/* Statement Dashboard (rooftop/stmtdash.js) */
html.stm-on .lp { display: none !important; }
#rooftop-stm { --ink: #1B2333; --muted: #5B6475; --line: #DCE1EA; --line2: #EEF1F6; --brand: #1F3A93; --page: #F4F6FA; --up: #1F7A3E; --down: #B42318; --bar: #22324F; --cmp: #C2410C;
  font: 13px Roboto, "Segoe UI", Arial, sans-serif; color: var(--ink); background: var(--page); min-height: 100vh; }
.stm-page { gap: 12px; }
.stm-bar { align-items: center; }
.stm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.stm-chip { font: inherit; padding: 5px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; }
.stm-chip:hover { border-color: #B8C2D6; }
.stm-chip.on { background: var(--bar); border-color: var(--bar); color: #fff; }
.stm-chip:focus-visible, .stm-link:focus-visible, .stm-t th button:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.stm-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.stm-tile { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stm-tl { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stm-tv { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.stm-ts { font-size: 12px; color: var(--muted); }
.stm-td { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--muted); }
.stm-td small, .stm-key, .stm-card h2 small { color: var(--muted); font-weight: 400; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
.stm-none { color: var(--muted); font-size: 13px; font-weight: 400; }

.stm-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.stm-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.stm-card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.stm-key { margin: 8px 0 0; font-size: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.stm-depts { display: flex; flex-direction: column; gap: 8px; }
.stm-dept { display: grid; grid-template-columns: 64px minmax(0, 1fr) 96px 150px; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.stm-dl { color: var(--muted); }
.stm-track { position: relative; height: 14px; background: var(--line2); border-radius: 4px; }
.stm-fill { display: block; height: 100%; background: var(--bar); border-radius: 4px; }
.stm-fill.neg { background: var(--down); }
.stm-mark { position: absolute; top: -3px; width: 3px; height: 20px; margin-left: -1.5px; background: var(--cmp); border-radius: 2px; }
.stm-dv { text-align: right; font-weight: 600; }
.stm-dd { font-size: 12px; color: var(--muted); }
.stm-key .stm-fill { width: 14px; height: 10px; display: inline-block; }
.stm-key .stm-mark { position: static; display: inline-block; height: 12px; margin: 0; }
.stm-gpu { margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-variant-numeric: tabular-nums; color: var(--muted); }
.stm-gpu b { color: var(--ink); }
.stm-gpu em { font-style: normal; font-size: 12px; }

.stm-trend { width: 100%; height: auto; display: block; }
.stm-trend text { font-size: 11px; fill: var(--muted); }
.stm-grid { stroke: var(--line2); }
.stm-zero { stroke: #9AA3B5; stroke-dasharray: 3 3; }
.stm-la { fill: none; stroke: var(--bar); stroke-width: 2.5; }
.stm-lc { fill: none; stroke: var(--cmp); stroke-width: 2; stroke-dasharray: 5 4; }
.stm-dot { fill: var(--bar); }
.stm-la-k, .stm-lc-k { display: inline-block; width: 18px; height: 0; border-top: 2.5px solid var(--bar); }
.stm-lc-k { border-top: 2px dashed var(--cmp); }

.stm-tw { overflow-x: auto; }
.stm-t, .stm-st { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.stm-t th, .stm-t td { padding: 7px 10px; border-bottom: 1px solid var(--line2); text-align: right; white-space: nowrap; }
.stm-t th:first-child { text-align: left; }
.stm-t thead th { font-weight: 500; color: #3A4458; border-bottom: 2px solid var(--bar); }
.stm-t thead th button { all: unset; cursor: pointer; }
.stm-t tfoot th, .stm-t tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.stm-link { all: unset; cursor: pointer; color: var(--brand); font-weight: 500; }
.stm-link:hover { text-decoration: underline; }

.stm-bs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.stm-bs div { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: #F7F8FB; border-radius: 8px; }
.stm-bs span, .stm-bs small { font-size: 12px; color: var(--muted); }
.stm-bs b { font-size: 17px; font-variant-numeric: tabular-nums; }

.stm-st th, .stm-st td { padding: 5px 8px; border-bottom: 1px solid var(--line2); text-align: center; white-space: nowrap; }
.stm-st thead th { font-weight: 500; color: #3A4458; font-size: 12px; }
.stm-st tbody th { text-align: left; font-weight: 400; color: var(--muted); }
.stm-in { color: var(--up); font-weight: 700; }
.stm-off { color: #B54708; font-weight: 700; }
.stm-miss { color: #9AA3B5; }

@media (max-width: 1100px) { .stm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } .stm-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .stm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stm-tv { font-size: 20px; }
  .stm-dept { grid-template-columns: 56px minmax(0, 1fr) 84px; }
  .stm-dd { grid-column: 2 / -1; }
}
