/* Dashboard styles are scoped so the approved Login/Registration composition stays intact. */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
body.dashboard { background:#030e18; }
.dashboard .layout { display:block; width:calc(100% - 48px); max-width:1840px; margin:auto; min-height:100dvh; }
.dashboard .intro { display:none; }
.dashboard .workspace { padding:0 0 24px; display:block; }
.dashboard .panel { background:none; border:0; border-radius:0; box-shadow:none; padding:0; }
.dashboard h1, .dashboard h2, .dashboard p { margin:0; }
.dashboard h1 { font-size:clamp(28px,2.5vw,46px); line-height:1.15; letter-spacing:-.04em; white-space:normal; }
.dashboard h2 { font-size:16px; letter-spacing:-.02em; line-height:1.35; }
.dashboard button { color:#bfeaf6; background:#061c2b; border:1px solid #245068; border-radius:8px; min-height:38px; padding:7px 12px; display:inline-flex; align-items:center; justify-content:center; gap:7px; font-size:12px; }
.dashboard button:hover { background:#0c2b3e; border-color:#3ad9f1; }
.dashboard button:disabled { opacity:.45; }
.dashboard .icon { width:18px; height:18px; }
.dashboard #notice { position:fixed; z-index:5; bottom:16px; left:24px; margin:0; min-height:0; max-width:calc(100% - 48px); }
.dashboard #notice:not(:empty) { background:#0b2539; border:1px solid #43809b; border-radius:9px; padding:12px 18px; box-shadow:0 6px 24px #0008; }
.dash-nav { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; min-height:90px; gap:20px; }
.dash-brand img { display:block; width:94px; height:auto; }
.period-control { display:flex; align-items:center; gap:6px; padding:4px; border:1px solid #25465b; border-radius:30px; background:#081c2be8; }
.period-control button { padding:5px; min-width:34px; min-height:34px; border:0; background:transparent; border-radius:50%; }
.period-control button span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.period-control input { border:0; padding:7px; background:transparent; color:#e6f3ff; font-family:inherit; font-size:14px; font-weight:600; max-width:180px; }
.dash-nav-actions { display:flex; justify-content:flex-end; align-items:center; gap:10px; min-width:0; }
.dashboard .toolbar { margin:0; gap:6px; white-space:nowrap; }
.dashboard .toolbar select { padding:7px; background:#081c2b; }
.dashboard #language-label { position:absolute; width:1px; height:1px; clip:rect(0,0,0,0); overflow:hidden; }
.dashboard .language-icon { display:none; }
.dash-hero { position:relative; min-height:205px; display:grid; grid-template-columns:minmax(0,1fr) 210px 290px; align-items:center; gap:24px; overflow:hidden; isolation:isolate; }
.dash-hero::before { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(90deg,#030f1bf5,#030f1b80 55%,#030f1be6),url('./assets/branding/night-desk.webp') center 40%/cover; border-radius:14px; }
.hero-copy { padding:20px 24px; }
.hero-copy p { font-size:18px; color:#b7cbdd; margin-top:9px; }
.selected-period { display:block; margin-top:15px; font-size:12px; color:#8fbbd3; }
.dash-companion { height:205px; align-self:end; overflow:hidden; mask-image:linear-gradient(#000 82%,transparent); }
.dash-companion img { display:block; width:100%; height:100%; object-fit:cover; object-position:center 14%; }
.overview-state { background:#0a1e2ce8; border:1px solid #2a4c62; border-radius:12px; padding:15px; margin-right:15px; }
.overview-state strong { display:flex; gap:8px; font-size:14px; line-height:1.4; color:#74dfef; }
.overview-state p { color:#91adc4; font-size:12px; line-height:1.45; margin:7px 0; }
.overview-state ul { list-style:none; padding:0; margin:0; }
.overview-state li { display:flex; gap:7px; align-items:center; font-size:12px; color:#bbd0e0; margin-top:5px; }
.overview-state li .icon { width:12px; height:12px; }
.finance-metrics { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin:14px 0; }
.financial-metric { display:flex; align-items:flex-start; gap:12px; border:1px solid #1f4258; border-radius:12px; background:linear-gradient(135deg,#071c2b,#03121d); padding:18px 14px; min-width:0; }
.metric-icon { padding:10px; border-radius:10px; background:#08372f; color:#26d9b6; }
.metric-icon .icon { width:25px; height:25px; }
.metric-copy { min-width:0; }
.dashboard .metric-copy h2 { font-size:14px; font-weight:500; color:#c1d4e5; }
.metric-amount { display:block; font-size:clamp(18px,1.6vw,29px); line-height:1.25; margin-top:8px; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.metric-copy small { display:block; color:#7fa5be; font-size:12px; margin-top:4px; }
.kind-fixed .metric-icon,.kind-fixed .row-glyph { background:#3a1e2b; color:#ff626b; }
.kind-variable .metric-icon,.kind-variable .row-glyph { background:#3b331b; color:#f1ce4b; }
.kind-extraordinary .metric-icon,.kind-extraordinary .row-glyph { background:#2b2346; color:#b08afa; }
.kind-free .metric-icon { background:#08394b; color:#21d5ef; }
.kind-free .metric-amount { color:#2bdeed; }
.finance-guide,.finance-onboarding { display:flex; align-items:center; justify-content:space-between; gap:20px; background:#082032; border:1px solid #27506b; border-radius:12px; padding:18px 22px; margin:14px 0; }
.finance-guide p,.finance-onboarding p { font-size:12px; line-height:1.5; color:#9ebcd1; margin-top:7px; }
.finance-guide button,.currency-form button { background:#0b6074; color:#d8fcff; border-color:#28bed8; }
.finance-onboarding { display:block; }
.currency-form { display:grid; grid-template-columns:auto minmax(120px,190px) auto; justify-content:start; align-items:center; gap:10px; margin-top:14px; font-size:13px; }
.currency-form select { min-height:42px; width:100%; }
.currency-form button { min-height:42px; border:1px solid #28bed8; border-radius:8px; padding:8px 14px; cursor:pointer; }
.currency-form .help,.currency-form .finance-form-error { grid-column:1/-1; margin:0; }
.finance-lists { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.finance-list { min-height:310px; border:1px solid #1e4259; background:#041722e6; border-radius:12px; padding:14px 12px; min-width:0; }
.section-heading { display:flex; gap:10px; align-items:flex-start; justify-content:space-between; margin-bottom:12px; }
.section-heading button { color:#39daef; font-size:12px; padding:4px 7px; min-height:32px; flex-shrink:0; max-width:60%; }
.section-heading button .icon { width:13px; height:13px; }
.income-tabs { display:flex; gap:5px; margin-bottom:12px; }
.income-tabs button { flex:1; padding:5px; font-size:12px; min-height:32px; }
.income-tabs button[aria-pressed="true"] { background:#12436b; border-color:#277ca0; color:#eefbff; }
.finance-rows { max-height:280px; overflow-y:auto; scrollbar-width:thin; }
.finance-row { display:grid; grid-template-columns:30px minmax(0,1fr) auto; align-items:center; column-gap:8px; padding:10px 0; border-bottom:1px solid #193144; }
.row-glyph { display:grid; place-items:center; width:28px; height:30px; background:#0b302f; color:#2ad3b1; border-radius:7px; }
.row-description { min-width:0; }
.row-description strong { font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.row-description small { display:block; font-size:11px; color:#7eabc5; margin-top:4px; overflow-wrap:anywhere; }
.row-amount { font-size:14px; font-variant-numeric:tabular-nums; text-align:right; overflow-wrap:anywhere; max-width:125px; }
.row-actions { grid-column:3; display:flex; justify-content:flex-end; gap:4px; margin-top:4px; }
.row-actions button { min-height:32px; padding:4px; min-width:32px; background:transparent; border-color:#254056; }
.row-actions .icon { width:15px; height:15px; }
.finance-row.inactive { opacity:.6; }
.empty-list { padding:30px 5px; font-size:12px; color:#7f9fb6; text-align:center; }
.finance-charts { display:grid; grid-template-columns:1.05fr 1.05fr .85fr; gap:14px; margin-top:14px; }
.chart-panel { border:1px solid #23455b; background:#041722e6; border-radius:12px; padding:18px; min-width:0; }
.chart-empty { font-size:13px; color:#7fa4bd; min-height:155px; display:flex; align-items:center; justify-content:center; text-align:center; }
.distribution { display:grid; grid-template-columns:minmax(100px,160px) minmax(0,1fr); gap:8px; align-items:center; margin-top:16px; }
.donut { position:relative; aspect-ratio:1; }
.donut svg { display:block; width:100%; }
.donut > div { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:30px; }
.donut strong { font-size:clamp(11px,1vw,17px); overflow-wrap:anywhere; }
.donut small { font-size:10px; color:#98b3c8; margin-top:3px; }
.dashboard .distribution-table { font-size:12px; }
.distribution-table td,.distribution-table th { padding:9px 4px; border-color:#1c3749; font-weight:400; white-space:normal; }
.distribution-table td { text-align:right; }
.distribution-table th { color:#b5cadc; }
.legend-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:5px; }
.kind-fixed .legend-dot { background:#ff626b; }
.kind-variable .legend-dot { background:#f1ce4b; }
.kind-extraordinary .legend-dot { background:#9c7af4; }
.chart-legend { display:flex; gap:10px; font-size:11px; color:#9db4c7; }
.chart-legend span::before { content:""; display:inline-block; width:6px; height:6px; border-radius:50%; margin-right:4px; background:#24d5ae; }
.chart-legend .expense-dot::before { background:#ff626b; }
.history-chart { display:block; width:100%; max-height:195px; margin-top:10px; }
.grid-lines { stroke:#1b3549; stroke-width:1; fill:none; }
.bar-income { fill:#29d9b2; }
.bar-expense { fill:#ff626b; }
.history-chart text { fill:#9ab7cd; font:11px 'Segoe UI',sans-serif; }
.history-panel details { margin-top:8px; font-size:11px; color:#8db7cc; }
.history-panel table { font-size:10px; }
.history-panel td,.history-panel th { white-space:normal; padding:6px; }
.month-summary dl { margin:12px 0 0; }
.month-summary dl > div { display:flex; justify-content:space-between; gap:12px; padding:9px 0; border-bottom:1px solid #254357; font-size:12px; }
.month-summary dt { color:#a9bfd2; }
.month-summary dd { margin:0; font-weight:600; text-align:right; overflow-wrap:anywhere; }
.month-summary .kind-income dd { color:#2bd9b5; }
.month-summary .kind-fixed dd,.month-summary .kind-variable dd,.month-summary .kind-extraordinary dd { color:#ff8991; }
.month-summary .kind-free dd { color:#25dcec; }
.dashboard-loading { padding:60px; text-align:center; }
.finance-dialog { color:#e7f4ff; background:#091d2d; border:1px solid #376078; border-radius:16px; width:min(540px,calc(100% - 32px)); max-height:calc(100dvh - 40px); padding:26px; overflow-y:auto; box-shadow:0 25px 100px #000b; }
.finance-dialog::backdrop { background:#000a; backdrop-filter:blur(5px); }
.dialog-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.dialog-heading h2 { font-size:22px; margin:0; }
.dialog-close { color:#b3dded; background:transparent; border:0; font-size:26px; cursor:pointer; min-width:36px; min-height:36px; }
.finance-dialog form > label,.finance-dialog #finance-type-fields > label { display:block; font-size:13px; margin:15px 0 8px; }
.finance-dialog input:not([type=checkbox]),.finance-dialog select { display:block; width:100%; min-height:44px; border:1px solid #376179; border-radius:8px; padding:10px; background:#04111d; color:#f0f7ff; font:inherit; }
.finance-dialog .help { margin:7px 0; font-size:11px; }
.active-check { display:flex!important; align-items:center; gap:10px; }
.active-check input { width:20px; height:20px; accent-color:#3ad9ef; }
.dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:20px; }
.dialog-actions button { border:1px solid #2d829c; background:#0a344b; color:#d1f8ff; border-radius:8px; min-height:44px; padding:10px 18px; cursor:pointer; }
.dialog-actions button:last-child { background:#3edced; color:#04202b; }
.finance-form-error { font-size:12px; line-height:1.5; color:#f4becb; }
.finance-form-error:empty { display:none; }
@media(max-width:1450px) {
  .dash-hero { grid-template-columns:minmax(0,1fr) 165px 250px; min-height:180px; gap:14px; }
  .dash-companion { height:180px; }
  .financial-metric { padding:14px 10px; gap:8px; }
  .metric-icon { padding:8px; }
  .metric-icon .icon { width:21px; height:21px; }
  .finance-lists { gap:10px; }
  .finance-list { padding:12px 10px; }
  .section-heading { flex-wrap:wrap; gap:7px; }
  .section-heading button { max-width:100%; }
  .distribution { grid-template-columns:110px minmax(0,1fr); }
}
@media(max-width:1100px) {
  .dash-nav { grid-template-columns:auto 1fr; gap:12px; padding:10px 0; }
  .dash-nav .period-control { grid-row:2; grid-column:1/-1; justify-self:center; }
  .finance-metrics { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .finance-lists { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .finance-charts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .month-summary { grid-column:1/-1; }
  .dash-hero { grid-template-columns:minmax(0,1fr) 160px; }
  .overview-state { grid-column:1/-1; margin:0 15px 15px; }
  .overview-state ul { display:flex; gap:15px; flex-wrap:wrap; }
  .dash-nav-actions button span { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
}
@media(max-width:650px) {
  .dashboard .layout { width:calc(100% - 28px); }
  .dash-nav { min-height:75px; }
  .dash-brand img { width:74px; }
  .dash-nav-actions { gap:6px; }
  .dash-nav-actions button { padding:7px; min-width:38px; }
  .dash-hero { grid-template-columns:minmax(0,1fr) 110px; gap:0; }
  .hero-copy { padding:20px 12px; }
  .dashboard h1 { font-size:28px; overflow-wrap:anywhere; }
  .hero-copy p { font-size:13px; }
  .dash-companion { height:170px; }
  .overview-state { margin:0 10px 10px; }
  .overview-state ul { display:block; }
  .finance-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .financial-metric { padding:12px 8px; gap:7px; }
  .financial-metric.kind-free { grid-column:1/-1; }
  .metric-icon { padding:7px; }
  .metric-icon .icon { width:18px; height:18px; }
  .dashboard .metric-copy h2 { font-size:11px; }
  .metric-amount { font-size:18px; }
  .finance-lists,.finance-charts { grid-template-columns:minmax(0,1fr); }
  .finance-list { min-height:180px; }
  .section-heading { flex-wrap:nowrap; }
  .section-heading h2 { font-size:14px; }
  .section-heading button { max-width:58%; }
  .row-description strong { font-size:13px; }
  .row-actions button { min-width:36px; min-height:36px; }
  .chart-panel { padding:16px; }
  .distribution { grid-template-columns:120px minmax(0,1fr); }
  .finance-guide { display:block; padding:16px; }
  .finance-guide button { margin-top:12px; }
  .currency-form { grid-template-columns:1fr; }
  .currency-form .help,.currency-form .finance-form-error { grid-column:auto; }
  .finance-dialog { padding:22px; }
  .dialog-heading h2 { font-size:20px; }
}
