        /* ═══════════════════════════════════════════════════════════════
           TEMPLATE DIFF COMPARISON
           ═══════════════════════════════════════════════════════════════ */

        .manage-templates-compare-btn {
            display: inline-flex;
            align-items: center;
            gap: var(--space-xs);
            margin-top: var(--space-sm);
            padding: var(--space-xs) var(--space-md);
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-full);
            font-size: var(--text-small);
            font-weight: var(--font-medium);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .manage-templates-compare-btn:hover {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            border-color: var(--border-medium);
        }

        .template-diff-overlay {
            position: fixed;
            top: 0; left: 0; right: 0; bottom: 0;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2100;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.3s ease;
        }

        .template-diff-overlay.show {
            opacity: 1;
            pointer-events: all;
        }

        .template-diff-modal {
            background: var(--bg-tertiary);
            border-radius: var(--radius-xl);
            padding: var(--space-xl);
            max-width: 700px;
            width: 90vw;
            max-height: 85vh;
            overflow-y: auto;
            box-shadow: var(--shadow-xl);
        }

        .template-diff-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--space-lg);
        }

        .template-diff-title {
            font-size: var(--text-heading);
            font-weight: var(--font-semibold);
        }

        .template-diff-selectors {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            margin-bottom: var(--space-lg);
        }

        .template-diff-selectors select {
            flex: 1;
        }

        .template-diff-arrow {
            font-size: var(--text-lg);
            color: var(--text-muted);
            font-weight: var(--font-bold);
        }

        .template-diff-section {
            margin-bottom: var(--space-lg);
        }

        .template-diff-section-title {
            font-size: var(--text-body);
            font-weight: var(--font-semibold);
            color: var(--text-secondary);
            margin-bottom: var(--space-sm);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .template-diff-group {
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            overflow: hidden;
            margin-bottom: var(--space-sm);
        }

        .template-diff-group-header {
            padding: var(--space-sm) var(--space-md);
            font-weight: var(--font-semibold);
            font-size: var(--text-body);
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border-light);
        }

        .template-diff-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--space-sm) var(--space-md);
            font-size: var(--text-body);
            border-bottom: 1px solid var(--border-light);
        }

        .template-diff-row:last-child {
            border-bottom: none;
        }

        .template-diff-item-name {
            flex: 1;
            color: var(--text-primary);
        }

        .template-diff-values {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            font-variant-numeric: tabular-nums;
        }

        .template-diff-old {
            color: var(--text-muted);
            text-decoration: line-through;
        }

        .template-diff-new {
            font-weight: var(--font-medium);
            color: var(--text-primary);
        }

        .template-diff-badge {
            font-size: var(--text-small);
            padding: 2px 8px;
            border-radius: var(--radius-full);
            font-weight: var(--font-medium);
        }

        .template-diff-badge.increase {
            background: var(--danger-light);
            color: var(--danger);
        }

        .template-diff-badge.decrease {
            background: var(--success-light);
            color: var(--success);
        }

        .template-diff-added {
            background: var(--success-light);
        }

        .template-diff-removed {
            background: var(--danger-light);
        }

        .diff-copy-btn {
            padding: 3px 10px;
            border: 1px solid var(--border-medium);
            border-radius: var(--radius-sm);
            background: var(--bg-primary);
            color: var(--person-0);
            font-size: var(--text-small);
            font-weight: var(--font-medium);
            cursor: pointer;
            transition: all var(--duration-fast) var(--ease);
            white-space: nowrap;
            flex-shrink: 0;
            margin-left: var(--space-sm);
        }

        .diff-copy-btn:hover {
            background: var(--person-0-light);
            border-color: var(--person-0);
        }

        .template-diff-summary {
            background: var(--bg-secondary);
            border-radius: var(--radius-md);
            padding: var(--space-md);
            display: flex;
            justify-content: space-around;
            text-align: center;
            font-size: var(--text-body);
        }

        .template-diff-summary-item {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .template-diff-summary-label {
            color: var(--text-secondary);
            font-size: var(--text-small);
        }

        .template-diff-summary-value {
            font-weight: var(--font-semibold);
            font-variant-numeric: tabular-nums;
        }

        .template-diff-summary-value .diff-positive {
            color: var(--success);
        }

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

        .template-diff-empty {
            text-align: center;
            padding: var(--space-xl);
            color: var(--text-muted);
        }

        /* Template diff mobile */
        @media (max-width: 640px) {
            .template-diff-modal {
                width: 95vw;
                padding: var(--space-md);
                max-height: 90vh;
            }

            .template-diff-selectors {
                flex-direction: column;
                gap: var(--space-sm);
            }

            .template-diff-arrow {
                display: none;
            }

            .template-diff-summary {
                flex-direction: column;
                gap: var(--space-sm);
            }
        }

        [data-theme="dark"] .template-diff-modal {
            background: var(--bg-secondary);
        }

        [data-theme="dark"] .template-diff-group {
            background: var(--bg-tertiary);
        }

        /* ═══════ Budget Alerts & Thresholds ═══════ */

        .alert-banners {
            max-width: calc(var(--container-max) - 2 * var(--container-padding));
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: var(--space-sm);
        }

        .alert-banners:not(:empty) {
            margin-bottom: var(--space-xl);
        }

        .alert-banner {
            background: var(--warning-light);
            border: 1px solid rgba(255, 149, 0, 0.2);
            border-radius: var(--radius-md);
            padding: var(--space-md) var(--space-lg);
            display: flex;
            align-items: center;
            gap: var(--space-md);
            animation: slideDown 0.3s ease;
        }

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

        .alert-banner-icon {
            font-size: 1.25rem;
            flex-shrink: 0;
        }

        .alert-banner-content {
            flex: 1;
        }

        .alert-banner-title {
            font-weight: var(--font-semibold);
            font-size: var(--text-body);
            color: var(--text-primary);
            margin-bottom: 2px;
        }

        .alert-banner-detail {
            font-size: var(--text-small);
            color: var(--text-secondary);
        }

        .alert-banner-progress {
            height: 4px;
            background: var(--border-light);
            border-radius: 2px;
            margin-top: var(--space-xs);
            position: relative;
            overflow: hidden;
        }

        .alert-banner-progress-fill {
            height: 100%;
            border-radius: 2px;
            background: var(--warning);
            position: relative;
        }

        .alert-banner-progress-threshold {
            position: absolute;
            top: -2px;
            width: 2px;
            height: 8px;
            background: var(--text-primary);
            border-radius: 1px;
        }

        .alert-banner-dismiss {
            background: none;
            border: none;
            color: var(--text-muted);
            cursor: pointer;
            padding: 4px;
            font-size: 18px;
            flex-shrink: 0;
        }

        .alert-banner-dismiss:hover {
            color: var(--text-primary);
        }

        .alert-banner.danger {
            background: var(--danger-light);
            border-color: rgba(255, 59, 48, 0.2);
        }

        .nav-alert-btn {
            position: relative;
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            font-size: 16px;
            color: var(--text-secondary);
        }

        .nav-alert-badge {
            position: absolute;
            top: 0;
            right: 0;
            background: var(--danger);
            color: white;
            font-size: 10px;
            font-weight: var(--font-bold);
            min-width: 16px;
            height: 16px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
        }

        .alert-rule-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: var(--space-sm) var(--space-md);
            border-bottom: 1px solid var(--border-light);
        }

        .alert-rule-item:last-child {
            border-bottom: none;
        }

        .alert-rule-left {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            flex: 1;
        }

        .alert-rule-label {
            font-size: var(--text-body);
            color: var(--text-primary);
        }

        .alert-rule-threshold {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: var(--text-small);
            color: var(--text-secondary);
        }

        .alert-rule-threshold input {
            width: 50px;
            text-align: center;
            padding: 4px;
            border: 1px solid var(--border-light);
            border-radius: var(--radius-xs);
            font-size: var(--text-small);
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }


        [data-theme="dark"] .alert-banner {
            background: rgba(255, 149, 0, 0.15);
        }

        [data-theme="dark"] .alert-banner.danger {
            background: rgba(255, 59, 48, 0.15);
        }

        /* ═══════════════════════════════════════════════════════════════
           BANK ACCOUNTS (Settings)
           ═══════════════════════════════════════════════════════════════ */

        .bank-account-empty {
            padding: var(--space-md);
            text-align: center;
            font-size: var(--text-small);
            color: var(--text-secondary);
        }

        .bank-account-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: var(--space-sm) var(--space-md);
            border-bottom: 1px solid var(--border-light);
        }

        .bank-account-item:last-child { border-bottom: none; }

        .bank-account-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

        .bank-account-name {
            font-size: var(--text-body);
            font-weight: var(--font-medium);
            color: var(--text-primary);
        }

        .bank-account-note {
            font-size: var(--text-caption);
            color: var(--text-secondary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .bank-account-actions {
            display: flex;
            gap: 4px;
            flex-shrink: 0;
        }

        .bank-account-edit,
        .bank-account-delete {
            background: none;
            border: none;
            cursor: pointer;
            width: 28px;
            height: 28px;
            border-radius: var(--radius-sm);
            font-size: 14px;
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .bank-account-edit:hover { background: var(--bg-tertiary); }
        .bank-account-delete:hover { background: var(--danger-light); color: var(--danger); }


/* ═══════ Error Boundaries ═══════ */
.error-boundary {
    background: var(--danger-light);
    border: 1px solid var(--danger);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-align: center;
    margin: var(--space-md);
}

.error-boundary p {
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: var(--text-body);
}

.error-boundary button {
    background: var(--danger);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-caption);
}

.error-boundary button:hover {
    opacity: 0.9;
}

[data-theme="dark"] .error-boundary {
    background: rgba(255, 59, 48, 0.15);
    border-color: rgba(255, 59, 48, 0.4);
}

/* Toast notifications — see modals.css for .toast styles */

/* ═══════ PWA Update Banner ═══════ */
.update-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--person-0);
    color: white;
    text-align: center;
    padding: 12px 20px;
    font-size: var(--text-caption);
    z-index: 10001;
    animation: slideUp 0.3s ease;
}

.update-banner button {
    background: white;
    color: var(--person-0);
    border: none;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    margin-left: 12px;
    cursor: pointer;
    font-weight: var(--font-semibold);
}

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

/* ═══════ Offline Indicator ═══════ */
.offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--warning);
    color: white;
    text-align: center;
    padding: 8px;
    font-size: var(--text-small);
    z-index: 10001;
    display: none;
}

.offline-banner.visible {
    display: block;
}


/* ═══════════════════════════════════════════════════════════════
   INCOME-PROPORTIONAL SPLIT SUGGESTIONS (ALLO-18)
   ═══════════════════════════════════════════════════════════════ */

.income-ratio-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: 3px var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: var(--text-small);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.income-ratio-pill .income-ratio-label {
    color: var(--text-tertiary);
    font-size: var(--text-micro);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.income-ratio-pill .income-ratio-value {
    font-weight: var(--font-semibold);
}

.proportional-split-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    margin-top: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    font-size: var(--text-small);
    font-weight: var(--font-medium);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: var(--touch-target);
}

.proportional-split-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.proportional-split-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

[data-theme="dark"] .income-ratio-pill {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}

[data-theme="dark"] .proportional-split-btn {
    background: var(--bg-tertiary);
    border-color: var(--border-medium);
}


/* ═══════════════════════════════════════════════════════════════
   STARTER TEMPLATES BROWSER
   ═══════════════════════════════════════════════════════════════ */

.starter-templates-modal {
    max-width: 640px;
    width: 90vw;
}

.starter-templates-subtitle {
    color: var(--text-secondary);
    font-size: var(--text-small);
    margin: 0 0 var(--space-md);
    line-height: 1.5;
}

.starter-templates-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.starter-template-card {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    padding: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.2s ease;
}

.starter-template-card:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.12);
}

.starter-template-card:active {
    transform: translateY(0);
}

.starter-template-icon {
    font-size: 2rem;
    line-height: 1;
}

.starter-template-info {
    flex: 1;
}

.starter-template-name {
    font-weight: var(--font-semibold);
    font-size: var(--text-body);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.starter-template-desc {
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: 1.4;
    margin-bottom: var(--space-xs);
}

.starter-template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.starter-template-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

.starter-template-tip {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(52, 199, 89, 0.08);
    border-radius: var(--radius-md);
    font-size: var(--text-small);
    color: var(--text-secondary);
    line-height: 1.4;
}

.starter-template-tip-icon {
    flex-shrink: 0;
    font-size: 14px;
}

[data-theme="dark"] .starter-template-card:hover {
    box-shadow: 0 4px 16px rgba(0, 113, 227, 0.2);
}

[data-theme="dark"] .starter-template-tip {
    background: rgba(52, 199, 89, 0.12);
}


/* ═══════════════════════════════════════════════════════════════
   GOAL MILESTONE CELEBRATIONS
   ═══════════════════════════════════════════════════════════════ */

.milestone-celebration-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 10000;
    pointer-events: none;
    overflow: hidden;
}

.confetti-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    animation: confetti-fall 3s ease-out forwards;
    will-change: transform, opacity;
}

@keyframes confetti-fall {
    0% {
        transform: translateY(-20px) rotate(0deg) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(100vh) rotate(720deg) scale(0.3);
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .confetti-particle {
        animation: none;
        display: none;
    }
    .milestone-celebration-overlay {
        display: none;
    }
}

.milestone-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    z-index: 10001;
    background: var(--glass-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-lg) var(--space-xl);
    text-align: center;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
    opacity: 0;
    animation: milestone-toast-in 0.5s ease forwards;
    pointer-events: auto;
}

@keyframes milestone-toast-in {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.milestone-toast-icon {
    font-size: 3rem;
    margin-bottom: var(--space-sm);
    animation: milestone-icon-bounce 0.6s ease 0.3s both;
}

@keyframes milestone-icon-bounce {
    0% { transform: scale(0.5); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.milestone-toast-title {
    font-size: var(--text-title);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.milestone-toast-subtitle {
    font-size: var(--text-body);
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}

.milestone-toast-dismiss {
    padding: var(--space-xs) var(--space-lg);
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: var(--text-small);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: background 0.2s;
}

.milestone-toast-dismiss:hover {
    background: var(--primary-hover);
}

@media (prefers-reduced-motion: reduce) {
    .milestone-toast {
        animation: none;
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    .milestone-toast-icon {
        animation: none;
    }
}

/* Goal milestone history in detail view */
.goal-milestone-history {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.goal-milestone-history-title {
    font-size: var(--text-small);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.goal-milestone-history-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-small);
    color: var(--text-secondary);
    padding: 2px 0;
}

.goal-milestone-history-item.reached {
    color: var(--success);
}

.goal-milestone-history-icon {
    font-size: 12px;
    width: 16px;
    text-align: center;
}


/* ═══════════════════════════════════════════════════════════════
   SOLO MODE — Hide multi-person UI for 1-person households
   ═══════════════════════════════════════════════════════════════ */

.solo-mode .budget-row-persons,
.solo-mode .budget-row-split-collapsed,
.solo-mode .shared-toggle,
.solo-mode .dest-person-btn,
.solo-mode .dest-multi .dest-person-options {
    display: none !important;
}

.solo-mode .money-flow-tab[data-tab="settlement"] {
    display: none !important;
}

.solo-mode .split-calc-quick-tool,
.solo-mode #toggle-category-details {
    display: none !important;
}

/* Solo mode: single input instead of per-person inputs */
.solo-mode .person-inputs-row .input-with-label:not(:first-child) {
    display: none !important;
}

/* Solo mode: hide person labels since there's only one */
.solo-mode .person-inputs-row .input-with-label:first-child .input-label {
    display: none;
}

/* Solo mode: income row person amounts hidden */
.solo-mode .income-person-amounts {
    display: none !important;
}

/* Solo mode: hide shared badge on collapsed rows */
.solo-mode .shared-badge {
    display: none !important;
}

/* Solo mode: hide per-person dest badges, only show "All" dest */
.solo-mode .dest-sep,
.solo-mode .dest-multi .dest-person-btn {
    display: none !important;
}

/* Solo mode: dashboard subtitle "& partner" hidden */
.solo-mode .dashboard-subtitle {
    display: none;
}

/* Solo mode: hide multi-person dashboard sections */
.solo-mode .share-summary-section,
.solo-mode .split-calc-quick-tool,
.solo-mode #share-summary-section,
.solo-mode #paycheck-breakdown-btn,
.solo-mode .income-split-paycheck {
    display: none !important;
}

/* ── Solo income metric card ── */
.solo-income-metric {
    text-align: center;
    padding: var(--space-lg) var(--space-md);
}

.solo-income-value {
    font-size: var(--text-hero, clamp(2rem, 5vw, 3.5rem));
    font-weight: var(--font-bold);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.solo-income-label {
    font-size: var(--text-body);
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

/* ── Solo savings progress bar ── */
.solo-savings-card {
    padding: var(--space-md);
}

.solo-savings-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
}

.solo-savings-rate {
    font-size: var(--text-title);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}

.solo-savings-amount {
    font-size: var(--text-body);
    color: var(--text-secondary);
}

.solo-savings-bar-track {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.solo-savings-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--success), #30d158);
    border-radius: 6px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 0;
}

.solo-savings-targets {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-caption);
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}



/* ═══════════════════════════════════════════════════════════════
   HOUSEHOLD BALANCE — Fairness & Settlement
   ═══════════════════════════════════════════════════════════════ */

.solo-mode #household-balance-section {
    display: none !important;
}

.hb-fairness {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
}

.hb-gauge {
    position: relative;
    display: inline-block;
    margin-bottom: var(--space-xs);
}

.hb-gauge-value {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: var(--text-title);
    font-weight: var(--font-bold);
}

.hb-gauge-label {
    font-size: var(--text-body);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.hb-person-splits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-xs) var(--space-md);
    font-size: var(--text-caption);
}

.hb-person-split {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hb-person-split.over { color: var(--danger); }
.hb-person-split.under { color: var(--success); }
.hb-person-split.fair { color: var(--text-secondary); }

.hb-expected {
    color: var(--text-tertiary);
    font-size: 0.85em;
}

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

.hb-no-data {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-tertiary);
    font-size: var(--text-body);
}

.hb-settlement {
    border-top: 1px solid var(--border-light);
    padding: var(--space-sm) var(--space-md);
}

.hb-settlement-title,
.hb-history-title {
    font-size: var(--text-caption);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-xs);
}

.hb-owing-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: var(--space-xs) 0;
    font-size: var(--text-body);
}

.hb-arrow {
    color: var(--text-tertiary);
}

.hb-owing-amount {
    margin-left: auto;
    font-weight: var(--font-semibold);
    color: var(--primary);
}

.hb-settle-btn {
    margin-top: var(--space-sm);
    width: 100%;
}

.hb-settled-msg {
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    color: var(--success);
    font-weight: var(--font-semibold);
    border-top: 1px solid var(--border-light);
}

.hb-history {
    border-top: 1px solid var(--border-light);
    padding: var(--space-sm) var(--space-md);
}

.hb-history-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    font-size: var(--text-caption);
    color: var(--text-secondary);
}

.hb-history-date {
    min-width: 50px;
    color: var(--text-tertiary);
}

.hb-history-amount {
    margin-left: auto;
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.hb-history-reason {
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-tertiary);
}



/* ═══════════════════════════════════════════════════════════════
   SUBSCRIPTION AUDIT VIEW
   ═══════════════════════════════════════════════════════════════ */

.subscription-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-caption);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

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

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(0, 113, 227, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
}

[data-theme="dark"] .subscription-badge {
    background: rgba(0, 113, 227, 0.15);
}

/* Subscription audit section on dashboard */
.subscription-audit-section {
    margin-top: var(--space-sm);
}

.subscription-audit-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(var(--glass-blur));
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--glass-shadow);
}

.subscription-audit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.subscription-audit-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.subscription-audit-title {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.subscription-audit-total {
    font-size: var(--text-title);
    font-weight: 700;
    color: var(--danger);
}

.subscription-audit-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.subscription-audit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    font-size: var(--text-caption);
    gap: 8px;
}

.subscription-audit-item-name {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 500;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.subscription-audit-item-name > span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subscription-audit-item-cat {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 400;
}

.subscription-audit-item-amount {
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* Per-person amount columns */
.sub-audit-amounts {
    display: flex;
    gap: 0;
    flex-shrink: 0;
}

.sub-audit-amt {
    display: inline-block;
    width: 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-size: 11px;
    font-weight: 500;
}

.sub-audit-amt-total {
    font-weight: 600;
    color: var(--text-primary);
    border-left: 1px solid var(--border-light);
    margin-left: 4px;
    padding-left: 4px;
}

/* Column header row */
.sub-audit-col-header {
    background: transparent;
    padding-top: 0;
    padding-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    opacity: 0.7;
}

.sub-audit-col-header .sub-audit-amt-total {
    border-left-color: transparent;
}

.subscription-audit-empty {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-secondary);
    font-size: var(--text-caption);
}

.subscription-person-group {
    margin-top: var(--space-xs);
}

.subscription-person-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    padding-left: 4px;
}

[data-theme="dark"] .subscription-audit-item {
    background: var(--bg-tertiary);
}

/* Person filter — inline segmented control */
.sub-audit-filters {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 2px;
    border: 1px solid var(--border-light);
    flex-shrink: 0;
}

.sub-audit-filter-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 10px;
    min-width: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.32, 0.72, 0, 1);
    font-family: inherit;
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
}

.sub-audit-filter-pill:hover {
    color: var(--pill-color, var(--text-primary));
}

.sub-audit-filter-pill.active {
    background: var(--pill-color, #0071e3);
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .sub-audit-filters {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
}

[data-theme="dark"] .sub-audit-filter-pill.active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}


/* ═══════════════════════════════════════════════════════════════
   VARIABLE INCOME
   ═══════════════════════════════════════════════════════════════ */

.variable-income-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    background: var(--warning-light);
    color: var(--warning);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    margin-right: 4px;
}

.variable-income-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-caption);
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
    min-height: 44px;
}

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

.variable-toggle-label {
    font-weight: 500;
}

.income-controls-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    width: 100%;
}

.variable-income-ranges {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) 0;
}

.variable-range-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.variable-range-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.variable-range-inputs {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.variable-range-expected {
    opacity: 0.7;
    pointer-events: none;
}

.variable-min-input {
    border-color: var(--danger) !important;
    border-left: 3px solid var(--danger) !important;
}

.variable-max-input {
    border-color: var(--success) !important;
    border-left: 3px solid var(--success) !important;
}

/* Dashboard variable income range indicator */
.variable-income-range-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--warning-light);
    font-size: 11px;
    font-weight: 500;
    color: var(--warning);
    margin-top: var(--space-xs);
}

.variable-range-icon {
    font-weight: 700;
    font-size: 14px;
}

/* Simulator variable income presets */
.sim-variable-income-presets {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.sim-preset-label {
    font-size: var(--text-caption);
    color: var(--text-secondary);
    white-space: nowrap;
}

.sim-preset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    background: var(--bg-secondary);
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 28px;
}

.sim-preset-btn:hover {
    background: var(--warning-light);
    color: var(--warning);
    border-color: var(--warning);
}

[data-theme="dark"] .variable-income-badge {
    background: rgba(255, 149, 0, 0.15);
}

[data-theme="dark"] .variable-income-range-indicator {
    background: rgba(255, 149, 0, 0.12);
}

[data-theme="dark"] .sim-preset-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
}

[data-theme="dark"] .sim-preset-btn:hover {
    background: rgba(255, 149, 0, 0.15);
}

@media (max-width: 480px) {
    .variable-income-ranges {
        gap: var(--space-xs);
    }
    .variable-range-inputs {
        flex-direction: column;
    }
    .income-controls-row {
        gap: var(--space-sm);
    }
}


/* ═══════════════════════════════════════════════════════════════
   SPENDING TRENDS
   ═══════════════════════════════════════════════════════════════ */

.spending-trends-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--glass-shadow);
}

.spending-trends-header {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.spending-trends-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
}

.spending-trends-title {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--text-primary);
}

.trend-range-selector {
    display: inline-flex;
    gap: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 2px;
    border: 1px solid var(--border-light);
}

.trend-range-btn {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.trend-range-btn.active {
    background: #0071e3;
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.trend-view-filter {
    display: inline-flex;
    gap: 0;
    background: var(--bg-secondary);
    border-radius: var(--radius-full);
    padding: 2px;
    border: 1px solid var(--border-light);
    align-self: flex-start;
}

.trend-view-btn {
    padding: 3px 10px;
    min-width: 32px;
    border-radius: var(--radius-full);
    border: none;
    background: transparent;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.trend-view-btn.active {
    background: var(--pill-color, #0071e3);
    color: white;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.spending-trends-chart-container {
    position: relative;
    height: 220px;
    width: 100%;
    margin-bottom: var(--space-sm);
}

.spending-trends-legend {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm) var(--space-lg);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
}

.trend-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
}

.trend-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.trend-legend-name {
    color: var(--text-secondary);
    font-weight: 500;
}

.trend-legend-value {
    color: var(--text-primary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.trend-legend-change {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-full);
}

.trend-legend-change.trend-up {
    background: var(--danger-light);
    color: var(--danger);
}

.trend-legend-change.trend-down {
    background: var(--success-light);
    color: var(--success);
}

[data-theme="dark"] .trend-range-selector,
[data-theme="dark"] .trend-view-filter {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
}

@media (max-width: 480px) {
    .spending-trends-chart-container {
        height: 180px;
    }
    .spending-trends-legend {
        gap: var(--space-xs) var(--space-md);
    }
    .trend-legend-item {
        font-size: 11px;
    }
    .spending-trends-title-row {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ═══════════════════════════════════════════════════════════════
   PERSONAL SPENDING PRIVACY MODE
   ═══════════════════════════════════════════════════════════════ */

/* Personal badge on category headers */
.personal-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-tertiary);
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    margin-left: 4px;
    vertical-align: middle;
}

.personal-badge-icon {
    font-size: 10px;
}

/* Privacy blur — applied to sections belonging to another person */
.privacy-blur .budget-row-total,
.privacy-blur .budget-row-persons,
.privacy-blur .person-amount,
.privacy-blur .budget-section-amount,
.privacy-blur .category-bar-amount,
.privacy-blur .category-bar-track-wrapper,
.privacy-blur .category-detail-wrapper {
    filter: blur(8px);
    user-select: none;
    transition: filter 0.3s ease;
}

/* Tap-to-reveal button */
.privacy-reveal-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    margin-left: auto;
    min-height: 28px;
    flex-shrink: 0;
}

.privacy-reveal-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* Category modal — personal picker */
.category-personal-desc {
    font-size: var(--text-caption);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
    line-height: 1.4;
}

.category-personal-picker {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.personal-picker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-medium);
    background: var(--bg-secondary);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    min-height: 36px;
}

.personal-picker-btn:hover {
    border-color: var(--pill-color, var(--text-primary));
    color: var(--pill-color, var(--text-primary));
}

.personal-picker-btn.active {
    background: var(--pill-color, #0071e3);
    color: white;
    border-color: var(--pill-color, #0071e3);
    font-weight: 600;
}

[data-theme="dark"] .personal-badge {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
}

[data-theme="dark"] .privacy-reveal-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
}

[data-theme="dark"] .personal-picker-btn {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-medium);
}

@media (prefers-reduced-motion: reduce) {
    .privacy-blur .budget-row-total,
    .privacy-blur .budget-row-persons,
    .privacy-blur .person-amount,
    .privacy-blur .budget-section-amount,
    .privacy-blur .category-bar-amount,
    .privacy-blur .category-bar-track-wrapper,
    .privacy-blur .category-detail-wrapper {
        transition: none;
    }
}


/* ═══════════════════════════════════════════════════════════════
   FIRE CALCULATOR
   ═══════════════════════════════════════════════════════════════ */

.fire-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-sm);
}

.fire-header-left {
    display: flex;
    align-items: baseline;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.fire-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.fire-subtitle {
    font-size: var(--text-small);
    color: var(--text-secondary);
}

/* Body */
.fire-body {
    margin-top: var(--space-md);
}

.fire-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.fire-input-group label {
    display: block;
    font-size: var(--text-small);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

.fire-optional {
    font-weight: 400;
    opacity: 0.7;
}

.fire-input-row {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.fire-input-row input {
    width: 90px;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-body);
    font-family: inherit;
    -moz-appearance: textfield;
}

.fire-input-row input::-webkit-outer-spin-button,
.fire-input-row input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.fire-input-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

.fire-input-suffix {
    font-size: var(--text-small);
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Results */
.fire-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-sm);
}

.fire-result-card {
    padding: var(--space-sm) var(--space-md);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    text-align: center;
}

.fire-result-label {
    font-size: var(--text-small);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--space-xs);
}

.fire-result-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.fire-result-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.fire-result-target .fire-result-value {
    color: var(--primary);
}

.fire-result-date .fire-result-value {
    color: var(--success);
}

.fire-result-date .fire-result-value.fire-unreachable {
    color: var(--danger);
    font-size: 1rem;
}

/* Progress bar */
.fire-progress-bar-wrapper {
    margin-top: var(--space-xs);
    height: 6px;
    background: var(--bg-secondary);
    border-radius: 3px;
    overflow: hidden;
}

.fire-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    border-radius: 3px;
    transition: width 0.5s ease;
}

@media (prefers-reduced-motion: reduce) {
    .fire-progress-bar {
        transition: none;
    }
}


        /* ═══════════════════════════════════════════════════════════════
           GDPR DELETION STATUS
           ═══════════════════════════════════════════════════════════════ */

        /* Deletion status banner in settings danger zone */
        .deletion-status-banner {
            margin-bottom: var(--space-sm);
            padding: var(--space-md);
            background: color-mix(in srgb, var(--warning) 8%, var(--glass-bg));
            border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
            border-radius: var(--radius-lg);
            backdrop-filter: blur(var(--glass-blur));
            -webkit-backdrop-filter: blur(var(--glass-blur));
        }

        .deletion-banner-content {
            display: flex;
            align-items: flex-start;
            gap: var(--space-sm);
            margin-bottom: var(--space-sm);
        }

        .deletion-banner-icon {
            font-size: var(--text-title);
            flex-shrink: 0;
        }

        .deletion-banner-title {
            font-weight: var(--font-semibold);
            color: var(--text-primary);
            font-size: var(--text-body);
        }

        .deletion-banner-desc {
            font-size: var(--text-caption);
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .deletion-banner-actions {
            display: flex;
            gap: var(--space-xs);
            flex-wrap: wrap;
        }

        .deletion-banner-actions .btn {
            font-size: var(--text-caption);
            padding: var(--space-xs) var(--space-sm);
        }

        .deletion-cancel-btn {
            color: var(--success) !important;
        }

        .deletion-execute-btn {
            background: var(--danger) !important;
            color: white !important;
        }

        /* Deletion status modal overlay */
        .deletion-status-overlay {
            position: fixed;
            inset: 0;
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.25s ease, visibility 0.25s ease;
        }

        .deletion-status-overlay.show {
            opacity: 1;
            visibility: visible;
        }

        .deletion-status-modal {
            background: var(--glass-bg);
            backdrop-filter: blur(var(--glass-blur));
            -webkit-backdrop-filter: blur(var(--glass-blur));
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-xl);
            box-shadow: var(--glass-shadow);
            padding: var(--space-xl);
            max-width: 420px;
            width: 90vw;
            text-align: center;
            transform: scale(0.95);
            transition: transform 0.25s ease;
        }

        .deletion-status-overlay.show .deletion-status-modal {
            transform: scale(1);
        }

        .deletion-status-icon {
            font-size: 3rem;
            margin-bottom: var(--space-sm);
        }

        .deletion-status-title {
            font-size: var(--text-title);
            font-weight: var(--font-bold);
            color: var(--danger);
            margin-bottom: var(--space-md);
        }

        .deletion-status-countdown {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: var(--space-md);
            margin-bottom: var(--space-md);
            background: var(--danger-light);
            border-radius: var(--radius-lg);
        }

        .deletion-days-remaining {
            font-size: 2.5rem;
            font-weight: var(--font-bold);
            color: var(--danger);
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }

        .deletion-days-label {
            font-size: var(--text-caption);
            color: var(--text-secondary);
            margin-top: var(--space-xs);
        }

        .deletion-status-date {
            font-size: var(--text-body);
            color: var(--text-secondary);
            margin-bottom: var(--space-md);
        }

        .deletion-status-info {
            font-size: var(--text-caption);
            color: var(--text-secondary);
            line-height: 1.5;
            margin-bottom: var(--space-md);
        }

        .deletion-status-checklist {
            text-align: left;
            margin-bottom: var(--space-lg);
        }

        .deletion-check-item {
            font-size: var(--text-caption);
            color: var(--success);
            padding: var(--space-xs) 0;
        }

        .deletion-status-actions {
            display: flex;
            gap: var(--space-xs);
            justify-content: center;
            flex-wrap: wrap;
        }

        .deletion-status-actions .btn {
            min-width: 100px;
        }

        .btn-primary {
            background: var(--primary);
            color: white;
            border: none;
            border-radius: var(--radius-md);
            padding: var(--space-sm) var(--space-md);
            cursor: pointer;
            font-weight: var(--font-semibold);
        }

        .btn-primary:hover {
            opacity: 0.9;
        }

        .btn-danger {
            background: var(--danger-light);
            color: var(--danger);
            border: none;
            border-radius: var(--radius-md);
            padding: var(--space-sm) var(--space-md);
            cursor: pointer;
            font-weight: var(--font-semibold);
        }

        .btn-danger:hover {
            background: var(--danger);
            color: white;
        }

        @media (prefers-reduced-motion: reduce) {
            .deletion-status-overlay,
            .deletion-status-modal {
                transition: none;
            }
        }


        /* ═══════════════════════════════════════════════════════════════
           SPENDING BENCHMARKS ("Am I Normal?")
           ═══════════════════════════════════════════════════════════════ */

        .benchmark-rows {
            display: flex;
            flex-direction: column;
            gap: var(--space-sm);
            padding: var(--space-md) 0;
        }

        .benchmark-row {
            padding: var(--space-sm) var(--space-md);
            border-radius: var(--radius-md);
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            transition: background var(--duration) var(--ease);
        }

        .benchmark-row:hover {
            background: var(--bg-tertiary);
        }

        .benchmark-row-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--space-sm);
        }

        .benchmark-category {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
            font-weight: var(--font-medium);
            font-size: var(--text-body);
            color: var(--text-primary);
        }

        .benchmark-icon {
            font-size: 1.1em;
        }

        .benchmark-values {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            font-size: var(--text-caption);
        }

        .benchmark-actual {
            font-weight: var(--font-semibold);
            font-size: var(--text-body);
        }

        .benchmark-good .benchmark-actual { color: var(--success); }
        .benchmark-caution .benchmark-actual { color: var(--warning); }
        .benchmark-over .benchmark-actual { color: var(--danger); }

        .benchmark-range {
            color: var(--text-secondary);
            font-size: var(--text-small);
        }

        .benchmark-status-icon {
            font-size: 1em;
        }

        .benchmark-bar-track {
            position: relative;
            height: 6px;
            background: var(--border-light);
            border-radius: var(--radius-full);
            margin-top: var(--space-xs);
            overflow: visible;
        }

        .benchmark-bar-fill {
            height: 100%;
            border-radius: var(--radius-full);
            transition: width var(--duration-slow) var(--ease-spring);
        }

        .benchmark-bar-fill.benchmark-good { background: var(--success); }
        .benchmark-bar-fill.benchmark-caution { background: var(--warning); }
        .benchmark-bar-fill.benchmark-over { background: var(--danger); }

        .benchmark-marker {
            position: absolute;
            top: -3px;
            width: 2px;
            height: 12px;
            background: var(--text-secondary);
            border-radius: 1px;
            opacity: 0.6;
        }

        .benchmark-advice {
            margin-top: var(--space-xs);
            font-size: var(--text-small);
            color: var(--text-secondary);
            line-height: 1.4;
        }

        .benchmark-person-summary {
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-sm);
            padding: var(--space-md) 0 0;
            border-top: 1px solid var(--border-light);
            margin-top: var(--space-md);
        }

        .benchmark-person-chip {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
            padding: var(--space-xs) var(--space-sm);
            border-radius: var(--radius-full);
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            font-size: var(--text-small);
        }

        .benchmark-person-name {
            font-weight: var(--font-semibold);
            color: var(--chip-color, var(--text-primary));
        }

        .benchmark-person-stat.good { color: var(--success); }
        .benchmark-person-stat.caution { color: var(--warning); }
        .benchmark-person-stat.over { color: var(--danger); }

        /* ═══════════════════════════════════════════════════════════════

           SAVINGS RATE DASHBOARD
           ═══════════════════════════════════════════════════════════════ */

        .savings-rate-hero {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--space-lg);
            padding: var(--space-md) 0;
        }

        .savings-rate-current {
            text-align: center;
            min-width: 120px;
        }

        .savings-rate-big {
            font-size: var(--text-title);
            font-weight: var(--font-extrabold);
            line-height: 1;
        }

        .savings-rate-ahead .savings-rate-big { color: var(--success); }
        .savings-rate-close .savings-rate-big { color: var(--warning); }
        .savings-rate-behind .savings-rate-big { color: var(--danger); }

        .savings-rate-label {
            font-size: var(--text-small);
            font-weight: var(--font-medium);
            margin-top: var(--space-xs);
        }

        .savings-rate-ahead .savings-rate-label { color: var(--success); }
        .savings-rate-close .savings-rate-label { color: var(--warning); }
        .savings-rate-behind .savings-rate-label { color: var(--danger); }

        .savings-rate-vs {
            font-size: var(--text-small);
            color: var(--text-secondary);
            margin-top: 2px;
        }

        .savings-rate-averages {
            display: flex;
            gap: var(--space-lg);
        }

        .savings-rate-avg {
            text-align: center;
        }

        .savings-rate-avg-value {
            font-size: var(--text-heading);
            font-weight: var(--font-bold);
            color: var(--text-primary);
        }

        .savings-rate-avg-label {
            font-size: var(--text-small);
            color: var(--text-secondary);
        }

        .savings-rate-target-row {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
            font-size: var(--text-small);
        }

        .savings-rate-target-label {
            color: var(--text-secondary);
            font-weight: var(--font-medium);
        }

        .savings-rate-target-input {
            width: 50px;
            padding: 4px 6px;
            border: 1px solid var(--border-medium);
            border-radius: var(--radius-xs);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: var(--text-small);
            text-align: center;
            min-height: 28px;
        }

        .savings-rate-target-pct {
            color: var(--text-secondary);
        }

        .savings-rate-chart-container {
            position: relative;
            height: 200px;
            margin: var(--space-md) 0;
        }

        .savings-rate-fire {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
            padding: var(--space-sm) var(--space-md);
            background: var(--card-savings-tint);
            border-radius: var(--radius-md);
            font-size: var(--text-caption);
            color: var(--text-primary);
        }

        .savings-rate-fire-icon {
            font-size: 1.2em;
        }

        .savings-rate-persons {
            display: flex;
            flex-wrap: wrap;
            gap: var(--space-sm);
            padding: var(--space-sm) 0;
        }

        .savings-rate-person-chip {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
            padding: var(--space-xs) var(--space-sm);
            border-radius: var(--radius-full);
            background: var(--bg-secondary);
            border: 1px solid var(--border-light);
            font-size: var(--text-small);
        }

        .savings-rate-person-name {
            font-weight: var(--font-semibold);
            color: var(--chip-color, var(--text-primary));
        }

        .savings-rate-person-value.good { color: var(--success); }
        .savings-rate-person-value.caution { color: var(--warning); }
        .savings-rate-person-value.over { color: var(--danger); }

        .savings-rate-impact {
            padding: var(--space-md) 0 0;
            border-top: 1px solid var(--border-light);
            margin-top: var(--space-md);
        }

        .savings-rate-impact-title {
            font-size: var(--text-small);
            font-weight: var(--font-semibold);
            color: var(--text-secondary);
            margin-bottom: var(--space-xs);
        }

        .savings-rate-impact-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--space-xs) 0;
            font-size: var(--text-caption);
        }

        .savings-rate-impact-row.impact-positive span:last-child { color: var(--success); }
        .savings-rate-impact-row.impact-negative span:last-child { color: var(--danger); }

        /* ═══════════════════════════════════════════════════════════════

/* ═══════════════════════════════════════════════════════════════
   SAVE-FAILED BANNER — persistent, non-dismissable until resolved
   ═══════════════════════════════════════════════════════════════ */

.save-failed-banner {
    position: sticky;
    top: 60px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--danger);
    color: #fff;
    font-size: var(--text-caption);
    font-weight: var(--font-medium);
    text-align: center;
    animation: save-banner-in 0.3s ease;
}

.save-failed-icon {
    font-size: 1em;
    flex-shrink: 0;
}

.save-failed-text {
    flex: 0 1 auto;
}

.save-failed-retry {
    flex-shrink: 0;
    padding: 4px 12px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-sm);
    font-size: var(--text-caption);
    font-weight: var(--font-semibold);
    cursor: pointer;
    min-height: 32px;
    transition: background 0.2s ease;
}

.save-failed-retry:hover {
    background: rgba(255, 255, 255, 0.35);
}

.save-failed-retry:active {
    background: rgba(255, 255, 255, 0.15);
}

@keyframes save-banner-in {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .save-failed-banner {
        animation: none;
    }
}

@media (max-width: 768px) {
    .save-failed-banner {
        top: 56px;
        font-size: var(--text-micro);
        padding: var(--space-xs) var(--space-sm);
    }

    .save-failed-retry {
        min-height: 44px;
        padding: 6px 14px;
    }
}



/* ═══════════════════════════════════════════════════════════════
   GOALS: Empty State, Achieved Section, Linked Badge
   ═══════════════════════════════════════════════════════════════ */

.goals-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-xl) var(--space-md);
    text-align: center;
    grid-column: 1 / -1;
}

.goals-empty-icon {
    font-size: 3rem;
    line-height: 1;
}

.goals-empty-title {
    font-size: var(--text-body);
    font-weight: 600;
    color: var(--text-primary);
}

.goals-empty-text {
    font-size: var(--text-small);
    color: var(--text-secondary);
    max-width: 300px;
}

.goals-achieved-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) 0;
    margin-top: var(--space-sm);
}

.goals-achieved-divider::before,
.goals-achieved-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-light);
}

.goals-achieved-label {
    font-size: var(--text-small);
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.goal-item.goal-achieved {
    opacity: 0.75;
}

.goal-item.goal-achieved .goal-progress-fill {
    background: var(--success) !important;
}

.goal-linked-badge {
    font-size: var(--text-small);
    color: var(--primary);
    padding: 2px 0;
    opacity: 0.8;
}

