:root {
    /* Modern Palette */
    --bg-color: #0f1115; /* Deeper, richer black/blue */
    --sidebar-bg: #18191e;
    --card-bg: #20222a;
    --card-hover: #2a2d36;

    /* Text */
    --text-main: #ffffff;
    --text-muted: #9ca3af;

    /* Accents */
    --accent: #22c55e; /* Vibrant Green */
    --accent-glow: rgba(34, 197, 94, 0.4);
    --accent-dim: rgba(34, 197, 94, 0.1);

    --secondary: #6366f1; /* Indigo */
    --secondary-glow: rgba(99, 102, 241, 0.4);

    --danger: #ef4444;
    --danger-glow: rgba(239, 68, 68, 0.3);

    --warning: #f59e0b;

    /* Structure */
    --nav-height: 70px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-sm: 12px;

    /* Transitions */
    --ease-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; -webkit-tap-highlight-color: transparent; }

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container { display: flex; flex-direction: column; height: 100vh; }

/* ============================================
   NAVIGATION (MOBILE DOCK)
   ============================================ */
.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--sidebar-bg);
    padding: 0 10px;
    z-index: 100;
    border-top: 1px solid rgba(255,255,255,0.05);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.logo { display: none; }

.nav-links {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    max-width: 500px;
}

.nav-links li {
    list-style: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s var(--ease-smooth);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    gap: 4px;
    flex: 1;
    height: 100%;
}

.nav-links li i {
    font-size: 1.3rem;
    margin: 0;
    transition: transform 0.2s var(--ease-elastic);
}

.nav-links li:active i { transform: scale(0.8); }

.nav-links li.active { color: var(--text-main); }
.nav-links li.active i {
    color: var(--accent);
    transform: translateY(-2px);
    text-shadow: 0 4px 12px var(--accent-glow);
}

/* Special styling for the add button in navigation */
.nav-links li.nav-add-button {
    background: var(--accent);
    width: 44px;
    height: 44px;
    min-width: 44px;
    max-width: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    flex: none;
    box-shadow: 0 4px 12px var(--accent-glow);
    transition: all 0.2s var(--ease-smooth);
}

.nav-links li.nav-add-button:active {
    transform: scale(0.9);
    box-shadow: 0 2px 8px var(--accent-glow);
}

.nav-links li.nav-add-button i {
    font-size: 1.3rem;
    color: var(--bg-color);
    margin: 0;
}

.desktop-only { display: none !important; }

/* ============================================
   MAIN CONTENT
   ============================================ */
.content {
    flex: 1;
    padding: 20px 16px 100px 16px; /* Bottom padding accounts for nav */
    overflow-y: auto;
    width: 100%;
    background: radial-gradient(circle at top right, #1e2028 0%, var(--bg-color) 40%);
}

header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 25px;
}

.header-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(to right, #fff, #9ca3af);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Month Nav Pill */
.month-nav {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.05);
    padding: 6px 8px;
    border-radius: 30px;
    width: 100%;
    max-width: 300px;
    justify-content: space-between;
    border: 1px solid rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.month-nav span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
    flex: 1;
    text-align: center;
}

.nav-btn {
    background: var(--card-bg);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.nav-btn:hover {
    background: var(--accent);
    color: #000;
    transform: scale(1.1);
    box-shadow: 0 4px 12px var(--accent-glow);
}
.nav-btn:active {
    transform: scale(0.95);
}


/* ============================================
   CARDS & UI ELEMENTS
   ============================================ */
.section {
    display: none;
    animation: slideUp 0.4s var(--ease-smooth);
}
.active-section { display: block; }

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

.card {
    background-color: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.03);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s;
}

/* Net Worth Card Gradient */
.total-balance {
    background: linear-gradient(135deg, #20222a 0%, #1a1c23 100%);
    position: relative;
    overflow: hidden;
}
.total-balance::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: radial-gradient(circle, var(--accent-dim) 0%, transparent 60%);
    pointer-events: none;
    animation: pulseGlow 4s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.total-balance h3 { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; margin-bottom: 5px; position: relative; }
.total-balance h1 {
    font-size: 2.2rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 700;
    position: relative;
    animation: countUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.flow-row {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    position: relative;
}
.income .val { color: var(--accent); }
.expense .val { color: var(--danger); }

/* Lists & Grids */
.cards-grid { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.wallet-grid, .goals-grid { display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }

/* Interactive Elements */
.wallet-card, .goal-card, .tag-card, .transaction-item {
    cursor: pointer;
    transition: transform 0.2s var(--ease-smooth), background-color 0.2s;
}
.wallet-card:active, .goal-card:active, .tag-card:active, .transaction-item:active {
    transform: scale(0.98);
}

.dashed-btn {
    background: rgba(255,255,255,0.02);
    border: 2px dashed rgba(255,255,255,0.1);
    color: var(--text-muted);
    width: 100%;
    padding: 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.95rem;
    font-weight: 500;
}
.dashed-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: #1a1c23;
    margin: auto;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    width: calc(100% - 32px);
    max-width: 450px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    animation: modalPop 0.3s var(--ease-elastic);
}

@keyframes modalPop {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.close {
    position: absolute; right: 25px; top: 25px;
    font-size: 24px; color: var(--text-muted);
    cursor: pointer; transition: 0.2s;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
}
.close:hover { background: rgba(255,255,255,0.1); color: white; }

.modal h2 { margin-bottom: 25px; font-size: 1.4rem; color: white; }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
input, select {
    background-color: #121317;
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    padding: 14px 16px;
    border-radius: 12px;
    width: 100%;
    font-size: 16px;
    transition: 0.2s;
    font-family: inherit;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-dim); }

/* Constrain date input width to prevent it from appearing larger */
input[type="date"] {
    max-width: 200px;
}

/* Form Elements */
.optional-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Tag Multi-select Component */
.tag-multiselect {
    position: relative;
    background-color: #121317;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 8px;
    min-height: 48px;
    transition: 0.2s;
}

.tag-multiselect:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.tag-selected-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.tag-selected-chips:empty {
    margin-bottom: 0;
}

.tag-chip-selected {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.1);
}

.tag-chip-selected i {
    font-size: 0.7rem;
}

.tag-chip-selected .remove-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(0,0,0,0.2);
    margin-left: 4px;
    transition: background 0.2s;
}

.tag-chip-selected:hover .remove-tag {
    background: rgba(0,0,0,0.4);
}

.tag-search-input {
    background: transparent !important;
    border: none !important;
    padding: 6px 8px !important;
    font-size: 0.9rem;
    color: white;
    width: 100%;
    box-shadow: none !important;
}

.tag-search-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.tag-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #1a1c23;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 10;
    display: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.tag-dropdown.show {
    display: block;
}

.tag-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.tag-dropdown-item:last-child {
    border-bottom: none;
}

.tag-dropdown-item:hover {
    background: rgba(255,255,255,0.05);
}

.tag-dropdown-item.selected {
    background: rgba(34, 197, 94, 0.1);
}

.tag-dropdown-item .tag-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1rem;
    flex-shrink: 0;
}

.tag-dropdown-item .tag-name {
    flex: 1;
    font-size: 0.9rem;
    color: var(--text-main);
}

.tag-dropdown-item .tag-checkmark {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--accent);
    flex-shrink: 0;
}

.tag-dropdown-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Color Picker */
.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-row input[type="color"] {
    width: 60px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    padding: 4px;
    background: #121317;
}

.color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.color-preset {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.1);
    cursor: pointer;
    transition: transform 0.2s;
}

.color-preset:hover {
    transform: scale(1.1);
    border-color: rgba(255,255,255,0.3);
}

.color-preset:active {
    transform: scale(0.95);
}

.modal-footer { display: flex; gap: 12px; margin-top: 30px; }
button.save-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    flex: 1;
    transition: 0.2s;
}
button.save-btn:hover { filter: brightness(1.1); transform: translateY(-1px); }
button.danger-btn {
    border: 1px solid var(--danger);
    color: var(--danger);
    background: transparent;
    padding: 15px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
}
button.danger-btn:hover { background: var(--danger); color: white; }

/* Installment Options */
.installment-group {
    padding: 15px;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-main);
}

.toggle-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
    cursor: pointer;
}

.installment-options {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.installment-input {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.installment-input label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.installment-input input {
    width: 100%;
    padding: 12px;
    background: #121317;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    background: #121317;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}
.radio-group label {
    flex: 1;
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    cursor: pointer;
    margin: 0 !important;
    color: var(--text-muted);
    transition: 0.2s;
    font-weight: 500;
}
.radio-group input { display: none; }
.radio-group label:has(input:checked) {
    background: var(--card-bg);
    color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* ============================================
   SPECIFIC COMPONENTS (Refined)
   ============================================ */

/* Insight Box */
.insight-container {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(99, 102, 241, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 20px;
    margin-bottom: 24px;
    border-radius: var(--border-radius-md);
    display: flex;
    gap: 15px;
    align-items: flex-start;
}
.insight-container h3 { display: none; } /* Hide title, keep icon */
.insight-container::before {
    font-family: "Font Awesome 6 Free";
    content: "\f0eb";
    font-weight: 900;
    color: var(--secondary);
    font-size: 1.2rem;
    background: rgba(99, 102, 241, 0.2);
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.insight-container p { font-size: 0.9rem; line-height: 1.5; color: #e0e7ff; margin: 0; flex: 1; }

/* Transactions List */
.month-header-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-item {
    background: var(--card-bg);
    margin-bottom: 12px;
    border-radius: var(--border-radius-md);
    padding: 16px;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.transaction-left { display: flex; flex-direction: column; gap: 4px; }
.transaction-main { display: flex; flex-direction: column; gap: 2px; }
.transaction-main strong { font-weight: 600; font-size: 0.95rem; }
.transaction-date { font-size: 0.75rem; opacity: 0.6; }

.transaction-amount { font-weight: 600; font-size: 1rem; }
.transaction-amount.income { color: var(--accent); }
.transaction-amount.expense { color: var(--text-main); }

/* Tags in Transaction List */
.transaction-meta { margin-top: 6px; }
.transaction-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--bg-color);
    border: 1px solid rgba(255,255,255,0.05);
}

/* Wallets */
.wallet-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border-left: 4px solid var(--accent);
    position: relative;
    overflow: hidden;
}
.wallet-card::after {
    content: '\f555';
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: -10px; bottom: -10px;
    font-size: 5rem;
    opacity: 0.05;
    transform: rotate(-15deg);
    transition: opacity 0.3s;
}
.wallet-card:hover::after {
    opacity: 0.1;
}
.wallet-card.credit { border-left-color: var(--warning); }
.wallet-card.investment { border-left-color: var(--secondary); }

.wallet-edit-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.wallet-card:hover .wallet-edit-indicator {
    opacity: 1;
    background: rgba(255,255,255,0.1);
}

/* Goals Allocation Summary */
.goals-allocation-summary {
    margin-bottom: 20px;
}

.allocation-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.allocation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent);
}

.allocation-card.info::before {
    background: var(--secondary);
}

.allocation-card.success::before {
    background: var(--accent);
}

.allocation-card.warning::before {
    background: var(--warning);
}

.allocation-card.danger::before {
    background: var(--danger);
}

.allocation-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}

.allocation-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    background: var(--accent-dim);
    color: var(--accent);
}

.allocation-card.info .allocation-icon {
    background: rgba(99, 102, 241, 0.15);
    color: var(--secondary);
}

.allocation-card.success .allocation-icon {
    background: var(--accent-dim);
    color: var(--accent);
}

.allocation-card.warning .allocation-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.allocation-card.danger .allocation-icon {
    background: var(--danger-glow);
    color: var(--danger);
}

.allocation-info {
    flex: 1;
}

.allocation-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.allocation-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin: 0;
}

.allocation-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--border-radius-sm);
}

.allocation-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.allocation-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.allocation-stat .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.allocation-stat.over-budget .stat-value {
    color: var(--danger);
}

.allocation-bar {
    height: 8px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    overflow: visible;
    position: relative;
    display: flex;
}

.allocation-bar-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 10px 0 0 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.allocation-card.info .allocation-bar-fill {
    background: var(--secondary);
}

.allocation-card.warning .allocation-bar-fill {
    background: var(--warning);
}

.allocation-card.danger .allocation-bar-fill {
    background: var(--danger);
}

.allocation-bar-overflow {
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        var(--danger),
        var(--danger) 4px,
        rgba(239, 68, 68, 0.5) 4px,
        rgba(239, 68, 68, 0.5) 8px
    );
    border-radius: 0 10px 10px 0;
    animation: pulse-overflow 1.5s ease-in-out infinite;
}

@keyframes pulse-overflow {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.allocation-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Goals Cards */
.goal-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.goal-card::before {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100px;
    background: radial-gradient(circle, var(--accent-dim), transparent);
    opacity: 0.3;
    pointer-events: none;
}

.goal-card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 18px;
    position: relative;
}

.goal-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    position: relative;
}

.goal-info {
    flex: 1;
}

.goal-info h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.goal-type-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.goal-type-badge.savings {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent);
}

.goal-type-badge.spending {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.goal-type-badge.target {
    background: rgba(99, 102, 241, 0.15);
    color: var(--secondary);
}

.goal-edit-indicator {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.6;
    transition: all 0.2s;
}

.goal-card:hover .goal-edit-indicator {
    opacity: 1;
    background: rgba(255,255,255,0.08);
}

.goal-progress-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.goal-progress-ring {
    width: 80px;
    height: 80px;
    position: relative;
    flex-shrink: 0;
}

.goal-progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-bg-ring {
    fill: none;
    stroke: rgba(255,255,255,0.05);
    stroke-width: 2.5;
}

.progress-fill-ring {
    fill: none;
    stroke: var(--progress-color, var(--accent));
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 0.6s ease;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
}

.goal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.goal-amount {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
}

.goal-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Legacy goal card styles (for compatibility) */
.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.goal-header h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.goal-header small {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.goal-progress {
    margin-top: 12px;
}

.goal-progress-bar {
    background: rgba(255,255,255,0.05);
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.goal-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.goal-progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.goal-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.goal-stats .amount {
    font-weight: 600;
    color: var(--text-main);
}

.goal-stats .percentage {
    color: var(--text-muted);
}

/* Tag Cards */
.tag-card {
    background: var(--card-bg);
    padding: 18px 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s;
}

.tag-card:hover {
    background: var(--card-hover);
    border-color: rgba(255,255,255,0.1);
}

.tag-card-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.tag-icon-wrapper {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tag-card .tag-info {
    flex: 1;
    min-width: 0;
}

.tag-card .tag-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.tag-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tag-card-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.tag-amount {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.tag-edit-indicator {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.03);
    color: var(--text-muted);
    font-size: 0.75rem;
    opacity: 0.6;
    transition: all 0.2s;
}

.tag-card:hover .tag-edit-indicator {
    opacity: 1;
    background: rgba(255,255,255,0.08);
}

/* Legacy tag card styles (for compatibility) */
.tag-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: currentColor;
    display: none; /* Hidden by default, can be enabled if needed */
}

.tag-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(255,255,255,0.05);
    flex-shrink: 0;
}

.tag-info small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Budget/Tag Spending Section */
.budget-container {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255,255,255,0.03);
}

.budget-container h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.budget-container h3 i {
    color: var(--accent);
    font-size: 1rem;
}

.budget-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

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

.b-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.b-header span:first-child {
    font-weight: 500;
    color: var(--text-main);
}

.b-header span:last-child {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.95rem;
}

.tag-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.progress-bg {
    background: rgba(255,255,255,0.05);
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    background: linear-gradient(90deg, currentColor, currentColor 80%, transparent);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

/* Goals Summary (Dashboard) */
.goals-summary-container {
    background: var(--card-bg);
    padding: 24px;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255,255,255,0.03);
    margin-top: 24px;
    margin-bottom: 24px;
}

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

.section-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h3 i {
    color: var(--accent);
    font-size: 1rem;
}

.see-all-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: 0.2s;
}

.see-all-link:hover {
    color: var(--text-main);
}

.goals-summary {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.goal-summary-item {
    background: rgba(255,255,255,0.02);
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    display: flex;
    gap: 12px;
    align-items: center;
}

.goal-summary-item:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
    transform: translateX(4px);
}

.goal-summary-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.goal-summary-info {
    flex: 1;
    min-width: 0;
}

.goal-summary-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.goal-summary-progress-bar {
    background: rgba(255,255,255,0.05);
    height: 6px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 6px;
}

.goal-summary-progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.goal-summary-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.goal-summary-percent {
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.goal-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.goal-summary-header strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.goal-summary-header .percentage {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.05);
}

/* Settings Card Improvements */
.card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.card .subtext {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Mobile Settings Section */
.mobile-settings-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 10px;
}

.mobile-settings-btn {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    text-decoration: none;
}

.mobile-settings-btn i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.mobile-settings-btn:active {
    transform: scale(0.98);
}

.mobile-settings-btn.google-btn {
    background: white;
    color: #000;
    border: none;
}

.mobile-settings-btn.google-btn.connected {
    background: #166534;
    color: white;
}

.mobile-settings-btn.danger-btn {
    border-color: var(--danger);
    color: var(--danger);
}

.mobile-settings-btn.danger-btn:active {
    background: var(--danger);
    color: white;
}

/* Legal Links Desktop */
.legal-links-desktop {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
}

/* ============================================
   WELCOME MODAL
   ============================================ */
.welcome-modal .modal-content {
    max-width: 500px;
    padding: 40px 30px;
}

.welcome-content {
    text-align: center;
}

.welcome-header {
    margin-bottom: 40px;
}

.welcome-logo {
    margin-bottom: 20px;
}

.welcome-logo .logo-icon {
    font-size: 3rem;
    display: inline-block;
}

.welcome-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.welcome-header h1 .highlight {
    color: var(--accent);
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.welcome-steps {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 30px;
    text-align: left;
}

.welcome-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255,255,255,0.02);
    padding: 20px;
    border-radius: var(--border-radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.step-icon i {
    font-size: 1.3rem;
    color: var(--accent);
}

.step-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.step-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.welcome-tips {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 16px 20px;
    border-radius: var(--border-radius-md);
    margin-bottom: 30px;
}

.tip-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-main);
}

.tip-item i {
    color: var(--secondary);
    font-size: 1.1rem;
}

.welcome-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 20px var(--accent-glow);
}

.welcome-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px var(--accent-glow);
}

.welcome-btn i {
    transition: transform 0.3s;
}

.welcome-btn:hover i {
    transform: translateX(4px);
}

/* ============================================
   SYNC MODAL
   ============================================ */
.sync-header {
    text-align: center;
    margin-bottom: 30px;
}

.sync-header h2 {
    font-size: 1.5rem;
    color: var(--text-main);
    margin-bottom: 10px;
}

.sync-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sync-option-btn {
    background: var(--card-bg);
    border: 2px solid rgba(255,255,255,0.1);
    padding: 20px;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    width: 100%;
}

.sync-option-btn:hover {
    border-color: var(--accent);
    background: rgba(255,255,255,0.03);
    transform: translateY(-2px);
}

.sync-option-btn i {
    font-size: 2rem;
    color: var(--text-muted);
}

.sync-option-btn.cloud-btn:hover i {
    color: var(--accent);
}

.sync-option-btn.local-btn:hover i {
    color: var(--secondary);
}

.sync-option-content {
    flex: 1;
}

.sync-option-content strong {
    display: block;
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 6px;
}

.sync-option-content small {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    width: 90%;
    max-width: 400px;
}

.toast {
    background: rgba(32, 34, 42, 0.95);
    color: white;
    padding: 14px 20px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    animation: toastIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    pointer-events: auto;
}

.toast.success i { color: var(--accent); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--secondary); }
.toast.sync {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
}
.toast.sync i { color: var(--secondary); }

.toast.undo {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.toast.undo i:first-child { color: var(--danger); }

.undo-btn {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    margin-left: auto;
}

.undo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.undo-btn:active {
    transform: scale(0.95);
}

/* Keyboard Shortcuts Help */
.keyboard-help-content {
    max-width: 500px;
}

.keyboard-shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.shortcut-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.shortcut-item kbd {
    background: var(--card-bg);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.shortcut-item span {
    flex: 1;
    color: var(--text-main);
    font-size: 0.95rem;
}

.keyboard-help-tip {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    color: var(--text-main);
    line-height: 1.5;
    margin-top: 20px;
}

/* Transaction Summary Card */
.transaction-summary-card {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}

.summary-period {
    margin-bottom: 16px;
}

.summary-period h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
}

.summary-count {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.balance-stat .stat-value {
    font-size: 1.2rem;
}

.expense-stat .stat-value {
    color: var(--danger);
}

/* Enhanced Summary Card Features */
.stat-icon {
    font-size: 0.85rem;
    margin-right: 4px;
    opacity: 0.9;
}

.stat-value-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.trend-indicator {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}

.trend-indicator.positive {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.trend-indicator.negative {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.trend-indicator.neutral {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Clickable stats for filtering */
.summary-stat.income-stat,
.summary-stat.expense-stat {
    cursor: pointer;
    transition: all 0.2s ease;
}

.summary-stat.income-stat:hover,
.summary-stat.expense-stat:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.summary-stat.income-stat:active,
.summary-stat.expense-stat:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.12);
}

/* Budget Warning Banner */
.budget-warning {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fca5a5;
    font-size: 0.85rem;
    animation: slideDown 0.3s ease;
}

.budget-warning i {
    font-size: 1rem;
}

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

/* Expandable Details Section */
.expand-summary-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    padding: 10px;
    margin-top: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.expand-summary-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.expand-summary-btn i {
    transition: transform 0.3s ease;
}

.expand-summary-btn.expanded i {
    transform: rotate(180deg);
}

.summary-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 8px;
}

.summary-details.open {
    max-height: 300px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 6px;
}

.detail-row:last-child {
    margin-bottom: 0;
}

.detail-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.detail-value {
    font-size: 0.85rem;
    color: white;
    font-weight: 600;
}

/* Swipe gesture indicator */
.transaction-summary-card {
    position: relative;
    touch-action: pan-y;
    user-select: none;
}

.transaction-summary-card.swiping {
    transition: none;
}

/* Count-up animation */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-value.animating {
    animation: countUp 0.4s ease;
}

/* Transaction Toolbar */
.transaction-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    width: 100%;
}

.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 12px 20px;
    border-radius: var(--border-radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    position: relative;
}

.filter-toggle-btn:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
}

.filter-toggle-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

.filter-badge {
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* Quick Filters Bar (NEW) */
.quick-filters-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow-x: auto;
    padding-bottom: 4px;
    width: 100%;
    flex-wrap: wrap;
}

.quick-filters-bar::-webkit-scrollbar {
    height: 4px;
}

.quick-filters-bar::-webkit-scrollbar-track {
    background: transparent;
}

.quick-filters-bar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.quick-filter-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-sm);
    padding: 10px 14px;
    white-space: nowrap;
    transition: all 0.2s;
    flex: 1;
    min-width: fit-content;
}

.quick-filter-pill:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--accent);
}

.quick-filter-pill.active {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.quick-filter-pill.active select {
    color: var(--accent);
    font-weight: 600;
}

.quick-filter-pill i {
    color: var(--accent);
    font-size: 0.9rem;
}

.quick-filter-pill select {
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    font-family: inherit;
}

.quick-filter-pill select option {
    background: var(--card-bg);
    color: var(--text-main);
}

/* Transaction Summary */
.transaction-summary {
    margin-bottom: 16px;
}

.transaction-summary:empty {
    display: none;
}

.summary-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.summary-stat {
    flex: 1;
    min-width: 140px;
    background: var(--card-bg);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.05);
}

.summary-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.summary-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.summary-stat-value.income {
    color: var(--accent);
}

.summary-stat-value.expense {
    color: var(--danger);
}

.summary-stat-value.positive {
    color: var(--accent);
}

.summary-stat-value.negative {
    color: var(--danger);
}

.summary-stat-value.neutral {
    color: var(--text-main);
}

.filter-indicator {
    color: var(--secondary);
    font-size: 0.7rem;
}

@media (max-width: 600px) {
    .summary-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .summary-stat {
        min-width: unset;
        padding: 10px 12px;
    }

    .summary-stat-value {
        font-size: 1rem;
    }
}

/* Active Filters Bar */
.active-filters-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

.active-filters-list {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--accent-dim);
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.active-filter-chip:hover {
    background: var(--accent);
    color: white;
}

.active-filter-chip i {
    font-size: 0.7rem;
}

.clear-all-filters {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: var(--border-radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.clear-all-filters:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Filter Panel */
.filter-panel {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-panel.open {
    max-height: 800px;
    opacity: 1;
    margin-bottom: 24px;
}

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-panel-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-panel-btn:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}

.filter-panel-content {
    padding: 20px;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

/* Transaction Search & Filter */
.search-bar {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-md);
    padding: 14px 18px;
    margin-bottom: 0;
    transition: all 0.2s;
    flex: 1;
    width: 100%;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent-dim);
}

.search-bar i.fa-search {
    color: var(--text-muted);
    margin-right: 12px;
    font-size: 1rem;
}

.search-bar input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    font-size: 0.95rem;
    color: var(--text-main);
    box-shadow: none !important;
}

.search-bar input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.clear-search {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    margin-left: 8px;
}

.clear-search:hover {
    background: rgba(255,255,255,0.1);
    color: var(--text-main);
}

.filter-tags-container,
.filter-wallets-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-wallets-container,
.filter-goals-container {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.filter-tag-chip {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.filter-tag-chip:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--tag-color);
    transform: translateY(-2px);
}

.filter-tag-chip.active {
    background: var(--tag-color);
    border-color: var(--tag-color);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.filter-tag-chip i {
    font-size: 0.8rem;
}

.filter-wallet-chip {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.filter-wallet-chip:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--secondary);
    transform: translateY(-2px);
}

.filter-wallet-chip.active {
    background: var(--secondary);
    border-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.filter-wallet-chip i {
    font-size: 0.8rem;
}

.filter-goal-chip {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.filter-goal-chip:hover {
    background: rgba(255,255,255,0.08);
    border-color: var(--goal-color, var(--accent));
    transform: translateY(-2px);
}

.filter-goal-chip.active {
    background: var(--goal-color, var(--accent));
    border-color: var(--goal-color, var(--accent));
    color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.filter-goal-chip i {
    font-size: 0.8rem;
}

/* Bulk Actions */
.transaction-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    position: relative;
}

.transaction-checkbox-container {
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.transaction-item:hover .transaction-checkbox-container,
.transaction-item.selected .transaction-checkbox-container {
    opacity: 1;
}

.transaction-checkbox {
    width: 20px !important;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}

.transaction-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.transaction-item.selected {
    background: var(--accent-dim) !important;
    border: 1px solid var(--accent);
}

.bulk-action-bar {
    background: var(--card-bg);
    border: 1px solid var(--accent);
    border-radius: var(--border-radius-md);
    padding: 16px 20px;
    margin-bottom: 20px;
    display: none;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 15px var(--accent-glow);
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.bulk-action-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.bulk-action-info span {
    font-weight: 600;
    color: var(--text-main);
}

.bulk-action-buttons {
    display: flex;
    gap: 10px;
}

.bulk-action-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--text-main);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.bulk-action-btn:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.bulk-action-btn.delete-btn {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.bulk-action-btn.delete-btn:hover {
    background: #dc2626;
    box-shadow: 0 4px 12px var(--danger-glow);
}

.bulk-action-btn.clear-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
}

.bulk-action-btn.clear-btn:hover {
    color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.9); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* ============================================
   MICRO-INTERACTIONS & DELIGHTFUL UX
   ============================================ */

/* Floating Feedback Animation */
.floating-feedback {
    position: fixed;
    font-size: 2rem;
    pointer-events: none;
    z-index: 10000;
    animation: floatUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

@keyframes floatUp {
    0% {
        opacity: 0;
        transform: translateY(0) scale(0.5);
    }
    20% {
        opacity: 1;
        transform: translateY(-10px) scale(1.2);
    }
    100% {
        opacity: 0;
        transform: translateY(-80px) scale(0.8);
    }
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: rippleEffect 0.6s ease-out;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* Enhanced Button Animations */
.save-btn, .header-add-btn, .google-btn, .mobile-settings-btn {
    position: relative;
    overflow: hidden;
}

.save-btn:active, .header-add-btn:active {
    transform: scale(0.97);
}

/* Card Entrance Animations */
.card, .wallet-card, .goal-card, .tag-card, .transaction-item {
    animation: cardEntrance 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

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

/* Staggered entrance for lists */
.wallet-card:nth-child(1), .goal-card:nth-child(1), .tag-card:nth-child(1) { animation-delay: 0s; }
.wallet-card:nth-child(2), .goal-card:nth-child(2), .tag-card:nth-child(2) { animation-delay: 0.05s; }
.wallet-card:nth-child(3), .goal-card:nth-child(3), .tag-card:nth-child(3) { animation-delay: 0.1s; }
.wallet-card:nth-child(4), .goal-card:nth-child(4), .tag-card:nth-child(4) { animation-delay: 0.15s; }
.wallet-card:nth-child(5), .goal-card:nth-child(5), .tag-card:nth-child(5) { animation-delay: 0.2s; }

/* Card Hover Enhancements */
.wallet-card:hover, .goal-card:hover, .tag-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.3);
}

.transaction-item:hover {
    background: var(--card-hover);
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Smooth property transitions */
* {
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* Loading State Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Subtle Glow on Focus */
input:focus, select:focus, .tag-multiselect:focus-within {
    box-shadow: 0 0 0 3px var(--accent-dim), 0 4px 12px rgba(0,0,0,0.2);
}

/* Progress Bar Animations */
.progress-fill, .goal-summary-progress-fill {
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.1);
    }
}

/* Syncing Animation */
.google-btn.syncing, .mobile-settings-btn.syncing {
    position: relative;
    overflow: hidden;
}

.google-btn.syncing::after, .mobile-settings-btn.syncing::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: syncSlide 1.5s infinite;
}

@keyframes syncSlide {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--border-radius-lg);
    border: 2px dashed rgba(255,255,255,0.1);
}

.empty-state i {
    font-size: 4rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 20px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.empty-state p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}

.empty-state small {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: block;
}

/* ============================================
   DESKTOP RESPONSIVENESS
   ============================================ */
@media (min-width: 1024px) {
    /* Layout */
    .app-container { flex-direction: row; }

    /* Sidebar becomes Left Nav */
    .sidebar {
        position: static;
        width: 260px;
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 30px 20px;
        border-top: none;
        border-right: 1px solid rgba(255,255,255,0.05);
        box-shadow: none;
        background: var(--sidebar-bg);
    }

    .logo {
        display: block;
        margin-bottom: 40px;
        padding-left: 10px;
    }

    .logo h2 { font-size: 1.5rem; color: white; }
    .logo .highlight { color: var(--accent); }

    .nav-links {
        flex-direction: column;
        max-width: none;
        gap: 8px;
        padding: 0;
    }

    .nav-links li {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: flex-start;
        padding: 14px 16px;
        border-radius: 12px;
        font-size: 0.95rem;
        font-weight: 500;
        gap: 15px;
    }

    .nav-links li i { font-size: 1.1rem; width: 24px; text-align: center; }
    .nav-links li:active i { transform: none; }

    .nav-links li.active { background: rgba(255,255,255,0.05); color: white; }
    .nav-links li.active i { transform: none; text-shadow: none; }

    .nav-links li:hover:not(.active) { background: rgba(255,255,255,0.03); color: white; }

    .nav-links li.nav-add-button {
        width: 100%;
        height: auto;
        min-width: unset;
        max-width: unset;
        flex: unset;
        background: transparent;
        border-radius: var(--border-radius-sm);
        padding: 14px 16px;
        justify-content: flex-start;
        gap: 12px;
        margin: 0;
        box-shadow: none;
    }

    .nav-links li.nav-add-button::after {
        content: 'Adicionar';
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--accent);
    }

    .nav-links li.nav-add-button i {
        font-size: 1.1rem;
        width: 24px;
        text-align: center;
        color: var(--accent);
    }

    .nav-links li.nav-add-button:hover {
        background: rgba(255,255,255,0.03);
    }

    .nav-links li.nav-add-button:active {
        transform: none;
    }

    .desktop-only {
        display: flex !important;
        margin-top: 24px;
    }

    .card.desktop-only {
        display: block !important;
        margin-top: 24px;
    }

    /* Hide mobile-specific elements */
    .mobile-settings-section { display: none !important; }

    /* Nav Footer */
    .nav-footer {
        margin-top: auto !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 12px;
    }

    .google-btn {
        background: white;
        color: #000;
        border: none;
        width: 100%;
        padding: 12px;
        border-radius: 10px;
        display: flex; align-items: center; justify-content: center; gap: 10px;
        font-weight: 600;
        cursor: pointer;
    }
    .google-btn.connected { background: #166534; color: white; }

    /* Content Area */
    .content {
        padding: 40px 50px;
        background: var(--bg-color); /* Cleaner background for desktop */
    }

    /* Header */
    header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    /* Month Nav */
    .month-nav { margin: 0; }

    /* Header Add Button */
    .header-add-btn {
        background: var(--accent);
        color: #000;
        border: none;
        padding: 12px 24px;
        border-radius: 30px;
        font-weight: 600;
        cursor: pointer;
        transition: 0.2s;
        box-shadow: 0 4px 15px var(--accent-glow);
    }
    .header-add-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--accent-glow); }

    /* Grids */
    .cards-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .wallet-grid, .goals-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
    }
}

/* =========================================
   DELIGHT FEATURES STYLES
   ========================================= */

/* --- Streak Badge --- */
.streak-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    animation: streakPulse 2s ease-in-out infinite;
}

.streak-fire {
    font-size: 0.9rem;
}

.streak-count {
    letter-spacing: 0.5px;
}

@keyframes streakPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.card-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.card-header-row h3 {
    margin: 0;
}

/* --- Budget Runway --- */
.runway-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

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

.runway-header h4 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.runway-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.runway-status.on-track {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.runway-status.warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.runway-status.over-budget {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.runway-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg);
    border-radius: 12px;
}

.runway-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.runway-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.runway-stat-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.runway-stat-value.expected {
    color: var(--accent);
}

.runway-bar-container {
    margin-bottom: 20px;
}

.runway-bar {
    position: relative;
    height: 32px;
    background: var(--border-color);
    border-radius: 8px;
    overflow: visible;
}

.runway-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    border-radius: 8px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
}

.runway-progress.on-track {
    background: linear-gradient(90deg, var(--accent), #3b82f6);
}

.runway-progress.warning {
    background: linear-gradient(90deg, #f59e0b, #fb923c);
}

.runway-progress.over-budget {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.runway-label {
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.runway-expected-marker {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
    z-index: 2;
}

.runway-expected-line {
    width: 3px;
    height: 48px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.runway-expected-label {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    white-space: nowrap;
    background: var(--card-bg);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

.runway-footer {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.runway-message {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
}

.runway-message i {
    color: #3b82f6;
    font-size: 1rem;
}

.runway-remaining-info {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.runway-daily,
.runway-days {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.runway-daily strong,
.runway-days strong {
    font-size: 1.2rem;
    color: var(--accent);
}

@media (max-width: 768px) {
    .runway-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .runway-remaining-info {
        flex-direction: column;
        gap: 12px;
    }

    .runway-expected-label {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

/* --- Trend Indicators --- */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.trend-indicator.trend-positive {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.trend-indicator.trend-negative {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

/* --- Confetti Animation --- */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    overflow: hidden;
    z-index: 10000;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s ease-out forwards;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg);
        opacity: 0;
    }
}

/* --- Celebration Toast --- */
.toast.celebration {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
    color: white;
    padding: 16px 20px;
    min-width: 280px;
}

.celebration-emoji {
    font-size: 1.5rem;
}

.celebration-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.celebration-content strong {
    font-size: 1rem;
}

.celebration-content span {
    font-size: 0.85rem;
    opacity: 0.9;
}

/* --- Charts Section --- */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

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

    /* Mobile Transaction Summary Card */
    .transaction-summary-card {
        padding: 16px;
        margin-bottom: 16px;
    }

    .summary-period h3 {
        font-size: 1.1rem;
    }

    .summary-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .summary-stat {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    }

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

    .stat-label {
        font-size: 0.8rem;
        flex-shrink: 1;
        min-width: 0;
    }

    .stat-value {
        font-size: 1rem;
        flex-shrink: 0;
        white-space: nowrap;
        margin-left: 8px;
    }

    /* Mobile Enhanced Summary Features */
    .stat-icon {
        font-size: 0.75rem;
        margin-right: 3px;
    }

    .stat-value-container {
        flex-direction: row;
        gap: 4px;
        flex-shrink: 0;
    }

    .trend-indicator {
        font-size: 0.65rem;
        padding: 2px 4px;
    }

    .budget-warning {
        font-size: 0.75rem;
        padding: 8px 10px;
        margin-top: 10px;
    }

    .expand-summary-btn {
        padding: 8px;
        font-size: 0.8rem;
        margin-top: 10px;
    }

    .detail-row {
        padding: 6px 10px;
        font-size: 0.75rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .detail-label {
        font-size: 0.7rem;
    }

    .detail-value {
        font-size: 0.8rem;
    }

    /* Mobile touch targets (minimum 44x44px for accessibility) */
    .summary-stat.income-stat,
    .summary-stat.expense-stat {
        min-height: 44px;
        padding: 8px 0;
    }

    /* Mobile Toolbar */
    .transaction-toolbar {
        flex-direction: column;
        gap: 10px;
    }

    .filter-toggle-btn {
        width: 100%;
        justify-content: center;
    }

    /* Mobile Filter Panel */
    .filter-panel.open {
        max-height: 600px;
    }

    .filter-panel-content {
        padding: 16px;
    }

    /* Mobile Quick Filters */
    .quick-filters-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .quick-filters-bar::-webkit-scrollbar {
        display: none;
    }

    .quick-filter-pill {
        flex: none;
        min-width: auto;
    }

    /* Mobile Export Actions */
    .export-actions {
        flex-direction: column;
    }

    .export-btn {
        width: 100%;
    }
}


.chart-container {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--border-color);
}

.chart-container h3 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
}

/* Bar Chart */
.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 150px;
    padding: 10px 0;
    gap: 8px;
}

.bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.bar-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
}

.bar {
    width: 20px;
    border-radius: 4px 4px 0 0;
    min-height: 4px;
    position: relative;
    transition: height 0.5s ease;
}

.bar.income-bar {
    background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
}

.bar.expense-bar {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
}

.bar-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-color);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.bar:hover .bar-tooltip {
    opacity: 1;
}

.bar-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.income {
    background: #22c55e;
}

.legend-dot.expense {
    background: #ef4444;
}

/* Donut Chart */
.donut-chart-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.donut-chart {
    width: 150px;
    height: 150px;
    transform: rotate(-90deg);
}

.donut-segment {
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    padding-top: 25px;
}

.donut-total {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-color);
}

.donut-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.donut-legend {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-name {
    flex: 1;
    color: var(--text-color);
}

.legend-value {
    font-weight: 600;
    color: var(--text-muted);
}

/* --- Date Range Filter --- */
.date-range-container {
    margin-bottom: 15px;
}

.date-range-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.date-preset-btn {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.date-preset-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.date-preset-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
}

.custom-date-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}

.custom-date-inputs input {
    flex: 1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9rem;
}

.custom-date-inputs span {
    color: var(--text-muted);
}

/* --- Export Actions --- */
.export-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-wrap: wrap;
}

.export-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255,255,255,0.1);
    background: var(--card-bg);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
    min-width: 140px;
}

.export-btn i {
    font-size: 0.9rem;
}

.export-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
}

.export-btn.secondary {
    background: transparent;
}

/* --- Recurring Transactions --- */
.recurring-section {
    margin-top: 20px;
    margin-bottom: 24px;
}

.recurring-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.add-recurring-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    border: none;
    background: var(--accent);
    color: #000;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.add-recurring-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

.recurring-rules-list {
    margin-top: 15px;
}

.empty-recurring {
    text-align: center;
    color: var(--text-muted);
    padding: 30px 20px;
    font-size: 0.9rem;
}

.recurring-rule-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--input-bg);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.recurring-rule-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.recurring-rule-card.inactive {
    opacity: 0.5;
}

.recurring-rule-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recurring-rule-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recurring-rule-icon.expense {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.recurring-rule-icon.income {
    background: rgba(34, 197, 94, 0.2);
    color: #22c55e;
}

.recurring-rule-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
}

.recurring-rule-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.recurring-rule-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.recurring-amount {
    font-weight: 600;
}

.recurring-amount.expense {
    color: #ef4444;
}

.recurring-amount.income {
    color: #22c55e;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* --- Tag Suggestions --- */
.tag-suggestions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 8px 0;
}

.suggestion-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.tag-suggestion-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 15px;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tag-suggestion-chip:hover {
    transform: scale(1.05);
}

/* --- Swipe Gestures --- */
.transaction-item {
    position: relative;
    overflow: hidden;
}

.transaction-item::before,
.transaction-item::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s;
}

.transaction-item::before {
    left: -80px;
    background: linear-gradient(90deg, #3b82f6 0%, #3b82f6 100%);
    color: white;
}

.transaction-item::after {
    right: -80px;
    background: linear-gradient(90deg, #ef4444 0%, #ef4444 100%);
    color: white;
}

.transaction-item.swipe-edit::before {
    opacity: 1;
}

.transaction-item.swipe-delete::after {
    opacity: 1;
}

/* --- Enhanced Empty States --- */
.empty-state-enhanced {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 60px 30px;
    text-align: center;
}

.empty-state-illustration {
    position: relative;
    margin-bottom: 24px;
}

.empty-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    position: relative;
    z-index: 2;
}

.empty-decoration {
    position: absolute;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.1;
}

.empty-decoration-1 {
    width: 120px;
    height: 120px;
    top: -20px;
    left: -20px;
    animation: float 3s ease-in-out infinite;
}

.empty-decoration-2 {
    width: 30px;
    height: 30px;
    top: -10px;
    right: -20px;
    animation: float 2.5s ease-in-out infinite 0.5s;
}

.empty-decoration-3 {
    width: 20px;
    height: 20px;
    bottom: 0;
    left: -10px;
    animation: float 2s ease-in-out infinite 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.empty-state-enhanced h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
}

.empty-state-enhanced p {
    margin: 0 0 24px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 280px;
}

.empty-state-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 25px;
    border: none;
    background: var(--accent);
    color: #000;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.empty-state-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--accent-glow);
}

/* --- Print Styles --- */
@media print {
    body {
        background: white !important;
        color: black !important;
    }

    .sidebar,
    .nav-links,
    .header-add-btn,
    .export-actions,
    .transaction-search-container,
    .date-range-container,
    .modal,
    #toast-container {
        display: none !important;
    }

    .content {
        width: 100%;
        padding: 20px;
        margin: 0;
    }

    .card {
        background: white !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }

    .transaction-item {
        border-bottom: 1px solid #ddd;
    }
}
/* ============================================
   ENHANCED TRANSACTION ITEMS
   ============================================ */

/* Improved transaction item layout */
.transaction-content {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.transaction-left {
    display: flex !important;
    align-items: left;
    gap: 12px;
    flex: 1;
    min-width: 0; /* For text truncation */
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.transaction-icon.income {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.05) 100%);
    color: var(--accent);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.transaction-icon.expense {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.transaction-icon i {
    transition: transform 0.3s;
}

.transaction-item:hover .transaction-icon i {
    transform: scale(1.2) rotate(5deg);
}

.transaction-details {
    flex: 1;
    min-width: 0; /* For text truncation */
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.transaction-main {
    display: flex !important;
    align-items: left;
    gap: 8px;
    flex-wrap: wrap;
}

.transaction-main strong {
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    color: var(--text-main);
}

.installment-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.transaction-meta {
    display: flex !important;
    align-items: center;
    gap: 12px;
    margin-top: 2px !important;
}

.transaction-date,
.transaction-wallet {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.transaction-date i,
.transaction-wallet i {
    font-size: 0.7rem;
    opacity: 0.7;
}

.transaction-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.transaction-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem !important;
    padding: 3px 8px !important;
    border-radius: 8px !important;
    background: var(--tag-color) !important;
    opacity: 0.9;
    color: white !important;
    border: 1px solid var(--tag-color) !important;
    font-weight: 500;
}

.transaction-tag i {
    font-size: 0.65rem;
}

.transaction-tag.no-tag {
    background: rgba(255,255,255,0.05) !important;
    color: var(--text-muted) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
}

.transaction-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.transaction-amount {
    text-align: right;
}

.amount-value {
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    display: block;
}

.transaction-amount.income .amount-value {
    color: var(--accent);
}

.transaction-amount.expense .amount-value {
    color: var(--text-main);
}

/* Quick action buttons */
.transaction-actions {
    display: flex;
    gap: 6px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    transform: translateX(-10px);
}

.transaction-item:hover .transaction-actions {
    opacity: 1;
    transform: translateX(0);
}

.transaction-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.transaction-action-btn:hover {
    transform: scale(1.1);
}

.transaction-action-btn.edit-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.transaction-action-btn.delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

/* Month header improvements */
.transaction-month-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--border-radius-md);
    margin: 24px 0 16px 0;
    border-left: 4px solid var(--accent);
}

.transaction-month-header:first-child {
    margin-top: 0;
}

.month-header-left h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px 0;
}

.month-transaction-count {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.month-header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.month-total-income,
.month-total-expense {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
}

.month-total-income {
    color: var(--accent);
}

.month-total-expense {
    color: var(--text-muted);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .transaction-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .transaction-main strong {
        font-size: 0.9rem !important;
    }

    .amount-value {
        font-size: 1rem !important;
    }

    .transaction-actions {
        opacity: 1; /* Always show on mobile */
        transform: translateX(0);
    }

    .transaction-action-btn {
        width: 36px;
        height: 36px;
    }

    .transaction-month-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .month-header-right {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .transaction-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .transaction-content {
        flex-direction: column;
        align-items: stretch;
    }

    .transaction-right {
        justify-content: space-between;
        width: 100%;
    }

    .transaction-meta {
        flex-wrap: wrap;
    }

    .transaction-actions {
        gap: 8px;
    }
}

/* ============================================
   HELP SECTION STYLES
   ============================================ */

.help-container {
    max-width: 800px;
    margin: 0 auto;
    padding-bottom: 40px;
}

/* Hero */
.help-hero {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 24px;
}

.help-hero-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
}

.help-hero h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.help-hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Cards */
.help-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    transition: all 0.2s ease;
}

.help-card:not(.help-highlight):not(.help-mindset) {
    cursor: pointer;
}

.help-card:not(.help-highlight):not(.help-mindset):hover {
    border-color: rgba(255,255,255,0.1);
}

.help-card.help-highlight {
    border-color: var(--accent);
    border-width: 2px;
}

.help-card.help-mindset {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(34, 197, 94, 0.1));
    border-color: var(--secondary);
}

.help-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
}

.help-card-icon {
    font-size: 1.5rem;
}

.help-card-header h3 {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
}

.help-card-toggle {
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.help-card.expanded .help-card-toggle {
    transform: rotate(180deg);
}

.help-card-content {
    padding: 0 20px 20px;
}

.help-expandable {
    display: none;
}

.help-card.expanded .help-expandable {
    display: block;
    animation: helpFadeIn 0.3s ease;
}

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

/* Quick Start Steps */
.help-steps {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.help-step {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--accent);
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 1rem;
}

.step-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Philosophy Items */
.help-philosophy {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.philosophy-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.philosophy-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.philosophy-item strong {
    display: block;
    margin-bottom: 4px;
}

.philosophy-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Section Groups */
.help-section-group {
    margin-bottom: 24px;
}

.help-section-group:last-child {
    margin-bottom: 0;
}

.help-section-group h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--accent);
}

.help-section-group h4 i {
    font-size: 0.9rem;
}

.help-section-group > p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.help-list {
    list-style: none;
    padding: 0;
    margin: 12px 0;
}

.help-list li {
    padding: 8px 0 8px 20px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: bold;
}

.help-list li strong {
    color: var(--text-main);
}

.help-tip, .help-example {
    background: rgba(34, 197, 94, 0.1);
    border-left: 3px solid var(--accent);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 12px;
}

.help-tip strong, .help-example strong {
    color: var(--accent);
}

.help-example {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--secondary);
}

.help-example strong {
    color: var(--secondary);
}

/* Habit Tips */
.help-intro {
    font-size: 1rem;
    color: var(--text-main);
    margin-bottom: 20px;
    font-weight: 500;
}

.help-habit-tips {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.habit-tip {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(255,255,255,0.02);
    padding: 16px;
    border-radius: var(--border-radius-sm);
}

.habit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.habit-tip strong {
    display: block;
    margin-bottom: 4px;
}

.habit-tip p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

/* Scenarios */
.help-scenario {
    background: rgba(255,255,255,0.02);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 16px;
}

.help-scenario:last-child {
    margin-bottom: 0;
}

.help-scenario h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.help-scenario p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Pro Tips */
.help-protips {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.protip {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-radius: var(--border-radius-sm);
}

.protip code {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    min-width: 40px;
    text-align: center;
}

.protip span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.protip span strong {
    color: var(--text-main);
}

/* Mindset */
.mindset-quotes {
    margin-bottom: 20px;
}

.mindset-quotes blockquote {
    border-left: 3px solid var(--secondary);
    padding: 12px 20px;
    margin: 0 0 16px 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.mindset-quotes blockquote:last-child {
    margin-bottom: 0;
}

.mindset-closing {
    color: var(--text-main);
    font-size: 1rem;
    line-height: 1.6;
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* Footer */
.help-footer {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.help-footer p {
    margin-bottom: 8px;
}

.help-version {
    font-size: 0.8rem;
    opacity: 0.6;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .help-hero {
        padding: 30px 16px;
    }

    .help-hero h2 {
        font-size: 1.5rem;
    }

    .help-hero-subtitle {
        font-size: 1rem;
    }

    .help-card-header {
        padding: 16px;
    }

    .help-card-content {
        padding: 0 16px 16px;
    }

    .help-step {
        gap: 12px;
    }

    .step-number {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .habit-tip {
        padding: 12px;
    }

    .help-scenario {
        padding: 16px;
    }

    .protip {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .protip code {
        min-width: auto;
    }
}

/* =========================================
   PROFILE SWITCHER STYLES
   ========================================= */

/* Profile Switcher - Desktop (in nav footer) */
.profile-switcher {
    display: block;
    position: relative;
    margin-bottom: 12px;
    width: 100%;
}

.profile-current {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--card-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid rgba(255,255,255,0.05);
}

.profile-current:hover {
    background: var(--card-hover);
    border-color: rgba(255,255,255,0.1);
}

.profile-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.profile-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.profile-name {
    flex: 1;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-chevron {
    font-size: 0.7rem;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.profile-dropdown.open + .profile-current .profile-chevron,
.profile-current:has(+ .profile-dropdown.open) .profile-chevron {
    transform: rotate(180deg);
}

/* Profile Dropdown */
.profile-dropdown {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 50;
    overflow: hidden;
}

.profile-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-main);
    font-size: 0.9rem;
}

.profile-dropdown-item:hover {
    background: rgba(255,255,255,0.05);
}

.profile-dropdown-item.active {
    background: rgba(34, 197, 94, 0.1);
}

.profile-dropdown-item.active .fa-check {
    color: var(--accent);
    margin-left: auto;
    font-size: 0.8rem;
}

.profile-dropdown-item.action {
    color: var(--text-muted);
}

.profile-dropdown-item.action:hover {
    color: var(--accent);
}

.profile-dropdown-item.action i {
    width: 20px;
    text-align: center;
}

.profile-dropdown-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.profile-dropdown-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 6px 0;
}

/* Mobile Profile Switcher */
.mobile-profile-switcher {
    position: relative;
}

.mobile-profile-dropdown {
    display: none;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--border-radius-md);
    margin-top: 8px;
    overflow: hidden;
}

.mobile-profile-dropdown.open {
    display: flex;
}

.mobile-profile-dropdown .profile-dropdown-item {
    padding: 14px 16px;
}

/* Profile Modal Styles */
.profile-icon-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-icon-option {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 2px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    font-size: 1.1rem;
}

.profile-icon-option:hover {
    border-color: rgba(255,255,255,0.2);
    color: var(--text-main);
}

.profile-icon-option.selected {
    border-color: var(--accent);
    background: var(--accent-dim);
    color: var(--accent);
}

.profile-color-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.profile-color-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    border: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.profile-color-option:hover {
    transform: scale(1.1);
}

.profile-color-option.selected {
    border-color: white;
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* =========================================
   USER GREETING CARD STYLES
   ========================================= */

.user-greeting-card {
    background: linear-gradient(135deg, var(--card-bg) 0%, rgba(34, 197, 94, 0.1) 100%);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.user-greeting-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent) 0%, #16a34a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 12px var(--accent-glow);
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar span {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-avatar i {
    font-size: 1.4rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-info h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.user-greeting-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.user-stats {
    display: flex;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-stat {
    flex: 1;
    text-align: center;
    padding: 12px 8px;
    background: rgba(255,255,255,0.03);
    border-radius: 12px;
}

.user-stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 2px;
}

.user-stat-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
