/* Segment Icon Colors for Dashboard Cards */
.segment-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.4rem;
    margin-right: 1rem;
    background: rgba(255,255,255,0.06);
}
.icon-job-color {
    color: #fff;
    background: var(--cat-job);
}
.icon-side-color {
    color: #fff;
    background: var(--cat-side);
}
.icon-internet-color {
    color: #fff;
    background: var(--cat-internet);
}
.icon-expenses-color {
    color: #fff;
    background: var(--cat-expenses);
}

/* ── SEO Hero Section ── */
.seo-hero {
    text-align: center;
    padding: 3rem 1rem 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.seo-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
}

.seo-hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── SEO Content Section ── */
.seo-content-section {
    width: 100%;
    max-width: 1280px;
    padding: 4rem 2rem;
    border-top: 1px solid var(--border-dim);
    margin-top: 2rem;
}

.seo-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
}

.seo-features h2, .seo-faq h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

.feature-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.feature-item i {
    font-size: 1.8rem;
    color: var(--accent-primary);
    background: rgba(var(--accent-rgb), 0.1);
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-item h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-dim);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h4 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.faq-item p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 900px) {
    .seo-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 600px) {
    .seo-hero h1 {
        font-size: 2.2rem;
    }
    .seo-content-section {
        padding: 3rem 1.5rem;
    }
}
/* Monthly Expenses Box Style */
.monthly-expenses {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
}
:root {
    /* Brand Colors */
    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #ec4899;
    --accent-rgb: 99, 102, 241;

    /* Category Colors */
    --cat-job: #3b82f6;
    --cat-side: #10b981;
    --cat-internet: #f59e0b;
    --cat-expenses: #ef4444;

    /* Dark Theme Core (default) */
    --bg-base: #030712;
    --bg-surface: rgba(17, 24, 39, 0.65);
    --bg-elevated: rgba(31, 41, 55, 0.8);
    --border-dim: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);

    /* Typography */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-tertiary: #6b7280;

    /* Interactive */
    --input-bg: rgba(0, 0, 0, 0.3);
    --input-focus-ring: rgba(var(--accent-rgb), 0.5);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.1);

    /* Effects */
    --card-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.5);
    --card-glow: 0 0 40px -10px rgba(var(--accent-rgb), 0.15);
}


/* â”€â”€ Light Mode Theme (High Contrast) â”€â”€ */
[data-theme="light"] {
    --bg-base: #e2e8f0;
    --bg-surface: #ffffff;
    --bg-elevated: #f8fafc;
    --border-dim: rgba(0, 0, 0, 0.18);
    --border-hover: rgba(0, 0, 0, 0.35);
    --text-primary: #0a0f1e;
    --text-secondary: #334155;
    --text-tertiary: #64748b;
    --input-bg: #ffffff;
    --input-focus-ring: rgba(var(--accent-rgb), 0.4);
    --danger-bg: rgba(239, 68, 68, 0.12);
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    --card-glow: 0 0 0 1px rgba(var(--accent-rgb), 0.15);
}

/* Page background */
[data-theme="light"] body {
    background-color: #e2e8f0;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(var(--accent-rgb), 0.07), transparent 30%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.05), transparent 30%);
}

/* Cards: solid white with clear shadow border */
[data-theme="light"] .card {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .card:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
    box-shadow: 0 4px 20px rgba(var(--accent-rgb), 0.12);
}

/* Income items: clearly separated from card bg */
[data-theme="light"] .income-item {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .income-item:hover {
    background: #e8edf5;
    border-color: rgba(var(--accent-rgb), 0.3);
}

/* Inputs: clearly white with visible border */
[data-theme="light"] input,
[data-theme="light"] select {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: #0a0f1e;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

[data-theme="light"] .amount-group {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .amount-group .currency {
    color: #475569;
}

/* Dashboard sidebar */
[data-theme="light"] .sticky-dashboard {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-top: 3px solid var(--accent-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Result boxes: richly colored */
[data-theme="light"] .result-box {
    background: #eef0f4;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .result-box .value {
    color: #0a0f1e;
}

[data-theme="light"] .result-box .label {
    color: #475569;
}

[data-theme="light"] .result-box.primary {
    background: rgba(var(--accent-rgb), 0.18);
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}

[data-theme="light"] .result-box.primary .value {
    color: #0a0f1e;
}

[data-theme="light"] .result-box.highlight {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.22), rgba(236, 72, 153, 0.15));
    border: 1px solid rgba(var(--accent-rgb), 0.35);
}

[data-theme="light"] .result-box.highlight .value {
    color: #0a0f1e;
}

[data-theme="light"] .result-box.yearly-box {
    background: rgba(16, 185, 129, 0.16);
    border: 1px solid rgba(16, 185, 129, 0.4);
}

/* Chart & legend */
[data-theme="light"] .chart-bars {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .chart-legend .legend-item {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .legend-amount {
    color: #0a0f1e;
}

/* Header & nav */
[data-theme="light"] .app-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .export-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #334155;
}

[data-theme="light"] .export-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0a0f1e;
}

/* Select dropdown options */
[data-theme="light"] select option {
    background: #ffffff;
    color: #0a0f1e;
}

/* Delete button in light mode */
[data-theme="light"] .delete-btn {
    color: #94a3b8;
}

[data-theme="light"] .delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

/* Add button */
[data-theme="light"] .add-btn {
    background: #f1f5f9;
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #475569;
}

[data-theme="light"] .add-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

/* Chart area divider */
[data-theme="light"] .chart-area {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}


/* ── Accent Color Themes ── */
[data-accent="emerald"] {
    --accent-primary: #10b981;
    --accent-secondary: #34d399;
    --accent-tertiary: #06b6d4;
    --accent-rgb: 16, 185, 129;
}

[data-accent="rose"] {
    --accent-primary: #f43f5e;
    --accent-secondary: #fb7185;
    --accent-tertiary: #f59e0b;
    --accent-rgb: 244, 63, 94;
}

[data-accent="amber"] {
    --accent-primary: #f59e0b;
    --accent-secondary: #fbbf24;
    --accent-tertiary: #ef4444;
    --accent-rgb: 245, 158, 11;
}

[data-accent="cyan"] {
    --accent-primary: #06b6d4;
    --accent-secondary: #22d3ee;
    --accent-tertiary: #8b5cf6;
    --accent-rgb: 6, 182, 212;
}

[data-accent="violet"] {
    --accent-primary: #8b5cf6;
    --accent-secondary: #a78bfa;
    --accent-tertiary: #ec4899;
    --accent-rgb: 139, 92, 246;
}

[data-accent="slate"] {
    --accent-primary: #64748b;
    --accent-secondary: #94a3b8;
    --accent-tertiary: #475569;
    --accent-rgb: 100, 116, 139;
}


/* ── Ko-fi Button ── */
.kofi-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    background: rgba(255, 94, 91, 0.12);
    border: 1px solid rgba(255, 94, 91, 0.25);
    border-radius: 8px;
    color: #ff5e5b;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
}

.kofi-btn:hover {
    background: rgba(255, 94, 91, 0.2);
    border-color: rgba(255, 94, 91, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 94, 91, 0.2);
}

.kofi-btn i {
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .kofi-text {
        display: none;
    }
    .kofi-btn {
        padding: 0.4rem 0.6rem;
    }
}

/* ── Rich Footer ── */
.rich-footer {
    width: 100%;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-dim);
    margin-top: 4rem;
    padding: 5rem 2rem 3rem;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 4rem;
    margin-bottom: 4rem;
}

.brand-col .footer-tagline {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-socials {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
}

.footer-socials a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s;
}

.footer-socials a:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.footer-col h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.2s;
}

.footer-col ul a:hover {
    color: var(--accent-primary);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-dim);
    text-align: center;
}

.footer-bottom p {
    color: var(--text-tertiary);
    font-size: 0.82rem;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .rich-footer {
        padding-top: 3rem;
    }
}

/* ── Cookie Consent Banner ── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-dim);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    z-index: 9999;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.cookie-banner a {
    color: var(--accent-primary);
    text-decoration: none;
}

.cookie-banner a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-accept {
    padding: 0.45rem 1.1rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.cookie-accept:hover {
    opacity: 0.85;
}

.cookie-decline {
    padding: 0.45rem 1.1rem;
    background: transparent;
    color: var(--text-tertiary);
    border: 1px solid var(--border-dim);
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cookie-decline:hover {
    border-color: var(--border-hover);
    color: var(--text-secondary);
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        text-align: center;
        padding-bottom: 1.25rem;
    }
}

/* ── Theme Picker Dropdown ── */
.theme-dropdown {
    position: relative;
}

.theme-picker-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    background: var(--accent-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 0 16px 2px rgba(var(--accent-rgb), 0.18);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-picker-btn:hover {
    border-color: var(--accent-secondary);
    background: var(--accent-secondary);
    color: #fff;
    transform: rotate(20deg) scale(1.08);
    box-shadow: 0 0 20px 4px rgba(var(--accent-rgb), 0.32);
}

.theme-picker-btn:active {
    transform: rotate(0deg) scale(0.95);
}

.theme-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: 14px;
    width: 220px;
    padding: 1rem;
    box-shadow: var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 200;
}

.theme-panel.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-panel-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-tertiary);
    margin-bottom: 0.6rem;
}

/* Mode toggle row */
.mode-toggle-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

.mode-btn {
    flex: 1;
    padding: 0.45rem 0;
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s;
    font-family: inherit;
}

.mode-btn:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.mode-btn.active {
    background: rgba(var(--accent-rgb), 0.15);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.mode-btn i {
    font-size: 0.75rem;
}

/* Color swatches grid */
.accent-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}

.accent-swatch {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
}

.accent-swatch .swatch-fill {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    transition: transform 0.2s;
}

.accent-swatch:hover .swatch-fill {
    transform: scale(1.15);
}

.accent-swatch.active {
    border-color: var(--text-primary);
}

.accent-swatch.active .swatch-fill {
    transform: scale(1.1);
}

.accent-swatch.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.55rem;
    color: white;
    position: absolute;
    z-index: 1;
}

/* Swatch colors */
.swatch-indigo { background: #6366f1; }
.swatch-emerald { background: #10b981; }
.swatch-rose { background: #f43f5e; }
.swatch-amber { background: #f59e0b; }
.swatch-cyan { background: #06b6d4; }
.swatch-violet { background: #8b5cf6; }

/* Light mode overrides for theme panel */
[data-theme="light"] .theme-picker-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #334155;
}

[data-theme="light"] .theme-picker-btn:hover {
    color: var(--accent-primary);
}

[data-theme="light"] .theme-panel {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .mode-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #475569;
}

[data-theme="light"] .mode-btn:hover {
    color: #0a0f1e;
}

[data-theme="light"] .mode-btn.active {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}



/* â”€â”€ Theme Toggle Button â”€â”€ */
.theme-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-dim);
    background: var(--bg-elevated);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    transform: rotate(20deg) scale(1.08);
    box-shadow: 0 0 12px rgba(var(--accent-rgb), 0.3);
}

.theme-toggle-btn:active {
    transform: rotate(0deg) scale(0.95);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-image:
        radial-gradient(circle at 15% 50%, rgba(var(--accent-rgb), 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.06), transparent 25%);
    background-attachment: fixed;
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6,
.logo {
    font-family: 'Outfit', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.app-container {
    width: 100%;
    max-width: 1280px;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    flex: 1;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
    border-bottom: 1px solid var(--border-dim);
}

.header-main {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--accent-primary);
}

@media (max-width: 850px) {
    .main-nav {
        display: none;
    }
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-icon-wrapper {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.4);
}

.logo-icon {
    color: white;
    font-size: 1.1rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.export-btn {
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.export-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.export-chevron {
    font-size: 0.65rem;
    margin-left: 0.15rem;
    opacity: 0.6;
}

/* Export Dropdown */
.export-dropdown {
    position: relative;
}

.export-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    min-width: 180px;
    padding: 0.4rem;
    box-shadow: var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 100;
}

.export-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.export-menu button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}

.export-menu button:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-primary);
}

.export-menu button i {
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
}

/* Currency Dropdown */
.currency-dropdown {
    position: relative;
}

.currency-btn {
    background: transparent;
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
}

.currency-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.03);
}

.currency-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    border-radius: 10px;
    min-width: 230px;
    padding: 0.4rem;
    box-shadow: var(--card-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all 0.2s ease;
    z-index: 100;
    max-height: 340px;
    overflow-y: auto;
}

.currency-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.currency-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.85rem;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
    font-family: inherit;
}

.currency-option:hover {
    background: rgba(var(--accent-rgb), 0.12);
    color: var(--text-primary);
}

.currency-option.active {
    background: rgba(var(--accent-rgb), 0.18);
    color: var(--accent-primary);
}

.currency-option .cur-symbol {
    width: 28px;
    text-align: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.currency-option .cur-name {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

.currency-menu::-webkit-scrollbar {
    width: 5px;
}

.currency-menu::-webkit-scrollbar-track {
    background: transparent;
}

.currency-menu::-webkit-scrollbar-thumb {
    background: var(--border-dim);
    border-radius: 4px;
}

/* Light mode overrides for new elements */
[data-theme="light"] .export-menu {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .export-menu button {
    color: #475569;
}

[data-theme="light"] .export-menu button:hover {
    background: rgba(var(--accent-rgb), 0.1);
    color: #0a0f1e;
}

[data-theme="light"] .currency-btn {
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: #334155;
}

[data-theme="light"] .currency-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #0a0f1e;
}

[data-theme="light"] .currency-menu {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .currency-option {
    color: #475569;
}

[data-theme="light"] .currency-option:hover {
    background: rgba(var(--accent-rgb), 0.1);
    color: #0a0f1e;
}

[data-theme="light"] .currency-option.active {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent-primary);
}

[data-theme="light"] .currency-option .cur-symbol {
    color: #0a0f1e;
}

.avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border-dim);
}

/* Layout */
.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2.5rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .user-profile {
        gap: 0.6rem;
    }

    .currency-btn span {
        max-width: 70px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .sticky-dashboard {
        position: static;
        margin-top: 2rem;
    }

    .card,
    .dashboard-card {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .app-header,
    .section-header,
    .template-cta-banner {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
@media (max-width: 600px) {
    .app-container {
        padding: 0.5rem 0.2rem;
    }
    .main-content {
        gap: 1.2rem;
    }
    .card,
    .dashboard-card {
        padding: 1rem 0.7rem;
        font-size: 0.97rem;
    }
    .app-header,
    .section-header,
    .template-cta-banner {
        padding-left: 0.3rem;
        padding-right: 0.3rem;
    }
    .template-cta-headline {
        font-size: 1.1rem;
    }
}

.section-header {
    margin-bottom: 2rem;
}

.section-header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-dim);
    border-radius: 16px;
    padding: 1.5rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--card-shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Card Pop-up Visual Effect */
    .card,
    .dashboard-card {
        box-shadow: 0 2px 16px 0 rgba(99,102,241,0.06), 0 1px 3px 0 rgba(0,0,0,0.06);
        transition: transform 0.18s cubic-bezier(0.4,0,0.2,1), box-shadow 0.18s cubic-bezier(0.4,0,0.2,1);
    }
    .card:hover,
    .dashboard-card:hover {
        transform: translateY(-6px) scale(1.025);
        box-shadow: 0 4px 24px 0 rgba(99,102,241,0.10), 0 2px 6px 0 rgba(0,0,0,0.08);
    }
}

.card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--card-glow);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.header-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-box {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.icon-job {
    background: rgba(59, 130, 246, 0.1);
    color: var(--cat-job);
}

.icon-side {
    background: rgba(16, 185, 129, 0.1);
    color: var(--cat-side);
}

.icon-internet {
    background: rgba(245, 158, 11, 0.1);
    color: var(--cat-internet);
}

.icon-expenses {
    background: rgba(239, 68, 68, 0.1);
    color: var(--cat-expenses);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 500;
    letter-spacing: -0.025em;
}

.add-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-dim);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
    transform: translateY(-1px);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Income Items */
.income-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s;
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.income-item:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.02);
}

.item-drag-handle {
    color: var(--text-tertiary);
    cursor: grab;
    padding: 0.5rem;
    display: flex;
    align-items: center;
}

.item-drag-handle:hover {
    color: var(--text-secondary);
}

.item-inputs {
    display: flex;
    flex: 1;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
}

.name-wrapper {
    flex: 2;
    min-width: 140px;
}

.amount-wrapper {
    flex: 1.5;
    min-width: 120px;
}

.freq-wrapper {
    flex: 1;
    min-width: 110px;
}

input,
select {
    background: var(--input-bg);
    border: 1px solid var(--border-dim);
    color: var(--text-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s;
    width: 100%;
}

input:focus,
select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
}

input::placeholder {
    color: var(--text-tertiary);
}

.amount-group {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border: 1px solid var(--border-dim);
    border-radius: 8px;
    transition: all 0.2s;
}

.amount-group:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px var(--input-focus-ring);
}

.amount-group .currency {
    padding-left: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.amount-group input {
    border: none;
    background: transparent;
    padding-left: 0.5rem;
    box-shadow: none;
}

.amount-group input:focus {
    box-shadow: none;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239ca3af' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
}

select option {
    background: #1f2937;
    color: #fff;
}

.delete-btn {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.delete-btn:hover {
    color: var(--danger);
    background: var(--danger-bg);
}

/* Dashboard Sidebar */
.sticky-dashboard {
    position: sticky;
    top: 2rem;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.4) 0%, rgba(17, 24, 39, 0.6) 100%);
    border: 1px solid var(--border-dim);
    border-top: 3px solid var(--accent-primary);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 7.2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.dashboard-header h3 {
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.75rem;
}

.pulse-indicator {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
}

.pulse {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.result-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
}

.result-box.primary {
    background: rgba(var(--accent-rgb), 0.08);
    border-color: rgba(var(--accent-rgb), 0.2);
}

.result-box.highlight {
    background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.15), rgba(236, 72, 153, 0.1));
    border-color: rgba(236, 72, 153, 0.25);
}

.result-box.yearly-box {
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.2);
}

.shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.05), transparent);
    transform: skewX(-20deg);
    animation: shimmer 6s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-family: 'Outfit', sans-serif;
}

.value {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    transition: all 0.3s ease;
}

/* Visualization */
.chart-area {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-dim);
}

.chart-area h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-weight: 500;
}

.chart-bars {
    display: flex;
    height: 12px;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
    margin-bottom: 1.25rem;
}

.chart-bar {
    height: 100%;
    transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
}

.legend-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-amount {
    font-weight: 600;
    color: var(--text-primary);
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .add-btn,
    .delete-btn,
    .export-btn,
    .export-dropdown,
    .currency-dropdown,
    .item-drag-handle {
        display: none;
    }

    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        background: white;
    }

    input,
    select {
        border: none;
        background: transparent;
        padding: 0;
        color: black;
    }

    .sticky-dashboard {
        position: static;
        background: #f9fafb;
    }

    .result-box {
        color: black;
        border: 1px solid #ddd;
        background: white;
    }

    .value {
        color: black;
    }

    .chart-bars {
        border: 1px solid #ddd;
    }
}
/* ── Template CTA Banner ── */
.template-cta-banner {
    margin: 2rem 0 1.5rem 0;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 16px;
    box-shadow: 0 4px 24px -1px rgba(var(--accent-rgb), 0.15);
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.template-cta-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.template-cta-icon {
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: #fff;
}

.template-cta-text {
    flex: 1;
    min-width: 180px;
}

.template-cta-headline {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-family: 'Outfit', sans-serif;
}

.template-cta-desc {
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    color: #f3f4f6;
}

.template-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 1rem;
    padding: 0.7rem 1.3rem;
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.template-cta-btn:hover {
    background: var(--accent-primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--accent-rgb), 0.18);
}

.template-cta-arrow {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .template-cta-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    .template-cta-banner {
        padding: 1rem 0.5rem;
    }
    .template-cta-icon {
        font-size: 1.5rem;
        padding: 0.7rem;
    }
    .template-cta-headline {
        font-size: 1rem;
    }
    .template-cta-desc {
        font-size: 0.85rem;
    }
    .template-cta-btn {
        font-size: 0.95rem;
        padding: 0.6rem 1rem;
    }
}