/* ===============================================================
   FILE: ASSETS/CSS/theme-dark.css
   FUNGSI: Tema GELAP + aksen EMAS (gaya CUBEX).
   Override kelas Tailwind yang dipakai di semua layar.
   Palet: bg #14110D, card #242427, sidebar #302E2D, field #2E2E32,
          gold #CF9B62 / #e0a96d, teks #F7F8FA, muted #968d82.
   =============================================================== */
:root{
  --cx-bg:#14110D; --cx-card:#242427; --cx-sidebar:#302E2D; --cx-field:#2E2E32;
  --cx-field-line:#6F7379; --cx-line:rgba(196,170,138,.14); --cx-line-2:rgba(196,170,138,.28);
  --cx-gold:#CF9B62; --cx-gold-2:#e0a96d; --cx-btn-bg:#553D23; --cx-text:#F7F8FA; --cx-muted:#968d82;
}

/* ---------- Latar & permukaan ---------- */
html, body { background-color:var(--cx-bg) !important; color:var(--cx-text); }
.bg-slate-100, .bg-slate-200 { background-color:var(--cx-bg) !important; }
.bg-white               { background-color:var(--cx-card) !important; }
.bg-slate-50            { background-color:var(--cx-field) !important; }
.bg-ink-900             { background-color:var(--cx-sidebar) !important; }
.bg-ink-800             { background-color:var(--cx-card) !important; }
.hover\:bg-slate-50:hover, .hover\:bg-slate-50\/60:hover, .hover\:bg-slate-50\/60:hover td { background-color:var(--cx-field) !important; }

/* ---------- Teks ---------- */
.text-ink-900, .text-ink-800, .text-slate-900, .text-slate-800, .text-slate-700 { color:var(--cx-text) !important; }
.text-slate-600, .text-slate-500 { color:#b3a99c !important; }
.text-slate-400, .text-slate-300 { color:var(--cx-muted) !important; }

/* ---------- Border ---------- */
.border-slate-200, .border-slate-100, .border-slate-300, .divide-slate-200 > :not([hidden]) ~ :not([hidden]),
.divide-slate-100 > :not([hidden]) ~ :not([hidden]) { border-color:var(--cx-line) !important; }

/* ---------- Aksen emas untuk brand ---------- */
.text-brand-600, .text-brand-700, .text-brand-500 { color:var(--cx-gold-2) !important; }
.hover\:text-brand-600:hover { color:var(--cx-gold-2) !important; }

/* ---------- Input / Select / Textarea (global) ---------- */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]),
select, textarea, .inp {
  background-color:var(--cx-field) !important; border-color:var(--cx-field-line) !important; color:var(--cx-text) !important;
}
input::placeholder, textarea::placeholder { color:var(--cx-muted) !important; }
.inp:focus, input:focus, select:focus, textarea:focus { border-color:var(--cx-gold) !important; box-shadow:0 0 0 3px rgba(207,155,98,.15) !important; }
input[type=date]::-webkit-calendar-picker-indicator { filter:invert(.8) sepia(.4) saturate(3) hue-rotate(-10deg); cursor:pointer; }
.bg-slate-50.font-semibold, .inp.bg-slate-50 { background-color:#26241f !important; }

/* ---------- Breadcrumb (cx-crumb) ---------- */
.cx-crumb{
  background:rgba(255,255,255,.025); border:1px solid var(--cx-line); border-radius:12px;
  padding:12px 20px; display:flex; align-items:center; gap:10px; font-size:14px; color:var(--cx-text);
}
.cx-crumb a{ color:var(--cx-text); text-decoration:none; display:inline-flex; align-items:center; gap:6px; }
.cx-crumb a:hover{ color:var(--cx-gold-2); }
.cx-crumb .sep{ color:var(--cx-muted); }
.cx-crumb .cur{ color:var(--cx-gold-2); font-weight:600; }

/* ---------- Select2 (dark) ---------- */
.select2-container--default .select2-selection--single{ background:var(--cx-field) !important; border-color:var(--cx-field-line) !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered{ color:var(--cx-text) !important; }
.select2-container--default .select2-selection--single .select2-selection__placeholder{ color:var(--cx-muted) !important; }
.select2-dropdown{ background:var(--cx-card) !important; border-color:var(--cx-line-2) !important; }
.select2-results__option{ color:var(--cx-text) !important; }
.select2-container--default .select2-results__option--highlighted[aria-selected]{ background:var(--cx-btn-bg) !important; color:var(--cx-gold-2) !important; }
.select2-container--default .select2-results__option[aria-selected=true]{ background:rgba(207,155,98,.12) !important; }
.select2-search--dropdown .select2-search__field{ background:var(--cx-field) !important; color:var(--cx-text) !important; border-color:var(--cx-field-line) !important; }

/* ---------- DataTables (dark) ---------- */
.dataTables_wrapper{ color:var(--cx-text) !important; }
table.dataTable, table.dataTable thead th, table.dataTable tbody td{ color:var(--cx-text) !important; border-color:var(--cx-line) !important; }
table.dataTable thead th{ background:var(--cx-sidebar) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button{ color:var(--cx-gold-2) !important; }
.dataTables_wrapper .dataTables_paginate .paginate_button.current{ background:var(--cx-btn-bg) !important; color:#fff !important; }
.dataTables_wrapper .dataTables_filter input, .dataTables_wrapper .dataTables_length select{ background:var(--cx-field) !important; border-color:var(--cx-field-line) !important; color:var(--cx-text) !important; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar-thumb{ background:#4A4A4A !important; }
::-webkit-scrollbar-thumb:hover{ background:var(--cx-gold) !important; }
