/* OrganizaPay - Sistema de Gestão Financeira */
/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #F3F4F6;
    color: #111827;
    line-height: 1.6;
}

/* Container Principal */
.container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #1D4ED8;
    color: white;
    padding: 30px 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.logo h1 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo p {
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 40px;
}

.menu {
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 8px;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background: rgba(255, 255, 255, 0.2);
}

.menu-item .icon {
    margin-right: 12px;
    font-size: 20px;
}

/* User Info */
.user-info {
    display: flex;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 20px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    color: #1D4ED8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
    margin-right: 12px;
}

.user-details strong {
    display: block;
    font-size: 14px;
    margin-bottom: 3px;
}

.logout-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    text-decoration: none;
}

.logout-link:hover {
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.page-title h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
}

.filter-bar {
    display: flex;
    gap: 10px;
}

.filter-form select {
    padding: 10px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    background: white;
    color: #111827;
    cursor: pointer;
    transition: border 0.3s;
}

.filter-form select:focus {
    outline: none;
    border-color: #3B82F6;
}

/* Content Area */
.content-area {
    max-width: 1400px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cards-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.cards-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Card */
.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

.card h4 {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card com ícone */
.card-icon {
    font-size: 40px;
    margin-bottom: 15px;
}

.card-value {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    color: #111827;
}

.card small {
    color: #6B7280;
    font-size: 13px;
}

/* Cards específicos */
.card-entradas {
    border-left: 4px solid #16A34A;
}

.card-despesas {
    border-left: 4px solid #DC2626;
}

.card-saldo {
    border-left: 4px solid #3B82F6;
}

.card-saldo-positivo {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
}

.card-saldo-negativo {
    background: linear-gradient(135deg, #FEF2F2 0%, #FEE2E2 100%);
}

.card-saldo-zerado {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
}

.saldo-status-positivo {
    color: #16A34A !important;
    font-weight: 600;
}

.saldo-status-negativo {
    color: #DC2626 !important;
    font-weight: 600;
}

.saldo-status-zerado {
    color: #6B7280 !important;
    font-weight: 600;
}

/* Card Summary */
.card-summary h4 {
    font-size: 13px;
}

.summary-big {
    font-size: 28px;
    font-weight: 700;
    color: #1D4ED8;
    margin-top: 10px;
}

/* Chart */
.chart-card {
    margin-bottom: 30px;
}

.chart-container {
    margin-top: 20px;
}

.chart-bar {
    margin-bottom: 20px;
}

.chart-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #4B5563;
    font-size: 14px;
}

.chart-bar-container {
    background: #E5E7EB;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 15px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: width 0.5s;
}

.chart-bar-entradas {
    background: linear-gradient(90deg, #16A34A 0%, #22C55E 100%);
}

.chart-bar-despesas {
    background: linear-gradient(90deg, #DC2626 0%, #EF4444 100%);
}

/* Alertas */
.alert-card {
    background: #FEF3C7;
    border-left: 4px solid #F59E0B;
}

.alerts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.alert-item {
    padding: 15px;
    border-radius: 8px;
    background: white;
}

.alert-danger {
    border-left: 4px solid #DC2626;
}

.alert-warning {
    border-left: 4px solid #F59E0B;
}

.alert-item strong {
    display: block;
    margin-bottom: 5px;
    color: #111827;
    font-size: 14px;
}

.alert-item p {
    color: #4B5563;
    font-size: 13px;
}

/* Summary List */
.summary-list {
    margin: 20px 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #E5E7EB;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-value {
    font-weight: 600;
    color: #1D4ED8;
}

/* Action Bar */
.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #1D4ED8;
    color: white;
}

.btn-primary:hover {
    background: #1E40AF;
}

.btn-success {
    background: #16A34A;
    color: white;
}

.btn-success:hover {
    background: #15803D;
}

.btn-warning {
    background: #F59E0B;
    color: white;
}

.btn-warning:hover {
    background: #D97706;
}

.btn-outline {
    background: white;
    color: #1D4ED8;
    border: 2px solid #1D4ED8;
}

.btn-outline:hover {
    background: #1D4ED8;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    margin-top: 15px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 5px 8px;
    transition: transform 0.2s;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #F3F4F6;
}

.table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #E5E7EB;
    font-size: 14px;
}

.table tbody tr:hover {
    background: #F9FAFB;
}

.text-center {
    text-align: center;
}

.row-highlight-danger {
    background: #FEF2F2 !important;
}

.row-highlight-warning {
    background: #FFFBEB !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: #D1FAE5;
    color: #16A34A;
}

.badge-warning {
    background: #FEF3C7;
    color: #D97706;
}

.badge-danger {
    background: #FEE2E2;
    color: #DC2626;
}

.badge-info {
    background: #DBEAFE;
    color: #1D4ED8;
}

.badge-category {
    background: #E0E7FF;
    color: #4338CA;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: #111827;
}

.modal h3 {
    margin-bottom: 20px;
    font-size: 22px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3B82F6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Alert */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.alert-error {
    background: #FEE2E2;
    border-left: 4px solid #DC2626;
    color: #991B1B;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
}

.login-container {
    width: 100%;
    max-width: 460px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #1D4ED8;
    margin-bottom: 8px;
}

.login-header p {
    color: #6B7280;
    font-size: 14px;
}

/* Tabs Login/Cadastro */
.login-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid #E5E7EB;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: #1D4ED8;
}

.tab-btn.active {
    color: #1D4ED8;
    border-bottom-color: #1D4ED8;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 15px;
    font-family: 'Inter', sans-serif;
}

.login-form input:focus {
    outline: none;
    border-color: #3B82F6;
}

.login-register-link {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.login-register-link p {
    color: #6B7280;
    font-size: 14px;
    margin: 0;
}

.login-register-link a {
    color: #1D4ED8;
    text-decoration: none;
    font-weight: 600;
}

.login-register-link a:hover {
    color: #1E40AF;
    text-decoration: underline;
}

.alert-success {
    background: #D1FAE5;
    border-left: 4px solid #16A34A;
    color: #065F46;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #E5E7EB;
}

.login-footer p {
    color: #9CA3AF;
    font-size: 12px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .cards-grid,
    .cards-grid-2,
    .cards-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px;
    }
}