/* ==========================================================================
   NOVA — Penyesuaian tampilan mengikuti desain Figma (navy + biru, minimalis)
   Dimuat PALING AKHIR (setelah nova-ds.css). Hanya mengubah tampilan:
   tidak menyentuh ID, kelas yang dipakai JS, data, atau alur kerja.
   ========================================================================== */

/* ---------- 1. Token: palet navy + biru, netral dingin ---------- */
:root, :root[data-theme=light] {
  --canvas: #f5f7fb; --surface: #ffffff; --surface-2: #f8fafd;
  --line: #e4e9f2; --line-2: #d3dbe8; --line-soft: #eef2f8;
  --ink: #0b1b36; --body: #1f2d46; --lbl: #3b4a66; --mute: #5d6b85; --faint: #6b7890;
  --brand: #0879f9; --brand-hover: #0668d6; --brand-soft: #eaf3ff; --brand-ink: #0a63d1; --brand-ring: #d6e8ff; --brand-300: #8bbfff;
  --cue: #0879f9; --cue-ink: #0a63d1; --on-brand: #fff;
  --side: #071b3c;
  --ok: #17784f; --ok-bg: #e8f6ef; --warn: #8a5a05; --warn-bg: #fff3dc; --err: #b4232f; --err-bg: #fdeeee; --err-bd: #f5c6c9;
  --info: #0a63d1; --info-bg: #eef5ff;
  --shadow-card: none;
  --r-s: 6px; --r-m: 8px; --r-l: 10px;
}
:root[data-theme=dark] {
  --canvas: #060f20; --surface: #0c1a33; --surface-2: #10213f; --line: #1c2f52; --line-2: #27406c; --line-soft: #14264a;
  --ink: #eef3fc; --body: #cfd9ea; --lbl: #b3c1da; --mute: #93a3c0; --faint: #8294b3;
  --brand: #3d9bff; --brand-hover: #5badff; --brand-soft: #0f2a52; --brand-ink: #a8d0ff; --brand-ring: #0f2a52; --brand-300: #2f7fdc;
  --cue: #3d9bff; --cue-ink: #a8d0ff; --on-brand: #04122a;
  --side: #040d1d;
  --ok: #4ccf98; --warn: #e8c070; --err: #ff8f95; --info: #8cc0ff;
}
::selection { background: color-mix(in srgb, var(--brand) 28%, transparent); }

/* ---------- 2. Sidebar: navy datar, menu aktif biru tua ---------- */
#side { background: var(--side); border-right: 0; }
#nav .ng { color: #27c3ee !important; font-size: 11px !important; font-weight: 600; letter-spacing: .06em !important; text-transform: uppercase !important; margin: 18px 12px 6px; }
#nav a { color: rgba(255,255,255,.78); border-radius: 8px; font-weight: 500; }
#nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
#nav a.on { background: #143a6e !important; color: #fff; font-weight: 600; }
#nav a.on::after { display: none; }                /* tanpa cincin emas: menu aktif cukup dengan blok warna */
.bname .bout, .bname .bout2 { color: #27c3ee; letter-spacing: .04em; }

/* ---------- 3. Topbar & judul halaman ---------- */
#main > header { background: var(--surface) !important; border-bottom: 1px solid var(--line); box-shadow: none; }
#app #phero h1 { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.015em; }
#app #phero p { color: var(--mute); }
.pcrumb { color: var(--brand); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- 4. Kartu: putih, garis tipis, tanpa bayangan ---------- */
.card, .mdc-card, .dx-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: none; }
.card h2, .card h3 { color: var(--ink); font-weight: 700; }

/* ---------- 5. Tombol: satu biru utama, sekunder putih bergaris ---------- */
.btn { border-radius: var(--r-m); font-weight: 600; box-shadow: none; }
.btn:not(.sec):not(.danger) { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn:not(.sec):not(.danger):hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.sec { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn.sec:hover { background: var(--surface-2); border-color: var(--faint); }

/* ---------- 6. Formulir: kolom putih, fokus biru lembut ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-m); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); outline: none; }
label { color: var(--lbl); font-weight: 500; }

/* ---------- 7. Tabel: kepala abu muda, baris lega, tautan biru ---------- */
table { border-collapse: separate; border-spacing: 0; }
th { background: var(--surface-2); color: var(--mute); font-size: 12px; font-weight: 600; border-bottom: 1px solid var(--line); }
td { border-bottom: 1px solid var(--line-soft); color: var(--body); }
tbody tr:hover td { background: var(--surface-2); }
td a, .lnk { color: var(--brand); font-weight: 600; }

/* ---------- 8. Status: pil lembut, tanpa garis tepi ---------- */
.pill, .chip, .st, [class*="status"] .b, .mdc-st { border: 0; border-radius: 6px; font-weight: 600; }

/* ---------- 9. Bilah info (catatan/validasi) ---------- */
.note, .info, .mdc-note, .hint-bar { background: var(--info-bg); color: var(--info); border: 0; border-radius: var(--r-m); }

/* ---------- 10. Tab / chip pilihan ---------- */
.mdc-stab.on::before, .dx-sum.warn i, .dx-k.warn .l::before { background: var(--brand); }
.mdc-stab::before, .dx-sum i, .dx-k.warn .l::before { border-color: var(--brand); }

/* ---------- 11. HP: kolom 16px, sentuhan 44px ---------- */
@media (max-width: 767px) {
  #app #phero h1 { font-size: 22px; }
  .btn { min-height: 44px; }
}

/* ---------- 12. Pencarian dashboard ---------- */
.dsx { position: relative; z-index: 40; }
.dsr-b { gap: 10px; min-height: 48px; padding: 0 12px 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--surface); box-shadow: none; transition: border-color .15s, box-shadow .15s; }
.dsr-b:hover { border-color: var(--faint); }
.dsr-b:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
.dsr-b > .ic, .dsr-b > svg { width: 18px; height: 18px; color: var(--faint); stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }
.dsr-b:focus-within > .ic, .dsr-b:focus-within > svg { color: var(--brand); }
.dsr-b input { flex: 1 1 auto; min-width: 0; height: 46px; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; outline: none !important; background: transparent !important; font-size: var(--t-md); color: var(--ink); }
.dsr-b input::placeholder { color: var(--faint); opacity: 1; text-overflow: ellipsis; }
.dsr-b input::-webkit-search-cancel-button, .dsr-b input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.dsr-b kbd { flex: none; font: 600 11px/1 var(--font, inherit); padding: 4px 7px; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); color: var(--mute); }
.dsr-b:focus-within kbd, .dsr-b input:not(:placeholder-shown) ~ kbd { display: none; }
.dsr-x { flex: none; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 6px; background: transparent; color: var(--mute); font-size: 20px; line-height: 1; cursor: pointer; }
.dsr-x:hover { background: var(--line-soft); color: var(--ink); }
.dsr-x.hidden { display: none; }

/* panel hasil */
.dsr-r { top: calc(100% + 6px); max-height: min(70vh, 560px); border: 1px solid var(--line-2); border-radius: var(--r-l); background: var(--surface); box-shadow: 0 12px 32px rgba(7, 27, 60, .14); overflow: hidden auto; }
.dsr-r.hidden { display: none; }
.dsr-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line-soft); background: var(--surface-2); position: static; z-index: auto; }
.dsr-s { font-size: var(--t-xs); color: var(--mute); }
.dsr-s b { color: var(--ink); font-variant-numeric: tabular-nums; }
.dsr-ex .btn { min-height: 32px; padding: 0 12px; font-size: var(--t-xs); }
.dsr-tabs { display: flex; gap: 6px; padding: 10px 14px; overflow-x: auto; border-bottom: 1px solid var(--line-soft); scrollbar-width: none; }
.dsr-tabs::-webkit-scrollbar { display: none; }
.dsr-tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); color: var(--body); font-size: var(--t-xs); font-weight: 600; cursor: pointer; }
.dsr-tabs button em { font-style: normal; font-variant-numeric: tabular-nums; color: var(--mute); font-weight: 600; }
.dsr-tabs button:hover { border-color: var(--brand); }
.dsr-tabs button.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-ink); }
.dsr-tabs button.on em { color: var(--brand-ink); }
.dsr-list { padding: 6px; }
.dsr-i { display: flex; align-items: flex-start; gap: 12px; padding: 10px 10px; border-radius: var(--r-m); cursor: pointer; }
.dsr-i:hover, .dsr-i.on { background: var(--brand-soft); }
.dsr-i .g { flex: none; min-width: 72px; padding: 3px 8px; border-radius: 6px; background: var(--line-soft); color: var(--mute); font-size: 11px; font-weight: 600; text-align: center; }
.dsr-i.on .g, .dsr-i:hover .g { background: var(--surface); color: var(--brand-ink); }
.dsr-i > div { min-width: 0; flex: 1; }
.dsr-i b { display: block; color: var(--ink); font-size: var(--t-sm); font-weight: 600; overflow-wrap: anywhere; }
.dsr-i small { display: block; margin-top: 2px; color: var(--mute); font-size: var(--t-xs); overflow-wrap: anywhere; }
.dsr-i mark { background: color-mix(in srgb, var(--brand) 18%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
@media (max-width: 767px) {
  .dsr-b { min-height: 48px; }
  .dsr-b input { font-size: 16px; }   /* cegah zoom otomatis iOS */
  .dsr-b kbd { display: none; }
  .dsr-r { max-height: 65vh; }
  .dsr-h { flex-wrap: wrap; }
  .dsr-i .g { min-width: 0; }
}
