@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #090d16;
    --bg-secondary: rgba(17, 24, 39, 0.7);
    --bg-surface: rgba(31, 41, 55, 0.4);
    --bg-accent: rgba(16, 185, 129, 0.12);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --primary: #10b981;
    --primary-hover: #34d399;
    --primary-light: rgba(16, 185, 129, 0.12);
    
    --success: #10b981;
    --success-hover: #34d399;
    --success-light: rgba(16, 185, 129, 0.12);
    
    --danger: #f43f5e;
    --danger-hover: #fb7185;
    --danger-light: rgba(244, 63, 94, 0.12);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.6);
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.light-theme {
    --bg-primary: #f8fafc;
    --bg-secondary: rgba(255, 255, 255, 0.75);
    --bg-surface: #f1f5f9;
    --bg-accent: rgba(5, 150, 105, 0.08);
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --primary: #059669;
    --primary-hover: #047857;
    --primary-light: rgba(5, 150, 105, 0.12);
    
    --success: #059669;
    --success-hover: #047857;
    --success-light: rgba(5, 150, 105, 0.12);
    
    --danger: #dc2626;
    --danger-hover: #b91c1c;
    --danger-light: rgba(220, 38, 38, 0.12);
    
    --border-color: rgba(15, 23, 42, 0.08);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(14, 165, 233, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.03) 0%, transparent 45%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.light-theme body {
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(2, 132, 199, 0.03) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(5, 150, 105, 0.02) 0%, transparent 45%);
}

/* Auth Layout */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 20% 30%, rgba(14, 165, 233, 0.12), transparent 40%),
                radial-gradient(circle at 80% 70%, rgba(16, 185, 129, 0.08), transparent 40%),
                #050811;
}

.auth-wrapper::before, .auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
    opacity: 0.4;
}
.auth-wrapper::before {
    background: var(--primary);
    top: 10%;
    left: 15%;
    animation: pulseGlow 10s ease-in-out infinite alternate;
}
.auth-wrapper::after {
    background: var(--success);
    bottom: 10%;
    right: 15%;
    animation: pulseGlow 8s ease-in-out infinite alternate-reverse;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.3; }
    100% { transform: scale(1.2) translate(20px, -20px); opacity: 0.5; }
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 450px;
    padding: 48px 40px;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 10;
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.auth-header h1 span {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* App Main Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(11, 15, 25, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: var(--transition);
}

.brand {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.brand span span {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #34d399);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand svg {
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.4));
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link svg {
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.04);
}

.nav-link:hover svg {
    transform: translateX(2px);
    color: var(--primary);
}

.nav-link.active {
    border-left-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.nav-link.active svg {
    color: var(--primary);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.user-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.user-email {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: 260px;
    padding: 48px;
    background-color: transparent;
    min-height: 100vh;
}

.header-actions,
.dashboard-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 16px;
}

.page-title h2 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-title p {
    color: var(--text-secondary);
    font-size: 15px;
    margin-top: 4px;
}

/* Form Styles */
.form-group {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 14px 18px;
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    width: 100%;
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(31, 41, 55, 0.6);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 40px;
}

select.form-control option {
    background-color: #0b0f19;
    color: var(--text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #6ee7b7);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), var(--danger-hover));
    color: white;
    box-shadow: 0 4px 14px rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger-hover), #fda4af);
    box-shadow: 0 6px 20px rgba(244, 63, 94, 0.4);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

/* Alerts */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 14px;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.alert-danger {
    background-color: rgba(244, 63, 94, 0.08);
    border: 1px solid rgba(244, 63, 94, 0.25);
    color: #fda4af;
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #a7f3d0;
}

/* Grid & Dashboard Cards */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.card-summary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.card-summary:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-summary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
}

.card-summary.balance::before { background: linear-gradient(to bottom, var(--primary), transparent); }
.card-summary.income::before { background: linear-gradient(to bottom, var(--success), transparent); }
.card-summary.expense::before { background: linear-gradient(to bottom, var(--danger), transparent); }
.card-summary.movements::before { background: linear-gradient(to bottom, #6366f1, transparent); }

.card-content h3 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.card-content .amount {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.card-icon {
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.card-icon.balance { color: var(--primary); filter: drop-shadow(0 0 8px rgba(14, 165, 233, 0.3)); }
.card-icon.income { color: var(--success); filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.3)); }
.card-icon.expense { color: var(--danger); filter: drop-shadow(0 0 8px rgba(244, 63, 94, 0.3)); }

/* Dashboard Section Layout */
.section-grid {
    display: grid;
    grid-template-columns: 1.8fr 1.2fr;
    gap: 24px;
}

.dashboard-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.panel-header h3 {
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.2px;
}

.panel-link {
    font-size: 14px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.panel-link:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.table th {
    padding: 14px 16px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.table td {
    padding: 16px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
    color: var(--text-primary);
    transition: var(--transition);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-income {
    background-color: var(--success-light);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-expense {
    background-color: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(244, 63, 94, 0.2);
}

/* Actions in Table */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.action-btn:hover {
    color: var(--text-primary);
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.action-btn.delete:hover {
    color: var(--danger);
    background-color: var(--danger-light);
    border-color: rgba(244, 63, 94, 0.3);
}

/* Filter Form */
.filter-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 32px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.filter-form {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 20px;
    align-items: end;
}

/* Charts Container */
.chart-container {
    position: relative;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(5, 8, 16, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-card {
    background-color: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

/* Utility classes */
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }

/* Responsive adjustments */
.mobile-header {
    display: none;
    background-color: rgba(11, 15, 25, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
}

.mobile-header .brand {
    margin-bottom: 0;
    font-size: 20px;
}

.menu-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.menu-toggle svg {
    stroke: var(--text-primary);
}

.menu-toggle:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 1024px) {
    .section-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .mobile-header {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 101;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: var(--shadow-lg);
        background: rgba(11, 15, 25, 0.95);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 32px 20px;
    }

    .filter-form {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .header-actions,
    .dashboard-header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .header-actions .btn {
        width: 100%;
    }

    .hide-on-mobile {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .page-title h2 {
        font-size: 24px;
    }

    .auth-card {
        padding: 36px 24px;
    }
    
    .card-summary {
        padding: 20px;
    }
    
    .card-content .amount {
        font-size: 24px;
    }
    
    .table th, .table td {
        padding: 12px 8px;
        font-size: 13px;
    }
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .config-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Spinner */
.spinner {
    width: 18px;
    height: 18px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print styling */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        font-family: 'Outfit', sans-serif;
        font-size: 11px;
        margin: 0;
        padding: 0;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .sidebar, .no-print, .menu-toggle, .mobile-header, .sidebar-overlay, .main-content, .app-container {
        display: none !important;
    }

    .print-invoice-container {
        position: static !important;
        left: auto !important;
        top: auto !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        height: auto !important;
        overflow: visible !important;
        display: block !important;
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        padding: 10px 20px;
        box-sizing: border-box;
    }

    .invoice-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 35px;
    }
    
    .invoice-logo {
        display: flex;
        align-items: center;
    }
    
    .company-details {
        text-align: right;
        font-size: 10px;
        line-height: 1.4;
        color: #475569;
    }

    .invoice-details-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 30px;
    }
    
    .client-details {
        font-size: 11px;
        line-height: 1.4;
    }
    
    .details-label {
        color: #64748b;
        text-transform: uppercase;
        font-size: 9px;
        font-weight: 600;
        display: inline-block;
        margin-bottom: 4px;
    }
    
    .invoice-meta {
        text-align: right;
    }
    
    .meta-grid {
        font-size: 11px;
        color: #475569;
        line-height: 1.4;
    }

    .invoice-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 25px;
        margin-top: 10px;
    }
    
    .invoice-table th {
        border-top: 2px solid #0f172a;
        border-bottom: 2px solid #0f172a;
        padding: 10px 4px;
        font-size: 10px;
        font-weight: 700;
        text-align: left;
        color: #0f172a;
        text-transform: uppercase;
    }
    
    .invoice-table td {
        border-bottom: 1px solid #e2e8f0;
        padding: 12px 4px;
        font-size: 11px;
        vertical-align: top;
    }
    
    .text-right {
        text-align: right !important;
    }

    .invoice-summary {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 40px;
    }
    
    .summary-table {
        width: 260px;
        border-collapse: collapse;
    }
    
    .summary-table td {
        padding: 8px 4px;
        font-size: 11px;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .summary-table tr.total-row td {
        font-size: 13px;
        font-weight: 700;
        border-top: 2px solid #0f172a;
        border-bottom: 2px solid #0f172a;
        color: #0f172a;
        padding: 12px 4px;
    }

    .invoice-note {
        font-size: 10px;
        color: #64748b;
        line-height: 1.4;
        margin-top: 50px;
    }

    .invoice-footer {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
    }
    
    .footer-line {
        border-top: 2px solid #0f172a;
        margin-bottom: 8px;
    }
    
    .footer-content {
        display: flex;
        justify-content: space-between;
        font-size: 9px;
        color: #475569;
        align-items: center;
    }
    
    .page-num {
        background-color: #0f172a;
        color: #ffffff;
        padding: 2px 6px;
        font-weight: 700;
        font-size: 10px;
    }
}

/* ==========================================
   SPLIT LOGIN PAGE STYLES (MATCHES REFERENCE)
   ========================================== */
.login-split-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    background-color: #ffffff;
    overflow-x: hidden;
    flex-direction: row-reverse;
}

.login-left-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background-color: #ffffff;
    z-index: 10;
    min-height: 100vh;
}

.login-right-panel {
    flex: 1;
    background-color: #043f2e; /* Sleek dark green base */
    background-image: url('../images/login_illustration.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Glassmorphism overlays on right panel for premium look */
.login-right-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(4, 79, 56, 0.15), rgba(4, 63, 46, 0.6));
    pointer-events: none;
}

.login-form-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}

.login-wallet-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #e6fdf5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px auto;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
    transition: transform 0.3s ease;
}

.login-wallet-badge:hover {
    transform: scale(1.05);
}

.login-brand-title {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.login-brand-title span {
    color: #10b981;
}

.login-subtitle {
    font-size: 15px;
    color: #6b7280;
    text-align: center;
    margin-bottom: 36px;
    font-weight: 400;
}

/* Customized Input Fields with Icons inside */
.login-input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.login-input-group svg.input-icon-left {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.3s ease;
}

.login-input-group svg.input-icon-right {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.3s ease;
}

.login-input-group svg.input-icon-right:hover {
    color: #4b5563;
}

.login-input-field {
    width: 100%;
    height: 54px;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 0 48px 0 52px;
    font-size: 15px;
    color: #111827;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Outfit', sans-serif;
}

.login-input-field:focus {
    outline: none;
    border-color: #10b981;
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.login-input-field:focus + svg.input-icon-left {
    color: #10b981;
}

.login-input-field::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Actions Row (Remember me & Forgot Password) */
.login-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    font-size: 14px;
}

.login-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #4b5563;
    cursor: pointer;
    user-select: none;
}

.login-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1.5px solid #d1d5db;
    accent-color: #10b981;
    cursor: pointer;
}

.login-forgot-link {
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.login-forgot-link:hover {
    color: #059669;
    text-decoration: underline;
}

/* Submit Button */
.login-btn-submit {
    width: 100%;
    height: 54px;
    background-color: #10b981;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
    font-family: 'Outfit', sans-serif;
}

.login-btn-submit:hover {
    background-color: #059669;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.login-btn-submit:active {
    transform: translateY(1px);
}

/* Bottom Registration Link */
.login-footer-text {
    text-align: center;
    margin-top: 28px;
    font-size: 14px;
    color: #4b5563;
}

.login-footer-text a {
    color: #10b981;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-footer-text a:hover {
    color: #059669;
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .login-split-container {
        background-color: #ffffff;
    }
    .login-left-panel {
        flex: 1;
        width: 100%;
        padding: 40px 24px;
        background-color: #ffffff;
    }
    .login-right-panel {
        display: none;
    }
}

/* Alert overrides for white background panel */
.login-left-panel .alert-danger {
    background-color: #fef2f2;
    border: 1px solid #fee2e2;
    color: #b91c1c;
}

.login-left-panel .alert-success {
    background-color: #f0fdf4;
    border: 1px solid #dcfce7;
    color: #15803d;
}

/* ==========================================
   NEW PREMIUM DASHBOARD & SIDEBAR COMPONENTS
   ========================================== */
/* Sidebar Premium Card */
.sidebar-premium-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
    border: 1px solid rgba(16, 185, 129, 0.15);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 16px 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.sidebar-premium-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

.premium-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(251, 191, 36, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
}

.sidebar-premium-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-premium-card p {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.btn-premium-action {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background-color: var(--primary);
    color: #ffffff;
    text-decoration: none;
    text-align: center;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-premium-action:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.25);
}

/* User Card with Avatar in Sidebar */
.user-profile-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    margin: 12px 0 4px 0;
    transition: var(--transition);
}

.user-profile-card:hover {
    background-color: rgba(255, 255, 255, 0.04);
}

.user-avatar-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.user-card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}

.user-card-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-card-email {
    font-size: 10px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-card-chevron {
    color: var(--text-muted);
}

/* Header actions extension */
.header-right-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.date-range-picker {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.date-range-picker:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.icon-circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    position: relative;
    cursor: pointer;
    transition: var(--transition);
}

.icon-circle-btn:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-hover);
}

.notification-badge-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--danger);
}

.header-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    object-fit: cover;
}

.header-user-avatar:hover {
    border-color: var(--primary);
}

/* Card metrics customization */
.card-trend-up, .card-trend-down {
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-trend-up {
    color: #10b981;
}

.card-trend-down {
    color: #f43f5e;
}

.card-subtext {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 400;
    margin-left: 2px;
}

/* Middle Row Panels structure */
.section-grid.middle-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 991px) {
    .section-grid.middle-row {
        grid-template-columns: 1fr;
    }
}

.chart-panel-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Custom categories legend */
.legend-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    max-height: 250px;
    overflow-y: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    padding: 4px 0;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legend-right {
    display: flex;
    gap: 16px;
    font-weight: 600;
}

.legend-amount {
    color: var(--text-primary);
}

.legend-percentage {
    color: var(--text-muted);
    width: 32px;
    text-align: right;
}

/* Bottom Grid (3 Columns layout) */
.section-grid.bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 24px;
    margin-bottom: 40px;
}

@media (max-width: 1199px) {
    .section-grid.bottom-row {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 768px) {
    .section-grid.bottom-row {
        grid-template-columns: 1fr;
    }
}

/* Circular Icon transaction items */
.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.transaction-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.transaction-left {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.transaction-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon-badge.income {
    background-color: rgba(16, 185, 129, 0.08);
    color: #10b981;
}

.transaction-icon-badge.expense {
    background-color: rgba(244, 63, 94, 0.08);
    color: #f43f5e;
}

.transaction-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.transaction-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.transaction-category {
    font-size: 11px;
    color: var(--text-secondary);
}

.transaction-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.transaction-amount {
    font-size: 13px;
    font-weight: 700;
}

.transaction-amount.income {
    color: #10b981;
}

.transaction-amount.expense {
    color: var(--text-primary); /* Mockup shows regular white text with negative sign, let's format it dynamically */
}

.transaction-date {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Monthly budget widgets with progress bars */
.budget-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 12px;
}

.budget-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.budget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.budget-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.budget-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}

.budget-label {
    font-weight: 600;
    color: var(--text-primary);
}

.budget-amounts {
    color: var(--text-primary);
    font-weight: 600;
}

.budget-amounts span {
    color: var(--text-muted);
    font-weight: 400;
}

.budget-progress-bg {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.budget-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.8s ease;
}

.budget-footer {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.budget-footer span.percentage {
    font-weight: 600;
    color: var(--text-secondary);
}

/* Goal Tracker widget */
.goal-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
}

.goal-image {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background-color: var(--bg-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.goal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.goal-details {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.goal-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.goal-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.goal-progress-bar-bg {
    flex-grow: 1;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    overflow: hidden;
}

.goal-progress-fill {
    height: 100%;
    background-color: #10b981;
    border-radius: 2px;
}

.goal-percentage {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.goal-days-left {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Quick summary list */
.quick-summary-table {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
}

.quick-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.quick-summary-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.quick-summary-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.quick-summary-value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}

/* User Profile Dropdown white styling */
.user-profile-menu {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
}

.user-menu-item {
    padding: 10px 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
    border-radius: var(--radius-sm);
    margin: 0;
    height: auto;
    box-shadow: none;
    color: #334155 !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.user-menu-item:hover {
    background-color: #f1f5f9 !important;
}

.user-menu-item svg {
    color: #475569 !important;
    stroke: currentColor;
}

.user-menu-item.logout-btn {
    color: #ef4444 !important;
}

.user-menu-item.logout-btn:hover {
    background-color: #fef2f2 !important;
}

.user-menu-item.logout-btn svg {
    color: #ef4444 !important;
}

/* Light Theme Sidebar Overrides */
.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.light-theme .nav-link:hover {
    background-color: rgba(15, 23, 42, 0.04) !important;
    color: var(--text-primary) !important;
}

.light-theme .user-profile-card {
    background-color: rgba(15, 23, 42, 0.02) !important;
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
}

.light-theme .user-profile-card:hover {
    background-color: rgba(15, 23, 42, 0.04) !important;
}

.light-theme .user-profile-card .user-card-name {
    color: var(--text-primary) !important;
}

.light-theme .user-profile-card .user-card-email {
    color: var(--text-secondary) !important;
}

.light-theme .user-profile-card .user-card-chevron {
    color: var(--text-muted) !important;
}

/* Light Theme Card Overrides for Dashboard panels to look premium white */
.light-theme .dashboard-panel,
.light-theme .card-summary {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
}

.light-theme .card-summary .amount {
    color: #0f172a !important;
}

.light-theme .goal-widget {
    background-color: #f8fafc !important;
    border: 1px solid rgba(15, 23, 42, 0.06) !important;
}

.light-theme .budget-progress-bg,
.light-theme .goal-progress-bar-bg {
    background-color: #e2e8f0 !important;
}

/* Light Theme Header & Modal Overrides */
.light-theme .page-title h2 {
    background: linear-gradient(to right, #0f172a, #334155) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.light-theme .modal-overlay {
    background-color: rgba(15, 23, 42, 0.4) !important;
}

.light-theme .modal-card {
    background-color: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.light-theme .modal-header h3 {
    color: #0f172a !important;
}

.light-theme .modal-close {
    color: #64748b !important;
}

.light-theme .modal-close:hover {
    color: #0f172a !important;
}

.light-theme .form-control:focus {
    background-color: #ffffff !important;
    border-color: var(--primary) !important;
}

.light-theme select.form-control option {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

.light-theme .btn-secondary:hover {
    background-color: #e2e8f0 !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
}

/* Direct Logout Button Styling */
.logout-btn-direct {
    color: var(--danger) !important;
    background-color: var(--danger-light) !important;
    border: 1px solid rgba(244, 63, 94, 0.15) !important;
    transition: var(--transition);
}

.logout-btn-direct:hover {
    background-color: var(--danger) !important;
    color: #ffffff !important;
    border-color: var(--danger) !important;
}



