/* ═══════════════════════════════════════════════════
   COINED — PREMIUM FINTECH DASHBOARD
   Stripe / Mercury / Modern Fintech Aesthetic
   ═══════════════════════════════════════════════════ */

/* ─── Reset & Base ─── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0; padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', sans-serif;
    font-size: 16px; line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ─── CSS Variables ─── */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255,255,255,0.04);
    --bg-elevated: rgba(255,255,255,0.06);
    --text-primary: #e5e7eb;
    --text-secondary: #f8fafc;
    --text-tertiary: #94a3b8;
    --border: rgba(255,255,255,0.08);
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #6366f1;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: none;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --nav-height: 60px;
    --bottom-nav-height: 64px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-top: env(safe-area-inset-top, 0px);
}

[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-elevated: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #1e293b;
    --text-tertiary: #64748b;
    --border: #e2e8f0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
}

/* ─── Typography ─── */
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.2; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-green { color: var(--success); }
.text-red { color: var(--danger); }
.text-muted { color: var(--text-tertiary); }

/* ─── Layout ─── */
.app-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    padding-top: calc(var(--safe-top) + 8px);
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px);
    min-height: 100dvh;
}

@media (min-width: 768px) {
    .app-container {
        max-width: 720px;
        padding: 0 20px;
        padding-top: calc(var(--safe-top) + 16px);
        padding-bottom: 24px;
    }
}

/* ─── Header ─── */
.app-header {
    padding: 12px 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 4px;
}
.app-header h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-secondary);
    margin: 0;
    letter-spacing: -0.02em;
}
.app-header p {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 2px 0 0;
    line-height: 1.3;
}
.app-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.app-header .btn-refresh {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
    flex-shrink: 0;
}
.app-header .btn-refresh:hover {
    background: var(--bg-elevated);
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
}
.app-header .btn-refresh:active {
    transform: rotate(180deg);
}
.app-header .pwa-install-btn-header {
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--info);
    color: #fff;
    border: none;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
}
.app-header .pwa-install-btn-header:active { opacity: 0.8; }

/* ─── Bottom Navigation ─── */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    padding-bottom: var(--safe-bottom);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    z-index: 100;
}
.bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 48px;
    color: var(--text-tertiary);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.15s;
}
.bottom-nav a.active {
    color: var(--info);
}
.bottom-nav a iconify-icon {
    width: 22px; height: 22px;
}
@media (min-width: 768px) {
    .bottom-nav { display: none; }
}
@media (max-width: 374px) {
    .bottom-nav a { font-size: 9px; }
    .bottom-nav a iconify-icon { width: 20px; height: 20px; }
}

/* ─── Desktop Navigation ─── */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
}
.desktop-nav a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: all 0.15s;
}
.desktop-nav a.active {
    background: var(--info);
    color: #fff;
}
.desktop-nav a:hover:not(.active) {
    background: var(--bg-elevated);
}

@media (min-width: 768px) {
    .desktop-nav { display: flex; }
}

/* ─── Balance Hero ─── */
.balance-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(16,185,129,0.03));
    border: 1px solid rgba(99,102,241,0.12);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.balance-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(99,102,241,0.08), transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.balance-hero-content {
    flex: 1;
    min-width: 0;
    z-index: 1;
}
.balance-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: 4px;
}
.balance-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
}
.balance-unit {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.6;
}
.balance-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 99px;
    margin-top: 8px;
}
.balance-hero-visual {
    flex-shrink: 0;
    z-index: 1;
}
.balance-ring {
    position: relative;
    width: 80px;
    height: 80px;
}
.balance-ring-svg {
    width: 100%;
    height: 100%;
}
.balance-ring-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}
.balance-ring-value {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
}
.balance-ring-sub {
    font-size: 9px;
    color: var(--text-tertiary);
}

@media (min-width: 768px) {
    .balance-hero { padding: 24px; }
    .balance-value { font-size: 2.5rem; }
    .balance-ring { width: 100px; height: 100px; }
}
@media (max-width: 374px) {
    .balance-hero { padding: 16px; flex-direction: column; gap: 12px; align-items: flex-start; }
    .balance-value { font-size: 1.5rem; }
    .balance-ring { width: 60px; height: 60px; }
    .balance-hero-visual { align-self: flex-end; }
}

/* ─── Quick Stats Row ─── */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
@media (min-width: 768px) {
    .quick-stats { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 374px) {
    .quick-stats { gap: 6px; }
    .stat-pill { padding: 10px; }
    .stat-pill-icon { width: 28px; height: 28px; }
    .stat-pill-value { font-size: 0.85rem; }
}
.stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    transition: border-color 0.15s;
}
.stat-pill:hover {
    border-color: rgba(255,255,255,0.15);
}
.stat-pill-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-pill-content {
    min-width: 0;
}
.stat-pill-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-tertiary);
}
.stat-pill-value {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

/* ─── Trend Banner ─── */
.trend-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
}
.trend-banner.trend-up {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.12);
}
.trend-banner.trend-down {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.12);
}
.trend-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    margin-right: 10px;
}
.trend-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.trend-text {
    color: var(--text-primary);
    font-weight: 500;
}
.trend-sub {
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

/* ─── Accordion Badge ─── */
.accordion-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    background: var(--bg-elevated);
    color: var(--text-tertiary);
    margin-left: auto;
    margin-right: 8px;
}
.badge-green-text { color: var(--success); }
.badge-red-text { color: var(--danger); }

/* ─── Empty State Mini ─── */
.empty-state-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}
.empty-state-mini.settled {
    color: var(--success);
}

/* ─── Budget List ─── */
.budget-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}
.budget-row {
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.budget-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.budget-category {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}
.budget-amount {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    font-variant-numeric: tabular-nums;
}
.budget-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}
.budget-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}
.budget-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.budget-bar-fill.bg-red { background: var(--danger); }
.budget-bar-fill.bg-yellow { background: var(--warning); }
.budget-bar-fill.bg-green { background: var(--success); }
.budget-percentage {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-tertiary);
    min-width: 36px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ─── People Stats ─── */
.people-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}
.people-stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.people-stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
}
.people-stat-label {
    font-size: 0.65rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* ─── Chart Header ─── */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.chart-legend-inline {
    display: flex;
    gap: 12px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

/* ─── Net Status Redesign ─── */
.net-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 12px;
}
.net-status-icon {
    flex-shrink: 0;
    margin-right: 12px;
}
.net-status-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.net-positive { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.12); }
.net-negative { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.12); }

/* ─── Empty State Redesign ─── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    text-align: center;
}
.empty-icon {
    margin-bottom: 12px;
}
.empty-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px;
}
.empty-text {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 0 0 20px;
    max-width: 280px;
}

/* ─── Sections ─── */
.section {
    margin-bottom: 16px;
}
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.section-header h2 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
}
.section-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--info);
    text-decoration: none;
}

/* ─── Transaction List (Mobile Cards) ─── */
.tx-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tx-card-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: opacity 0.2s, transform 0.2s;
}
.tx-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    cursor: pointer;
}
.tx-card:active {
    background: var(--bg-elevated);
}
.tx-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 10px;
}
.tx-info {
    flex: 1;
    min-width: 0;
}
.tx-desc {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tx-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    margin-top: 2px;
}
.tx-cat {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
}
.tx-dot-sep {
    margin: 0 4px;
    opacity: 0.5;
}
.tx-amount {
    font-size: 0.9rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: right;
    flex-shrink: 0;
}

/* ─── Transaction Actions ─── */
.tx-actions {
    display: flex;
    border-top: 1px solid var(--border);
    background: rgba(0,0,0,0.1);
}
.tx-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: none;
    background: none;
    color: var(--text-tertiary);
    font-size: 0.75rem;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.15s, color 0.15s;
}
.tx-action-btn:active {
    background: var(--bg-elevated);
}
.tx-action-btn.edit { color: var(--info); }
.tx-action-btn.duplicate { color: var(--warning); }
.tx-action-btn.delete { color: var(--danger); }
.tx-action-btn iconify-icon { pointer-events: none; }

/* ─── Sticky Filters ─── */
.sticky-filters {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-primary);
    padding: 8px 0;
    margin: -4px -12px 12px;
    padding-left: 12px;
    padding-right: 12px;
}
.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}
.search-input-wrap {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
.search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-tertiary);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 10px 32px 10px 34px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}
.search-input:focus {
    border-color: var(--info);
}
.search-clear {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-tertiary);
    padding: 4px;
    cursor: pointer;
}
.btn-add-mobile {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--info);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.filter-chips {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
}
.chip-active {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}
.chip-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}
.chip-dot.green { background: var(--success); }
.chip-dot.red { background: var(--danger); }

/* ─── People Summary ─── */
.people-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 12px;
}
.summary-item {
    text-align: center;
    flex: 1;
}
.summary-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
}
.summary-val {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 2px;
}
.summary-divider {
    width: 1px;
    height: 32px;
    background: var(--border);
}

/* ─── People Toolbar ─── */
.people-toolbar {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

/* ─── Person Cards ─── */
.person-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.person-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    cursor: pointer;
    transition: background 0.15s;
}
.person-card:active {
    background: var(--bg-elevated);
}
.person-card-main {
    display: flex;
    align-items: center;
    gap: 10px;
}
.person-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.bg-green { background: var(--success); }
.bg-red { background: var(--danger); }
.bg-gray { background: #6b7280; }
.person-card-info {
    flex: 1;
    min-width: 0;
}
.person-card-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}
.person-card-meta {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.person-card-balance {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
    flex-shrink: 0;
}
.person-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.person-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-tertiary);
    font-size: 0.7rem;
    cursor: pointer;
    min-height: 36px;
}

/* ─── Accordion ─── */
.accordion-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}
.accordion {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.accordion[open] {
    border-color: rgba(255,255,255,0.12);
}
.accordion-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
    min-height: 52px;
    gap: 8px;
}
.accordion-header::-webkit-details-marker { display: none; }
.accordion-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
}
.accordion-title iconify-icon {
    color: var(--text-tertiary);
}
.accordion-chevron {
    color: var(--text-tertiary);
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.accordion[open] .accordion-chevron {
    transform: rotate(180deg);
}
.accordion-body {
    padding: 0 16px 16px;
    animation: accordionFadeIn 0.2s ease-out;
}
@keyframes accordionFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ─── Trend Banner ─── */
.trend-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 12px;
    font-size: 0.8rem;
}
.trend-banner.trend-up {
    background: rgba(239,68,68,0.06);
    border: 1px solid rgba(239,68,68,0.12);
}
.trend-banner.trend-down {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.12);
}
.trend-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    margin-right: 10px;
}
.trend-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.trend-text {
    color: var(--text-primary);
    font-weight: 500;
}
.trend-sub {
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

/* ─── Chart Container ─── */
.chart-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 200px;
}
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}
.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* ─── Chart Sections ─── */
.chart-section {
    margin-bottom: 16px;
}
.chart-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
}
.chart-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 200px;
}
.chart-box canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ─── Donut Chart (Redesigned) ─── */
.donut-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
@media (min-width: 768px) {
    .donut-section {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }
}
.donut-container {
    position: relative;
    width: 180px;
    height: 180px;
    flex-shrink: 0;
}
.donut-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}
.donut-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: 2px;
}
.donut-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
}
.donut-legend {
    flex: 1;
    min-width: 0;
    width: 100%;
}
.donut-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.75rem;
}
.donut-legend-item:last-child {
    border-bottom: none;
}
.donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.donut-legend-name {
    flex: 1;
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.donut-legend-value {
    color: var(--text-tertiary);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
    text-align: right;
    font-size: 0.7rem;
}

/* ─── Category Bars Section ─── */
.cat-bars-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

/* ─── Category Bars ─── */
.cat-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
@media (min-width: 768px) {
    .cat-grid { flex-direction: row; gap: 24px; }
}

/* ─── Category Bars ─── */
/* ─── Donut Center Label ─── */
.cat-center-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 0.65rem;
    color: var(--text-tertiary);
}
.cat-center-label strong {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.cat-bars {
    flex: 1;
}
.cat-ic {
    width: 22px;
    text-align: center;
    font-size: 12px;
    flex-shrink: 0;
}
.cat-name {
    font-size: 0.7rem;
    color: var(--text-primary);
    min-width: 50px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cat-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}
.cat-bar-fill {
    height: 100%;
    background: var(--danger);
    border-radius: 3px;
    transition: width 0.4s ease;
}
.cat-bar-fill.green {
    background: var(--success);
}
.cat-val {
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ─── Net Status ─── */
.net-status {
    padding: 12px;
    border-radius: var(--radius-sm);
    text-align: center;
    margin-bottom: 10px;
}
.net-positive { background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.15); }
.net-negative { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.15); }
.net-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
    letter-spacing: 0.03em;
}
.net-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin-top: 4px;
}
.debt-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
}
.debt-box {
    padding: 10px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.debt-box-icon {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.debt-in { background: rgba(16,185,129,0.06); border: 1px solid rgba(16,185,129,0.1); }
.debt-out { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.1); }
.debt-label {
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-tertiary);
}
.debt-val {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 2px;
}
.view-all-link {
    display: block;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--info);
    text-decoration: none;
    padding: 8px;
}

/* ─── Bottom Sheet ─── */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.sheet-panel {
    width: 100%;
    max-width: 512px;
    max-height: 90vh;
    background: var(--bg-secondary);
    border-radius: 16px 16px 0 0;
    overflow-y: auto;
    padding: 0 16px calc(var(--safe-bottom) + 16px);
    animation: sheetIn 0.25s ease-out;
}
@media (max-width: 374px) {
    .sheet-panel {
        max-height: 85vh;
        padding: 0 12px calc(var(--safe-bottom) + 12px);
    }
    .sheet-title { font-size: 0.95rem; }
    .field-input { font-size: 16px; }
    .seg-btn { padding: 10px 8px; font-size: 0.8rem; }
    .cat-chip { padding: 8px 10px; font-size: 0.75rem; }
    .sheet-btn { padding: 12px 6px; font-size: 0.65rem; min-height: 56px; }
    .sheet-cancel { padding: 12px; min-height: 44px; }
}
.sheet-sm { max-height: 50vh; }
.sheet-lg { max-height: 85vh; }
.sheet-handle {
    width: 36px;
    height: 4px;
    background: var(--text-tertiary);
    opacity: 0.3;
    border-radius: 2px;
    margin: 12px auto;
}
.sheet-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0 12px;
}
.sheet-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.sheet-close {
    background: none;
    border: none;
    color: var(--text-tertiary);
    padding: 4px;
    cursor: pointer;
}
.sheet-body {
    padding-bottom: 12px;
}
.sheet-footer {
    display: flex;
    gap: 8px;
    padding: 12px 0;
    border-top: 1px solid var(--border);
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
}

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

/* ─── Segmented Control ─── */
.seg-control {
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 3px;
    gap: 2px;
}
.seg-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--text-tertiary);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 40px;
}
.seg-btn.active {
    background: var(--info);
    color: #fff;
}
.mt-2 { margin-top: 8px; }

/* ─── Field Styles ─── */
.field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin: 12px 0 6px;
}
.field-optional {
    font-weight: 400;
    opacity: 0.6;
}
.field-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 16px;
    outline: none;
    -webkit-appearance: none;
}
.field-input:focus {
    border-color: var(--info);
}
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 120px;
    overflow-y: auto;
}
.cat-chip {
    padding: 8px 12px;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    min-height: 36px;
}
.cat-chip.active {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

/* ─── Buttons ─── */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--info);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
    text-decoration: none;
    transition: opacity 0.15s;
}
.btn-primary:active { opacity: 0.85; }
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-card);
    color: var(--text-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
    text-decoration: none;
}
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 44px;
}
.btn-danger-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    color: var(--danger);
    border: 1px solid var(--danger);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    min-height: 36px;
}

/* ─── FAB ─── */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px);
    right: 16px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--info);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
    box-shadow: 0 4px 16px rgba(99,102,241,0.4);
    transition: transform 0.15s;
}
.fab:active { transform: scale(0.92); }
@media (min-width: 768px) {
    .fab { bottom: 24px; right: 24px; }
}
@media (max-width: 374px) {
    .fab {
        width: 48px;
        height: 48px;
        right: 12px;
        bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 8px);
    }
    .fab iconify-icon { width: 20px; }
}

/* ─── Sheet Actions (Quick Add) ──═ */
.sheet-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin: 12px 0;
}
.sheet-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 14px 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 60px;
}
.sheet-btn:active { background: var(--bg-elevated); }
.sheet-btn iconify-icon { color: var(--info); }
.sheet-cancel {
    width: 100%;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-tertiary);
    font-size: 0.875rem;
    cursor: pointer;
    min-height: 48px;
}

/* ─── Dialog (Delete Confirmation) ─── */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.dialog-panel {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    animation: dialogIn 0.2s ease-out;
}
@keyframes dialogIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}
.dialog-icon {
    margin-bottom: 12px;
}
.dialog-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}
.dialog-text {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}
.dialog-actions {
    display: flex;
    gap: 8px;
}
.dialog-actions .btn-secondary,
.dialog-actions .btn-danger {
    flex: 1;
}

/* ─── Person Detail (in Sheet) ─── */
.person-detail { padding-bottom: 16px; }
.person-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.person-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.person-info { flex: 1; min-width: 0; }
.person-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
}
.person-note {
    font-size: 0.7rem;
    color: var(--text-tertiary);
}
.person-balance {
    font-size: 0.85rem;
    font-weight: 700;
    text-align: right;
}
.person-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}
.person-actions .btn-primary { flex: 1; }
.person-entries h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.entry-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}
.entry-info { flex: 1; min-width: 0; }
.entry-desc {
    font-size: 0.8rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.entry-date {
    font-size: 0.65rem;
    color: var(--text-tertiary);
}
.entry-amount {
    font-size: 0.8rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}
.entry-actions {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}
.entry-action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-tertiary);
    cursor: pointer;
}

/* ─── Detail Header (Transaction) ─── */
.detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
}
.detail-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}
.detail-info { flex: 1; min-width: 0; }
.detail-desc { font-size: 0.9rem; font-weight: 600; }
.detail-meta { font-size: 0.7rem; color: var(--text-tertiary); }
.detail-amount { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.detail-actions .btn-secondary,
.detail-actions .btn-danger {
    font-size: 0.75rem;
    padding: 8px 12px;
    min-height: 36px;
}

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 32px 16px;
}
.empty-state p {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin: 8px 0 16px;
}
.empty-state .btn-primary { margin: 0 auto; }

/* ─── Load More ─── */
.load-more-trigger {
    text-align: center;
    padding: 16px;
}

/* ─── Hide on Mobile ─── */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}

/* ─── Desktop: Show desktop nav, hide mobile nav ─── */
@media (min-width: 768px) {
    .app-container {
        padding-top: 16px;
    }
}

/* ═══ PREMIUM DASHBOARD GRID LAYOUT ═══ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 80px;
}
@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    .dashboard-col {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

/* ═══ CARD COMPONENT ═══ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.card:hover {
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 16px 0;
    gap: 12px;
    flex-wrap: wrap;
}
.card-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin: 0;
}
.card-link {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--info);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    transition: opacity 0.15s;
}
.card-link:hover { opacity: 0.8; }
.card-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.card-body {
    padding: 12px 16px 16px;
}

/* ═══ FILTER GROUP ═══ */
.filter-group {
    display: flex;
    gap: 2px;
    background: var(--bg-elevated);
    border-radius: 8px;
    padding: 2px;
}
.filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-tertiary);
    background: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    min-height: 28px;
    font-family: inherit;
    line-height: 1;
}
.filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}
.filter-btn.active {
    background: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}

/* ═══ CATEGORY BREAKDOWN ═══ */
.category-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    align-items: center;
}
@media (max-width: 480px) {
    .category-breakdown {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
.category-breakdown-chart {
    display: flex;
    justify-content: center;
}
.donut-container-lg {
    position: relative;
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}
.donut-container-lg canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.category-breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

/* ═══ CAT ROW (ENHANCED) ═══ */
.cat-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.cat-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    transition: background 0.15s;
    border-radius: 6px;
    margin: 0 -6px;
    padding-left: 6px;
    padding-right: 6px;
}
.cat-row.clickable {
    cursor: pointer;
}
.cat-row.clickable:hover {
    background: var(--bg-elevated);
}
.cat-row.clickable.active {
    background: rgba(99,102,241,0.08);
    border: 1px solid rgba(99,102,241,0.2);
    padding: 3px 5px;
    margin: -1px -7px;
}
.cat-pct {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-tertiary);
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ═══ BUTTON SMALL ═══ */
.btn-sm {
    padding: 8px 14px;
    font-size: 0.8rem;
    min-height: 36px;
}
.btn-sm iconify-icon {
    margin-right: 2px;
}

/* ═══ MICRO-INTERACTIONS ═══ */
.tx-card {
    transition: background 0.15s, transform 0.15s;
}
.tx-card:active {
    background: var(--bg-elevated);
    transform: scale(0.99);
}

/* Chart animation */
@keyframes chartFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.chart-section {
    animation: chartFadeIn 0.4s ease-out;
}

/* ═══ CHIP BUTTONS (AJAX FILTERS) ═══ */
.chip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s;
    cursor: pointer;
    min-height: 32px;
    gap: 4px;
    font-family: inherit;
    line-height: 1;
}
.chip-btn:hover {
    border-color: rgba(255,255,255,0.15);
    color: var(--text-primary);
    background: var(--bg-elevated);
}
.chip-btn.active {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
    box-shadow: 0 2px 8px rgba(99,102,241,0.35);
}

/* ═══ SEARCH SUMMARY ═══ */
.search-summary {
    padding: 6px 0 0;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}
.search-summary strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* ═══ CHART BOX TALL ═══ */
.chart-box-tall {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 280px;
}
.chart-box-tall canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ═══ TOP SPENDING ═══ */
.top-spending-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.top-spending-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 8px;
    transition: background 0.15s;
    cursor: pointer;
}
.top-spending-row:hover {
    background: var(--bg-elevated);
}
.top-spending-icon {
    width: 28px;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
    margin-right: 8px;
}
.top-spending-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 80px;
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.top-spending-bar-wrap {
    flex: 1;
    min-width: 0;
}
.top-spending-bar {
    display: block;
    height: 6px;
    background: var(--bg-elevated);
    border-radius: 3px;
    overflow: hidden;
}
.top-spending-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}
.top-spending-val {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 50px;
    text-align: right;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

/* ═══ Focus States ═══ */
:focus-visible {
    outline: 2px solid var(--info);
    outline-offset: 2px;
}

/* ─── Reduced Motion ─── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
