/* ==========================================================================
   Tema "Terminal" (gelap presisi) — lapisan tampilan dashboard jagovibe.
   Aktif saat <html class="terminal"> (bersama class "dark" bawaan halaman).
   ========================================================================== */

html.terminal {
  --bg: #0B0C0E;
  --surface: #111316;
  --surface-2: #171A1F;
  --surface-3: #1E2227;
  --line: #1E2227;
  --line-strong: #2B3138;
  --ink: #E8EAED;
  --ink-2: #B4BAC1;
  --ink-3: #808892;
  --accent: #E8B45A;
  --accent-ink: #14161A;
  --pos: #6EE7A8;
  --neg: #F08A7A;
  --warn: #E8B45A;
  --info: #A9B7C4;
}

html.terminal body,
html.terminal .bg-\[\#090d16\] {
  background: var(--bg) !important;
  color: var(--ink) !important;
  font-family: 'Inter', 'Plus Jakarta Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* kartu: permukaan rata bergaris, tanpa kaca & tanpa bayangan */
html.terminal .glass-card,
html.terminal .glass-card-hover:hover {
  background: var(--surface) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border: 1px solid var(--line) !important;
  box-shadow: none !important;
}
html.terminal .glass-card-hover:hover { border-color: var(--line-strong) !important; }

/* ---------- permukaan ---------- */
html.terminal .bg-slate-950,
html.terminal .bg-slate-950\/80,
html.terminal .bg-slate-950\/70,
html.terminal .bg-slate-950\/60,
html.terminal .bg-slate-950\/50,
html.terminal .bg-slate-950\/40 { background-color: var(--bg) !important; }

html.terminal .bg-slate-900,
html.terminal .bg-slate-900\/90,
html.terminal .bg-slate-900\/60 { background-color: var(--surface) !important; }

html.terminal .bg-slate-800 { background-color: var(--surface-2) !important; }
html.terminal .hover\:bg-slate-800:hover,
html.terminal .hover\:bg-slate-700:hover { background-color: var(--surface-3) !important; }

/* ---------- teks ---------- */
html.terminal .text-white,
html.terminal .text-slate-100 { color: var(--ink) !important; }
html.terminal .text-slate-200 { color: #D3D8DE !important; }
html.terminal .text-slate-300 { color: var(--ink-2) !important; }
html.terminal .text-slate-400 { color: var(--ink-3) !important; }
html.terminal .text-slate-500 { color: #8A929C !important; }
html.terminal .text-slate-600 { color: #7C848E !important; }
html.terminal .text-slate-950 { color: var(--accent-ink) !important; }

/* ---------- garis ---------- */
html.terminal .border-slate-800,
html.terminal .border-slate-800\/80,
html.terminal .border-slate-800\/70,
html.terminal .border-slate-800\/60,
html.terminal .border-slate-800\/40 { border-color: var(--line) !important; }
html.terminal .border-slate-700,
html.terminal .border-slate-700\/80 { border-color: var(--line-strong) !important; }
html.terminal .divide-slate-800\/60 > :not([hidden]) ~ :not([hidden]),
html.terminal .divide-slate-800\/40 > :not([hidden]) ~ :not([hidden]),
html.terminal .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: var(--line) !important; }

/* ---------- aksen tunggal: amber ---------- */
html.terminal .text-emerald-400,
html.terminal .text-emerald-300 { color: var(--accent) !important; }
html.terminal .bg-emerald-500 { background-color: var(--accent) !important; color: var(--accent-ink) !important; }
html.terminal .bg-emerald-400 { background-color: #F0C57F !important; }
html.terminal .bg-emerald-500\/20,
html.terminal .bg-emerald-500\/15,
html.terminal .bg-emerald-500\/10 { background-color: rgba(232, 180, 90, .12) !important; }
html.terminal .border-emerald-500\/60,
html.terminal .border-emerald-500\/50,
html.terminal .border-emerald-500\/40,
html.terminal .border-emerald-500\/30 { border-color: rgba(232, 180, 90, .38) !important; }
html.terminal .hover\:bg-emerald-500:hover { background-color: #F2C87A !important; }

html.terminal .text-rose-400,
html.terminal .text-rose-300 { color: var(--neg) !important; }
html.terminal .bg-rose-500\/10 { background-color: rgba(240, 138, 122, .10) !important; }
html.terminal .border-rose-500\/30 { border-color: rgba(240, 138, 122, .32) !important; }

html.terminal .text-amber-400,
html.terminal .text-amber-300 { color: var(--warn) !important; }
html.terminal .bg-amber-500\/20 { background-color: rgba(232, 180, 90, .14) !important; }

html.terminal .text-cyan-400,
html.terminal .text-cyan-300 { color: var(--info) !important; }
html.terminal .bg-cyan-500\/20 { background-color: rgba(169, 183, 196, .10) !important; }
html.terminal .border-cyan-500\/40,
html.terminal .border-cyan-500\/30 { border-color: rgba(169, 183, 196, .28) !important; }

html.terminal .text-indigo-600,
html.terminal .text-indigo-400 { color: var(--accent) !important; }
html.terminal .placeholder-slate-500::placeholder { color: #8A929C !important; }

/* ---------- gradien diratakan ---------- */
html.terminal [class*="bg-gradient-to"] { background-image: none !important; }
html.terminal [class*="from-emerald-500"] { background-color: var(--accent) !important; }
html.terminal [class*="from-emerald-500"]:hover { background-color: #F2C87A !important; }
html.terminal [class*="from-slate-900"],
html.terminal [class*="from-emerald-950"],
html.terminal [class*="from-slate-950"] { background-color: var(--surface-2) !important; }
html.terminal [class*="from-rose-500"] {
  background-image: linear-gradient(90deg, var(--neg), var(--accent)) !important;
  background-color: transparent !important;
}

/* ---------- tipografi: presisi, bukan dekoratif ---------- */
html.terminal h1,
html.terminal h2,
html.terminal #reportViewerTitle {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
  color: var(--ink) !important;
}
html.terminal .font-mono-num {
  font-family: 'Inter', system-ui, sans-serif !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.005em;
}

/* ---------- bentuk ---------- */
html.terminal .rounded-2xl { border-radius: 8px !important; }
html.terminal .rounded-xl { border-radius: 6px !important; }
html.terminal .rounded-lg { border-radius: 4px !important; }
html.terminal .shadow-2xl,
html.terminal .shadow-xl,
html.terminal .shadow-lg,
html.terminal .shadow-md { box-shadow: none !important; }

/* tabel laporan */
html.terminal .report-scroll::-webkit-scrollbar-thumb { background: var(--line-strong) !important; }
html.terminal .report-scroll::-webkit-scrollbar-track { background: var(--bg) !important; }
html.terminal #reportContainer table thead th {
  background: var(--surface-2) !important;
  color: #8A929C !important;
  border-bottom: 1px solid var(--line-strong) !important;
  font-weight: 500 !important;
  letter-spacing: .07em;
}
html.terminal #reportContainer table tbody td {
  border-bottom: 1px solid var(--line) !important;
  font-variant-numeric: tabular-nums;
  color: var(--ink) !important;
}
html.terminal #reportContainer .text-emerald-400,
html.terminal #reportContainer .text-emerald-300,
html.terminal #reportContainer .text-cyan-400,
html.terminal #reportContainer .text-cyan-300 { color: var(--ink) !important; }
html.terminal #reportContainer .text-rose-400,
html.terminal #reportContainer .text-rose-300 { color: var(--neg) !important; }
html.terminal #reportContainer table tbody tr:hover td { background: var(--surface-2) !important; }

/* input */
html.terminal input,
html.terminal select,
html.terminal textarea {
  background-color: var(--surface) !important;
  border-color: var(--line) !important;
  color: var(--ink) !important;
}

/* tombol tambahan (inline style dari skrip) */
html.terminal #jvUrlBtn,
html.terminal #jvPpnBtn {
  background: var(--surface) !important;
  color: var(--accent) !important;
  border: 1px solid var(--line-strong) !important;
  font-weight: 500 !important;
}
html.terminal #jvUrlBtn:hover,
html.terminal #jvPpnBtn:hover { background: var(--surface-2) !important; color: var(--ink) !important; }
html.terminal #jvLazyFlag { background: var(--surface) !important; color: var(--ink) !important; border-color: var(--line-strong) !important; }

/* variabel panel PPN & Aging */
html.terminal {
  --jvp-panel: #111316;
  --jvp-ink: #E8EAED;
  --jvp-line: #1E2227;
  --jvp-line-soft: #171A1F;
  --jvp-overlay: rgba(0, 0, 0, .72);
  --jvp-blur: none;
  --jvp-shadow: 0 24px 64px rgba(0, 0, 0, .6);
  --jvp-tab-bg: transparent;
  --jvp-tab-ink: #E8B45A;
  --jvp-tab-line: #2B3138;
  --jvp-close-bg: #1E2227;
  --jvp-box: #171A1F;
  --jvp-neg: #F08A7A;
  --jvp-accent: #E8B45A;
  --jvp-accent-ink: #14161A;
}
