/* ============================================================
   THEME-FIX.CSS — Perbaikan dark/light yang tertinggal
   Override warna hardcoded putih di layer modern
   ============================================================ */

/* Transisi body global */
body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---- Public: card putih → ikut dark ---- */
[data-theme="dark"] .portal-hl-card,
[data-theme="dark"] .quick-facts,
[data-theme="dark"] .mahasiswa-sidebar,
[data-theme="dark"] .student-card,
[data-theme="dark"] .card,
[data-theme="dark"] .hof-card,
[data-theme="dark"] .kenangan-card,
[data-theme="dark"] .kesan-card,
[data-theme="dark"] .contact-card,
[data-theme="dark"] .stat-chart-wrap,
[data-theme="dark"] .prodi-stats,
[data-theme="dark"] .jadwal-table-wrap,
[data-theme="dark"] .public-jadwal {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .portal-hl-card b,
[data-theme="dark"] .student-card h3,
[data-theme="dark"] .section-title,
[data-theme="dark"] .quick-facts-header b {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .portal-hl-card p,
[data-theme="dark"] .section-sub,
[data-theme="dark"] .list-count-note {
  color: #94a3b8 !important;
}

[data-theme="dark"] .quick-fact-card {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.1) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .mahasiswa-search-box {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.15) !important;
}

[data-theme="dark"] .btn-outline-cta {
  background: #0f172a !important;
  color: #93c5fd !important;
  border-color: rgba(96, 165, 250, 0.3) !important;
}

[data-theme="dark"] .hero-cta-primary {
  background: #f8fafc !important;
  color: #0c1b3a !important;
}

/* Navbar dark text */
[data-theme="dark"] .brand b,
[data-theme="dark"] .nav-link {
  color: #e2e8f0 !important;
}

[data-theme="dark"] .brand small,
[data-theme="dark"] .navTaglineWeb {
  color: #94a3b8 !important;
}

/* ---- Admin: pastikan surface gelap ---- */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .panel,
[data-theme="dark"] .am-quick-chip {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

[data-theme="dark"] .stat-card b,
[data-theme="dark"] .panel h3,
[data-theme="dark"] .topbar h2 {
  color: #f1f5f9 !important;
}

[data-theme="dark"] .content {
  background: #070d18 !important;
}

[data-theme="dark"] .topbar {
  background: rgba(15, 23, 42, 0.94) !important;
}

[data-theme="dark"] table thead th {
  background: #0b1220 !important;
  color: #94a3b8 !important;
}

[data-theme="dark"] .form-control {
  background: #0b1220 !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .btn-outline {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border-color: rgba(148, 163, 184, 0.2) !important;
}

/* ---- Portal hub: form & cards ---- */
[data-theme="dark"] .dash-card,
[data-theme="dark"] .hub-panel,
[data-theme="dark"] .mhs-stat-card,
[data-theme="dark"] .mhs-quick-btn,
[data-theme="dark"] .mhs-teman-card,
[data-theme="dark"] .mhs-kesan-item,
[data-theme="dark"] .mhs-link-card,
[data-theme="dark"] .mhs-jadwal-class,
[data-theme="dark"] .mhs-agenda-item {
  background: var(--hub-surface, #0f172a) !important;
  border-color: var(--hub-line, rgba(148, 163, 184, 0.12)) !important;
  color: var(--hub-ink-soft, #cbd5e1) !important;
}

[data-theme="dark"] .mhs-page-title,
[data-theme="dark"] .dash-card h3,
[data-theme="dark"] .mhs-stat-value {
  color: var(--hub-ink, #f1f5f9) !important;
}

[data-theme="dark"] .form-control {
  background: var(--hub-surface-2, #152036) !important;
  color: var(--hub-ink, #f1f5f9) !important;
  border-color: var(--hub-line) !important;
}

[data-theme="dark"] .mhs-bottom-nav {
  background: rgba(15, 23, 42, 0.96) !important;
  border-top-color: rgba(148, 163, 184, 0.12) !important;
}

/* Auth modern */
[data-theme="dark"] .auth-modern-body,
[data-theme="dark"] body.auth-modern-body {
  background: #070d18 !important;
  color: #e2e8f0 !important;
}

[data-theme="dark"] .auth-modern-card,
[data-theme="dark"] .auth-modern-panel {
  background: transparent;
}

[data-theme="dark"] .auth-modern-card {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

/* Light mode: pastikan data-theme=light eksplisit tidak “nyangkut” dark */
[data-theme="light"] body {
  color-scheme: light;
}

/* Meta theme-color dinamis via JS — fallback */
[data-theme="dark"] {
  color-scheme: dark;
}
[data-theme="light"] {
  color-scheme: light;
}
