/* Reports use the Android app's neutral surfaces; series colors stay in the charts. */
#reports-workspace.dashboard-mode{container-type:inline-size}
.report-dashboard-heading{margin-bottom:20px}
.report-dashboard-heading h2{margin:0;font-size:1.15rem;letter-spacing:-.02em}
.report-dashboard-heading p{margin:7px 0 0;color:var(--muted);font-size:.86rem;line-height:1.6;max-width:720px}

#reports-workspace.dashboard-mode .report-filters{padding:14px 16px;margin-bottom:18px;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:0 2px 6px #18374403}
#reports-workspace.dashboard-mode .report-control-bar{display:grid;grid-template-columns:minmax(0,1fr) minmax(130px,170px) minmax(80px,100px);align-items:end;gap:12px;padding-inline-end:136px}
#reports-workspace.dashboard-mode .report-field>span{font-size:11px;line-height:14px}
#reports-workspace.dashboard-mode .report-more-filters>summary{position:absolute;top:34px;inset-inline-end:16px;min-height:38px;margin-top:0;background:var(--panel)}
#reports-workspace.dashboard-mode .report-more-filters[open]>summary{background:var(--soft)}
#reports-workspace.dashboard-mode .report-secondary-controls{margin-top:12px}
#reports-workspace.dashboard-mode .report-filter-panel{grid-template-columns:minmax(0,1fr);gap:22px;margin-top:16px;padding-top:16px}
#reports-workspace.dashboard-mode .report-filter-panel>fieldset{width:100%}
#reports-workspace.dashboard-mode .report-account-list>div{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:3px 20px}
.report-back{display:inline-flex;align-items:center;gap:7px;min-height:32px;margin:0 0 14px;padding:5px 0;border:0;border-radius:5px;background:transparent;color:var(--accent);font-size:.78rem}
.report-back svg{width:16px;height:16px;flex:none}
.report-back:hover:not(:disabled){color:var(--ink)}
.report-back:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
[dir=rtl] .report-back svg{transform:rotate(180deg)}

.report-dashboard-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 20px}
.report-metric{position:relative;min-width:0;min-height:110px;padding:18px 20px;border:1px solid var(--border);border-radius:12px;background:var(--panel);box-shadow:0 2px 6px #18374403}
.report-metric .metric-icon{position:absolute;inset-block-start:18px;inset-inline-end:18px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:11px;color:var(--accent);background:var(--soft)}
.report-metric .metric-icon svg{width:18px;height:18px}
.report-metric.income .metric-icon{color:var(--green);background:color-mix(in srgb,var(--green) 10%,var(--panel))}
.report-metric.expense .metric-icon{color:var(--red);background:color-mix(in srgb,var(--red) 9%,var(--panel))}
.report-metric .metric-label{display:block;margin:0;padding-inline-end:44px;color:var(--muted);font-size:.74rem;line-height:1.4;font-weight:500}
.report-metric .metric-value{display:block;margin:8px 0 0;padding-inline-end:34px;font-size:clamp(1.15rem,2.2cqi,1.8rem);line-height:1.2;letter-spacing:-.025em;font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.report-metric.income .metric-value{color:var(--green)}
.report-metric.expense .metric-value{color:var(--red)}
.report-metric.net .metric-value{color:var(--ink)}
.report-metric .metric-value.negative,.report-metric.net .metric-value.negative{color:var(--red)}
.report-metric .metric-caption{display:block;margin:8px 0 0;color:var(--muted);font-size:.66rem;line-height:1.4}

.report-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:stretch}
.report-dashboard-card{display:flex;flex-direction:column;min-width:0;min-height:292px;padding:18px 20px 16px;border:1px solid var(--border);border-radius:13px;background:var(--panel);box-shadow:0 3px 12px #102b3905;overflow:visible}
.report-dashboard-card:focus-within{border-color:color-mix(in srgb,var(--accent) 48%,var(--border))}
.report-dashboard-card--wide{grid-column:1/-1}
.dashboard-card-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-height:41px;margin-bottom:15px}
.dashboard-card-title{min-width:0}
.dashboard-card-title h2,.dashboard-card-heading h2{margin:0;color:var(--ink);font-size:.88rem;font-weight:600;line-height:1.4;letter-spacing:-.012em}
.dashboard-card-subtitle{display:block;margin:5px 0 0;color:var(--muted);font-size:.66rem;line-height:1.4;overflow-wrap:anywhere}
.dashboard-card-heading>.icon-button,.dashboard-card-heading [data-open-report],.dashboard-card-heading [data-dashboard-report]{display:inline-flex;align-items:center;justify-content:center;flex:none;width:31px;height:31px;min-height:31px;padding:6px;margin-block-start:-3px;margin-inline-end:-5px;color:var(--muted);background:transparent;border:1px solid transparent;border-radius:7px}
.dashboard-card-heading>.icon-button:hover:not(:disabled),.dashboard-card-heading [data-open-report]:hover:not(:disabled),.dashboard-card-heading [data-dashboard-report]:hover:not(:disabled){background:var(--soft);color:var(--accent)}
.dashboard-card-heading>.icon-button svg,.dashboard-card-heading [data-open-report] svg,.dashboard-card-heading [data-dashboard-report] svg{width:17px;height:17px;flex:none}
.dashboard-card-heading>.icon-button:focus-visible,.dashboard-card-heading [data-open-report]:focus-visible,.dashboard-card-heading [data-dashboard-report]:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.report-dashboard-card .dashboard-chart{display:flex;flex-direction:column;justify-content:center;min-width:0;min-height:210px;flex:1}
.report-dashboard-card .dashboard-chart>.report-chart{width:100%;min-width:0;margin:0}
.report-dashboard-card .dashboard-chart>.empty,.report-dashboard-card .dashboard-chart>.report-empty{display:flex;align-items:center;justify-content:center;min-height:210px;padding:24px;color:var(--muted);font-size:.8rem;text-align:center}
.dashboard-card-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid var(--border);margin-top:14px;padding-top:10px;color:var(--muted);font-size:.72rem}
.dashboard-card-footer>button,.dashboard-card-footer>a{font-size:.73rem;min-height:28px;padding:3px 0;border:0;background:transparent;color:var(--accent)}

.dark .report-metric,.dark .report-dashboard-card,.dark #reports-workspace.dashboard-mode .report-filters{box-shadow:none}
.dark .report-metric.income .metric-icon{background:color-mix(in srgb,var(--green) 12%,var(--panel))}
.dark .report-metric.expense .metric-icon{background:color-mix(in srgb,var(--red) 12%,var(--panel))}

@container (max-width:760px){
  .report-dashboard-grid{grid-template-columns:minmax(0,1fr);gap:16px}
  .report-dashboard-card{min-height:292px}
  .report-dashboard-metrics{gap:12px}
  .report-metric{padding:15px;min-height:103px}
  .report-metric .metric-icon{inset-block-start:13px;inset-inline-end:13px;width:29px;height:29px;border-radius:9px}
  .report-metric .metric-icon svg{width:15px;height:15px}
  .report-metric .metric-label{padding-inline-end:32px;font-size:.7rem}
  .report-metric .metric-value{padding-inline-end:0;font-size:1.18rem;margin-top:12px}
}
@container (max-width:500px){
  .report-dashboard-metrics{gap:8px;margin-bottom:16px}
  .report-metric{padding:13px 11px;min-height:93px;border-radius:10px}
  .report-metric .metric-icon{display:none}
  .report-metric .metric-label{padding:0;font-size:.66rem}
  .report-metric .metric-value{font-size:1.02rem;line-height:1.3;margin-top:8px}
  .report-metric .metric-caption{font-size:.59rem;margin-top:6px}
  .report-dashboard-card{padding:17px 16px 15px;border-radius:11px}
  .dashboard-card-heading{margin-bottom:12px;gap:9px}
  .dashboard-card-title h2,.dashboard-card-heading h2{font-size:.83rem}
  .dashboard-card-subtitle{font-size:.63rem}
}
@container (max-width:650px){
  #reports-workspace.dashboard-mode .report-control-bar{grid-template-columns:minmax(0,1fr) 95px;padding-inline-end:0;gap:10px}
  #reports-workspace.dashboard-mode .report-field-report{grid-column:1/-1}
  #reports-workspace.dashboard-mode .report-field-period{grid-column:1}
  #reports-workspace.dashboard-mode .report-more-filters>summary{position:static;width:max-content;margin-top:10px}
}
@media(max-width:600px){
  #reports-workspace.dashboard-mode .report-filters{padding:12px;margin-bottom:16px}
  #reports-workspace.dashboard-mode .report-control-bar{grid-template-columns:minmax(0,1fr) 85px;padding-inline-end:0;gap:9px}
  #reports-workspace.dashboard-mode .report-field-report{grid-column:1/-1}
  #reports-workspace.dashboard-mode .report-field-period{grid-column:1}
  #reports-workspace.dashboard-mode .report-more-filters>summary{position:static;width:max-content;margin-top:10px}
  #reports-workspace.dashboard-mode .report-filter-panel{gap:16px;margin-top:12px;padding-top:14px}
}
@media(prefers-reduced-motion:no-preference){.dashboard-card-heading>.icon-button,.dashboard-card-heading [data-open-report],.dashboard-card-heading [data-dashboard-report]{transition:background-color .15s,color .15s}}
