/* SIMPUL-KIA Mode Malam
 * Aktif saat <html data-bs-theme="dark"> (diatur oleh static/js/theme.js).
 * Hanya berlaku di layar; saat dicetak tetap memakai tampilan terang.
 */
@media screen {

html[data-bs-theme="dark"] {
  color-scheme: dark;

  --brand-primary: #2dd4bf;
  --brand-primary-hover: #5eead4;
  --brand-primary-light: rgba(45, 212, 191, 0.12);
  --brand-primary-border: rgba(45, 212, 191, 0.35);
  --brand-accent: #38bdf8;
  --brand-accent-light: rgba(56, 189, 248, 0.12);

  --pastel-pink-bg: rgba(244, 114, 182, 0.10);
  --pastel-pink-subtle: rgba(244, 114, 182, 0.16);
  --pastel-pink-border: rgba(244, 114, 182, 0.35);
  --pastel-pink-dark: #f9a8d4;
  --pastel-blue-bg: rgba(56, 189, 248, 0.10);
  --pastel-blue-subtle: rgba(56, 189, 248, 0.16);
  --pastel-blue-border: rgba(56, 189, 248, 0.35);
  --pastel-blue-dark: #7dd3fc;
  --pastel-mint-bg: rgba(52, 211, 153, 0.10);
  --pastel-mint-subtle: rgba(52, 211, 153, 0.16);
  --pastel-mint-border: rgba(52, 211, 153, 0.35);
  --pastel-mint-dark: #6ee7b7;
  --pastel-peach-bg: rgba(251, 146, 60, 0.10);
  --pastel-peach-subtle: rgba(251, 146, 60, 0.16);
  --pastel-peach-border: rgba(251, 146, 60, 0.35);
  --pastel-peach-dark: #fdba74;
  --pastel-lavender-bg: rgba(192, 132, 252, 0.10);
  --pastel-lavender-subtle: rgba(192, 132, 252, 0.16);
  --pastel-lavender-border: rgba(192, 132, 252, 0.35);
  --pastel-lavender-dark: #d8b4fe;

  --dark-sidebar: #131c18;
  --dark-sidebar-hover: #1c2a23;
  --dark-sidebar-border: #26342d;

  --bg-app: #0e1512;
  --bg-card: #161f1b;
  --bg-card-hover: #1b2621;
  --text-main: #e2e8f0;
  --text-muted: #9fb0a7;
  --text-light: #7c8c84;
  --border-subtle: #24302a;
  --border-strong: #2f3e37;

  --shadow-subtle: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 16px -2px rgba(0, 0, 0, 0.45);
  --shadow-hover: 0 16px 32px -6px rgba(0, 0, 0, 0.6);

  /* Bootstrap */
  --bs-body-bg: #0e1512;
  --bs-body-color: #dfe7e3;
  --bs-secondary-bg: #1b2621;
  --bs-tertiary-bg: #18221e;
  --bs-border-color: #2f3e37;
  --bs-emphasis-color: #f1f5f9;
  --bs-secondary-color: #9fb0a7;
  --bs-heading-color: #f1f5f9;
  --bs-link-color: #5eead4;
  --bs-link-hover-color: #99f6e4;
  --bs-link-color-rgb: 94, 234, 212;
  --bs-dark-rgb: 226, 232, 240;
  --bs-light-rgb: 27, 38, 33;
  --bs-white-rgb: 22, 31, 27;
}

/* ---------- Kerangka aplikasi ---------- */
html[data-bs-theme="dark"] body,
html[data-bs-theme="dark"] .app-wrapper {
  background-color: var(--bg-app);
  color: var(--text-main);
}
html[data-bs-theme="dark"] .app-wrapper {
  background-image:
    radial-gradient(at 0% 0%, rgba(244, 114, 182, 0.05) 0px, transparent 40%),
    radial-gradient(at 100% 0%, rgba(56, 189, 248, 0.05) 0px, transparent 45%),
    radial-gradient(at 50% 100%, rgba(52, 211, 153, 0.05) 0px, transparent 45%);
}
html[data-bs-theme="dark"] .app-sidebar,
html[data-bs-theme="dark"] .sidebar-header {
  background: var(--dark-sidebar);
  border-color: var(--dark-sidebar-border);
}
html[data-bs-theme="dark"] .app-sidebar { box-shadow: 2px 0 16px -4px rgba(0, 0, 0, 0.5); }
html[data-bs-theme="dark"] .sidebar-brand-icon { background: #1b2621; border-color: #3f6b52; }
html[data-bs-theme="dark"] .sidebar-brand-title { color: #f1f5f9; }
html[data-bs-theme="dark"] .sidebar-brand-hospital { color: #2dd4bf !important; }
html[data-bs-theme="dark"] .sidebar-brand-subtitle { color: #8fb8a0 !important; }
html[data-bs-theme="dark"] .menu-category-title { color: #7fa08c; }
html[data-bs-theme="dark"] .sidebar-nav-item { color: #c3cfc8; }
html[data-bs-theme="dark"] .sidebar-nav-item i { color: #8fc0a3; }
html[data-bs-theme="dark"] .sidebar-nav-item:hover { background-color: var(--dark-sidebar-hover); color: #ecfdf5; }
html[data-bs-theme="dark"] .sidebar-nav-item:hover i { color: #a7e3bf; }
html[data-bs-theme="dark"] .sidebar-menu::-webkit-scrollbar-thumb { background-color: #2f3e37; }
html[data-bs-theme="dark"] .sidebar-user-widget { background: #111915; border-color: var(--dark-sidebar-border); }

html[data-bs-theme="dark"] .app-topbar {
  background: rgba(14, 21, 18, 0.85);
  border-color: var(--border-subtle);
}
html[data-bs-theme="dark"] .topbar-date-badge { background: #1b2621; color: #c3cfc8; }

/* ---------- Kartu & panel ---------- */
html[data-bs-theme="dark"] .modern-card,
html[data-bs-theme="dark"] .card,
html[data-bs-theme="dark"] .form-card-section,
html[data-bs-theme="dark"] .resume-paper-container {
  background: var(--bg-card);
  border-color: var(--border-subtle);
  color: var(--text-main);
}
html[data-bs-theme="dark"] .card-header,
html[data-bs-theme="dark"] .card-footer { background-color: #18221e; border-color: var(--border-subtle); }
html[data-bs-theme="dark"] .modern-card:hover { border-color: var(--border-strong); }

html[data-bs-theme="dark"] .stat-kpi-card {
  background: rgba(22, 31, 27, 0.85);
  border-color: rgba(255, 255, 255, 0.06);
}
html[data-bs-theme="dark"] .stat-kpi-card::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 70%);
}
html[data-bs-theme="dark"] .stat-kpi-card:hover { border-color: rgba(255, 255, 255, 0.12); }
html[data-bs-theme="dark"] .stat-kpi-footer { border-color: var(--border-subtle); }
html[data-bs-theme="dark"] .stat-icon-wrapper.teal  { background: rgba(45, 212, 191, 0.12); color: #2dd4bf; border-color: rgba(45, 212, 191, 0.25); }
html[data-bs-theme="dark"] .stat-icon-wrapper.blue  { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border-color: rgba(56, 189, 248, 0.25); }
html[data-bs-theme="dark"] .stat-icon-wrapper.green { background: rgba(52, 211, 153, 0.12); color: #34d399; border-color: rgba(52, 211, 153, 0.25); }
html[data-bs-theme="dark"] .stat-icon-wrapper.amber { background: rgba(251, 191, 36, 0.12); color: #fbbf24; border-color: rgba(251, 191, 36, 0.25); }

/* ---------- Tombol & tab ---------- */
html[data-bs-theme="dark"] .btn-kia-secondary,
html[data-bs-theme="dark"] .btn-pastel-copy,
html[data-bs-theme="dark"] .btn-light,
html[data-bs-theme="dark"] .btn-outline-light {
  background: #1b2621;
  border-color: var(--border-strong) !important;
  color: #dfe7e3;
}
html[data-bs-theme="dark"] .btn-kia-secondary:hover,
html[data-bs-theme="dark"] .btn-pastel-copy:hover,
html[data-bs-theme="dark"] .btn-light:hover {
  background: #23302a;
  color: #f8fafc;
}
html[data-bs-theme="dark"] .pastel-tab-container {
  background: rgba(22, 31, 27, 0.96);
  border-color: var(--border-strong);
}
html[data-bs-theme="dark"] .pastel-tab-btn { color: #a9c2b3; }
html[data-bs-theme="dark"] .pastel-tab-btn:hover { color: #ecfdf5; background-color: #1f2c26; }

/* ---------- Filter, form & input ---------- */
html[data-bs-theme="dark"] .pastel-filter-card {
  background: rgba(22, 31, 27, 0.96);
  border-color: var(--border-strong);
}
html[data-bs-theme="dark"] .form-control,
html[data-bs-theme="dark"] .form-select,
html[data-bs-theme="dark"] .pastel-input-group .form-control,
html[data-bs-theme="dark"] .pastel-select {
  background-color: #111915;
  border-color: var(--border-strong);
  color: #e2e8f0;
}
html[data-bs-theme="dark"] .form-control:disabled,
html[data-bs-theme="dark"] .form-control[readonly] { background-color: #18221e; }
html[data-bs-theme="dark"] .form-control::placeholder { color: #6b7d74; }
html[data-bs-theme="dark"] .input-group-text,
html[data-bs-theme="dark"] .pastel-input-group .input-group-text {
  background-color: #1b2621;
  border-color: var(--border-strong);
  color: #8fc0a3;
}
html[data-bs-theme="dark"] .form-label,
html[data-bs-theme="dark"] label { color: #c9d4ce; }

/* ---------- Kartu GForm ---------- */
html[data-bs-theme="dark"] .pastel-gform-card,
html[data-bs-theme="dark"] .pastel-gform-card.evaluasi {
  background: linear-gradient(180deg, #1a2a22 0%, var(--bg-card) 42%);
  border-color: var(--border-strong);
}
html[data-bs-theme="dark"] .pastel-gform-card.lainnya {
  background: linear-gradient(180deg, #2a1f16 0%, var(--bg-card) 42%);
  border-color: rgba(251, 146, 60, 0.35);
}
html[data-bs-theme="dark"] .pastel-gform-card .card-icon-squircle {
  background: linear-gradient(135deg, #24382d 0%, #2f4c3b 100%);
  color: #a7e3bf;
}

/* ---------- Badge status ---------- */
html[data-bs-theme="dark"] .badge-status.sembuh    { background-color: rgba(16, 185, 129, 0.14); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }
html[data-bs-theme="dark"] .badge-status.membaik   { background-color: rgba(56, 189, 248, 0.14); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.35); }
html[data-bs-theme="dark"] .badge-status.rujuk     { background-color: rgba(245, 158, 11, 0.14); color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); }
html[data-bs-theme="dark"] .badge-status.aps       { background-color: rgba(239, 68, 68, 0.14);  color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
html[data-bs-theme="dark"] .badge-status.meninggal { background-color: rgba(148, 163, 184, 0.14); color: #cbd5e1; border-color: rgba(148, 163, 184, 0.35); }

/* ---------- Tabel ---------- */
html[data-bs-theme="dark"] .table {
  --bs-table-bg: var(--bg-card);
  --bs-table-color: var(--text-main);
  --bs-table-border-color: var(--border-subtle);
  --bs-table-striped-bg: #1a2420;
  --bs-table-hover-bg: #1d2924;
  --bs-table-hover-color: #f1f5f9;
}
html[data-bs-theme="dark"] .table-light,
html[data-bs-theme="dark"] .table > thead.table-light th {
  --bs-table-bg: #1b2621;
  --bs-table-color: #c9d4ce;
  --bs-table-border-color: var(--border-strong);
}
html[data-bs-theme="dark"] .table-clean thead th,
html[data-bs-theme="dark"] .table-scroll-wrapper th {
  background: #1b2621 !important;
  color: #c9d4ce;
  border-color: var(--border-strong) !important;
}
html[data-bs-theme="dark"] .table-clean tbody td,
html[data-bs-theme="dark"] .table-scroll-wrapper td {
  background-color: var(--bg-card);
  border-color: var(--border-subtle) !important;
  color: var(--text-main);
}
html[data-bs-theme="dark"] .table-clean tbody tr:hover td { background-color: #1d2924; }
html[data-bs-theme="dark"] .table-scroll-wrapper { scrollbar-color: #3b4b43 #111915; }
html[data-bs-theme="dark"] .table-scroll-wrapper::-webkit-scrollbar-track { background: #111915; }
html[data-bs-theme="dark"] .table-scroll-wrapper::-webkit-scrollbar-thumb { background: #3b4b43; border-color: #111915; }

/* ---------- Dropdown, modal, notifikasi ---------- */
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] .list-group-item {
  background-color: #18221e;
  border-color: var(--border-strong);
  color: var(--text-main);
}
html[data-bs-theme="dark"] .dropdown-item { color: #dfe7e3; }
html[data-bs-theme="dark"] .dropdown-item:hover,
html[data-bs-theme="dark"] .dropdown-item:focus { background-color: #22302a; color: #fff; }
html[data-bs-theme="dark"] .notif-item.notif-read   { background: #18221e !important; }
html[data-bs-theme="dark"] .notif-item.notif-unread { background: rgba(45, 212, 191, 0.08) !important; }
html[data-bs-theme="dark"] .notif-item { border-color: var(--border-subtle) !important; }
html[data-bs-theme="dark"] #notifStatusBadge { background-color: #22302a !important; color: #9fb0a7 !important; }

/* ---------- Kelas utilitas Bootstrap yang terang ---------- */
html[data-bs-theme="dark"] .bg-white { background-color: var(--bg-card) !important; }
html[data-bs-theme="dark"] .bg-light { background-color: #1b2621 !important; }
html[data-bs-theme="dark"] .text-dark,
html[data-bs-theme="dark"] .text-black { color: #e8eef0 !important; }
html[data-bs-theme="dark"] .text-muted { color: #9fb0a7 !important; }
html[data-bs-theme="dark"] .text-secondary { color: #a9b6b0 !important; }
html[data-bs-theme="dark"] .border-white { border-color: var(--bg-card) !important; }
html[data-bs-theme="dark"] .bg-teal-subtle { background-color: rgba(45, 212, 191, 0.14) !important; }
html[data-bs-theme="dark"] .alert-success { background-color: rgba(52, 211, 153, 0.12); color: #a7f3d0; border-color: rgba(52, 211, 153, 0.3); }
html[data-bs-theme="dark"] .alert-info    { background-color: rgba(56, 189, 248, 0.12); color: #bae6fd; border-color: rgba(56, 189, 248, 0.3); }
html[data-bs-theme="dark"] .alert-warning { background-color: rgba(251, 191, 36, 0.12); color: #fde68a; border-color: rgba(251, 191, 36, 0.3); }
html[data-bs-theme="dark"] .alert-danger,
html[data-bs-theme="dark"] .alert-error   { background-color: rgba(248, 113, 113, 0.12); color: #fecaca; border-color: rgba(248, 113, 113, 0.3); }
html[data-bs-theme="dark"] hr { border-color: var(--border-strong); opacity: 1; }

/* ---------- Warna inline di template (style="...") ---------- */
/* Latar putih / sangat terang -> latar kartu gelap */
html[data-bs-theme="dark"] [style*="background: #fff"],
html[data-bs-theme="dark"] [style*="background:#fff"],
html[data-bs-theme="dark"] [style*="background-color: #fff"],
html[data-bs-theme="dark"] [style*="background-color:#fff"],
html[data-bs-theme="dark"] [style*="background: white"],
html[data-bs-theme="dark"] [style*="background-color: white"],
html[data-bs-theme="dark"] [style*="background: rgba(255, 255, 255"],
html[data-bs-theme="dark"] [style*="background:rgba(255,255,255"],
html[data-bs-theme="dark"] [style*="background-color: rgba(255, 255, 255"],
html[data-bs-theme="dark"] [style*="background: #f8fa"],
html[data-bs-theme="dark"] [style*="background-color: #f8fa"],
html[data-bs-theme="dark"] [style*="background: #f1f5f9"],
html[data-bs-theme="dark"] [style*="background-color: #f1f5f9"],
html[data-bs-theme="dark"] [style*="background: #f7fa"],
html[data-bs-theme="dark"] [style*="background-color: #f7fa"],
html[data-bs-theme="dark"] [style*="background: #f4f8"],
html[data-bs-theme="dark"] [style*="background: #f3f8"],
html[data-bs-theme="dark"] [style*="background-color: #f3f8"],
html[data-bs-theme="dark"] [style*="background: #f1f6"],
html[data-bs-theme="dark"] [style*="background: #f2f7"] {
  background: #18221e !important;
  border-color: var(--border-strong) !important;
}
/* Latar hijau/teal muda -> teal transparan */
html[data-bs-theme="dark"] [style*="background: #f0fdf"],
html[data-bs-theme="dark"] [style*="background-color: #f0fdf"],
html[data-bs-theme="dark"] [style*="background: #e6fffa"],
html[data-bs-theme="dark"] [style*="background: #ecfdf5"],
html[data-bs-theme="dark"] [style*="background-color: #ecfdf5"],
html[data-bs-theme="dark"] [style*="background: #eaf5ee"],
html[data-bs-theme="dark"] [style*="background: #ebf3ee"],
html[data-bs-theme="dark"] [style*="background: #eef5f0"],
html[data-bs-theme="dark"] [style*="background: #eef6f1"],
html[data-bs-theme="dark"] [style*="background: #e4efe7"],
html[data-bs-theme="dark"] [style*="background: #c6e3d0"] {
  background: rgba(45, 212, 191, 0.10) !important;
  border-color: rgba(45, 212, 191, 0.28) !important;
}
/* Latar biru/ungu/kuning/merah muda */
html[data-bs-theme="dark"] [style*="background: #f0f9ff"],
html[data-bs-theme="dark"] [style*="background-color: #f0f9ff"],
html[data-bs-theme="dark"] [style*="background: #e0f2fe"],
html[data-bs-theme="dark"] [style*="background: #eef2ff"],
html[data-bs-theme="dark"] [style*="background-color: #eef2ff"] {
  background: rgba(99, 102, 241, 0.12) !important;
  border-color: rgba(99, 102, 241, 0.3) !important;
}
html[data-bs-theme="dark"] [style*="background: #fffbeb"],
html[data-bs-theme="dark"] [style*="background-color: #fffbeb"],
html[data-bs-theme="dark"] [style*="background-color: #fef3c7"],
html[data-bs-theme="dark"] [style*="background: #fff7ed"],
html[data-bs-theme="dark"] [style*="background-color: #fff7ed"] {
  background: rgba(251, 191, 36, 0.10) !important;
  border-color: rgba(251, 191, 36, 0.3) !important;
}
html[data-bs-theme="dark"] [style*="background: #fef2f2"],
html[data-bs-theme="dark"] [style*="background-color: #fef2f2"],
html[data-bs-theme="dark"] [style*="background: #fff5f8"],
html[data-bs-theme="dark"] [style*="background: #fdf2f8"] {
  background: rgba(248, 113, 113, 0.10) !important;
  border-color: rgba(248, 113, 113, 0.3) !important;
}
/* Teks gelap -> teks terang */
html[data-bs-theme="dark"] [style*="color: #1e293b"],
html[data-bs-theme="dark"] [style*="color: #0f172a"],
html[data-bs-theme="dark"] [style*="color: #334155"],
html[data-bs-theme="dark"] [style*="color: #475569"] { color: #e2e8f0 !important; }
html[data-bs-theme="dark"] [style*="color: #64748b"] { color: #9fb0a7 !important; }
html[data-bs-theme="dark"] [style*="color: #234833"],
html[data-bs-theme="dark"] [style*="color: #244933"],
html[data-bs-theme="dark"] [style*="color: #1e3d2a"],
html[data-bs-theme="dark"] [style*="color: #2a523b"],
html[data-bs-theme="dark"] [style*="color: #2e593f"],
html[data-bs-theme="dark"] [style*="color: #3b5a47"],
html[data-bs-theme="dark"] [style*="color: #1b4332"] { color: #bfe6cf !important; }
html[data-bs-theme="dark"] [style*="color: #4f8768"],
html[data-bs-theme="dark"] [style*="color: #557261"],
html[data-bs-theme="dark"] [style*="color: #477057"],
html[data-bs-theme="dark"] [style*="color: #45755b"],
html[data-bs-theme="dark"] [style*="color: #528367"] { color: #8fc0a3 !important; }
html[data-bs-theme="dark"] [style*="color: #0f766e"],
html[data-bs-theme="dark"] [style*="color: #115e59"] { color: #5eead4 !important; }
html[data-bs-theme="dark"] [style*="color: #0d9488"] { color: #2dd4bf !important; }
html[data-bs-theme="dark"] [style*="color: #166534"],
html[data-bs-theme="dark"] [style*="color: #065f46"] { color: #6ee7b7 !important; }
html[data-bs-theme="dark"] [style*="color: #991b1b"] { color: #fca5a5 !important; }
html[data-bs-theme="dark"] [style*="color: #92400e"] { color: #fcd34d !important; }
html[data-bs-theme="dark"] [style*="color: #3730a3"] { color: #a5b4fc !important; }
/* Garis terang */
html[data-bs-theme="dark"] [style*="border-color: #d2e5d8"],
html[data-bs-theme="dark"] [style*="border-color: #d0e3d6"],
html[data-bs-theme="dark"] [style*="border-color: #d4e5da"],
html[data-bs-theme="dark"] [style*="border-color: #e2e8f0"],
html[data-bs-theme="dark"] [style*="border-color: #cbd5e1"],
html[data-bs-theme="dark"] [style*="border: 1px solid #e"],
html[data-bs-theme="dark"] [style*="border: 1px solid #d"],
html[data-bs-theme="dark"] [style*="border: 1.5px solid #d"],
html[data-bs-theme="dark"] [style*="border-bottom: 1px solid #e"],
html[data-bs-theme="dark"] [style*="border-bottom: 1px solid #f"],
html[data-bs-theme="dark"] [style*="border-top: 1px solid #e"],
html[data-bs-theme="dark"] [style*="border-top: 1px solid #f"] {
  border-color: var(--border-strong) !important;
}

/* ---------- Peta & lain-lain ---------- */
html[data-bs-theme="dark"] .leaflet-container { filter: brightness(0.85) contrast(1.05); }
html[data-bs-theme="dark"] .leaflet-popup-content-wrapper,
html[data-bs-theme="dark"] .leaflet-popup-tip { background: #18221e; color: var(--text-main); }

/* ---------- Tombol ganti tema ---------- */
.theme-toggle-btn .theme-icon-light { display: none; }
html[data-bs-theme="dark"] .theme-toggle-btn .theme-icon-light { display: inline-block; color: #fbbf24; }
html[data-bs-theme="dark"] .theme-toggle-btn .theme-icon-dark { display: none; }

} /* end @media screen */

/* Tombol tema (berlaku di kedua mode) */
.theme-toggle-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle-btn .theme-icon-dark { color: #475569; }
@media print {
  .theme-toggle-btn { display: none !important; }
}

/* ---------- Style khusus halaman (blok <style> di template) ---------- */
@media screen {
  html[data-bs-theme="dark"] .app-wrapper { background-color: var(--bg-app) !important; }

  /* Baris tabel terpilih / hover */
  html[data-bs-theme="dark"] .table-active-row td { background-color: rgba(45, 212, 191, 0.12) !important; color: #f1f5f9 !important; }
  html[data-bs-theme="dark"] .table-active-row td * { color: inherit; }
  html[data-bs-theme="dark"] .patient-row:hover td,
  html[data-bs-theme="dark"] .hpp-row:hover td,
  html[data-bs-theme="dark"] .pe-row:hover td,
  html[data-bs-theme="dark"] .followup-table-row:hover td,
  html[data-bs-theme="dark"] .asfiksia-row:hover td,
  html[data-bs-theme="dark"] .pe-table-row:hover td { background-color: #1d2924 !important; }
  html[data-bs-theme="dark"] .table-scroll-wrapper td { border-color: var(--border-strong) !important; }

  /* Kartu & tabel skrining / asfiksia */
  html[data-bs-theme="dark"] .asfiksia-card,
  html[data-bs-theme="dark"] .pe-list-card,
  html[data-bs-theme="dark"] .success-card { background: rgba(22, 31, 27, 0.96); border-color: var(--border-strong); }
  html[data-bs-theme="dark"] .table-asfiksia th,
  html[data-bs-theme="dark"] .table-pe th { background-color: #1b2621 !important; color: #c9d4ce !important; border-color: var(--border-strong) !important; }
  html[data-bs-theme="dark"] .table-asfiksia td,
  html[data-bs-theme="dark"] .table-pe td,
  html[data-bs-theme="dark"] .summary-table td { border-color: var(--border-subtle) !important; }
  html[data-bs-theme="dark"] .summary-label { background: #1b2621; color: #a9c2b3; }
  html[data-bs-theme="dark"] .summary-val { color: #e2e8f0; }
  html[data-bs-theme="dark"] .resume-section-title { background: #1b2621; color: #bfe6cf; }

  /* Rekomendasi / badge risiko */
  html[data-bs-theme="dark"] .rec-rendah, html[data-bs-theme="dark"] .badge-risk-rendah { background-color: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.35); color: #6ee7b7; }
  html[data-bs-theme="dark"] .rec-sedang, html[data-bs-theme="dark"] .badge-risk-sedang { background-color: rgba(251, 191, 36, 0.12); border-color: rgba(251, 191, 36, 0.35); color: #fcd34d; }
  html[data-bs-theme="dark"] .rec-tinggi, html[data-bs-theme="dark"] .badge-risk-tinggi { background-color: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); color: #fca5a5; }
  html[data-bs-theme="dark"] .risk-check-item:hover { background-color: rgba(255, 255, 255, 0.04); }

  /* Halaman Feedback GForm (memakai !important di template) */
  html[data-bs-theme="dark"] .pastel-tab-container { background: rgba(22, 31, 27, 0.96) !important; border-color: var(--border-strong) !important; }
  html[data-bs-theme="dark"] .pastel-tab-btn { color: #a9c2b3 !important; }
  html[data-bs-theme="dark"] .pastel-tab-btn:hover { color: #ecfdf5 !important; background-color: #1f2c26 !important; }
  html[data-bs-theme="dark"] .pastel-filter-card { background: rgba(22, 31, 27, 0.96) !important; border-color: var(--border-strong) !important; }
  html[data-bs-theme="dark"] .pastel-input-group .input-group-text { background-color: #1b2621 !important; border-color: var(--border-strong) !important; color: #8fc0a3 !important; }
  html[data-bs-theme="dark"] .pastel-input-group .form-control,
  html[data-bs-theme="dark"] .pastel-select { background-color: #111915 !important; border-color: var(--border-strong) !important; color: #e2e8f0 !important; }
  html[data-bs-theme="dark"] .pastel-gform-card { background: linear-gradient(180deg, #1a2a22 0%, var(--bg-card) 42%) !important; border-color: var(--border-strong) !important; }
  html[data-bs-theme="dark"] .pastel-gform-card .card-icon-squircle { background: linear-gradient(135deg, #24382d 0%, #2f4c3b 100%) !important; color: #a7e3bf !important; }
  html[data-bs-theme="dark"] .btn-pastel-copy { background: #1b2621 !important; border-color: var(--border-strong) !important; color: #c3cfc8 !important; }
  html[data-bs-theme="dark"] .btn-pastel-copy:hover { background: #23302a !important; color: #ecfdf5 !important; }

  /* Tom Select (dropdown pencarian di form) */
  html[data-bs-theme="dark"] .ts-control,
  html[data-bs-theme="dark"] .ts-control input { background: #111915 !important; color: #e2e8f0 !important; border-color: var(--border-strong) !important; }
  html[data-bs-theme="dark"] .ts-dropdown { background: #18221e !important; color: #e2e8f0 !important; border-color: var(--border-strong) !important; }
  html[data-bs-theme="dark"] .ts-dropdown .optgroup-header { background-color: #1b2621 !important; color: #2dd4bf !important; }
  html[data-bs-theme="dark"] .ts-dropdown .option.active,
  html[data-bs-theme="dark"] .ts-dropdown .option:hover { background-color: rgba(45, 212, 191, 0.12) !important; color: #5eead4 !important; }
  html[data-bs-theme="dark"] ::placeholder { color: #6b7d74 !important; }
}
