#main[data-view=home]:has(.dashboard-studio) { overflow:auto; }
.dashboard-studio {
  --dashboard-mint:#157a60;
  --dashboard-coral:#a45139;
  --dashboard-blue:#345bbf;
  --dashboard-violet:#7153a9;
  width:100%;
  max-width:1620px;
  margin-inline:auto;
  gap:clamp(10px,1.5vh,17px);
  flex:1 1 auto;
}
.dashboard-header,.dashboard-header .heading-actions {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.dashboard-header h1 { font-size:clamp(25px,2vw,34px); }
.dashboard-header p { margin:0 0 3px; color:var(--accent-dark); font-weight:700; }
.dashboard-header .heading-actions { flex-wrap:wrap; justify-content:flex-end; }
.dashboard-header .heading-actions .btn { min-height:40px; }
.dashboard-overview { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:12px; }
.dashboard-studio .dashboard-profit {
  position:relative;
  isolation:isolate;
  justify-content:space-between;
  min-height:219px;
  padding:17px 22px;
  gap:12px;
  overflow:hidden;
  background:radial-gradient(ellipse at 90% 5%,#2a6b68,transparent 66%),#102f36;
  border:1px solid #285652;
  color:#f2f9f7;
  border-radius:19px;
}
.dashboard-profit::after {
  content:"";
  position:absolute;
  z-index:-1;
  right:-95px;
  top:-157px;
  width:355px;
  height:355px;
  border:1px solid #b3f7e433;
  border-radius:50%;
  box-shadow:0 0 0 25px #a7ebd015,0 0 0 53px #a7ebd00c;
  pointer-events:none;
}
.dashboard-profit-top,.dashboard-profit-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.dashboard-profit-top span { display:inline-flex; align-items:center; gap:6px; font-size:14px; color:#d2f4e8; }
.dashboard-profit-top span:first-child { padding:5px 9px; border:1px solid #a7ebd041; border-radius:7px; font-weight:700; }
.dashboard-profit-top svg { width:15px; height:15px; }
.dashboard-profit-main { display:grid; gap:3px; }
.dashboard-profit-main > span { color:#d2f4e8; font-size:17px; font-weight:650; }
.dashboard-profit-main strong { font-size:clamp(31px,3.1vw,55px); line-height:1.1; letter-spacing:-.05em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.dashboard-studio .dashboard-profit-main small,.dashboard-studio .dashboard-profit-foot small { color:#c6e6de; font-size:13px; }
.dashboard-profit-foot { display:grid; grid-template-columns:1fr 1fr; border-top:1px solid #b3f7e434; padding-top:8px; }
.dashboard-profit-foot > span { display:grid; gap:2px; min-width:0; }
.dashboard-profit-foot b { font-size:17px; overflow-wrap:anywhere; }
.dashboard-stats { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; min-width:0; }
.dashboard-studio .dashboard-stat {
  --stat-color:var(--dashboard-blue);
  display:grid;
  align-content:start;
  justify-content:stretch;
  gap:1px;
  padding:9px 13px;
  min-width:0;
  min-height:0;
  background:var(--paper);
  border:1px solid var(--line);
  border-radius:14px;
}
.dashboard-studio .dashboard-stat.kpi-expenses { --stat-color:var(--dashboard-coral); }
.dashboard-studio .dashboard-stat.kpi-receivables { --stat-color:var(--dashboard-mint); }
.dashboard-studio .dashboard-stat.kpi-tax { --stat-color:var(--dashboard-violet); }
.dashboard-stat-top { display:flex; align-items:center; gap:6px; font-size:14px; font-weight:750; color:var(--ink); }
.dashboard-stat-top > svg { margin-left:auto; width:15px; height:15px; color:var(--muted); flex:none; }
.dashboard-stat-icon { display:grid; place-items:center; width:24px; height:24px; flex:none; border-radius:7px; color:var(--stat-color); background:color-mix(in srgb,var(--stat-color) 12%,var(--paper)); }
.dashboard-stat-icon svg { width:15px; height:15px; }
.dashboard-studio .dashboard-stat > strong { font-size:clamp(18px,1.65vw,30px); color:var(--ink); letter-spacing:-.04em; line-height:1.16; white-space:normal; }
.dashboard-stat-caption,.dashboard-stat-detail { font-size:12px; line-height:1.4; overflow-wrap:anywhere; }
.dashboard-stat-caption { color:var(--muted); }
.dashboard-stat-detail { color:var(--stat-color); font-weight:700; }
.dashboard-summary-strip { display:grid; grid-template-columns:minmax(0,1.13fr) minmax(0,1fr); gap:12px; flex:none; }
.dashboard-summary-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:8px 12px; min-width:0; min-height:49px; padding:6px 11px; border:1px solid var(--line); border-radius:11px; background:var(--paper); }
.dashboard-studio .dashboard-summary-card h2 { display:flex; align-items:center; gap:5px; font-size:14px; }
.dashboard-summary-card h2 .od-icon { width:16px; height:16px; color:var(--dashboard-blue); }
.dashboard-summary-card dl { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:3px clamp(8px,1vw,18px); margin:0; }
.dashboard-summary-card dt { color:var(--muted); font-size:11px; }
.dashboard-summary-card dd { margin:0; color:var(--dashboard-blue); font-size:13px; font-weight:750; font-variant-numeric:tabular-nums; white-space:nowrap; }
.dashboard-summary-card dd.outgoing { color:var(--dashboard-coral); }
.dashboard-detail { display:grid; grid-template-columns:minmax(0,1.13fr) minmax(0,1fr); gap:12px; flex:none; align-items:stretch; }
.dashboard-funds-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
.dashboard-detail .insight-card { grid-column:auto; border-radius:16px; }
.dashboard-detail .insight-card > header { padding:13px 16px 9px; }
.dashboard-detail .insight-card h2 { font-size:19px; }
.dashboard-detail .insight-card header p { margin:3px 0 0; }
.dashboard-detail .dashboard-year-scroll { --dashboard-plot-height:218px; position:relative; flex:1 0 var(--dashboard-plot-height); min-height:var(--dashboard-plot-height); overflow-x:auto; }
.dashboard-detail #insight-trend-chart { position:absolute; inset:0; min-width:620px; min-height:0; }
#insight-trend-chart pattern,#insight-trend-chart .dashboard-profit-bar { color:var(--dashboard-mint); }
#insight-trend-chart .dashboard-profit-bar.is-loss { color:var(--dashboard-coral); }
#insight-trend-chart .financial-series-2 { fill:var(--dashboard-mint); }
.dashboard-detail .insight-legend > span:first-child { color:var(--dashboard-blue); }
.dashboard-detail .insight-legend > span:last-child { color:var(--dashboard-coral); }
.dashboard-series span { display:inline-flex; align-items:center; gap:5px; }
.dashboard-series span::before { content:""; width:11px; height:11px; border-radius:3px; background:currentColor; }
.dashboard-series .dashboard-profit-key::before { border:1px solid currentColor; background:radial-gradient(circle,currentColor 1px,transparent 1.4px) 0 0 / 4px 4px; }
.dashboard-detail #insight-trend-chart .financial-series-0 { fill:var(--dashboard-blue); }
.dashboard-detail #insight-trend-chart .financial-series-1 { fill:var(--dashboard-coral); }
.dashboard-detail #insight-trend-chart linearGradient[id$=-sale] stop:first-child { stop-color:#82a6f1; }
.dashboard-detail #insight-trend-chart linearGradient[id$=-sale] stop:last-child { stop-color:#4670cb; }
.dashboard-detail #insight-trend-chart linearGradient[id$=-cost] stop:first-child { stop-color:#f6b69c; }
.dashboard-detail #insight-trend-chart linearGradient[id$=-cost] stop:last-child { stop-color:#db886c; }
.dashboard-detail .trade-chart-exact { border-top:1px solid var(--line); }
.dashboard-detail .trade-chart-exact { margin-top:auto; }
.dashboard-funds-body { flex:1; padding:0 16px 8px; }
.dashboard-schedule-table { width:100%; table-layout:fixed; border-collapse:collapse; font-variant-numeric:tabular-nums; }
.dashboard-schedule-table :is(th,td) { padding:3px 8px; text-align:right; overflow-wrap:anywhere; font-size:14px; }
.dashboard-schedule-table th:first-child { width:27%; text-align:left; }
.dashboard-schedule-table thead th,.dashboard-schedule-table small { color:var(--muted); font-weight:650; }
.dashboard-schedule-table small { font-size:11px; }
.dashboard-schedule-table tbody :is(th,td) { border-top:1px solid var(--line); }
.dashboard-schedule-table tfoot { background:var(--ground); font-weight:750; }
.dashboard-schedule-table tfoot td:nth-child(2),.dashboard-cash-totals .cash-in { color:var(--dashboard-blue); }
.dashboard-schedule-table tfoot td:nth-child(3),.dashboard-cash-totals .cash-out { color:var(--dashboard-coral); }
.dashboard-cash-totals { container:dashboard-amounts / inline-size; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-content:start; gap:8px; flex:1; margin:0; padding:0 16px 8px; }
.dashboard-cash-totals > div { display:grid; align-content:start; gap:5px; min-width:0; padding:9px 9px; border:1px solid var(--line); border-radius:10px; background:var(--ground); }
.dashboard-cash-totals > div:last-child { grid-column:1/-1; }
.dashboard-cash-totals dt { font-size:13px; font-weight:650; line-height:1.3; }
.dashboard-cash-totals dd {
  margin:0;
  font-size:min(22px,calc((50cqi - 24px) / var(--amount-width)));
  font-weight:750;
  font-variant-numeric:tabular-nums;
  line-height:1.18;
  white-space:nowrap;
}
.dashboard-cash-totals .cash-net { color:var(--dashboard-mint); }
.dashboard-cash-totals .cash-net.is-negative { color:var(--dashboard-coral); }
.dashboard-funds > footer { align-items:center; flex-wrap:wrap; }
@container dashboard-amounts (max-width:252px) {
  .dashboard-cash-totals > div { grid-column:1/-1; }
  .dashboard-cash-totals dd { font-size:min(20px,calc((100cqi - 24px) / var(--amount-width))); }
}
@media(min-width:1240px) {
  .dashboard-funds-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .dashboard-funds-grid:not(:has(.dashboard-stock)) { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .dashboard-funds-grid:not(:has(.dashboard-payroll,.dashboard-stock)) { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media(min-width:1100px) {
  .dashboard-studio { gap:7px; }
  .dashboard-header p { margin-bottom:0; font-size:13px; }
  .dashboard-header h1 { font-size:29px; line-height:1.25; }
  .dashboard-overview { gap:8px; }
  .dashboard-studio .dashboard-profit { min-height:165px; padding:9px 16px; gap:5px; }
  .dashboard-profit-top span:first-child { padding-block:3px; }
  .dashboard-profit-main strong { font-size:clamp(30px,2.6vw,47px); }
  .dashboard-profit-foot { padding-top:5px; }
  .dashboard-stats { gap:6px; }
  .dashboard-studio .dashboard-stat { padding-block:5px; }
  .dashboard-studio .dashboard-stat > strong { font-size:clamp(18px,1.35vw,25px); }
  .dashboard-stat-icon { width:21px; height:21px; }
  .dashboard-stat-caption,.dashboard-stat-detail { line-height:1.25; }
  .dashboard-detail .insight-card > header { padding-block:8px 5px; }
  .dashboard-detail .insight-card h2,.dashboard-detail .insight-card header p { line-height:1.3; }
  .dashboard-detail .dashboard-year-scroll { --dashboard-plot-height:144px; }
  .dashboard-schedule-table :is(th,td) { padding-block:2px; line-height:1.2; }
  .dashboard-funds > footer,.dashboard-detail .trade-chart-exact { padding-block:4px; }
  .dashboard-detail .trade-chart-exact > span { width:auto; }
}
.dashboard-studio .insight-basis { font-size:12px; }
@media(min-width:1440px) {
  .dashboard-detail .dashboard-year-scroll { --dashboard-plot-height:164px; }
  .dashboard-studio .dashboard-stock li { font-size:14px; line-height:1.3; padding-block:3px; }
  .dashboard-studio .stock-dashboard-counts { font-size:14px; line-height:1.3; }
}
[data-theme=dark] .dashboard-studio { --dashboard-mint:#80d9ba; --dashboard-coral:#ffb298; --dashboard-blue:#a6c3ff; --dashboard-violet:#d2b9ff; }
@media(min-width:901px) and (max-height:900px) {
  .dashboard-studio { gap:9px; }
  .dashboard-studio .dashboard-profit { min-height:190px; padding-block:12px; gap:7px; }
  .dashboard-studio .dashboard-stat { padding-block:5px; }
  .dashboard-detail { min-height:0; }
  .dashboard-detail .dashboard-year-scroll { --dashboard-plot-height:154px; }
  .dashboard-detail .insight-card > header { padding-block:8px 5px; }
}
.company-year-summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; background:var(--ground); border:1px solid var(--line); border-radius:10px; padding:9px 13px; }
.company-year-summary small { color:var(--muted); }
.company-year-summary strong { margin-inline-start:4px; }
.expense-month-items { flex:none; padding:5px 9px; border:1px solid var(--line); border-radius:9px; }
.expense-month-items summary { cursor:pointer; padding:6px 4px; }
.expense-month-items[open] { min-height:120px; }
.expense-month-items td { white-space:nowrap; }
#insight-dialog.expense-calendar-modal:has(.expense-month-items[open]) .expense-calendar-body { overflow:auto; }
.account-header-status { display:flex; align-items:center; gap:8px; font-size:13px; }
.account-header-status[hidden] { display:none; }
.account-header-status button { color:var(--muted); background:var(--ground); border:1px solid var(--line); border-radius:7px; padding:4px 7px; white-space:nowrap; font:inherit; cursor:pointer; }
.account-header-status button:hover,.account-header-status button:focus-visible { color:var(--accent-dark); border-color:var(--accent); background:var(--accent-soft); }
.account-header-status b { color:var(--ink); }
@media(max-width:1050px) { .topbar:has(.account-header-status:not([hidden])) .sample-label { display:none; } }
@media(max-width:950px) {
  .account-header-status { grid-column:2; grid-row:2; justify-self:end; z-index:1; }
}
@media(max-width:700px) {
  .account-header-status { gap:2px; font-size:10px; }
  .account-header-status button { padding:2px 4px; }
  .topbar:has(.account-header-status:not([hidden])) .workspace-clock { grid-column:1; gap:4px; }
  .topbar:has(.account-header-status:not([hidden])) .workspace-clock-date { font-size:12px; }
  .topbar:has(.account-header-status:not([hidden])) .workspace-clock-time { font-size:11px; }
}
@media(max-width:900px) {
  .dashboard-studio { flex:0 0 auto; }
  .dashboard-overview,.dashboard-detail { grid-template-columns:minmax(0,1fr); }
  .dashboard-detail .dashboard-year-scroll { --dashboard-plot-height:185px; }
}
@media(max-width:700px) {
  .dashboard-header { flex-direction:column; align-items:stretch; }
  .dashboard-header .heading-actions { width:100%; justify-content:flex-start; }
  .dashboard-header .period-picker { min-width:0; }
  .dashboard-header .heading-actions .btn { font-size:13px; }
  .dashboard-studio .dashboard-profit { padding:13px 15px; }
  .dashboard-profit-main strong { font-size:clamp(29px,8vw,42px); }
  .dashboard-stat-detail { font-size:11px; }
}
