/* Dasbor: token grafik (palet acuan dataviz, divalidasi untuk kedua mode). */
.viz {
  --seri-1: #2a78d6; --seri-2: #eb6834;
  --grid: #e1e0d9; --sumbu: #c3c2b7; --tinta-1: #0b0b0b; --tinta-2: #52514e; --tinta-3: #898781;
  --naik: #006300; --turun: #b91c1c; --track: #cde2fb;
  --heat-0: #f0efec; --heat-1: #cde2fb; --heat-2: #9ec5f4; --heat-3: #6da7ec; --heat-4: #3987e5;
  --heat-5: #256abf; --heat-6: #184f95; --heat-7: #0d366b;
  --st-baik: #0ca30c; --st-waspada: #fab219; --st-serius: #ec835a; --st-kritis: #d03b3b;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .viz {
    --seri-1: #3987e5; --seri-2: #d95926;
    --grid: #2c2c2a; --sumbu: #383835; --tinta-1: #ffffff; --tinta-2: #c3c2b7; --tinta-3: #898781;
    --naik: #0ca30c; --turun: #f87171; --track: #104281;
    --heat-0: #1c2433; --heat-1: #0d366b; --heat-2: #104281; --heat-3: #184f95; --heat-4: #256abf;
    --heat-5: #3987e5; --heat-6: #6da7ec; --heat-7: #b7d3f6;
  }
}
:root[data-theme="dark"] .viz {
  --seri-1: #3987e5; --seri-2: #d95926;
  --grid: #2c2c2a; --sumbu: #383835; --tinta-1: #ffffff; --tinta-2: #c3c2b7; --tinta-3: #898781;
  --naik: #0ca30c; --turun: #f87171; --track: #104281;
  --heat-0: #1c2433; --heat-1: #0d366b; --heat-2: #104281; --heat-3: #184f95; --heat-4: #256abf;
  --heat-5: #3987e5; --heat-6: #6da7ec; --heat-7: #b7d3f6;
}

.saring-dasbor { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; margin-bottom: 16px; }
.saring-dasbor .preset { display: inline-flex; border: 1px solid var(--garis); border-radius: 8px; overflow: hidden; background: var(--kartu); }
.saring-dasbor .preset button { border: 0; background: none; padding: 8px 12px; font: inherit; cursor: pointer; color: var(--teks-2); }
.saring-dasbor .preset button[aria-pressed="true"] { background: var(--merek); color: #fff; font-weight: 600; }
.saring-dasbor input, .saring-dasbor select { width: auto; }
.memuat { opacity: .45; transition: opacity .15s; }

.ubin { display: flex; flex-direction: column; gap: 4px; }
.ubin .nilai { font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: var(--teks); }
.ubin.hero .nilai { font-size: 48px; line-height: 1.05; }
.ubin .delta { font-size: 12.5px; color: var(--teks-2); }
.delta .naik { color: var(--naik); font-weight: 600; }
.delta .turun { color: var(--turun); font-weight: 600; }

.grafik { position: relative; }
.grafik svg { display: block; width: 100%; height: auto; overflow: visible; }
.grafik svg:focus { outline: 2px solid var(--merek-muda); outline-offset: 4px; }
.grafik .grid { stroke: var(--grid); stroke-width: 1; }
.grafik .sumbu { stroke: var(--sumbu); stroke-width: 1; }
.grafik .tick { fill: var(--tinta-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.grafik .label-ujung { fill: var(--tinta-2); font-size: 11.5px; font-weight: 600; }
.grafik .crosshair { stroke: var(--tinta-3); stroke-width: 1; }
.grafik .cincin { stroke: var(--kartu); stroke-width: 2; }
.legenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--teks-2); margin-bottom: 6px; flex-wrap: wrap; }
.legenda span::before { content: ""; display: inline-block; width: 14px; height: 2px; margin-right: 6px; vertical-align: middle; background: var(--warna); border-radius: 1px; }

.tt { position: absolute; z-index: 5; pointer-events: none; background: var(--kartu); border: 1px solid var(--garis); border-radius: 8px;
      box-shadow: 0 6px 20px rgba(0,0,0,.15); padding: 8px 10px; font-size: 12.5px; min-width: 120px; }
.tt[hidden] { display: none; }
.tt-baris { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tt-baris b { color: var(--teks); }
.tt-label { color: var(--teks-2); }
.tt-kunci { width: 12px; height: 2px; border-radius: 1px; flex: none; }

.heat { display: grid; gap: 2px; font-size: 11px; color: var(--tinta-3); }
.heat-kolom { text-align: left; font-variant-numeric: tabular-nums; }
.heat-baris { align-self: center; }
.heat-sel { aspect-ratio: 1.6; border-radius: 3px; min-height: 12px; }
.heat-sel:hover { outline: 2px solid var(--teks); outline-offset: -1px; }
.heat-skala { display: flex; align-items: center; gap: 4px; margin-top: 10px; flex-wrap: wrap; }
.heat-kotak { width: 16px; height: 10px; border-radius: 2px; }

.bb { display: grid; grid-template-columns: minmax(90px, 38%) 1fr; gap: 10px; align-items: center; padding: 5px 0; outline: none; }
.bb:focus-visible { outline: 2px solid var(--merek-muda); border-radius: 4px; }
.bb-label { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--teks); }
.bb-jalur { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bb-isi { height: 12px; background: var(--seri-1); border-radius: 0 4px 4px 0; flex: none; max-width: calc(100% - 90px); }
.bb:hover .bb-isi { filter: brightness(1.12); }
.bb-nilai { font-size: 12.5px; color: var(--teks-2); white-space: nowrap; font-variant-numeric: tabular-nums; }

.meter { position: relative; height: 12px; background: var(--track); border-radius: 6px; margin: 10px 0 6px; }
.meter .meter-isi { position: absolute; inset: 0 auto 0 0; background: var(--seri-1); border-radius: 6px; }
.meter .tanda { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--tinta-1); }

.status { display: flex; gap: 10px; align-items: flex-start; }
.status .ikon-st { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.st-baik { background: var(--st-baik); } .st-waspada { background: var(--st-waspada); color: #111 !important; }
.st-serius { background: var(--st-serius); } .st-kritis { background: var(--st-kritis); }
.daftar-mini { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.daftar-mini li b { white-space: nowrap; }
.daftar-mini li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--garis); }
.daftar-mini li:last-child { border-bottom: 0; }
details.tabel-data summary { cursor: pointer; font-size: 12.5px; color: var(--teks-2); margin-top: 8px; }
a.status.kartu-tautan, .status { display: flex; }
.status.kartu-tautan { color: inherit; border-radius: 8px; }
.status.kartu-tautan:hover { background: var(--latar); text-decoration: none; }
