/* ═══════════════════════════════════════════════════════════
   UKS Dark Mode Patch — Portal & Form
   Auto-inject ke halaman yang belum punya dark override lengkap
   ═══════════════════════════════════════════════════════════ */

/* Global dark mode form fix */
html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background-color: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #475569 !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] select option {
  background-color: #1e293b;
  color: #f1f5f9;
}

/* Card & panel */
html[data-theme="dark"] .card,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .card-body {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Table */
html[data-theme="dark"] table thead th {
  background: #334155 !important;
  color: #f1f5f9 !important;
}

html[data-theme="dark"] table tbody tr {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] table tbody tr:hover {
  background: #334155 !important;
}

html[data-theme="dark"] table tbody td {
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

/* Labels */
html[data-theme="dark"] label,
html[data-theme="dark"] .form-label {
  color: #cbd5e1 !important;
}

/* List group (autocomplete) */
html[data-theme="dark"] .list-group-item {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .list-group-item:hover {
  background: #334155 !important;
}

html[data-theme="dark"] .list-group-item.text-muted {
  color: #94a3b8 !important;
}

/* Dropdown menu */
html[data-theme="dark"] .dropdown-menu {
  background: #1e293b !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .dropdown-item {
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .dropdown-item:hover {
  background: #334155 !important;
}

/* Badge */
html[data-theme="dark"] .badge.bg-light {
  background: #334155 !important;
  color: #f1f5f9 !important;
}

/* Modal */
html[data-theme="dark"] .modal-content {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

/* Small text helper */
html[data-theme="dark"] .text-muted { color: #94a3b8 !important; }
html[data-theme="dark"] .text-dark { color: #f1f5f9 !important; }
