/* Developer dashboard only. Foundation: style.css (do not restyle components there). */

/* ---------- Section rhythm ---------- */
.dash-sec + .dash-sec { margin-top: clamp(56px, 7vw, 96px); }
.dash > .notice { margin-bottom: 28px; }

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px 24px;
  padding-bottom: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}
.sec-head h2 { font-size: clamp(1.35rem, 1.2vw + 0.9rem, 1.7rem); display: flex; align-items: baseline; gap: 12px; }
.sec-head h2 .idx { font-size: 0.8rem; }
.sec-meta { font-family: var(--font-mono); font-size: 0.82rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.sub-head { font-size: 1rem; font-weight: 700; }
.sub-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }

.dash-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 48px; }
@media (min-width: 900px) { .dash-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; } }

/* ---------- [01] Today: LED panel + payout receipt ---------- */
.dash-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
@media (min-width: 720px) { .dash-hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px; } }
@media (min-width: 1000px) { .dash-hero { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }

.today-panel {
  container-type: inline-size;
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 32px);
}
.today-figure {
  --cells: 3;
  direction: ltr;
  display: flex;
  justify-content: flex-end; /* RTL start, under the label */
  align-items: flex-start;
  gap: 0.12em;
  /* LED cell ≈ 0.65em wide; shrink to fit the panel when the amount gets long */
  font-size: min(clamp(72px, 12vw, 152px), calc((100cqi - 8px) / (var(--cells) * 0.65 + 0.35)));
  line-height: 1;
  min-height: 1em;
}
.today-cur {
  font-family: var(--font-mono);
  font-size: 0.3em;
  line-height: 1;
  color: var(--on-panel-2);
  margin-top: 0.08em;
}
.today-led { display: block; line-height: 0; }
.today-led .led { height: 1em; }

.cap { border-top: 1px solid var(--panel-line); padding-top: 16px; }
.cap-line { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.cap-count { font-family: var(--font-mono); font-size: 1.3rem; color: var(--on-panel); font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; white-space: nowrap; }
.cap-of { color: var(--on-panel-2); }
.led-meter { display: flex; gap: 3px; height: 14px; margin-top: 12px; } /* fills from the RTL start, like .meter */
.led-meter > i { flex: 1 1 0; min-width: 2px; background: var(--led); opacity: 0.14; }
.led-meter > i.on { opacity: 1; }
.cap-note { margin-top: 10px; font-size: 0.84rem; color: var(--on-panel-2); }

.next-payout { margin-bottom: 9px; } /* room for the torn edge */
.next-payout .r-sub { margin-top: 2px; }
.next-payout .r-total > :last-child { font-size: 1.35rem; }
.next-payout .r-total { align-items: baseline; }
.pay-account a { font-family: var(--font-sans); color: var(--red-ink); font-weight: 600; }
.pay-progress { padding-block: 8px 2px; }
.pay-progress .meter { height: 10px; }
.r-note { margin-top: 10px; font-family: var(--font-sans); font-size: 0.84rem; line-height: 1.5; color: var(--ink-2); min-height: 1.5em; }

.dash-stats { margin-top: 20px; }
.dash-stats .stat-value { font-variant-numeric: normal; }

/* ---------- [02] Chart ---------- */
.chart-facts { display: flex; flex-wrap: wrap; gap: 10px 40px; margin: 0 0 20px; min-height: 3.1em; }
.chart-facts > div { display: grid; gap: 2px; }
.chart-facts dt { font-size: 0.8rem; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.chart-facts dd { margin: 0; font-family: var(--font-mono); font-size: 1.15rem; font-weight: 500; direction: ltr; unicode-bidi: isolate; text-align: right; white-space: nowrap; }
.swatch { width: 10px; height: 10px; flex: none; background: var(--ink); }
.swatch-red { background: var(--red); }

.chart-holder { min-height: 240px; }
.skeleton-chart { height: 240px; }
.chart-sub { margin-top: 10px; font-size: 0.84rem; color: var(--ink-3); }

.chart-table { margin-top: 16px; border-top: 1px solid var(--rule); }
.chart-table > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.92rem;
}
.chart-table > summary::-webkit-details-marker { display: none; }
.chart-table > summary::before {
  content: "+";
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 400;
  line-height: 1;
}
.chart-table[open] > summary::before { content: "−"; background: var(--ink); color: var(--paper); }
.chart-table .table-wrap { max-height: 360px; overflow: auto; margin-top: 8px; }
.chart-table .tbl th { position: sticky; top: 0; z-index: 1; }
.chart-table .tbl tr.is-today td { font-weight: 600; }
.chart-table .tbl td .swatch { display: inline-block; margin-inline-start: 8px; vertical-align: 1px; }

/* ---------- [03] Devices ---------- */
.device { gap: 16px; padding: 14px 0; }
.device-name { font-weight: 600; overflow-wrap: anywhere; }
.device-meta { margin-top: 2px; font-size: 0.84rem; color: var(--ink-3); }
.device-meta .num { font-family: var(--font-mono); font-size: 0.8rem; }
/* install card: prompt panel + CLI come from install.css; the split column is narrow, so commands wrap */
#install-card .steps h4 { font-size: 1rem; }
#install-card .inst-cli-cmds .codebox code { white-space: normal; overflow-wrap: anywhere; line-height: 1.5; }
.empty { padding: 32px 20px; }

/* ---------- [04] Payouts ---------- */
.payout-saved-actions { margin-top: 16px; }
.hold-note {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-size: 0.86rem;
  color: var(--ink-2);
  max-width: 60ch;
}
#payouts .tbl .t-num { font-size: 0.95rem; }

@media (max-width: 639px) {
  .page-head .btn { width: 100%; }
  .chart-facts { gap: 10px 28px; }
}
