:root {
    --bg: #f3f6f9;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --text: #1a202c;
    --text-soft: #718096;
    --border: #edf2f7;
    --primary: #18c895;
    --primary-gradient: linear-gradient(135deg, #18c895, #11a37c);
    --success: #10b981;
    --danger: #ef4444;
    --radius: 20px;
    --radius-lg: 32px;
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-glow: 0 12px 24px -6px rgba(15, 23, 42, 0.15);
    --sidebar-width: 260px;
    --account-drawer-width: 260px;
}

[data-theme="dark"] {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-soft: #334155;
    --text: #f8fafc;
    --text-soft: #94a3b8;
    --border: #334155;
    --primary: #18c895;
    --primary-gradient: linear-gradient(135deg, #18c895, #11a37c);
    color-scheme: dark;
}

i[data-lucide] {
    width: 20px;
    height: 20px;
    stroke-width: 2.5px;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    transition: background 0.3s, color 0.3s;
    font-size: 14px; /* Reduced from default */
}

.auth-wrap { 
    min-height: 100vh; 
    display: flex; 
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(24, 200, 149, 0.18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.12), transparent 30%),
        linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); 
    padding: 24px;
}

[data-theme="dark"] .auth-wrap {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

.auth-card {
    background: var(--surface);
    width: 100%;
    max-width: 940px;
    min-height: 520px;
    display: flex;
    border-radius: 28px;
    box-shadow: 0 30px 90px -30px rgba(2, 6, 23, 0.35);
    overflow: hidden;
    position: relative;
    z-index: 10;
    border: 1px solid rgba(148, 163, 184, 0.18);
}

.auth-card-info {
    flex: 1;
    background: linear-gradient(135deg, #18c895 0%, #11a37c 100%);
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
    border-right: 1px solid rgba(0,0,0,0.05);
}

.auth-card-info::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 10% 10%, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.auth-card-form {
    flex: 1.3;
    padding: 36px 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface);
}

.auth-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(24, 200, 149, 0.1);
    color: var(--primary);
    border: 1px solid rgba(24, 200, 149, 0.14);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.google-signin-shell {
    width: 100%;
    max-width: 360px;
    margin: 0 auto 14px;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.google-signin-target {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
}

@media (max-width: 920px) {
    .auth-wrap { 
        padding: 0;
        background:
            radial-gradient(circle at top, rgba(24, 200, 149, 0.16), transparent 28%),
            linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%); 
    }
    [data-theme="dark"] .auth-wrap {
        background:
            radial-gradient(circle at top, rgba(24, 200, 149, 0.14), transparent 28%),
            linear-gradient(180deg, #020617 0%, #0f172a 100%);
    }
    .auth-card {
        flex-direction: column;
        max-width: 100%;
        min-height: 100vh;
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
    .auth-card-info {
        display: none;
    }
    .auth-card-form {
        flex: 1;
        padding: 36px 20px 28px;
        justify-content: flex-start;
        padding-top: 56px;
        background:
            linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.86)),
            var(--surface);
        border-top-left-radius: 28px;
        border-top-right-radius: 28px;
        margin-top: -12px;
        box-shadow: 0 -12px 35px rgba(2, 6, 23, 0.08);
    }
    [data-theme="dark"] .auth-card-form {
        background:
            linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(2, 6, 23, 0.96)),
            var(--surface);
        box-shadow: 0 -12px 35px rgba(0, 0, 0, 0.36);
    }
    .auth-card-form .btn.primary { height: 52px; }
    .auth-card-form input,
    .auth-card-form select,
    .auth-card-form textarea {
        border-radius: 14px;
        background: rgba(248, 250, 252, 0.95);
    }
    [data-theme="dark"] .auth-card-form input,
    [data-theme="dark"] .auth-card-form select,
    [data-theme="dark"] .auth-card-form textarea {
        background: rgba(15, 23, 42, 0.92);
        color: var(--text);
        border-color: rgba(148, 163, 184, 0.14);
        -webkit-text-fill-color: var(--text);
    }
    [data-theme="dark"] .auth-card-form input:focus,
    [data-theme="dark"] .auth-card-form select:focus,
    [data-theme="dark"] .auth-card-form textarea:focus {
        background: var(--surface) !important;
    }
    [data-theme="dark"] .auth-card-form input::placeholder,
    [data-theme="dark"] .auth-card-form textarea::placeholder {
        color: var(--text-soft);
    }
    .auth-chip { margin-bottom: 14px; }
}

.sidebar {
    width: var(--sidebar-width); /* Slimmer sidebar */
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 20px 16px; /* Compact padding */
    position: fixed;
    top: 0; left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto; /* Enable scroll */
    overflow-x: hidden;
}

/* Custom Sleek Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 10px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: var(--text-soft); }

.main-content { margin-left: var(--sidebar-width); padding: 0; }

.hero-header {
    background: var(--primary-gradient);
    color: white;
    padding: 40px 40px 100px;
    position: relative;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 18px 48px -22px rgba(24, 200, 149, 0.42);
    overflow: hidden;
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hero-header .balance-label {
    font-size: 12px; /* Reduced */
    font-weight: 600;
    opacity: 0.8;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-header .balance-value {
    font-size: 36px; /* Reduced from 42px */
    font-weight: 800;
    margin: 0;
}

.content-body {
    padding: 0 40px 40px;
    margin-top: -60px;
    position: relative;
    z-index: 10;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 16px 40px -28px rgba(2, 6, 23, 0.24);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 50px -32px rgba(2, 6, 23, 0.28);
    border-color: rgba(24, 200, 149, 0.18);
}

[data-theme="dark"] .card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 28, 0.96));
    border-color: rgba(96, 113, 138, 0.34);
    box-shadow: 0 20px 46px -32px rgba(0, 0, 0, 0.78);
}

[data-theme="dark"] .card:hover {
    border-color: rgba(148, 163, 184, 0.26);
    box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.86);
}

.card.chart-card,
.settings-section,
.modal-content {
    position: relative;
    overflow: hidden;
}

.card.chart-card::before,
.settings-section::before,
.modal-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08), transparent 34%);
    pointer-events: none;
}

[data-theme="dark"] .card.chart-card::before,
[data-theme="dark"] .settings-section::before,
[data-theme="dark"] .modal-content::before {
    background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 42%);
}

.kpi-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: transform 0.2s;
    border: 0; /* No borders for KPI cards */
}
.kpi-card:hover { transform: translateY(-4px); }

.income-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.expense-gradient {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
}

[data-theme="dark"] .kpi-card .label {
    color: #cbd5e1;
}

[data-theme="dark"] .kpi-card .value {
    color: #f8fafc;
}

[data-theme="dark"] .income-gradient,
[data-theme="dark"] .expense-gradient {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(8, 15, 28, 0.96));
}

[data-theme="dark"] .income-gradient {
    box-shadow: inset 0 1px 0 rgba(74, 222, 128, 0.08), 0 18px 40px -32px rgba(0, 0, 0, 0.78);
}

[data-theme="dark"] .expense-gradient {
    box-shadow: inset 0 1px 0 rgba(248, 113, 113, 0.08), 0 18px 40px -32px rgba(0, 0, 0, 0.78);
}

[data-theme="dark"] .quick-menu-item {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 16px 30px -26px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .quick-menu-item:hover {
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.98), rgba(30, 41, 59, 0.96));
    border-color: rgba(24, 200, 149, 0.22);
}

[data-theme="dark"] .quick-menu-item span {
    color: #e2e8f0;
}

[data-theme="dark"] .quick-menu-item.wallets .icon-box { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
[data-theme="dark"] .quick-menu-item.budget .icon-box { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }
[data-theme="dark"] .quick-menu-item.debt .icon-box { background: rgba(239, 68, 68, 0.18); color: #fca5a5; }
[data-theme="dark"] .quick-menu-item.reports .icon-box { background: rgba(16, 185, 129, 0.18); color: #6ee7b7; }
[data-theme="dark"] .quick-menu-item.categories .icon-box { background: rgba(139, 92, 246, 0.18); color: #c4b5fd; }
[data-theme="dark"] .quick-menu-item.admin .icon-box { background: rgba(100, 116, 139, 0.2); color: #cbd5e1; }

.kpi-card .card-content { flex: 1; }
.kpi-card .label { font-size: 12px; color: var(--text-soft); font-weight: 600; }
.kpi-card .value { font-size: 22px; font-weight: 800; margin-top: 4px; }
.kpi-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.35);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px; /* Compact gap */
    padding: 10px 16px; /* Reduced vertical padding */
    border-radius: 10px;
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px; /* Smaller font */
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.nav-item i { flex-shrink: 0; width: 18px; height: 18px; } /* Precise icon size */
.nav-item:hover, .nav-item.active {
    background: var(--surface-soft);
    color: var(--primary);
}
.nav-item.active { background: #18c89515; }

.btn {
    border: 0;
    border-radius: var(--radius);
    padding: 10px 20px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn.primary { background: var(--primary); color: white; box-shadow: var(--shadow-glow); }
.btn.primary:hover { transform: scale(1.02); }
.btn.glass { 
    background: rgba(255, 255, 255, 0.15); 
    backdrop-filter: blur(8px); 
    -webkit-backdrop-filter: blur(8px); 
    color: white; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
}
.btn.glass:hover { background: rgba(255, 255, 255, 0.25); }

.header-actions {
    display: flex;
    gap: 12px;
}

input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: var(--text);
    font-family: inherit;
    transition: 0.2s;
}
input:focus { border-color: var(--primary); outline: 0; box-shadow: 0 0 0 3px rgba(24, 200, 149, 0.1); }

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.modal-header button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    transition: 0.2s;
    margin-right: -8px;
    margin-top: -8px;
}
.modal-header button:hover {
    background: var(--surface-soft);
}

.trans-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 18px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
    margin-bottom: 14px;
    box-shadow: 0 12px 26px -24px rgba(2, 6, 23, 0.18);
}

.trans-item:hover {
    background: white;
    transform: translateY(-1px);
    border-color: rgba(24, 200, 149, 0.16);
    box-shadow: 0 18px 30px -26px rgba(2, 6, 23, 0.2);
}

.trans-item:last-child { margin-bottom: 0; }
.trans-item .icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent !important;
    border: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: none;
}

[data-theme="dark"] .trans-item .icon {
    border-color: rgba(148, 163, 184, 0.1);
}

.history-header {
    padding: 4px 2px 0;
}

.transaction-table-shell {
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
    box-shadow: 0 18px 36px -30px rgba(2, 6, 23, 0.22);
}

[data-theme="dark"] .transaction-table-shell {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: 0 18px 36px -32px rgba(0, 0, 0, 0.55);
}

.transaction-table thead {
    background: var(--surface-soft);
}

[data-theme="dark"] .transaction-table thead {
    background: rgba(15, 23, 42, 0.95);
}

.transaction-table thead tr {
    border-bottom: 0 !important;
}

.transaction-table tbody tr {
    transition: background 0.2s ease, transform 0.2s ease;
}

.transaction-table tbody tr:hover {
    background: rgba(24, 200, 149, 0.04);
}

[data-theme="dark"] .transaction-table tbody tr:hover {
    background: rgba(24, 200, 149, 0.08);
}

.transaction-head {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.transaction-table td,
.transaction-table th {
    padding-top: 16px;
    padding-bottom: 16px;
}

.transaction-table td:first-child,
.transaction-table th:first-child {
    padding-left: 20px;
}

.transaction-table td:last-child,
.transaction-table th:last-child {
    padding-right: 20px;
}

.transaction-row .badge {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.45);
}

[data-theme="dark"] .transaction-row .badge {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.transaction-mobile-list {
    display: grid;
    gap: 14px;
}

.transaction-mobile-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 16px;
    padding: 12px 14px;
    box-shadow: 0 12px 24px -24px rgba(2, 6, 23, 0.18);
}

.transaction-mobile-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 9px;
}

.transaction-mobile-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.transaction-mobile-date {
    font-size: 12px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.2px;
}

.transaction-mobile-badge {
    align-self: flex-start;
    font-size: 9px;
    padding: 4px 8px;
    border-radius: 999px;
}

.transaction-mobile-amount {
    font-size: 14px;
    font-weight: 900;
    white-space: nowrap;
}

.transaction-mobile-desc {
    font-size: 12px;
    line-height: 1.35;
    color: var(--text-soft);
    margin-bottom: 9px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.transaction-mobile-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.transaction-mini-action {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: var(--surface);
    color: var(--primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 0.2s ease;
}

.transaction-mini-action i {
    width: 14px;
    height: 14px;
}

.transaction-mini-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 18px -16px rgba(2, 6, 23, 0.24);
}

.transaction-mini-action.danger {
    color: var(--danger);
}

[data-theme="dark"] .transaction-mobile-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 12px 24px -24px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .transaction-mobile-date {
    color: #f8fafc;
}

[data-theme="dark"] .transaction-mobile-desc {
    color: #94a3b8;
}

[data-theme="dark"] .transaction-mini-action {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
}

[data-theme="dark"] .trans-item {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 12px 26px -26px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .trans-item:hover {
    background: rgba(30, 41, 59, 0.98);
}

[data-theme="dark"] .trans-item .icon {
    background: transparent !important;
}

.admin-stat-card {
    position: relative;
    overflow: hidden;
}

.admin-stat-card::after {
    content: "";
    position: absolute;
    inset: auto -20% -40% auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}

[data-theme="dark"] .admin-stat-card::after {
    background: rgba(255,255,255,0.04);
}

.admin-stat-card .lucide {
    opacity: 0.18;
}

.admin-user-panel {
    border-radius: 28px;
    box-shadow: 0 18px 48px -32px rgba(2, 6, 23, 0.24);
}

[data-theme="dark"] .admin-user-panel {
    box-shadow: 0 18px 48px -34px rgba(0, 0, 0, 0.65);
}

.admin-user-panel-head {
    background: linear-gradient(180deg, rgba(248,250,252,0.98), rgba(241,245,249,0.96)) !important;
}

[data-theme="dark"] .admin-user-panel-head {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96)) !important;
}

.admin-user-table thead th {
    background: var(--surface-soft);
}

.admin-user-row:hover {
    background: rgba(24, 200, 149, 0.035) !important;
}

[data-theme="dark"] .admin-user-row:hover {
    background: rgba(24, 200, 149, 0.06) !important;
}

.user-mobile-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.95));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 14px 30px -26px rgba(2, 6, 23, 0.24);
}

[data-theme="dark"] .user-mobile-card {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 14px 30px -26px rgba(0, 0, 0, 0.55);
}

.admin-user-mobile-card {
    position: relative;
    overflow: hidden;
}

.admin-user-mobile-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(24,200,149,0.03), transparent 55%);
    pointer-events: none;
}

.drawer-shell {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-left: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: -22px 0 60px -40px rgba(2, 6, 23, 0.34);
}

[data-theme="dark"] .drawer-shell {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    border-left-color: rgba(148, 163, 184, 0.12);
    box-shadow: -22px 0 60px -40px rgba(0, 0, 0, 0.72);
}

.drawer-shell-header {
    padding: 28px 24px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94));
}

[data-theme="dark"] .drawer-shell-header {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    border-bottom-color: rgba(148, 163, 184, 0.1);
}

.drawer-shell-body {
    padding-top: 18px;
}

.drawer-profile {
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(248,250,252,0.95), rgba(255,255,255,0.92));
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 12px 28px -26px rgba(2, 6, 23, 0.2);
}

[data-theme="dark"] .drawer-profile {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.95));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 12px 28px -28px rgba(0, 0, 0, 0.55);
}

[data-theme="dark"] .drawer-menu-item {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.1);
}

[data-theme="dark"] .drawer-menu-item:hover {
    background: rgba(51, 65, 85, 0.96);
    box-shadow: 0 14px 26px -24px rgba(0, 0, 0, 0.55);
}

.drawer-profile-photo,
.drawer-profile-photo-placeholder {
    box-shadow: 0 10px 22px -18px rgba(2, 6, 23, 0.35);
}

.drawer-profile-name {
    font-weight: 800;
    font-size: 16px;
    line-height: 1.2;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.drawer-shell .drawer-menu-item + .drawer-menu-item {
    margin-top: 10px;
}

[data-theme="dark"] .log-item:hover {
    background: rgba(24, 200, 149, 0.05);
}

.badge {
    padding: 6px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Wallet Card Specifics */
.wallet-card h4 { font-size: 18px; }
.wallet-balance { font-size: 22px; }
.wallet-actions .btn { padding: 8px 16px; font-size: 14px; }
.wallet-actions .btn-icon { width: 44px; height: 44px; padding: 0; justify-content: center; }
.wallet-actions .btn-icon i { width: 20px; height: 20px; }
.wallet-icon-box { width: 40px; height: 40px; }

.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    padding: 12px 24px;
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

[data-theme="dark"] .bottom-nav { background: rgba(15, 23, 42, 0.9); }

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    flex: 1;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.bottom-nav-item.active { color: var(--primary); }

@media (max-width: 920px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .hero-header {
        padding: 30px 18px 78px;
        border-radius: 0 0 32px 32px;
        box-shadow: 0 18px 48px -26px rgba(24, 200, 149, 0.5);
    }
    [data-theme="dark"] .hero-header {
        box-shadow: 0 20px 54px -28px rgba(2, 6, 23, 0.7);
    }
    .bottom-nav { z-index: 850; }
    
    .hero-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .hero-header .balance-value { font-size: 26px; letter-spacing: -0.5px; }
    .hero-header .balance-label { font-size: 11px; letter-spacing: 0.5px; }
    .content-body { padding: 0 14px 120px; margin-top: -50px; }
    .bottom-nav { display: flex; }
    
    /* Header action adjustment */
    .hero-header .btn.primary { padding: 8px 14px; font-size: 13px; }
    
    .header-actions {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-top: 16px;
    }
    .header-actions .btn {
        width: auto;
        padding: 6px 14px;
        font-size: 11px;
        border-radius: 100px;
    }

    .card {
        padding: 18px;
        border-radius: 24px;
        box-shadow: 0 18px 40px -32px rgba(2, 6, 23, 0.2);
    }
    [data-theme="dark"] .card {
        box-shadow: 0 20px 44px -34px rgba(0, 0, 0, 0.65);
    }
    .card h3 { font-size: 16px; margin-bottom: 16px !important; }
    
    .kpi-card .value { font-size: 18px; }
    .kpi-card .label { font-size: 12px; }
    
    .trans-item div[style*="font-weight:700"] { font-size: 14px !important; }
    .trans-item div[style*="font-size:12px"] { font-size: 11px !important; }

    .kpi-grid { grid-template-columns: 1fr; gap: 16px; }
    .dashboard-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
    .desktop-only-btn { display: none !important; }
    
    .modal-overlay { align-items: flex-end; padding: 12px; }
    .modal-content { border-radius: 32px; padding: 32px 24px; }
    .modal-content h3 { font-size: 18px; }
    .modal-content input:not([type="checkbox"]):not([type="radio"]),
    .modal-content select,
    .modal-content textarea {
        padding: 14px 14px;
        border-radius: 16px;
        font-size: 15px;
        background: rgba(248, 250, 252, 0.98);
    }
    .modal-content .category-list-panel {
        padding: 12px !important;
        border-radius: 16px !important;
    }
    .modal-content .category-list-scroll {
        max-height: 210px !important;
        gap: 10px !important;
    }
    .modal-content .category-item {
        padding: 10px 12px !important;
        gap: 10px !important;
        border-radius: 12px !important;
        align-items: center !important;
    }
    .modal-content .category-item-body {
        display: flex;
        align-items: center;
        min-height: 40px;
    }
    .modal-content .category-item-title {
        font-size: 13px !important;
        line-height: 1.25;
    }
    .modal-content .category-item-action {
        padding: 6px !important;
        margin-top: 2px;
    }

    .settings-section {
        border-radius: 22px;
        padding: 20px;
    }

    .chart-card {
        padding: 20px;
        border-radius: 24px;
    }

    .quick-menu-grid {
        gap: 10px;
        margin: 20px 0 18px;
    }

    .quick-menu-item {
        padding: 14px 6px;
        border-radius: 18px;
    }

    .quick-menu-item .icon-box {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .quick-menu-item span {
        font-size: 10px;
    }

    .history-header {
        gap: 12px;
        margin-bottom: 20px !important;
    }

    .history-header h3 {
        font-size: 18px;
    }

    .transaction-table-shell {
        border-radius: 18px;
        box-shadow: 0 14px 30px -28px rgba(2, 6, 23, 0.24);
    }

    .transaction-table thead {
        display: none;
    }

    .transaction-table,
    .transaction-table tbody,
    .transaction-table tr,
    .transaction-table td {
        display: block;
        width: 100%;
    }

    .transaction-table tr {
        background: rgba(255,255,255,0.96);
        border: 1px solid rgba(148, 163, 184, 0.14) !important;
        border-radius: 18px;
        margin: 0 12px 12px;
        overflow: hidden;
        box-shadow: 0 12px 26px -26px rgba(2, 6, 23, 0.2);
    }

    [data-theme="dark"] .transaction-table tr {
        background: rgba(30, 41, 59, 0.98) !important;
        border-color: rgba(148, 163, 184, 0.12) !important;
        box-shadow: 0 12px 26px -26px rgba(0, 0, 0, 0.55);
    }

    .transaction-table tbody tr:last-child {
        margin-bottom: 12px;
    }

    .transaction-table td {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        font-size: 12px;
        white-space: normal;
        border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    }

    [data-theme="dark"] .transaction-table td {
        border-bottom-color: rgba(148, 163, 184, 0.08);
        color: #e2e8f0;
    }

    .transaction-table td::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.4px;
        text-transform: uppercase;
        color: var(--text-soft);
        flex: 0 0 auto;
    }

    [data-theme="dark"] .transaction-table td::before {
        color: #94a3b8;
    }

    .transaction-table td:last-child {
        justify-content: flex-end;
        border-bottom: 0;
    }

    .transaction-table td:last-child::before {
        display: none;
    }

    .transaction-table td:nth-child(1) { font-weight: 700; }
    .transaction-table td:nth-child(2) { align-items: center; }
    .transaction-table td:nth-child(3) { color: var(--text-soft); }
    .transaction-table td:nth-child(4) { font-weight: 900; }

    .transaction-table .badge {
        margin-left: auto;
    }

    .transaction-table-shell table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .history-header > div:first-child {
        width: 100%;
    }

    .history-header > div:last-child {
        width: 100%;
        justify-content: flex-start !important;
    }

    .admin-stat-card,
    .admin-stat-mini,
    .admin-user-panel {
        border-radius: 22px !important;
    }

    .admin-user-panel-head {
        padding: 16px 18px !important;
    }

    .user-mobile-card {
        padding: 14px;
        border-radius: 18px;
        margin-bottom: 10px;
    }

    .drawer-shell-header {
        padding: 24px 18px 16px;
    }

    .drawer-shell-body {
        padding-top: 14px;
    }

    .drawer-profile {
        border-radius: 18px;
        padding: 16px;
    }

    .drawer-menu-item {
        padding: 14px;
        border-radius: 14px;
        gap: 14px;
    }

    .drawer-shell {
        width: 88vw;
        max-width: 340px;
        box-shadow: -16px 0 40px rgba(2, 6, 23, 0.18);
    }

    .drawer-shell-header h2 {
        font-size: 18px;
    }

    .transaction-mobile-list {
        gap: 10px;
    }

    .transaction-mobile-card {
        border-radius: 16px;
        padding: 10px 12px;
        border: 1px solid rgba(148, 163, 184, 0.1);
        box-shadow: 0 14px 30px -28px rgba(2, 6, 23, 0.18);
    }

    [data-theme="dark"] .transaction-mobile-card {
        box-shadow: 0 18px 34px -30px rgba(0, 0, 0, 0.55);
    }

    .transaction-mobile-top {
        gap: 10px;
        margin-bottom: 6px;
    }

    .transaction-mobile-date {
        font-size: 11px;
    }

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

    .transaction-mobile-desc {
        font-size: 11px;
        margin-bottom: 8px;
        -webkit-line-clamp: 1;
    }

    .transaction-mini-action {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }
    
    table th, table td { white-space: nowrap; font-size: 12px; }

    /* Mobile Wallet Adjustments */
    .wallet-grid { gap: 16px !important; }
    .wallet-card { padding: 16px !important; }
    .wallet-card h4 { font-size: 15px !important; }
    .wallet-balance { font-size: 20px !important; }
    .wallet-icon-box { width: 32px !important; height: 32px !important; }
    .wallet-icon-box i { width: 16px !important; }
    .wallet-actions .btn { font-size: 12px !important; padding: 6px 12px !important; }
    .wallet-actions .btn-icon { width: 38px !important; height: 38px !important; }
    .wallet-actions .btn-icon i { width: 18px !important; height: 18px !important; }
}

/* Premium Wallet Cards */
.wallet-card-new {
    position: relative;
    border-radius: 28px;
    padding: 2px;
    background: linear-gradient(135deg, var(--card-color), #ffffff33);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.wallet-card-new.active {
    box-shadow: 0 20px 40px -10px var(--card-color);
    transform: translateY(-8px) scale(1.02);
}

.card-inner {
    background: linear-gradient(135deg, var(--card-color), var(--card-color));
    background-size: 200% 200%;
    border-radius: 26px;
    padding: 24px;
    height: 100%;
    position: relative;
    z-index: 1;
}

[data-theme="dark"] .wallet-card-new:not(.active) .card-inner {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(10px);
}

.card-chip {
    width: 40px;
    height: 30px;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    border-radius: 6px;
    margin-bottom: 20px;
    position: relative;
    opacity: 0.7;
}
.card-chip:after {
    content: '';
    position: absolute;
    top: 5px; left: 8px; right: 8px; bottom: 5px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 4px;
}

.wallet-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    border-radius: 14px;
    display: grid;
    place-items: center;
}

.btn-card-action {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 0;
    background: rgba(255,255,255,0.2);
    color: white;
    cursor: pointer;
    transition: 0.2s;
    display: grid;
    place-items: center;
}
.btn-card-action:hover {
    background: white;
    color: var(--card-color);
}
.btn-card-action.danger:hover {
    background: var(--danger);
    color: white;
}

@media (max-width: 920px) {
    .wallet-card-new { padding: 1px; border-radius: 20px; }
    .card-inner { padding: 16px; border-radius: 19px; }
    .wallet-balance { font-size: 20px !important; }
}

/* Sleek Midnight Wallet Cards (Flat Luxury) */
.wallet-card-new.compact { 
    border-radius: 20px; 
    background: none;
    box-shadow: none; /* Shadow removed */
}

.wallet-card-new.compact .card-inner { 
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%); /* Subtle midnight gradient */
    border-radius: 18px; 
    padding: 16px; 
    border: 0; /* Border removed */
    position: relative;
    overflow: hidden;
    box-shadow: none; /* Ensure no internal shadow */
}

[data-theme="dark"] .wallet-card-new.compact .card-inner {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.wallet-card-new.compact.active { 
    box-shadow: none; /* Active shadow removed */
    transform: translateY(-4px); /* Keep slight lift for feedback */
}

/* Subtle glow effect on active card icon instead of full shadow */
.wallet-card-new.compact.active .card-chip-mini {
    opacity: 0.9;
    box-shadow: 0 0 10px rgba(255,215,0,0.3);
}

/* Add a very subtle gradient overlay for texture */
.card-inner:before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    pointer-events: none;
}

.card-chip-mini {
    width: 32px;
    height: 22px;
    background: linear-gradient(135deg, #ffd700, #b8860b);
    border-radius: 4px;
    opacity: 0.5;
    position: relative;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.card-chip-mini:after {
    content: '';
    position: absolute;
    top: 3px; left: 5px; right: 5px; bottom: 3px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 2px;
}

.active-badge-mini {
    background: white;
    color: var(--text);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 800;
}

.btn-card-action-mini {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    border: 0;
    background: rgba(255,255,255,0.15);
    color: white;
    cursor: pointer;
    transition: 0.2s;
    display: grid;
    place-items: center;
}
.btn-card-action-mini i { width: 14px; height: 14px; }
.btn-card-action-mini:hover { background: white; color: var(--card-color); }
.btn-card-action-mini.danger:hover { background: var(--danger); color: white; }

.analytics-grid { margin-top: 10px; }
.chart-card { 
    padding: 24px; 
    overflow: hidden; 
}
.chart-card h3 {
    margin: 0 0 24px;
    font-weight: 800;
}
.apexcharts-canvas { margin: 0 auto; }

@media (max-width: 920px) {
    .analytics-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
}

/* Visibility Utilities */
.mobile-only { display: none !important; }
@media (max-width: 920px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block !important; }
    .hero-header { padding: 40px 24px 80px !important; }
}

/* User Mobile Cards */
.user-mobile-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: var(--surface-soft);
    border-radius: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.user-avatar {
    width: 44px;
    height: 44px;
    background: var(--primary-gradient);
    border-radius: 50%;
    color: white;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
}

/* Tap Feedback */
.btn:active, .nav-item:active, .bottom-nav-item:active {
    transform: scale(0.96);
    opacity: 0.8;
}

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

.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: 0.3s;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--surface);
    width: 100%; max-width: 500px;
    border-radius: 30px;
    padding: 30px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(30px);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 35px 90px -35px rgba(2, 6, 23, 0.45);
}
.modal-overlay.active .modal-content { transform: translateY(0); }

.modal-content .modal-header {
    position: relative;
    z-index: 1;
}

.modal-content input:not([type="checkbox"]):not([type="radio"]),
.modal-content select,
.modal-content textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: var(--text);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.modal-content textarea {
    resize: vertical;
    min-height: 92px;
}

.modal-content input:not([type="checkbox"]):not([type="radio"]):focus,
.modal-content select:focus,
.modal-content textarea:focus {
    border-color: rgba(24, 200, 149, 0.38);
    box-shadow: 0 0 0 4px rgba(24, 200, 149, 0.1);
    background: white;
}

.modal-content label {
    color: var(--text-soft);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.modal-content .btn.primary {
    box-shadow: 0 14px 26px -18px rgba(24, 200, 149, 0.55);
}

[data-theme="dark"] .modal-content {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 35px 90px -35px rgba(0, 0, 0, 0.72);
}

[data-theme="dark"] .modal-content input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] .modal-content select,
[data-theme="dark"] .modal-content textarea {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.14);
    color: #f8fafc;
}

[data-theme="dark"] .modal-content input:not([type="checkbox"]):not([type="radio"]):focus,
[data-theme="dark"] .modal-content select:focus,
[data-theme="dark"] .modal-content textarea:focus {
    background: rgba(30, 41, 59, 0.98);
    box-shadow: 0 0 0 4px rgba(24, 200, 149, 0.14);
}

[data-theme="dark"] .modal-content label {
    color: #cbd5e1;
}

.alert {
    padding: 16px; border-radius: 12px;
    margin-top: 10px; font-size: 14px; font-weight: 600;
}
.alert.error { background: #fee2e2; color: #991b1b; }
.alert.success { background: #dcfce7; color: #166534; }

/* Category Modal */
.category-modal-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.category-list-scroll {
    scrollbar-width: thin;
}

.category-item {
    transition: 0.2s ease;
}

.category-item:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
}

/* Account Drawer (Slide Right to Left) */
.account-drawer-overlay {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: var(--account-drawer-width);
    bottom: 0;
    background: rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 900;
    opacity: 0; visibility: hidden;
    transition: 0.3s opacity;
    pointer-events: none;
}
.account-drawer-overlay.active { 
    opacity: 1; 
    visibility: visible;
    pointer-events: auto;
    z-index: 900 !important;
}

.account-drawer {
    position: fixed;
    top: 0; right: -100%;
    width: var(--account-drawer-width);
    max-width: 85vw;
    height: 100vh;
    background: var(--surface);
    z-index: 1100;
    transition: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.account-drawer.active {
    right: 0 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    z-index: 1100 !important;
}

@media (max-width: 920px) {
    :root {
        --sidebar-width: 0px;
        --account-drawer-width: 85vw;
    }
    .account-drawer-overlay {
        left: 0;
        right: 0;
        z-index: 900;
    }
    .account-drawer {
        width: 85vw;
        max-width: 320px;
        z-index: 1100;
    }
}

.theme-toggle-header {
    transition: 0.2s;
}

@media (min-width: 920px) {
    .theme-toggle-header {
        display: none;
    }
}

.dashboard-header-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
}

@media (min-width: 920px) {
    .dashboard-header-wrap {
        width: auto;
        flex: 1;
    }
}

/* Settings Page Styles */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.settings-section {
    background: var(--surface);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    box-shadow: 0 14px 35px -28px rgba(2, 6, 23, 0.22);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.settings-section:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 200, 149, 0.16);
    box-shadow: 0 22px 44px -32px rgba(2, 6, 23, 0.24);
}

[data-theme="dark"] .settings-section {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.96));
    border-color: rgba(148, 163, 184, 0.12);
    box-shadow: 0 18px 38px -32px rgba(0, 0, 0, 0.62);
}

[data-theme="dark"] .settings-section:hover {
    border-color: rgba(24, 200, 149, 0.2);
    box-shadow: 0 24px 44px -32px rgba(0, 0, 0, 0.72);
}

.settings-header {
    margin-bottom: 20px;
}

.settings-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.settings-header p {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--text-soft);
}

.photo-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.photo-preview-big {
    width: 120px; height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary);
}

@media (min-width: 920px) {
    .settings-grid { grid-template-columns: 1fr 1fr; }
}
.account-drawer.active { right: 0; pointer-events: auto; }

.drawer-header {
    padding: 32px 24px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.profile-section {
    text-align: center;
    margin-bottom: 32px;
}

.profile-photo-wrap {
    width: 100px; height: 100px;
    margin: 0 auto 16px;
    position: relative;
    border-radius: 50%;
    background: var(--surface-soft);
    display: grid; place-items: center;
    border: 3px solid var(--primary);
}

.profile-photo-wrap img {
    width: 100%; height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.drawer-menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    margin-bottom: 8px;
    background: var(--surface-soft);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

[data-theme="dark"] .drawer-menu-item {
    background: rgba(30, 41, 59, 0.78);
    border-color: rgba(148, 163, 184, 0.1);
}

.drawer-menu-item:hover {
    background: white;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -22px rgba(2, 6, 23, 0.2);
    border-color: rgba(24, 200, 149, 0.16);
}

[data-theme="dark"] .drawer-menu-item:hover {
    background: rgba(51, 65, 85, 0.96);
    box-shadow: 0 14px 26px -24px rgba(0, 0, 0, 0.55);
}
.drawer-menu-item i { width: 18px; height: 18px; }
.drawer-menu-item-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,0.5); }
.drawer-menu-item-admin { background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94)); }
.drawer-menu-item-transactions { background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.94)); }
.drawer-menu-item.mobile-only { display: flex !important; }
.drawer-menu-item.danger { color: var(--danger); }

.log-item {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    font-size: 12px;
    border-radius: 12px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.log-item:hover {
    background: rgba(24, 200, 149, 0.03);
    transform: translateY(-1px);
}

[data-theme="dark"] .log-item:hover {
    background: rgba(24, 200, 149, 0.05);
}

@media (max-width: 420px) {
    .account-drawer { width: 85%; max-width: 300px; }
}

/* Quick Menu Grid */
.quick-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.quick-menu-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
    text-align: center;
    box-shadow: 0 16px 30px -24px rgba(2, 6, 23, 0.22);
}

.quick-menu-item:hover {
    transform: translateY(-2px);
    border-color: rgba(24, 200, 149, 0.18);
    box-shadow: 0 22px 42px -28px rgba(2, 6, 23, 0.24);
}

.quick-menu-item:active {
    transform: scale(0.95);
    background: var(--surface-soft);
}

.quick-menu-item .icon-box {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    margin-bottom: 4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.28);
}

.quick-menu-item span {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-soft);
    letter-spacing: -0.2px;
}

/* Specific item colors */
.quick-menu-item.wallets .icon-box { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.quick-menu-item.budget .icon-box { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.quick-menu-item.debt .icon-box { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.quick-menu-item.reports .icon-box { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.quick-menu-item.categories .icon-box { background: rgba(139, 92, 246, 0.1); color: #8b5cf6; }
.quick-menu-item.admin .icon-box { background: rgba(100, 116, 139, 0.1); color: #64748b; }

@media (min-width: 921px) {
    .quick-menu-grid { display: none; }
}

/* PWA Install Banner */
.install-banner {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    background: var(--primary-gradient);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

@media (max-width: 920px) {
    .install-banner {
        position: fixed;
        bottom: 80px; /* Above the bottom nav */
        top: auto;
        left: 12px;
        right: 12px;
        border-radius: 20px;
        margin-bottom: 12px;
    }
}
