/* Dashboard styles are scoped to the home page. */
.app--dashboard { max-width: 1160px; padding-top: 28px; }
.home-dashboard { display: grid; gap: 26px; }
.home-dashboard [hidden] { display: none !important; }
.home-dashboard h2 { font-size: 1.08rem; font-weight: 700; }
.home-dashboard h3 { font-size: .83rem; font-weight: 600; }
.home-muted { color: var(--text-muted); font-size: .78rem; line-height: 1.6; }
.home-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 8px 0 2px; }
.home-eyebrow { color: var(--primary-hover); font-size: .65rem; font-weight: 750; letter-spacing: .14em; margin-bottom: 10px; }
.home-intro h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.035em; margin-bottom: 8px; }
.home-intro .home-muted { font-size: .86rem; }
.home-date { flex-shrink: 0; color: var(--text-soft); font-size: .76rem; padding-bottom: 5px; }
.home-feedback:empty { display: none; }
.home-feedback { color: var(--text-muted); font-size: .82rem; }
.home-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--warning-border); border-radius: 14px; background: var(--warning-soft); padding: 14px 18px; color: var(--warning); font-size: .85rem; }
.home-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.home-overview > .home-balance { grid-column: 1 / -1; }
.home-balance { position: relative; overflow: hidden; display: flex; flex-direction: column; background: #104e3b; border-radius: 22px; padding: 30px; color: #fff; min-width: 0; }
.home-balance::after { content: ''; position: absolute; width: 320px; height: 320px; border: 1px solid #ffffff0d; border-radius: 50%; right: -140px; top: -115px; box-shadow: 0 0 0 45px #ffffff04, 0 0 0 90px #ffffff03; pointer-events: none; }
.home-balance > * { position: relative; z-index: 1; }
.home-balance-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-balance-label { font-size: .87rem; color: #d1e7df; }
.home-live { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #ffffff24; border-radius: 30px; padding: 5px 10px; font-size: .62rem; color: #d7eee4; }
.home-live > span { width: 5px; height: 5px; border-radius: 50%; background: #7dd5a9; }
.home-balance-amount { font-size: clamp(1.7rem, 3.8vw, 2.8rem); font-weight: 650; letter-spacing: -.05em; line-height: 1.2; margin-top: 30px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.home-balance-note { font-size: .73rem; color: #b0d2c4; margin-top: 10px; }
.home-balance-footer { margin-top: auto; padding-top: 27px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .72rem; }
.home-balance-footer > span { color: #b0d2c4; }
.home-balance-footer a { color: #fff; text-decoration: none; font-weight: 600; }
.home-balance-footer a span { margin-left: 8px; }
.home-saving { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 24px; min-width: 0; }
.home-tile-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.home-tile-heading > a { font-size: 1.35rem; color: var(--text-muted); text-decoration: none; }
.home-icon { width: 36px; height: 36px; border: 1px solid #dcebe3; border-radius: 11px; display: grid; place-items: center; color: #23765a; background: #f2f8f5; }
.home-icon svg { width: 20px; height: 20px; }
.home-saving h3 { color: var(--text-soft); }
.home-saving-amount { font-size: clamp(1.4rem, 2.8vw, 1.9rem); font-weight: 700; letter-spacing: -.035em; margin: 5px 0 3px; overflow-wrap: anywhere; }
.home-saving-detail { margin-top: 19px; padding-top: 15px; border-top: 1px solid #edf1ef; display: grid; gap: 7px; font-size: .72rem; }
.home-saving-detail > div { display: flex; justify-content: space-between; gap: 12px; }
.home-saving-detail dt { color: var(--text-muted); }
.home-saving-detail dd { font-weight: 600; }
.home-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.home-month-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.home-metric { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.home-metric > div { min-width: 0; }
.home-metric h3 { color: var(--text-soft); font-size: .75rem; }
.home-metric-value { font-size: clamp(1rem, 2.2vw, 1.4rem); font-weight: 700; letter-spacing: -.035em; margin: 8px 0 3px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.home-metric .home-muted { font-size: .69rem; }
.home-metric-symbol { display: grid; place-items: center; width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px; background: #f1f5f4; font-size: 1.25rem; color: var(--text-soft); }
.home-income { color: #23765a; }
.home-expense { color: #b34738; }
.home-metric-symbol.home-income, .home-activity-icon.home-income { background: #edf7f1; }
.home-metric-symbol.home-expense, .home-activity-icon.home-expense { background: #fff3ef; }
.home-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.home-action { display: flex; align-items: center; gap: 12px; padding: 15px 18px; text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 14px; background: #fff; transition: border-color .15s, background .15s; }
.home-action:hover { background: #f3f8f5; border-color: #afcfbb; }
.home-action > span:first-child { font-size: 1.45rem; line-height: 1; color: #23765a; }
.home-action > div { min-width: 0; }
.home-action strong { display: block; font-size: .8rem; }
.home-action small { display: block; color: var(--text-muted); font-size: .67rem; margin-top: 3px; }
.home-action-arrow { margin-left: auto; font-size: 1.1rem; color: var(--text-muted); }
.home-action-primary { background: #edf6f0; border-color: #d6e8dc; }
.home-content-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.home-panel { background: #fff; border: 1px solid var(--border); border-radius: 20px; padding: 24px; min-width: 0; }
.home-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 22px; }
.home-panel-heading h2 { font-size: .95rem; margin-bottom: 5px; }
.home-panel-heading .home-muted { font-size: .71rem; }
.home-panel-mark { color: var(--text-faint); font-size: 1.3rem; }
.home-text-link { white-space: nowrap; text-decoration: none; font-size: .68rem; font-weight: 650; padding-top: 3px; }
.home-chart-legend { display: flex; gap: 18px; margin-bottom: 17px; font-size: .68rem; color: var(--text-muted); }
.home-chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.home-chart-legend i { width: 7px; height: 7px; border-radius: 2px; }
.home-legend-income { background: #2c8b66; }
.home-legend-expense { background: #e8b38c; }
.home-chart { position: relative; display: flex; gap: 14px; height: 196px; margin-top: 22px; }
.home-chart-scale { display: flex; flex-direction: column; justify-content: space-between; flex-shrink: 0; padding-bottom: 30px; font-size: .58rem; color: var(--text-faint); max-width: 90px; }
.home-chart-plot { display: flex; flex: 1; min-width: 0; justify-content: space-around; gap: 8px; position: relative; }
.home-chart-plot::before { content: ''; position: absolute; inset: 0 0 30px; background: repeating-linear-gradient(to top, #edf1ef 0, #edf1ef 1px, transparent 1px, transparent 50%); pointer-events: none; }
.home-chart-column { flex: 1; display: flex; flex-direction: column; min-width: 0; max-width: 55px; position: relative; }
.home-chart-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 5px; min-height: 0; }
.home-chart-bar { width: 13px; max-width: 42%; border-radius: 4px 4px 0 0; }
.home-chart-bar-in { background: #2c8b66; }
.home-chart-bar-out { background: #e8b38c; }
.home-chart-month { height: 30px; flex-shrink: 0; text-align: center; padding-top: 12px; color: var(--text-muted); font-size: .65rem; }
.home-chart-empty { position: absolute; top: 50%; left: 24%; right: 0; font-size: .72rem; text-align: center; color: var(--text-muted); background: #ffffffdb; padding: 7px; }
.home-chart-details { margin-top: 18px; font-size: .72rem; color: var(--text-muted); }
.home-chart-details summary { cursor: pointer; padding: 6px 0; }
.home-table-wrap { overflow-x: auto; margin-top: 8px; }
.home-table-wrap table { border-collapse: collapse; width: 100%; white-space: nowrap; font-size: .68rem; }
.home-table-wrap th, .home-table-wrap td { text-align: right; padding: 9px 5px; border-bottom: 1px solid var(--border); }
.home-table-wrap th:first-child { text-align: left; }
.home-expense-item + .home-expense-item { margin-top: 22px; }
.home-expense-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; font-size: .75rem; }
.home-expense-heading > div { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.home-expense-heading > div strong { overflow-wrap: anywhere; }
.home-expense-heading > strong { white-space: nowrap; font-size: .72rem; }
.home-rank { color: var(--text-faint); font-size: .66rem; }
.home-expense-track { height: 5px; background: #f2f5f3; border-radius: 10px; overflow: hidden; margin: 9px 0 7px; }
.home-expense-track > span { display: block; height: 100%; background: #4a896b; border-radius: inherit; }
.home-expense-meta { display: flex; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: .62rem; }
.home-activity-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid #edf1ef; }
.home-activity-row:first-child { padding-top: 0; }
.home-activity-row:last-child { border-bottom: 0; padding-bottom: 0; }
.home-activity-icon { display: grid; place-items: center; width: 35px; height: 35px; border-radius: 11px; flex-shrink: 0; font-size: 1.2rem; }
.home-activity-info { display: grid; gap: 3px; min-width: 0; flex: 1; }
.home-activity-info strong { font-size: .78rem; overflow-wrap: anywhere; }
.home-activity-info > span { color: var(--text-muted); font-size: .64rem; }
.home-activity-info small { color: var(--text-muted); font-size: .66rem; overflow-wrap: anywhere; }
.home-activity-amount { display: grid; gap: 4px; text-align: right; flex-shrink: 0; }
.home-activity-amount strong { font-size: .78rem; font-variant-numeric: tabular-nums; }
.home-activity-amount > span { color: var(--text-muted); font-size: .61rem; }
.home-budget-summary { display: flex; justify-content: space-between; gap: 14px; }
.home-budget-summary > div { display: grid; gap: 4px; }
.home-budget-summary > div:last-child { text-align: right; }
.home-budget-summary strong { font-size: .89rem; }
.home-budget-track { height: 7px; border-radius: 10px; background: #f0f4f2; overflow: hidden; margin-top: 14px; }
.home-budget-track > span { display: block; height: 100%; background: #2c8b66; border-radius: inherit; }
.home-budget-track > span.is-over { background: #b34738; }
.home-budget-status { color: #23765a; font-size: .7rem; margin: 9px 0 16px; line-height: 1.6; }
.home-budget-status.is-over { color: #b34738; }
.home-budget-item { border-top: 1px solid #edf1ef; padding-top: 12px; margin-top: 12px; }
.home-budget-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.home-budget-item-head > strong { font-size: .73rem; overflow-wrap: anywhere; }
.home-budget-badge { color: #23765a; background: #edf7f1; padding: 3px 7px; border-radius: 6px; font-size: .58rem; white-space: nowrap; }
.home-budget-badge.is-over { color: #b34738; background: #fff3ef; }
.home-budget-item p { font-size: .7rem; margin-top: 6px; font-weight: 600; }
.home-budget-item p span { color: var(--text-muted); font-weight: 400; }
.home-empty { padding: 20px 0; }
.home-empty strong { font-size: .84rem; }
.home-empty p { font-size: .76rem; color: var(--text-muted); margin: 7px 0 12px; }
.home-empty a { font-size: .75rem; text-decoration: none; font-weight: 600; }
.home-footer { display: flex; justify-content: space-between; gap: 12px; color: var(--text-faint); font-size: .64rem; padding: 0 3px; }
@media (max-width: 820px) {
    .home-metric { flex-direction: column; padding: 17px; }
    .home-content-grid { grid-template-columns: 1fr; }
    .home-date { font-size: .67rem; }
}
@media (max-width: 600px) {
    .app--dashboard { padding-top: 20px; }
    .home-dashboard { gap: 22px; }
    .home-intro { flex-direction: column; align-items: flex-start; gap: 10px; }
    .home-intro h2 { font-size: 1.55rem; }
    .home-overview { grid-template-columns: 1fr; gap: 14px; }
    .home-balance { padding: 24px; }
    .home-balance-amount { font-size: clamp(1.8rem, 7vw, 2.5rem); margin-top: 27px; }
    .home-saving { padding: 20px; }
    .home-month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .home-metric:last-child { grid-column: 1 / -1; flex-direction: row; align-items: center; }
    .home-metric:last-child > div { flex: 1; }
    .home-metric-value { font-size: 1.07rem; }
    .home-actions { grid-template-columns: 1fr; gap: 8px; }
    .home-action { padding: 13px 16px; }
    .home-action > div { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
    .home-panel { padding: 20px; }
    .home-activity-row { gap: 9px; flex-wrap: wrap; }
    .home-activity-amount strong { font-size: .72rem; }
    .home-activity-amount { max-width: 100%; overflow-wrap: anywhere; }
    .home-chart { gap: 8px; }
    .home-chart-scale { font-size: .52rem; }
    .home-chart-plot { gap: 4px; }
    .home-chart-bars { gap: 3px; }
    .home-footer { flex-direction: column; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { .home-action { transition: none; } }

/* Finance workspace: restrained surfaces, readable figures, and line icons. */
.home-dashboard { gap: 24px; }
.home-intro { align-items: center; padding-top: 0; }
.home-eyebrow { font-size: .61rem; color: #82918f; letter-spacing: .14em; }
.home-intro h2 { font-size: clamp(1.5rem, 2.5vw, 1.9rem); font-weight: 650; }
.home-intro-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.home-date { font-size: .72rem; padding: 0; }
.home-add-entry { display: inline-flex; align-items: center; padding: 10px 14px; border-radius: 8px; background: #17664f; color: #fff; text-decoration: none; font-size: .76rem; font-weight: 600; }
.home-add-entry:hover { background: #125440; }
.home-add-entry .finance-icon { width: 16px; height: 16px; }
.home-balance { border-radius: 14px; background: #163f36; padding: 28px; box-shadow: none; }
.home-balance::after { opacity: .55; }
.home-balance-label .finance-icon { width: 17px; height: 17px; }
.home-balance-amount { font-size: clamp(1.8rem, 3.3vw, 2.65rem); font-weight: 600; letter-spacing: -.035em; }
.home-saving { border-radius: 14px; padding: 24px; background: #fff; }
.home-saving-amount { font-size: 1.8rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.home-icon { width: 34px; height: 34px; border-radius: 9px; background: #f1f5f3; border: 0; }
.home-icon svg { width: 19px; height: 19px; }
.home-metric { border-radius: 12px; background: #fff; padding: 20px; }
.home-metric-symbol { width: 34px; height: 34px; border-radius: 9px; }
.home-metric-symbol svg { width: 19px; height: 19px; }
.home-metric h3 { font-size: .76rem; font-weight: 500; }
.home-metric-value { font-size: clamp(1.1rem, 1.8vw, 1.4rem); font-weight: 650; letter-spacing: -.02em; }
.home-actions { gap: 12px; }
.home-action { border-radius: 10px; padding: 13px 16px; }
.home-action > span:first-child { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; }
.home-action > span:first-child svg { width: 20px; height: 20px; }
.home-action strong { font-size: .76rem; font-weight: 600; }
.home-action small { font-size: .68rem; }
.home-panel { border-radius: 14px; padding: 24px; }
.home-panel-heading h2 { font-size: .96rem; font-weight: 650; }
.home-panel-heading .home-muted { font-size: .74rem; }
.home-panel-mark { width: 22px; height: 22px; color: #91a29b; }
.home-panel-mark svg { width: 22px; height: 22px; }
.home-chart { height: 210px; }
.home-chart-scale { font-size: .63rem; }
.home-chart-month { font-size: .69rem; }
.home-chart-bar { border-radius: 3px 3px 0 0; }
.home-chart-bar-in { background: #3d8872; }
.home-chart-bar-out { background: #d8a282; }
.home-chart-legend { font-size: .72rem; }
.home-legend-income { background: #3d8872; }
.home-legend-expense { background: #d8a282; }
.home-category-icon { display: grid; place-items: center; width: 26px; height: 26px; background: #f4f6f5; color: #657a70; border-radius: 6px; flex-shrink: 0; }
.home-category-icon svg { width: 16px; height: 16px; }
.home-expense-heading { font-size: .76rem; }
.home-expense-meta { font-size: .67rem; }
.home-activity-icon { width: 34px; height: 34px; border-radius: 8px; }
.home-activity-icon svg { width: 19px; height: 19px; }
.home-activity-info strong { font-size: .8rem; font-weight: 600; }
.home-activity-info > span, .home-activity-info small { font-size: .68rem; }
.home-activity-amount strong { font-weight: 600; font-size: .8rem; }
.home-budget-summary strong { font-size: 1rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.home-budget-badge { font-size: .63rem; }
.home-budget-status { font-size: .74rem; }
.home-footer { font-size: .69rem; }
@media (max-width: 600px) {
    .home-intro { gap: 14px; align-items: flex-start; }
    .home-intro-tools { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; gap: 10px; }
    .home-date { font-size: .65rem; max-width: 48%; }
    .home-add-entry { font-size: .67rem; padding: 9px 10px; }
    .home-add-entry .finance-icon { width: 14px; height: 14px; margin-right: 4px; }
    .home-balance { padding: 23px; }
    .home-saving { padding: 20px; }
    .home-metric { padding: 15px; }
    .home-metric-value { font-size: 1.06rem; }
    .home-metric h3 { font-size: .71rem; }
    .home-metric-symbol { width: 30px; height: 30px; }
    .home-action > div { display: block; }
    .home-panel { padding: 20px; }
    .home-chart-scale { font-size: .54rem; }
    .home-activity-amount strong { font-size: .72rem; }
}


.home-period { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.home-period .select { width:auto; min-width:190px; }
.home-period p { flex-basis:100%; }
.finance-chart-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:22px; }
.finance-chart { min-width:0; padding:16px; border:1px solid var(--border); border-radius:12px; }
.finance-chart h3 { margin-bottom:20px; }
.finance-donut { width:190px; height:190px; max-width:100%; aspect-ratio:1; border-radius:50%; margin:0 auto 20px; display:grid; place-items:center; }
.finance-donut > div { width:72%; height:72%; border-radius:50%; background:#fff; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.finance-donut span { font-size:10px; color:var(--text-muted); }
.finance-donut strong { font-size:14px; margin-top:6px; }
.finance-legend { list-style:none; padding:0; display:grid; gap:12px; }
.finance-legend li { display:flex; gap:7px; align-items:start; font-size:11px; }
.finance-legend li > span:nth-child(2) { flex:1; overflow-wrap:anywhere; }
.finance-dot { width:8px; height:8px; margin-top:3px; border-radius:50%; flex-shrink:0; }
.finance-legend strong { text-align:right; font-variant-numeric:tabular-nums; }
.finance-legend small { display:block; font-weight:400; color:var(--text-muted); }
.finance-bar-key { display:flex; flex-wrap:wrap; gap:20px; font-size:12px; margin:18px 0; color:#26775f; }
.finance-bar-key span:last-child { color:#ba7b42; }
.finance-bar-row { display:grid; grid-template-columns:70px minmax(0,1fr); gap:12px; font-size:12px; margin:20px 0; }
.finance-bar-line { display:flex; align-items:center; gap:8px; margin:5px 0; }
.finance-bar-line i { display:block; background:#26775f; height:14px; min-width:2px; border-radius:3px; flex-shrink:1; }
.finance-bar-line.is-expense i { background:#ba7b42; }
.finance-bar-line span { white-space:nowrap; font-size:11px; }
@media(max-width:1000px) { .finance-chart-grid { grid-template-columns:1fr; } }
