        /* ═══════════════════════════════════════════════════════════════
           SINKING FUNDS / VIRTUAL ENVELOPES
           ═══════════════════════════════════════════════════════════════ */

        .sinking-funds-empty {
            text-align: center;
            padding: var(--space-xl) var(--space-md);
            color: var(--text-secondary);
        }

        .sinking-funds-empty p {
            margin-bottom: var(--space-md);
            font-size: var(--text-caption);
            line-height: 1.5;
        }

        .sf-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: var(--space-md);
            padding: var(--space-md) 0;
        }

        .sf-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-md);
            cursor: pointer;
            transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
        }

        .sf-card:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .sf-card:focus-visible {
            outline: 2px solid var(--primary, #0071e3);
            outline-offset: 2px;
        }

        .sf-card.sf-funded {
            border-color: var(--success);
        }

        .sf-card.sf-urgent {
            border-color: var(--danger);
        }

        .sf-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: var(--space-sm);
        }

        .sf-card-info {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
        }

        .sf-card-icon {
            font-size: 1.5em;
        }

        .sf-card-name {
            font-weight: var(--font-semibold);
            font-size: var(--text-body);
            color: var(--text-primary);
        }

        .sf-card-meta {
            display: flex;
            align-items: center;
            gap: var(--space-xs);
            font-size: var(--text-small);
            color: var(--text-secondary);
            flex-wrap: wrap;
        }

        .sf-card-pct {
            font-size: var(--text-heading);
            font-weight: var(--font-bold);
            color: var(--text-primary);
        }

        .sf-funded .sf-card-pct { color: var(--success); }
        .sf-urgent .sf-card-pct { color: var(--danger); }

        .sf-due-badge {
            display: inline-block;
            padding: 1px 6px;
            border-radius: var(--radius-full);
            font-size: var(--text-micro);
            font-weight: var(--font-medium);
        }

        .sf-due-badge.sf-overdue {
            background: var(--danger-light);
            color: var(--danger);
        }

        .sf-due-badge.sf-due-soon {
            background: var(--warning-light);
            color: var(--warning);
        }

        .sf-due-badge.sf-due-later {
            background: var(--success-light);
            color: var(--success);
        }

        .sf-owner {
            font-weight: var(--font-medium);
        }

        .sf-progress-track {
            height: 8px;
            background: var(--border-light);
            border-radius: var(--radius-full);
            overflow: hidden;
            margin-bottom: var(--space-sm);
        }

        .sf-progress-fill {
            height: 100%;
            background: linear-gradient(135deg, #ff9500, #ffb340);
            border-radius: var(--radius-full);
            transition: width var(--duration-slow) var(--ease-spring);
        }

        .sf-funded .sf-progress-fill {
            background: linear-gradient(135deg, var(--success), #30d158);
        }

        .sf-urgent .sf-progress-fill {
            background: linear-gradient(135deg, var(--danger), #ff6b6b);
        }

        .sf-card-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-size: var(--text-small);
            color: var(--text-secondary);
        }

        .sf-monthly {
            color: var(--success);
            font-weight: var(--font-medium);
        }

        /* Sinking Fund Modal */
        .sinking-fund-modal-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 var(--duration-slow) var(--ease);
        }

        .sinking-fund-modal-overlay.show {
            opacity: 1;
            pointer-events: all;
        }

        .sinking-fund-modal {
            background: var(--bg-tertiary);
            border-radius: var(--radius-xl);
            padding: var(--space-xl);
            width: 90%;
            max-width: 480px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-xl);
        }

        .sf-modal-title {
            font-size: var(--text-heading);
            font-weight: var(--font-bold);
            margin-bottom: var(--space-lg);
            color: var(--text-primary);
            position: sticky;
            top: 0;
            background: var(--bg-tertiary);
            padding-bottom: var(--space-sm);
            z-index: 1;
        }

        .sf-modal-field {
            margin-bottom: var(--space-md);
        }

        .sf-modal-label {
            display: block;
            font-size: var(--text-small);
            font-weight: var(--font-medium);
            color: var(--text-secondary);
            margin-bottom: var(--space-xs);
        }

        .sf-modal-input,
        .sf-modal-select {
            width: 100%;
            padding: var(--space-sm);
            border: 1px solid var(--border-medium);
            border-radius: var(--radius-sm);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: var(--text-body);
            min-height: 44px;
        }

        .sf-modal-actions {
            display: flex;
            justify-content: flex-end;
            gap: var(--space-sm);
            margin-top: var(--space-lg);
            padding-top: var(--space-md);
            border-top: 1px solid var(--border-light);
        }

        @media (max-width: 480px) {
            .sf-grid {
                grid-template-columns: 1fr;
            }

            .savings-rate-hero {
                flex-direction: column;
                text-align: center;
            }

            .benchmark-row-header {
                flex-direction: column;
                align-items: flex-start;
                gap: var(--space-xs);
            }

            .benchmark-values {
                align-self: flex-end;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .sf-card {
                transition: none;
            }

            .sf-progress-fill,
            .benchmark-bar-fill {
                transition: none;
            }

            .sinking-fund-modal-overlay {
                transition: none;
            }
        }


/* ═══════════════════════════════════════════════════════════════
   SINKING FUNDS: Deposit History
   ═══════════════════════════════════════════════════════════════ */

.sinking-fund-history {
    margin-top: var(--space-sm);
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-sm);
}

.sinking-fund-history-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-small);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px 0;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sinking-fund-history-toggle:hover {
    color: var(--text-primary);
}

.sinking-fund-history-toggle .history-chevron {
    transition: transform 0.2s ease;
    font-size: 10px;
}

.sinking-fund-history-toggle.expanded .history-chevron {
    transform: rotate(90deg);
}

.sinking-fund-history-list {
    display: none;
    flex-direction: column;
    gap: 4px;
    margin-top: var(--space-xs);
    max-height: 200px;
    overflow-y: auto;
}

.sinking-fund-history-list.show {
    display: flex;
}

.sinking-fund-history-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--text-small);
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}

.sinking-fund-history-item .history-date {
    color: var(--text-secondary);
    min-width: 70px;
}

.sinking-fund-history-item .history-amount {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sinking-fund-history-item .history-amount.deposit {
    color: var(--success);
}

.sinking-fund-history-item .history-amount.withdrawal {
    color: var(--danger);
}

.sinking-fund-history-item .history-note {
    color: var(--text-secondary);
    margin-left: auto;
    font-size: var(--text-caption);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.sinking-fund-linked-badge {
    font-size: var(--text-small);
    color: var(--primary);
    opacity: 0.8;
}
