/* =============================================
   FinTrack — style.css v3.0
   Dark Mode Modern — Gelap, Elegan, Animasi
   ============================================= */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Syne:wght@700;800&display=swap');

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    /* ── Dark Base ── */
    --bg:        #080c14;
    --surface:   #0d1117;
    --surface2:  #131b27;
    --surface3:  #1a2436;

    /* ── Borders ── */
    --border:    rgba(99,140,210,0.10);
    --border2:   rgba(99,140,210,0.18);

    /* ── Text ── */
    --text:      #e8edf5;
    --text2:     #8b98b1;
    --muted:     #4a5568;

    /* ── Accent — Cyan / Electric ── */
    --accent:    #00d4ff;
    --accent-h:  #00bce0;
    --accent-bg: rgba(0, 212, 255, 0.08);
    --accent2:   #7c3aed;

    /* ── Glow Colors ── */
    --glow-accent: rgba(0, 212, 255, 0.25);
    --glow-success: rgba(34, 197, 94, 0.2);
    --glow-danger:  rgba(239, 68, 68, 0.2);

    /* ── Semantic ── */
    --danger:    #ef4444;
    --warning:   #f59e0b;
    --success:   #22c55e;
    --info:      #60a5fa;

    /* ── Layout ── */
    --radius:    14px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --shadow:    0 4px 24px rgba(0,0,0,0.5), 0 1px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 12px 48px rgba(0,0,0,0.6), 0 4px 16px rgba(0,0,0,0.4);
    --shadow-glow: 0 0 24px var(--glow-accent);

    /* Sidebar */
    --sidebar-w: 252px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: 'Space Grotesk', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Animated background grid ── */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* ── Ambient glow orbs ── */
body::after {
    content: '';
    position: fixed;
    top: -200px; left: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0,212,255,0.04) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: orbFloat 20s ease-in-out infinite;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0); }
    33%       { transform: translate(80px, 40px); }
    66%       { transform: translate(-40px, 80px); }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: none; color: var(--accent-h); }
img { max-width: 100%; height: auto; display: block; }

/* ── Layout ── */
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ── Sidebar ── */
.sidebar {
    width: var(--sidebar-w);
    min-height: 100vh;
    background: linear-gradient(180deg, #0d1117 0%, #0a0f1a 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: left 0.28s cubic-bezier(0.4,0,0.2,1);
    backdrop-filter: blur(20px);
}

/* ── Sidebar shimmer top line ── */
.sidebar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: shimmerLine 3s ease-in-out infinite;
}

@keyframes shimmerLine {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 1; }
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 22px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-logo-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--accent), #0077ff);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; color: #000; flex-shrink: 0;
    box-shadow: 0 0 20px var(--glow-accent);
    animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { box-shadow: 0 0 20px var(--glow-accent); }
    50%       { box-shadow: 0 0 35px var(--glow-accent), 0 0 60px rgba(0,212,255,0.1); }
}

.sidebar-logo-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800; font-size: 18px; letter-spacing: -0.5px;
    background: linear-gradient(135deg, #fff, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.sidebar-logo-sub { font-size: 10.5px; color: var(--muted); margin-top: 1px; letter-spacing: 0.2px; }

.nav-section { padding: 16px 12px 0; }
.nav-label {
    font-size: 9px; color: var(--muted); letter-spacing: 2px;
    text-transform: uppercase; font-weight: 700; padding: 0 10px 8px;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 13.5px; color: var(--text2);
    margin-bottom: 2px; font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none !important; position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: linear-gradient(135deg, var(--accent), #0077ff);
    border-radius: 0 3px 3px 0;
    transition: width 0.2s;
}

.nav-item:hover {
    background: var(--surface2);
    color: var(--text);
    transform: translateX(3px);
    text-decoration: none;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0,212,255,0.12), rgba(0,119,255,0.06));
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(0,212,255,0.15);
}

.nav-item.active::before { width: 3px; }
.nav-item.active i { color: var(--accent); }
.nav-item i { font-size: 17px; flex-shrink: 0; opacity: 0.7; transition: opacity 0.2s; }
.nav-item:hover i, .nav-item.active i { opacity: 1; }

/* ── Animate ALL nav items — CSS custom property stagger ── */
.nav-item:nth-child(1)  { --nav-i: 0; }
.nav-item:nth-child(2)  { --nav-i: 1; }
.nav-item:nth-child(3)  { --nav-i: 2; }
.nav-item:nth-child(4)  { --nav-i: 3; }
.nav-item:nth-child(5)  { --nav-i: 4; }
.nav-item:nth-child(6)  { --nav-i: 5; }
.nav-item:nth-child(7)  { --nav-i: 6; }
.nav-item:nth-child(8)  { --nav-i: 7; }
.nav-item:nth-child(9)  { --nav-i: 8; }
.nav-item:nth-child(10) { --nav-i: 9; }
.nav-item:nth-child(11) { --nav-i: 10; }
.nav-item:nth-child(12) { --nav-i: 11; }
.nav-item:nth-child(13) { --nav-i: 12; }
.nav-item:nth-child(14) { --nav-i: 13; }
.nav-item:nth-child(15) { --nav-i: 14; }
.nav-item:nth-child(16) { --nav-i: 15; }
.nav-item:nth-child(17) { --nav-i: 16; }
.nav-item:nth-child(18) { --nav-i: 17; }
.nav-item:nth-child(19) { --nav-i: 18; }
.nav-item:nth-child(20) { --nav-i: 19; }
.nav-item {
    animation: slideInLeft 0.38s cubic-bezier(0.4,0,0.2,1) both;
    animation-delay: calc(0.04s + var(--nav-i, 0) * 0.042s);
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-14px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Sidebar Footer ── */
.sidebar-footer{
    margin-top:auto;
    padding:14px 12px;
    border-top:1px solid var(--border);
}

.user-card{
    display:flex;
    flex-direction:column;
    gap:12px;

    padding:14px;
    width:100%;

    border-radius:14px;
    border:1px solid rgba(245,158,11,.18);

    background:
        linear-gradient(
            135deg,
            rgba(245,158,11,.06),
            rgba(245,158,11,.02)
        );

    transition:.25s;
}

.user-card:hover{
    border-color:rgba(245,158,11,.35);
    background:
        linear-gradient(
            135deg,
            rgba(245,158,11,.10),
            rgba(245,158,11,.04)
        );
}

.user-card > a:first-child,
.user-card > div:first-child{
    display:flex;
    align-items:center;
    gap:12px;
    width:100%;
    min-width:0;
}

.avatar{
    width:44px;
    height:44px;
    min-width:44px;

    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    background:
        linear-gradient(
            135deg,
            var(--accent),
            #0077ff
        );

    color:#000;
    font-size:14px;
    font-weight:700;

    box-shadow:
        0 0 18px rgba(0,212,255,.35);
}

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

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.user-role{
    font-size:11px;
    color:var(--muted);

    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.user-card .nav-item{
    width:100%;
    margin:0;
    justify-content:center;
}
.user-card .sidebar-logout-btn,
.user-card .nav-item{
    min-height:40px;
    border-radius:10px;
}

.user-card .nav-item i{
    font-size:16px;
}

/* ── Main ── */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; position: relative; z-index: 1; }

/* ── Topbar ── */
.topbar {
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 14px;
    background: rgba(13,17,23,0.85);
    backdrop-filter: blur(20px);
    position: sticky; top: 0; z-index: 50;
}

.topbar-title {
    font-family: 'Syne', sans-serif;
    font-size: 18px; font-weight: 700; flex: 1; letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--text), var(--text2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ── Buttons ── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px; border-radius: var(--radius-sm);
    border: 1px solid transparent; cursor: pointer;
    font-size: 13px; font-weight: 600; font-family: 'Space Grotesk', sans-serif;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1); white-space: nowrap; text-decoration: none !important;
    position: relative; overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}
.btn:hover::after { opacity: 1; }

.btn i { font-size: 15px; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), #0077ff);
    color: #000; font-weight: 700;
    box-shadow: 0 0 16px rgba(0,212,255,0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0,212,255,0.45);
    color: #000; text-decoration: none;
}

.btn-accent {
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    color: #fff; border-color: rgba(124,58,237,0.4);
    box-shadow: 0 0 16px rgba(124,58,237,0.25);
}
.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(124,58,237,0.4);
    color: #fff; text-decoration: none;
}

.btn-success { background: linear-gradient(135deg, var(--success), #16a34a); color: #fff; }
.btn-success:hover { filter: brightness(1.1); color: #fff; text-decoration: none; transform: translateY(-1px); }

.btn-danger {
    background: transparent; color: var(--danger);
    border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover {
    background: rgba(239,68,68,0.08);
    border-color: rgba(239,68,68,0.5);
    text-decoration: none;
}

.btn-ghost {
    background: transparent; color: var(--text2);
    border: 1px solid var(--border2);
}
.btn-ghost:hover {
    background: var(--surface2); color: var(--text); text-decoration: none;
    border-color: var(--border2);
}

.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 6px; }
.btn-block { width: 100%; justify-content: center; padding: 11px; }

/* ── Content ── */
.content { flex: 1; overflow-y: auto; padding: 26px 28px; }

/* ── Cards ── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
    animation: fadeUp 0.4s both;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,212,255,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.card:hover {
    border-color: rgba(0,212,255,0.2);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.08);
}

.card:hover::before { opacity: 1; }

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

.card-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 18px;
}
.card-title {
    font-family: 'Syne', sans-serif;
    font-size: 14px; font-weight: 700; letter-spacing: -0.2px;
    color: var(--text);
}
.card-action {
    font-size: 12px; color: var(--accent); cursor: pointer; font-weight: 600;
    transition: all 0.2s;
}
.card-action:hover { text-decoration: none; text-shadow: 0 0 8px var(--accent); }

/* ── Stat Cards ── */
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 22px; }

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    position: relative; overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1), box-shadow 0.3s;
    cursor: default;
    animation: fadeUp 0.5s both;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top right, var(--glow-color, transparent) 0%, transparent 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.stat-card:hover { transform: translateY(-4px); }
.stat-card:hover::after { opacity: 1; }

.stat-card.income  { border-top: 2px solid var(--success); --glow-color: rgba(34,197,94,0.08); }
.stat-card.income:hover  { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(34,197,94,0.2), 0 0 30px rgba(34,197,94,0.1); }
.stat-card.expense { border-top: 2px solid var(--danger); --glow-color: rgba(239,68,68,0.08); }
.stat-card.expense:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(239,68,68,0.2), 0 0 30px rgba(239,68,68,0.1); }
.stat-card.balance { border-top: 2px solid var(--info); --glow-color: rgba(96,165,250,0.08); }
.stat-card.balance:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(96,165,250,0.2), 0 0 30px rgba(96,165,250,0.1); }
.stat-card.savings { border-top: 2px solid var(--accent2); --glow-color: rgba(124,58,237,0.08); }
.stat-card.savings:hover { box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(124,58,237,0.2), 0 0 30px rgba(124,58,237,0.1); }

/* ── Stagger stat cards ── */
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.15s; }
.stat-card:nth-child(3) { animation-delay: 0.20s; }
.stat-card:nth-child(4) { animation-delay: 0.25s; }

.stat-label {
    font-size: 10.5px; color: var(--muted); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600;
}
.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 22px; font-weight: 700; line-height: 1.15; color: var(--text);
}
.stat-change { font-size: 11.5px; margin-top: 8px; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.stat-change.up     { color: var(--success); }
.stat-change.down   { color: var(--danger); }
.stat-change.neutral{ color: var(--muted); }
.stat-icon { position: absolute; right: 16px; top: 20px; font-size: 28px; opacity: 0.05; }

/* ── Quick Actions ── */
.quick-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin-bottom: 22px; }

.quick-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px 10px;
    text-align: center; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    text-decoration: none !important; display: block;
    position: relative; overflow: hidden;
}

.quick-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, var(--accent-bg) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.quick-btn:hover {
    border-color: rgba(0,212,255,0.25);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    text-decoration: none;
}
.quick-btn:hover::before { opacity: 1; }

.quick-btn i { font-size: 24px; display: block; margin-bottom: 7px; transition: transform 0.3s; }
.quick-btn:hover i { transform: scale(1.2) rotate(-5deg); }
.quick-btn span { font-size: 12px; color: var(--text2); font-weight: 600; letter-spacing: 0.3px; }

/* ── Transaction Items ── */
.tx-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    transition: all 0.2s;
}
.tx-item:last-child { border-bottom: none; }
.tx-item:hover {
    background: var(--surface2); margin: 0 -10px; padding: 10px;
    border-radius: var(--radius-sm); border-bottom-color: transparent;
    transform: translateX(4px);
}

.tx-icon { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.tx-info { flex: 1; min-width: 0; }
.tx-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.tx-amount { font-size: 13.5px; font-weight: 700; white-space: nowrap; }
.tx-amount.income  { color: var(--success); }
.tx-amount.expense { color: var(--danger); }

/* ── Budget Items ── */
.budget-item { margin-bottom: 20px; }
.budget-header { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 7px; align-items: center; }
.budget-name  { font-weight: 600; }
.budget-meta  { color: var(--muted); font-size: 12px; }

/* ── Progress Bar ── */
.progress-track { height: 6px; background: var(--surface3); border-radius: 10px; overflow: hidden; }
.progress-fill {
    height: 100%; border-radius: 10px;
    transition: width 1s cubic-bezier(0.4,0,0.2,1);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: progressShimmer 2s ease-in-out infinite;
}

@keyframes progressShimmer {
    0%   { left: -100%; }
    100% { left: 200%; }
}

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 16px; }
.form-group.full { grid-column: 1/-1; }
.form-label {
    display: block; font-size: 11px; color: var(--muted);
    margin-bottom: 7px; text-transform: uppercase; letter-spacing: 1px; font-weight: 700;
}
.form-input, .form-select, .form-textarea {
    width: 100%;
    background: var(--surface2);
    border: 1.5px solid var(--border2);
    border-radius: var(--radius-sm); padding: 10px 13px;
    color: var(--text); font-size: 13.5px; font-family: 'Space Grotesk', sans-serif;
    outline: none; transition: all 0.2s;
    color-scheme: dark;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,212,255,0.12), 0 0 16px rgba(0,212,255,0.08);
    background: var(--surface3);
}
.form-select { cursor: pointer; }
.form-select option { background: var(--surface2); color: var(--text); }
.form-textarea { resize: vertical; min-height: 88px; }
.form-hint { font-size: 11.5px; color: var(--muted); margin-top: 5px; }

/* ── Alerts ── */
.alert {
    padding: 12px 16px; border-radius: var(--radius-sm);
    font-size: 13.5px; margin-bottom: 18px;
    display: flex; align-items: flex-start; gap: 10px;
    font-weight: 500;
    animation: alertSlideIn 0.4s cubic-bezier(0.4,0,0.2,1);
}

@keyframes alertSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.alert i { font-size: 17px; flex-shrink: 0; margin-top: 1px; }
.alert-success { background: rgba(34,197,94,0.1); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.alert-danger  { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.alert-warning { background: rgba(245,158,11,0.1); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }

/* ── Table ── */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
    font-size: 10px; text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--muted); font-weight: 700; padding: 10px 14px;
    text-align: left; border-bottom: 1px solid var(--border);
    white-space: nowrap; background: var(--surface2);
}
td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface2); transition: background 0.2s; }
.td-icon { display: flex; align-items: center; gap: 10px; }

/* ── Badges ── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px; border-radius: 20px;
    font-size: 10.5px; font-weight: 700; white-space: nowrap;
    letter-spacing: 0.3px;
}
.badge-success { background: rgba(34,197,94,0.12); color: #4ade80; border: 1px solid rgba(34,197,94,0.2); }
.badge-danger  { background: rgba(239,68,68,0.12); color: #f87171; border: 1px solid rgba(239,68,68,0.2); }
.badge-warning { background: rgba(245,158,11,0.12); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-info    { background: rgba(96,165,250,0.12); color: #93c5fd; border: 1px solid rgba(96,165,250,0.2); }
.badge-purple  { background: rgba(124,58,237,0.12); color: #a78bfa; border: 1px solid rgba(124,58,237,0.2); }
.badge-muted   { background: var(--surface3); color: var(--muted); border: 1px solid var(--border2); }

/* ── Tab Group ── */
.tab-group {
    display: flex; gap: 2px; background: var(--surface2);
    border-radius: var(--radius-sm); padding: 3px;
    border: 1px solid var(--border);
}
.tab-btn {
    flex: 1; padding: 7px 10px; border-radius: 6px; border: none;
    background: transparent; color: var(--muted); font-size: 13px;
    cursor: pointer; font-family: 'Space Grotesk', sans-serif; font-weight: 600;
    transition: all 0.2s;
}
.tab-btn.active {
    background: var(--surface3); color: var(--accent);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* ── Auth ── */
.auth-wrap {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 24px; background: var(--bg);
    position: relative;
}

/* Animated auth background */
.auth-wrap::before {
    content: '';
    position: fixed; inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,212,255,0.05) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(124,58,237,0.05) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(0,119,255,0.04) 0%, transparent 50%);
    animation: authGlow 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes authGlow {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius-lg); padding: 44px 40px;
    width: 100%; max-width: 420px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(0,212,255,0.06);
    position: relative; z-index: 1;
    animation: authCardIn 0.5s cubic-bezier(0.4,0,0.2,1);
}

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

.auth-logo { text-align: center; margin-bottom: 28px; }
.auth-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--accent), #0077ff);
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px; font-size: 28px; color: #000;
    box-shadow: 0 0 30px rgba(0,212,255,0.35);
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-4px); box-shadow: 0 8px 40px rgba(0,212,255,0.4); }
}

.auth-title {
    font-family: 'Syne', sans-serif;
    font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.auth-sub { font-size: 13.5px; color: var(--muted); text-align: center; }
.auth-footer { text-align: center; font-size: 13px; color: var(--muted); margin-top: 22px; }
.auth-footer a { color: var(--accent); font-weight: 600; }

/* ── Google OAuth Button ── */
.btn-google {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border-radius: 10px;
    border: 1.5px solid var(--border2);
    background: var(--card);
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
    margin-bottom: 4px;
}
.btn-google:hover {
    background: var(--hover);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
}

.divider {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border2), transparent);
    margin: 22px 0;
}

/* ── Empty State ── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-state i { font-size: 40px; display: block; margin-bottom: 12px; opacity: 0.2; }
.empty-state p { font-size: 13.5px; line-height: 1.6; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,212,255,0.3); }

/* ── Filter Bar ── */
.filter-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-bar .form-input,
.filter-bar .form-select { height: 38px; padding: 7px 12px; }
.filter-bar .form-input  { max-width: 220px; }

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 18px; }
.page-btn {
    width: 34px; height: 34px; border-radius: 8px;
    border: 1px solid var(--border2); background: transparent;
    color: var(--text2); font-size: 13px; cursor: pointer; font-family: 'Space Grotesk', sans-serif;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
    font-weight: 600;
}
.page-btn:hover  { background: var(--surface2); color: var(--text); border-color: var(--accent); }
.page-btn.active { background: var(--accent); color: #000; border-color: var(--accent); box-shadow: 0 0 12px rgba(0,212,255,0.4); }

/* ── Grid Layouts ── */
.grid-2     { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 22px; }
.grid-3     { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; margin-bottom: 22px; }
.grid-3-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 18px; margin-bottom: 22px; }

/* ── Section ── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title  { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 12px; color: var(--muted); margin-bottom: 18px; display: flex; align-items: center; gap: 6px; }
.breadcrumb a { color: var(--accent); font-weight: 500; }
.breadcrumb span { color: var(--text); font-weight: 500; }

/* ── Donut / Legend ── */
.donut-wrap   { display: flex; align-items: center; gap: 18px; }
.donut-legend { flex: 1; }
.legend-item  { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; font-size: 12.5px; }
.legend-dot   { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-name  { flex: 1; color: var(--muted); }
.legend-pct   { font-weight: 700; font-size: 13px; }

/* ── Show/Hide Password ── */
.input-password-wrap { position: relative; display: flex; align-items: center; }
.input-password-wrap .form-input { padding-right: 42px; width: 100%; }
.btn-toggle-password {
    position: absolute; right: 11px;
    background: none; border: none; cursor: pointer;
    color: var(--muted); font-size: 17px;
    display: flex; align-items: center; padding: 0;
    transition: color 0.2s;
}
.btn-toggle-password:hover { color: var(--accent); }

/* ── Hamburger ── */
.hamburger-btn {
    display: none;
    background: none; border: none; cursor: pointer;
    color: var(--text); font-size: 21px;
    padding: 4px 7px; border-radius: var(--radius-sm);
    transition: all 0.2s;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.hamburger-btn:hover { background: var(--surface2); color: var(--accent); }

/* ── Sidebar Overlay ── */
.sidebar-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 99;
    backdrop-filter: blur(4px);
}
.sidebar-overlay.active { display: block; }

/* ── Bottom Navigation ── */
.bottom-nav { display: none; }

/* ── Theme Toggle ── */
.theme-toggle {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 50%;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text2); font-size: 18px;
    transition: all 0.2s; flex-shrink: 0;
}
.theme-toggle:hover {
    background: var(--surface3);
    color: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(0,212,255,0.3);
    transform: rotate(20deg);
}

/* ── Loading Skeleton ── */
@keyframes skeletonPulse {
    0%, 100% { opacity: 0.5; }
    50%       { opacity: 0.8; }
}

/* ── Sidebar Logout ── */
.sidebar-logout-btn {
    background: rgba(239,68,68,0.07);
    border: 1px solid rgba(239,68,68,0.15);
    color: var(--danger) !important;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}
.sidebar-logout-btn:hover {
    background: rgba(239,68,68,0.14) !important;
    border-color: rgba(239,68,68,0.35) !important;
    color: var(--danger) !important;
    transform: translateX(3px) !important;
}

/* ── Responsive — Tablet ── */
@media (max-width: 1024px) {
    .stats-grid    { grid-template-columns: repeat(2,1fr); }
    .grid-3        { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(4,1fr); }
}

/* ── Responsive — Mobile ── */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px; top: 0;
        height: 100vh; width: 240px;
        z-index: 100;
        transition: left 0.3s cubic-bezier(0.4,0,0.2,1);
        box-shadow: none;
    }
    .sidebar.sidebar-open {
        left: 0;
        box-shadow: 8px 0 48px rgba(0,0,0,0.6);
    }
    .hamburger-btn  { display: flex; }
    .topbar         { padding: 10px 14px; gap: 8px; position: sticky; top: 0; z-index: 50; }
    .topbar-title   { font-size: 15px; flex: 1; }
    .topbar-actions { gap: 5px; }
    .btn-label      { display: none; }
    .user-label     { display: none; }
    .topbar .avatar { width: 28px !important; height: 28px !important; font-size: 10px !important; }
    .topbar .btn-primary { padding: 7px 10px; font-size: 13px; }

    .content { padding: 14px 12px; }

    .stats-grid    { grid-template-columns: 1fr 1fr !important; gap: 10px; margin-bottom: 14px; }
    .grid-2        { grid-template-columns: 1fr; gap: 12px; margin-bottom: 14px; }
    .grid-3        { grid-template-columns: 1fr; gap: 12px; }
    .grid-3-col    { grid-template-columns: 1fr 1fr; gap: 10px; }
    .form-grid     { grid-template-columns: 1fr; gap: 0; }
    .quick-actions { grid-template-columns: repeat(4,1fr); gap: 8px; margin-bottom: 14px; }

    .stat-card     { padding: 12px 10px 10px; }
    .stat-value    { font-size: 17px; }
    .stat-label    { font-size: 9.5px; }
    .stat-change   { font-size: 10.5px; }
    .stat-icon     { display: none; }

    .card          { padding: 14px; border-radius: 12px; }
    .card-header   { margin-bottom: 12px; }
    .card-title    { font-size: 13.5px; }

    .quick-btn     { padding: 12px 6px; }
    .quick-btn i   { font-size: 20px; }
    .quick-btn span{ font-size: 10px; }

    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 10px; }
    table       { min-width: 480px; }
    th, td      { padding: 9px 11px; }

    .filter-bar              { flex-direction: column; align-items: stretch; gap: 8px; }
    .filter-bar .form-input  { max-width: 100%; width: 100%; }
    .filter-bar .form-select { width: 100%; }
    .filter-bar .btn         { width: 100%; justify-content: center; }

    div[style*="max-width:660px"],
    div[style*="max-width:560px"] { max-width: 100% !important; }

    /* Bottom Nav */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 90;
        background: rgba(13,17,23,0.95);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--border);
        padding: 6px 4px;
        padding-bottom: calc(6px + env(safe-area-inset-bottom));
        box-shadow: 0 -8px 32px rgba(0,0,0,0.5);
    }
    .bnav-item {
        flex: 1; display: flex; flex-direction: column;
        align-items: center; justify-content: center;
        gap: 3px; padding: 6px 2px;
        color: var(--muted);
        font-size: 9.5px; font-weight: 600;
        text-decoration: none !important;
        border-radius: var(--radius-sm);
        transition: color 0.2s;
        -webkit-tap-highlight-color: transparent;
    }
    .bnav-item i    { font-size: 21px; line-height: 1; }
    .bnav-item:hover, .bnav-item.active { color: var(--accent); text-decoration: none !important; }

    .bnav-add {
        flex: 0 0 54px; width: 54px; height: 54px;
        margin-top: -20px;
        background: linear-gradient(135deg, var(--accent), #0077ff) !important;
        border-radius: 50%;
        border: 3px solid var(--bg);
        color: #000 !important;
        box-shadow: 0 4px 20px rgba(0,212,255,0.4);
        transition: transform 0.2s !important;
    }
    .bnav-add i    { font-size: 22px !important; color: #000 !important; }
    .bnav-add span { display: none; }
    .bnav-add:active { transform: scale(0.92); }
}

/* ── Small Mobile ── */
@media (max-width: 480px) {
    .content    { padding: 10px; }
    .card       { padding: 12px; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 8px; }
    .stat-value { font-size: 15px !important; }
    .stat-label { font-size: 9px; }
    .stat-change{ font-size: 10px; }
    .auth-card  { padding: 24px 18px; border-radius: var(--radius); }
    .auth-title { font-size: 21px; }
    .quick-actions { gap: 6px; }
    .quick-btn     { padding: 10px 4px; }
    .quick-btn i   { font-size: 18px; }
    .quick-btn span{ font-size: 9.5px; }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="month"],
    select, textarea { font-size: 16px !important; }
}

/* ── Utilities ── */
.mb-0  { margin-bottom: 0 !important; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mt-auto { margin-top: auto; }
.text-muted   { color: var(--muted); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-accent  { color: var(--accent); }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.w-full       { width: 100%; }

/* ── Light Mode Override ── */
[data-theme="light"] {
    /* ── Warm Ivory + Slate — Refined Editorial Palette ── */
    --bg:        #f7f5f0;
    --surface:   #ffffff;
    --surface2:  #f2efe9;
    --surface3:  #e8e4db;

    --border:    rgba(60,50,40,0.08);
    --border2:   rgba(60,50,40,0.14);

    --text:      #1a1714;
    --text2:     #5c5650;
    --muted:     #9c958c;

    /* Teal accent — sophisticated contrast against warm ivory */
    --accent:    #0d7a6e;
    --accent-h:  #0b6960;
    --accent-bg: rgba(13,122,110,0.07);
    --accent2:   #7c3aed;

    --glow-accent:  rgba(13,122,110,0.18);
    --glow-success: rgba(22,163,74,0.15);
    --glow-danger:  rgba(220,38,38,0.12);

    --danger:    #c0392b;
    --warning:   #c07b2b;
    --success:   #1a7a4a;
    --info:      #1a5fa8;

    --shadow:    0 1px 4px rgba(60,50,40,0.06), 0 4px 16px rgba(60,50,40,0.06);
    --shadow-md: 0 8px 32px rgba(60,50,40,0.10), 0 2px 8px rgba(60,50,40,0.06);
    --shadow-glow: 0 0 20px rgba(13,122,110,0.15);

    --sidebar-w: 252px;
}

/* ── Light body — warm grain texture ── */
[data-theme="light"] body {
    background: #f7f5f0;
}

[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(13,122,110,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(13,122,110,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
}

[data-theme="light"] body::after { display: none; }

/* ── Sidebar — warm white with left gold border ── */
[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #faf8f4 100%) !important;
    border-right: 1px solid rgba(60,50,40,0.1) !important;
    box-shadow: 2px 0 24px rgba(60,50,40,0.06);
}

[data-theme="light"] .sidebar::before { display: none; }

/* Logo icon — teal gradient */
[data-theme="light"] .sidebar-logo-icon {
    background: linear-gradient(135deg, var(--accent), #0b5a52) !important;
    box-shadow: 0 4px 16px rgba(13,122,110,0.25) !important;
    animation: logoPulseLight 4s ease-in-out infinite !important;
}

@keyframes logoPulseLight {
    0%, 100% { box-shadow: 0 4px 16px rgba(13,122,110,0.25); }
    50%       { box-shadow: 0 6px 28px rgba(13,122,110,0.4), 0 0 40px rgba(13,122,110,0.12); }
}

/* Logo text — dark warm */
[data-theme="light"] .sidebar-logo-text {
    background: linear-gradient(135deg, #1a1714, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Nav items */
[data-theme="light"] .nav-item {
    color: #5c5650;
}
[data-theme="light"] .nav-item:hover {
    background: rgba(13,122,110,0.06);
    color: var(--accent);
}
[data-theme="light"] .nav-item.active {
    background: linear-gradient(135deg, rgba(13,122,110,0.10), rgba(13,122,110,0.05)) !important;
    color: var(--accent) !important;
    border-color: rgba(13,122,110,0.18) !important;
    box-shadow: inset 0 0 20px rgba(13,122,110,0.04);
}
[data-theme="light"] .nav-item.active i { color: var(--accent) !important; }
[data-theme="light"] .nav-item.active::after {
    background: var(--accent) !important;
    box-shadow: 0 0 8px rgba(13,122,110,0.4) !important;
}

[data-theme="light"] .nav-label { color: #b0a898; }

/* ── Topbar — frosted warm white ── */
[data-theme="light"] .topbar {
    background: rgba(255,255,255,0.88) !important;
    backdrop-filter: blur(24px) saturate(1.4) !important;
    -webkit-backdrop-filter: blur(24px) saturate(1.4) !important;
    border-bottom: 1px solid rgba(60,50,40,0.08) !important;
    box-shadow: 0 1px 0 rgba(60,50,40,0.06), 0 4px 20px rgba(60,50,40,0.04);
}

[data-theme="light"] .topbar-title {
    background: linear-gradient(135deg, #1a1714, #3d3730);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Cards — warm white with subtle warmth ── */
[data-theme="light"] .card {
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(60,50,40,0.06), 0 4px 16px rgba(60,50,40,0.05) !important;
    border-color: rgba(60,50,40,0.08) !important;
}
[data-theme="light"] .card:hover {
    box-shadow: 0 8px 32px rgba(60,50,40,0.10), 0 0 0 1px rgba(13,122,110,0.12) !important;
    border-color: rgba(13,122,110,0.15) !important;
}
[data-theme="light"] .card::before {
    background: linear-gradient(90deg, transparent, rgba(13,122,110,0.35), rgba(11,90,82,0.25), transparent) !important;
}
[data-theme="light"] .card::after {
    background: radial-gradient(
        circle at var(--mouse-x,50%) var(--mouse-y,50%),
        rgba(13,122,110,0.04) 0%, transparent 60%
    ) !important;
}

/* ── Stat cards — clean with colored top border ── */
[data-theme="light"] .stat-card {
    background: linear-gradient(145deg, #ffffff, #faf8f5) !important;
    box-shadow: 0 2px 8px rgba(60,50,40,0.06), 0 0 0 1px rgba(60,50,40,0.06) !important;
}
[data-theme="light"] .stat-card:hover {
    box-shadow: 0 8px 28px rgba(60,50,40,0.12), 0 0 0 1px rgba(60,50,40,0.08) !important;
}
[data-theme="light"] .stat-card.income:hover  { box-shadow: 0 8px 28px rgba(22,163,74,0.12), 0 0 0 1px rgba(22,163,74,0.12) !important; }
[data-theme="light"] .stat-card.expense:hover { box-shadow: 0 8px 28px rgba(192,57,43,0.10), 0 0 0 1px rgba(192,57,43,0.1) !important; }
[data-theme="light"] .stat-card.balance:hover { box-shadow: 0 8px 28px rgba(26,95,168,0.10), 0 0 0 1px rgba(26,95,168,0.1) !important; }
[data-theme="light"] .stat-card.savings:hover { box-shadow: 0 8px 28px rgba(124,58,237,0.10), 0 0 0 1px rgba(124,58,237,0.1) !important; }

[data-theme="light"] .stat-label { color: #9c958c; }
[data-theme="light"] .stat-value { color: #1a1714; }
[data-theme="light"] .stat-icon  { opacity: 0.07; color: #1a1714; }

/* ── Buttons ── */
[data-theme="light"] .btn-primary {
    background: linear-gradient(135deg, var(--accent), #0b5a52) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(13,122,110,0.3);
}
[data-theme="light"] .btn-primary:hover {
    color: #fff !important;
    box-shadow: 0 8px 24px rgba(13,122,110,0.4) !important;
}
[data-theme="light"] .btn-ghost {
    background: rgba(60,50,40,0.04);
    border-color: rgba(60,50,40,0.12);
    color: #5c5650;
}
[data-theme="light"] .btn-ghost:hover {
    background: rgba(13,122,110,0.06);
    border-color: rgba(13,122,110,0.2);
    color: var(--accent);
}

/* ── Quick action buttons ── */
[data-theme="light"] .quick-btn {
    background: linear-gradient(145deg, #ffffff, #faf8f5) !important;
    box-shadow: 0 2px 8px rgba(60,50,40,0.06) !important;
    border-color: rgba(60,50,40,0.08) !important;
}
[data-theme="light"] .quick-btn:hover {
    border-color: rgba(13,122,110,0.2) !important;
    box-shadow: 0 6px 20px rgba(60,50,40,0.1) !important;
}
[data-theme="light"] .quick-btn span { color: #5c5650 !important; }

/* ── Alerts ── */
[data-theme="light"] .alert-success { background: rgba(26,122,74,0.07); color: #145f3a; border-color: rgba(26,122,74,0.2); }
[data-theme="light"] .alert-danger  { background: rgba(192,57,43,0.07); color: #922b21; border-color: rgba(192,57,43,0.18); }
[data-theme="light"] .alert-warning { background: rgba(192,123,43,0.07); color: #875c1a; border-color: rgba(192,123,43,0.2); }

/* ── Badges ── */
[data-theme="light"] .badge-success { background: rgba(26,122,74,0.09);  color: #145f3a; border-color: rgba(26,122,74,0.2); }
[data-theme="light"] .badge-danger  { background: rgba(192,57,43,0.09);  color: #922b21; border-color: rgba(192,57,43,0.2); }
[data-theme="light"] .badge-warning { background: rgba(192,123,43,0.09); color: #875c1a; border-color: rgba(192,123,43,0.2); }
[data-theme="light"] .badge-info    { background: rgba(26,95,168,0.08);  color: #1a5fa8; border-color: rgba(26,95,168,0.2); }
[data-theme="light"] .badge-purple  { background: rgba(124,58,237,0.08); color: #6d28d9; border-color: rgba(124,58,237,0.2); }
[data-theme="light"] .badge-muted   { background: rgba(60,50,40,0.06);   color: #9c958c; border-color: rgba(60,50,40,0.12); }

/* ── Forms ── */
[data-theme="light"] .form-input,
[data-theme="light"] .form-select,
[data-theme="light"] .form-textarea {
    background: #ffffff;
    border-color: rgba(60,50,40,0.16);
    color: #1a1714;
    color-scheme: light;
}
[data-theme="light"] .form-input::placeholder,
[data-theme="light"] .form-textarea::placeholder { color: #b0a898; }
[data-theme="light"] .form-input:focus,
[data-theme="light"] .form-select:focus,
[data-theme="light"] .form-textarea:focus {
    border-color: var(--accent);
    background: rgba(13,122,110,0.02);
    box-shadow: 0 0 0 3px rgba(13,122,110,0.12);
}
[data-theme="light"] .form-label { color: #7a726a; }
[data-theme="light"] .form-hint  { color: #b0a898; }

/* ── Tables ── */
[data-theme="light"] th { background: #f2efe9; color: #9c958c; border-color: rgba(60,50,40,0.08); }
[data-theme="light"] td { border-color: rgba(60,50,40,0.06); color: #1a1714; }
[data-theme="light"] tr:hover td { background: rgba(13,122,110,0.03) !important; }

/* ── Pagination ── */
[data-theme="light"] .page-btn { border-color: rgba(60,50,40,0.12); color: #5c5650; }
[data-theme="light"] .page-btn:hover { background: rgba(13,122,110,0.06); border-color: var(--accent); color: var(--accent); }
[data-theme="light"] .page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 12px rgba(13,122,110,0.3); }

/* ── Avatar ── */
[data-theme="light"] .avatar {
    background: linear-gradient(135deg, var(--accent), #0b5a52) !important;
    box-shadow: 0 2px 12px rgba(13,122,110,0.25) !important;
    color: #fff !important;
}

/* ── Sidebar footer user card ── */
[data-theme="light"] .user-card { border-color: rgba(60,50,40,0.08); }
[data-theme="light"] .user-card:hover { background: rgba(13,122,110,0.04); }
[data-theme="light"] .user-name { color: #1a1714; }
[data-theme="light"] .user-role { color: #9c958c; }

/* ── Sidebar logout ── */
[data-theme="light"] .sidebar-logout-btn {
    background: rgba(192,57,43,0.05);
    border-color: rgba(192,57,43,0.15);
    color: var(--danger) !important;
}
[data-theme="light"] .sidebar-logout-btn:hover {
    background: rgba(192,57,43,0.1) !important;
    border-color: rgba(192,57,43,0.3) !important;
}

/* ── Auth page ── */
[data-theme="light"] .auth-wrap { background: #f7f5f0; }
[data-theme="light"] .auth-wrap::before {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(13,122,110,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(124,58,237,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(13,95,100,0.05) 0%, transparent 50%);
    opacity: 1;
}
[data-theme="light"] .auth-card {
    background: #ffffff;
    border-color: rgba(60,50,40,0.10);
    box-shadow: 0 20px 60px rgba(60,50,40,0.10), 0 4px 16px rgba(60,50,40,0.06);
}
[data-theme="light"] .auth-icon {
    background: linear-gradient(135deg, var(--accent), #0b5a52);
    box-shadow: 0 8px 24px rgba(13,122,110,0.3);
}
[data-theme="light"] .auth-title {
    background: linear-gradient(135deg, #1a1714, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
[data-theme="light"] .auth-sub { color: #9c958c; }

/* ── Google button ── */
[data-theme="light"] .btn-google {
    background: #ffffff;
    border-color: rgba(60,50,40,0.14);
    color: #1a1714;
    box-shadow: 0 1px 4px rgba(60,50,40,0.06);
}
[data-theme="light"] .btn-google:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(13,122,110,0.12);
}

/* ── Scrollbar ── */
[data-theme="light"] ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent), #0b5a52);
    opacity: 0.4;
}

/* ── Tab group ── */
[data-theme="light"] .tab-group { background: #f2efe9; border-color: rgba(60,50,40,0.1); }
[data-theme="light"] .tab-btn { color: #9c958c; }
[data-theme="light"] .tab-btn.active { background: #ffffff; color: var(--accent); box-shadow: 0 2px 8px rgba(60,50,40,0.08); }

/* ── Progress bar ── */
[data-theme="light"] .progress-track { background: rgba(60,50,40,0.08) !important; }

/* ── Transaction items ── */
[data-theme="light"] .tx-item:hover {
    background: linear-gradient(135deg, rgba(13,122,110,0.04), rgba(60,50,40,0.03)) !important;
}
[data-theme="light"] .tx-name { color: #1a1714; }
[data-theme="light"] .tx-date { color: #9c958c; }

/* ── Theme toggle ── */
[data-theme="light"] .theme-toggle {
    background: rgba(60,50,40,0.06);
    border-color: rgba(60,50,40,0.12);
    color: #5c5650;
}
[data-theme="light"] .theme-toggle:hover {
    background: rgba(13,122,110,0.08);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(13,122,110,0.2);
}

/* ── Bottom nav ── */
[data-theme="light"] .bottom-nav {
    background: rgba(255,255,255,0.95) !important;
    border-top: 1px solid rgba(60,50,40,0.08) !important;
    box-shadow: 0 -4px 20px rgba(60,50,40,0.06) !important;
}
[data-theme="light"] .bnav-item { color: #b0a898; }
[data-theme="light"] .bnav-item:hover,
[data-theme="light"] .bnav-item.active { color: var(--accent) !important; }
[data-theme="light"] .bnav-item.active i { filter: drop-shadow(0 0 5px rgba(13,122,110,0.4)); }
[data-theme="light"] .bnav-add {
    background: linear-gradient(135deg, var(--accent), #0b5a52) !important;
    border-color: var(--bg) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(13,122,110,0.35) !important;
}
[data-theme="light"] .bnav-add i { color: #fff !important; }

/* ── Card title ── */
[data-theme="light"] .card-title { color: #1a1714; }
[data-theme="light"] .card-action { color: var(--accent); }

/* ── Blob accents — warmer for light ── */
[data-theme="light"] .blob-accent {
    background: radial-gradient(circle, rgba(13,122,110,0.06) 0%, transparent 70%);
}
[data-theme="light"] .blob-accent-2 {
    background: radial-gradient(circle, rgba(124,58,237,0.04) 0%, transparent 70%);
}

/* ── Particles light ── */
[data-theme="light"] .particle { background: var(--accent); }

/* ── Filter card ── */
[data-theme="light"] .filter-card-redesign { background: #ffffff; border-color: rgba(60,50,40,0.08); }
[data-theme="light"] .filter-card-header { background: #faf8f4; }
[data-theme="light"] .filter-chip { background: rgba(13,122,110,0.08); color: var(--accent); }

/* ── Empty state ── */
[data-theme="light"] .empty-state i { color: #b0a898; opacity: 1; }
[data-theme="light"] .empty-state p { color: #9c958c; }

/* ── Gold card ── */
[data-theme="light"] .stat-card.gold-card { border-top-color: #c07b2b; }

/* ── Legend ── */
[data-theme="light"] .legend-name { color: #9c958c; }

/* ── Breadcrumb ── */
[data-theme="light"] .breadcrumb { color: #9c958c; }
[data-theme="light"] .breadcrumb a { color: var(--accent); }
[data-theme="light"] .breadcrumb span { color: #1a1714; }

/* ── Sidebar mobile logout ── */
[data-theme="light"] .sidebar-logout-mobile {
    color: var(--danger);
    background: rgba(192,57,43,0.05);
    border-color: rgba(192,57,43,0.15);
}

/* ── Section header title ── */
[data-theme="light"] .section-title { color: #1a1714; }

/* ── Nav label ── */
[data-theme="light"] .nav-section .nav-label { color: #c0b8ae; }

/* ── Divider ── */
[data-theme="light"] .divider {
    background: linear-gradient(90deg, transparent, rgba(60,50,40,0.12), transparent);
}

/* ── sf-card (savings form) ── */
[data-theme="light"] .sf-card { background: #ffffff; border-color: rgba(60,50,40,0.1); }
[data-theme="light"] .sf-section { border-color: rgba(60,50,40,0.07); }
[data-theme="light"] .sf-section-title { color: var(--accent); }
[data-theme="light"] .sf-input { background: #faf8f5; border-color: rgba(60,50,40,0.14); color: #1a1714; }
[data-theme="light"] .sf-input:focus { border-color: var(--accent); background: rgba(13,122,110,0.03); box-shadow: 0 0 0 3px rgba(13,122,110,0.1); }
[data-theme="light"] .sf-actions { background: #f7f5f0; border-color: rgba(60,50,40,0.08); }
[data-theme="light"] .sf-label { color: #5c5650; }
[data-theme="light"] .sf-hint  { color: #b0a898; }
[data-theme="light"] .sf-btn-cancel { background: transparent; border-color: rgba(60,50,40,0.14); color: #5c5650; }
[data-theme="light"] .sf-btn-cancel:hover { background: rgba(60,50,40,0.05); color: #1a1714; border-color: rgba(60,50,40,0.2); }

/* ── Goal preview ── */
[data-theme="light"] .goal-preview { background: #f7f5f0; border-color: rgba(60,50,40,0.10); }

/* ── Icon opt ── */
[data-theme="light"] .icon-opt { background: #faf8f5; border-color: rgba(60,50,40,0.12); }
[data-theme="light"] .icon-opt:hover { border-color: var(--accent); background: rgba(13,122,110,0.05); }
/* Smooth theme transitions */
*, *::before, *::after {
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}
/* But don't transition transforms/opacity (breaks animations) */
.btn, .nav-item, .stat-card, .quick-btn, .tx-item, .card, .page-btn, .theme-toggle {
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
}

/* ── Filter Card Redesign ── */
.filter-card-redesign {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 16px;
    overflow: hidden;
}
.filter-card-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    cursor: pointer; user-select: none;
}
.filter-card-header-left {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 600; color: var(--text);
}
.filter-card-header-left i { color: var(--accent); font-size: 18px; }
.filter-toggle-icon { font-size: 18px; color: var(--muted); transition: transform 0.25s ease; }
.filter-card-header.open .filter-toggle-icon { transform: rotate(180deg); }
.filter-card-body { padding: 14px 16px; display: none; }
.filter-card-body.open { display: block; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px; border-top: 1px solid var(--border); }
.filter-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--accent-bg); color: var(--accent); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }

@media (max-width: 768px) {
    .filter-row-1 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
    .filter-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
    .filter-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 8px; }
    .filter-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
    .tx-card { border-left: 3px solid transparent; }
    .tx-card.income-card  { border-left-color: var(--success); }
    .tx-card.expense-card { border-left-color: var(--danger); }
    .sidebar-logout-mobile {
        display: flex; align-items: center; gap: 9px;
        padding: 10px 14px; margin: 6px 12px 0;
        border-radius: var(--radius-sm);
        color: var(--danger); font-size: 13.5px; font-weight: 600;
        background: rgba(239,68,68,0.07);
        border: 1px solid rgba(239,68,68,0.18);
        text-decoration: none; transition: background 0.15s;
    }
    .sidebar-logout-mobile:hover { background: rgba(239,68,68,0.13); text-decoration: none; color: var(--danger); }
    .sidebar-logout-mobile i { font-size: 18px; }
}

@media (min-width: 769px) {
    .filter-row-1 { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; margin-bottom: 10px; align-items: end; }
    .filter-row-2 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 0; align-items: end; }
    .filter-row-3 { display: none; }
    .filter-actions { display: flex; gap: 8px; margin-top: 12px; align-items: center; }
    .filter-card-header { display: none !important; }
    .filter-card-body { display: block !important; padding: 16px 20px; }
    .filter-card-redesign { border-radius: var(--radius); }
}

/* ── Number counter animation ── */
@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.stat-value { animation: countUp 0.6s cubic-bezier(0.4,0,0.2,1) both; }
.stat-card:nth-child(1) .stat-value { animation-delay: 0.2s; }
.stat-card:nth-child(2) .stat-value { animation-delay: 0.3s; }
.stat-card:nth-child(3) .stat-value { animation-delay: 0.4s; }
.stat-card:nth-child(4) .stat-value { animation-delay: 0.5s; }

/* ── Ripple effect for buttons ── */
.btn { overflow: hidden; }
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: scale(0);
    animation: rippleEffect 0.5s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to { transform: scale(4); opacity: 0; }
}
.savings-form-wrap {
    max-width: 640px;
    margin: 0 auto;
}
.savings-form-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}
.savings-form-header-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text2);
    font-size: 13px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--surface2);
    border: 1px solid var(--border2);
    transition: all .18s;
    text-decoration: none;
    white-space: nowrap;
}
.savings-form-header-back:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-bg);
}
.savings-form-header h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(120deg, var(--text) 60%, var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.savings-form-header p {
    margin: 4px 0 0;
    color: var(--text2);
    font-size: 13px;
}

/* Preview card */
.goal-preview {
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 24px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color .3s;
    position: relative;
    overflow: hidden;
}
.goal-preview::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--preview-color, var(--accent));
    transition: background .3s;
}
.goal-preview-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--preview-color, var(--accent)) 15%, transparent);
    border: 1px solid color-mix(in srgb, var(--preview-color, var(--accent)) 25%, transparent);
    flex-shrink: 0;
    transition: all .3s;
}
.goal-preview-icon i {
    font-size: 26px;
    color: var(--preview-color, var(--accent));
    transition: color .3s;
}
.goal-preview-info { flex: 1; min-width: 0; }
.goal-preview-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.goal-preview-amount {
    font-size: 20px;
    font-weight: 800;
    color: var(--preview-color, var(--accent));
    transition: color .3s;
    letter-spacing: -0.5px;
}
.goal-preview-date {
    font-size: 12px;
    color: var(--text2);
    margin-top: 2px;
}
.preview-label {
    position: absolute;
    top: 10px; right: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: var(--text2);
    text-transform: uppercase;
    opacity: .7;
}

/* Form card */
.sf-card {
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: var(--radius);
    overflow: hidden;
}
.sf-section {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
}
.sf-section:last-child { border-bottom: none; }
.sf-section-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.sf-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.sf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sf-full { grid-column: 1 / -1; }

.sf-field { display: flex; flex-direction: column; gap: 6px; }
.sf-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text2);
    letter-spacing: .2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.sf-label .req { color: var(--accent); font-size: 14px; line-height: 1; }
.sf-label .opt { color: var(--muted); font-size: 11px; font-weight: 400; }

.sf-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    transition: border-color .18s, box-shadow .18s, background .18s;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}
.sf-input::placeholder { color: var(--muted); }
.sf-input:focus {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 4%, var(--surface2));
    box-shadow: 0 0 0 3px var(--glow-accent);
}

/* Amount input with Rp prefix */
.sf-input-wrap { position: relative; }
.sf-input-prefix {
    position: absolute;
    left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text2);
    font-size: 13px;
    font-weight: 600;
    pointer-events: none;
}
.sf-input-wrap .sf-input { padding-left: 38px; }

/* Color + icon row */
.sf-icon-color-row { display: grid; grid-template-columns: 1fr 80px; gap: 14px; align-items: end; }
.sf-color-wrap { position: relative; }
.sf-color-preview {
    width: 100%;
    height: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border2);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: stretch;
    transition: border-color .18s, box-shadow .18s;
}
.sf-color-preview:hover, .sf-color-preview:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow-accent);
}
.sf-color-preview input[type=color] {
    width: 100%; height: 100%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: none;
}

/* Icon picker grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.icon-opt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border2);
    cursor: pointer;
    background: var(--surface2);
    transition: all .15s;
    user-select: none;
}
.icon-opt:hover {
    border-color: var(--accent);
    background: var(--accent-bg);
}
.icon-opt.selected {
    border-color: var(--preview-color, var(--accent));
    background: color-mix(in srgb, var(--preview-color, var(--accent)) 12%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--preview-color, var(--accent)) 18%, transparent);
}
.icon-opt i { font-size: 20px; color: var(--text2); transition: color .15s; }
.icon-opt.selected i { color: var(--preview-color, var(--accent)); }
.icon-opt span { font-size: 10px; color: var(--text2); text-align: center; line-height: 1.2; }
.icon-opt input[type=radio] { display: none; }

/* Textarea */
.sf-input.sf-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* Actions */
.sf-actions {
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    background: var(--surface2);
    border-top: 1px solid var(--border);
}
.sf-btn-submit {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--preview-color, var(--accent));
    color: #000;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .18s;
    letter-spacing: .2px;
}
.sf-btn-submit:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 16px color-mix(in srgb, var(--preview-color, var(--accent)) 40%, transparent);
    transform: translateY(-1px);
}
.sf-btn-cancel {
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--text2);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: all .18s;
    white-space: nowrap;
}
.sf-btn-cancel:hover {
    color: var(--text);
    border-color: var(--text2);
    background: var(--surface3);
}

/* Hint text */
.sf-hint { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── Gold Portfolio Page ──────────────────────────────── */
.stat-card.gold-card {
    border-top: 2px solid var(--warning);
    --glow-color: rgba(255,217,61,0.10);
}
.stat-card.gold-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,217,61,0.25), 0 0 30px rgba(255,217,61,0.12);
}

.gold-portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    padding: 20px;
}

.gold-stat {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 2px);
    padding: 16px 18px;
    transition: transform .2s;
}
.gold-stat:hover { transform: translateY(-2px); }
.gold-stat.highlight {
    background: linear-gradient(135deg, var(--surface2), var(--surface3));
    border-color: var(--warning);
}
.gold-stat.profit { border-color: var(--success); }
.gold-stat.loss   { border-color: var(--danger);  }

.gold-stat-label {
    font-size: 11px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.gold-stat-value {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}
.gold-stat-value.gold     { color: var(--warning); }
.gold-stat-value.positive { color: var(--success); }
.gold-stat-value.negative { color: var(--danger);  }

.gold-stat-note {
    font-size: 11px;
    color: var(--muted);
    margin-top: 5px;
}
.gold-stat-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-top: 8px;
}
.badge-success { background: rgba(34,197,94,0.15); color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.15);  color: var(--danger);  }

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.page-title { font-size: 22px; font-weight: 700; margin: 0; }

/* ══════════════════════════════════════════════
   UI IMPROVEMENTS v4.0 — Polish & Refinement
   ══════════════════════════════════════════════ */

/* ── Enhanced stat cards ── */
.stat-card {
    background: linear-gradient(145deg, var(--surface) 0%, rgba(19,27,39,0.95) 100%) !important;
    transform-style: preserve-3d;
}

/* ── Topbar improved ── */
.topbar {
    padding: 12px 28px;
}

/* ── Better card shadows ── */
.card {
    box-shadow: 0 1px 3px rgba(0,0,0,0.3), 0 4px 16px rgba(0,0,0,0.2);
    transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s !important;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(0,212,255,0.1) !important;
}

/* ── Quick btn improved ── */
.quick-btn {
    background: linear-gradient(145deg, var(--surface), var(--surface2)) !important;
}

.quick-btn:hover {
    transform: translateY(-5px) scale(1.03) !important;
}

/* ── Sidebar nav improvement ── */
.nav-item {
    border: 1px solid transparent;
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(0,119,255,0.05)) !important;
    border-color: rgba(0,212,255,0.12) !important;
    box-shadow: inset 0 0 20px rgba(0,212,255,0.03);
}

/* ── Auth card ── */
.auth-card {
    background: linear-gradient(145deg, var(--surface) 0%, var(--surface2) 100%);
}

/* ── Mobile content padding ── */
@media (max-width: 768px) {
    .content {
        padding-bottom: 90px !important;
    }

    .stats-grid {
        gap: 10px !important;
    }
}

/* ── Avatar glow ── */
.avatar {
    box-shadow: 0 0 16px rgba(0,212,255,0.4) !important;
    transition: box-shadow 0.3s !important;
}

.avatar:hover {
    box-shadow: 0 0 24px rgba(0,212,255,0.6) !important;
}

/* ── Better focus states ── */
*:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Improved btn styles ── */
.btn {
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #0099dd 50%, #0077ff 100%) !important;
    background-size: 200% 100% !important;
    transition: background-position 0.4s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

.btn-primary:hover {
    background-position: 100% 0 !important;
    box-shadow: 0 6px 28px rgba(0,212,255,0.5) !important;
}

/* ── Card title polish ── */
.card-title {
    display: flex;
    align-items: center;
}

/* ── Transaction item polish ── */
.tx-item {
    border-radius: var(--radius-sm);
    margin: 0 -4px;
    padding: 10px 4px !important;
}

.tx-item:hover {
    background: linear-gradient(135deg, rgba(0,212,255,0.04), var(--surface2)) !important;
    transform: translateX(6px) !important;
}

/* ── Stat value bigger on desktop ── */
@media (min-width: 1280px) {
    .stat-value {
        font-size: 24px;
    }
}

/* ── Sidebar gradient enhanced ── */
.sidebar {
    background: linear-gradient(180deg, #090d17 0%, #070b14 60%, #06090f 100%) !important;
}

[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafb 100%) !important;
}

/* ── Section headers ── */
.section-title {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* ── Progress bar enhanced ── */
.progress-track {
    background: rgba(255,255,255,0.04) !important;
}

/* ── Table hover enhanced ── */
tr:hover td {
    background: linear-gradient(135deg, rgba(0,212,255,0.03), var(--surface2)) !important;
}

/* ── Mobile stat cards ── */
@media (max-width: 480px) {
    .stat-card {
        border-radius: 10px !important;
    }
    
    .stat-label {
        font-size: 9px !important;
        letter-spacing: 1px !important;
    }
}

/* ── Bottom nav blur fix for iOS ── */
@supports (-webkit-backdrop-filter: blur(20px)) {
    .bottom-nav {
        -webkit-backdrop-filter: blur(20px) saturate(1.5) !important;
    }
    .topbar {
        -webkit-backdrop-filter: blur(20px) !important;
    }
}

/* Budget Progress per Kategori - Dashboard */
.budget-prog-item {
    padding: 4px 0;
}
.budget-prog-item:last-child {
    padding-bottom: 0;
}
