/* JEV Bot Dashboard - tema "jev" didefinisikan manual sebagai CSS variables.
   (File DaisyUI CDN itu precompiled: tema custom di tailwind.config TIDAK
   terbaca. Tanpa block ini browser fallback ke tema default = ungu.)
   Keputusan desain (R-31, satu baris per keputusan):
   - Dark terminal: tool monitoring sesi panjang, cocok konvensi trading terminal (R-21).
   - Satu aksen hijau (#3fb27f): arti semantik profit/go + aksi primer, tidak disebar (Part 3).
   - Biru #4b9fe5 hanya untuk info netral (link, badge AI), bukan dekorasi.
   - Merah #e5534b hanya untuk rugi/bahaya. Kuning #d9a13b hanya untuk warning.
   - Angka tabular mono: angka adalah kontennya; kolom rata kanan biar bisa di-scan.
   - Radius kecil konsisten (0.5rem kartu, 0.375rem tombol): bukan pill di mana-mana (R-11).
   - Matte total: tanpa shadow, tanpa glow, tanpa gradient (R-12, R-13, R-01).
   - Hierarki dari spacing + 1px hairline, bukan dari kotak bertumpuk.
*/

[data-theme="jev"] {
  color-scheme: dark;
  /* DaisyUI v4 mengharapkan channel oklch (L% C H), bukan hex:
     aturannya berbentuk oklch(var(--p)/1), jadi hex = deklarasi invalid. */
  --p: 68.54% 0.129 160.6;   --pf: 61.55% 0.117 160.0;   --pc: 16.84% 0.021 166.4;
  --s: 68.13% 0.132 246.5;   --sf: 63.24% 0.133 247.9;   --sc: 17.70% 0.029 246.7;
  --a: 68.54% 0.129 160.6;   --af: 61.55% 0.117 160.0;   --ac: 16.84% 0.021 166.4;
  --n: 22.52% 0.022 260.5;   --nf: 19.45% 0.018 259.7;   --nc: 91.04% 0.016 257.2;
  --b1: 19.93% 0.015 261.6;
  --b2: 15.82% 0.012 260.6;
  --b3: 26.27% 0.023 259.3;
  --bc: 91.04% 0.016 257.2;
  --in: 68.13% 0.132 246.5;  --inc: 17.70% 0.029 246.7;
  --su: 68.54% 0.129 160.6;  --suc: 16.84% 0.021 166.4;
  --wa: 74.43% 0.133 78.7;   --wac: 19.34% 0.029 68.5;
  --er: 63.74% 0.183 26.7;   --erc: 16.43% 0.042 22.8;
  --rounded-box: 0.5rem;
  --rounded-btn: 0.375rem;
  --rounded-badge: 0.375rem;
  --animation-btn: 0.15s;
  --animation-input: 0.15s;
  --btn-text-case: none;
  --btn-focus-scale: 0.98;
  --border-btn: 1px;
  --tab-border: 1px;
  --tab-radius: 0.375rem;
}

/* ---- lapisan kustom tipis: yang tidak dicover DaisyUI ---- */

.dot { width: 10px; height: 10px; border-radius: 9999px; background: #8a94a6; display: inline-block; flex: none; }
.dot.on { background: #3fb27f; }
.dot.off { background: #e5534b; }

.micro-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: #8a94a6; font-weight: 600;
}

.empty { color: #8a94a6; padding: 26px 12px; text-align: center; font-size: 13px; line-height: 1.7; }
.empty strong { color: #dbe2ec; font-weight: 600; display: block; margin-bottom: 2px; }

.reason { color: #8a94a6; font-size: 12px; max-width: 380px; }

.confbar { height: 6px; background: #1e2530; border-radius: 3px; min-width: 80px; }
.confbar > div { height: 100%; background: #3fb27f; border-radius: 3px; }

.logbox {
  background: #05070a; border: 1px solid #1e2530; border-radius: 0.5rem;
  padding: 12px; height: 480px; overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
  color: #c6cdd8;
}

canvas.chart { display: block; }

/* header tabel sticky: keputusan user di tabel adalah scan kolom angka (R-05) */
.tbl-sticky thead th {
  position: sticky; top: 0; background: #12161d; z-index: 1;
}

/* dialog backdrop: satu-satunya blur di seluruh UI, khusus modal (R-10 dose cap) */
dialog.modal::backdrop { background: rgba(0, 0, 0, 0.62); backdrop-filter: blur(3px); }

/* toast kustom */
#toasts {
  position: fixed; right: 18px; bottom: 18px; z-index: 100;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
}
.toast {
  background: #161c26; border: 1px solid #1e2530;
  border-left: 3px solid #3fb27f; border-radius: 0.375rem;
  padding: 10px 14px; font-size: 13px; line-height: 1.5; color: #dbe2ec;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  animation: slideIn 0.2s ease-out;
}
.toast.error { border-left-color: #e5534b; }
.toast.info { border-left-color: #4b9fe5; }
.toast.out { opacity: 0; transition: opacity 0.25s; }
@keyframes slideIn { from { opacity: 0; transform: translateX(18px); } }

:focus-visible { outline: 2px solid #4b9fe5; outline-offset: 2px; }

/* tap target 44px di mobile (R-03) */
@media (max-width: 640px) {
  #toasts { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .btn { min-height: 44px; }
  .tab { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .toast { animation: none; }
  .toast.out { transition: none; }
}
