:root {
  --bg: #0b0f14; --panel: #111823; --line: #1f2a3a; --text: #d7e2f0; --muted: #7f93ad;
  --green: #3ddc97; --amber: #f2b84b; --red: #ff5c6c; --blue: #5aa9ff; --grey: #56667d;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 "Segoe UI", Tahoma, Arial, sans-serif; padding: 12px 14px 40px; max-width: 1440px; margin-inline: auto; }
h1 { margin: 0; font-size: 20px; letter-spacing: .3px; }
h1 .sub { color: var(--muted); font-weight: 400; font-size: 14px; }
h2 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
a { color: var(--blue); }
.top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.disclaimer { margin: 2px 0 0; color: var(--amber); font-size: 12px; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 12px; color: var(--muted); background: var(--panel); }
.chip.ok { color: var(--green); border-color: #1d5a43; }
.chip.warn { color: var(--amber); border-color: #6a5320; }
.chip.bad { color: var(--red); border-color: #6d2a31; }
.banner { background: #2a1a1d; border: 1px solid #6d2a31; color: #ffb3bb; padding: 8px 12px; border-radius: 6px; margin-bottom: 12px; }
.fig { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 10px; margin-bottom: 12px; }
.summary .wide { grid-column: 1 / -1; }
.card, .panel, .meter { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.panel { margin-bottom: 12px; }
.big { font-size: 22px; font-weight: 700; }
.lines .line { font-size: 12.5px; margin-top: 3px; }
.small { font-size: 12px; color: var(--muted); }
.good { color: var(--green); } .warn { color: var(--amber); } .bad { color: var(--red); } .dim { color: var(--grey); }
.lines .dim { color: var(--muted); }
ol.next { margin: 0; padding-inline-start: 20px; }
ol.next li { margin: 3px 0; }
.strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 10px; }
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.meter .lab { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.meter .val { font-size: 22px; font-weight: 700; direction: ltr; text-align: end; }
.bar { height: 8px; background: #0a0e14; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.bar > i { display: block; height: 100%; width: 0; background: var(--green); }
.bar.amber > i { background: var(--amber); } .bar.red > i { background: var(--red); } .bar.grey > i { background: var(--grey); }
.scroll { overflow-x: auto; }
table.pos-table { border-collapse: collapse; width: 100%; min-width: 1180px; }
.pos-table th, .pos-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.pos-table th { color: var(--muted); font-weight: 600; font-size: 12px; white-space: nowrap; }
.pos-table td .main { font-weight: 600; white-space: nowrap; }
.pos-table td .main.asset { font-size: 16px; }
.pos-table td .sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pos-table td .sub.warn { color: var(--amber); } .pos-table td .sub.bad { color: var(--red); } .pos-table td .sub.good { color: var(--green); }
.pos-table td.wide { min-width: 200px; max-width: 290px; font-size: 12.5px; }
.pos-table .tgt { font-size: 12px; white-space: nowrap; }
.pos-table ul.waits { margin: 0; padding-inline-start: 16px; }
.pos-table ul.waits li { margin: 2px 0; }
.pos-table tr.pos { cursor: pointer; }
.pos-table tr.pos:hover { background: #151f2d; }
.pos-table tr.pos.sel { background: #17263a; }
.pos-table tr.details td { font-size: 11.5px; color: var(--muted); padding-top: 0; padding-bottom: 10px; border-bottom: 2px solid var(--line); }
.chart { height: 380px; width: 100%; position: relative; margin-top: 8px; }
.chart canvas { width: 100%; height: 100%; display: block; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 18px; border-top: 2px solid currentColor; margin-inline-end: 6px; vertical-align: middle; }
footer { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 8px; color: var(--muted); font-size: 12px; }
/* phone: each position becomes a card, every figure keeps its label */
@media (max-width: 760px) {
  body { padding: 8px; }
  .big { font-size: 19px; }
  .chart { height: 300px; }
  table.pos-table { min-width: 0; }
  .pos-table thead { display: none; }
  .pos-table, .pos-table tbody, .pos-table tr, .pos-table td { display: block; width: 100%; }
  .pos-table tr.pos { border: 1px solid var(--line); border-radius: 8px 8px 0 0; padding: 6px 10px; margin-top: 10px; background: var(--panel); }
  .pos-table td { border-bottom: 1px dashed var(--line); padding: 6px 0; }
  .pos-table td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 2px; }
  .pos-table td.wide { max-width: none; min-width: 0; }
  .pos-table td .main, .pos-table .tgt { white-space: normal; }
  .pos-table tr.details { border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px; padding: 0 10px 6px; }
  .pos-table tr.details td { border-bottom: none; padding: 4px 0; }
  .pos-table tr.details td::before { content: none; }
}
