
/* ═══════════════════════════════════════════
   BROWSER SCROLL LAYOUT — Master Layout Rules
   ═══════════════════════════════════════════ */
/* PENTING: overflow-x:hidden HANYA di html, bukan di body juga.
   Kalau overflow-x diset tanpa overflow-y eksplisit, browser otomatis
   mengubah overflow-y jadi "auto" (aturan CSS Overflow spec) — artinya
   body akan jadi scroll container KEDUA yang terpisah dari html
   (yang sudah scroll:scroll). Dua scroll container bersarang inilah
   yang menyebabkan posisi konten "meleset"/perlu discroll dulu di
   mobile, dan baru "kereset" saat halaman di-reload penuh. */
html { overflow-y: scroll; overflow-x: hidden; height: auto; }
body { margin: 0; padding: 0; min-height: 100vh; background: #0F2417; }

/* Toast Notification Styles */
.toast-notification {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Skeleton Loader Styles */
.skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-card {
  border-radius: 12px;
  padding: 16px 18px;
  background: #FFFFFF;
  border: 0.5px solid #E5E7EB;
}

.skeleton-line {
  height: 12px;
  border-radius: 6px;
  margin-bottom: 10px;
}

.skeleton-line.short {
  width: 40%;
}

.skeleton-line.medium {
  width: 70%;
}

.skeleton-line.long {
  width: 100%;
}

/* Dark mode skeleton */
body.dark .skeleton {
  background: linear-gradient(
    90deg,
    #27303f 25%,
    #1f2937 50%,
    #27303f 75%
  );
  background-size: 200% 100%;
}

body.dark .skeleton-card {
  background: #1f2937;
  border-color: rgba(255,255,255,0.08);
}

body.dark .skeleton-line {
  background: transparent;
}


/* ═══════════════════════════════════════════ */

/* SPIS - Sistem Pembayaran Imam Syafi'i
 * app.css — semua styling
 * Jangan edit manual. Di-generate dari index.html
 */


:root {
  /* Brand */
  --primary:        #065F46;
  --accent:         #10B981;
  --accent-light:   #D1FAE5;
  --sidebar-bg:     #F8FAFC;

  /* Page */
  --bg:             #F8FAFC;
  --bg-2:           #FFFFFF;

  /* Surface */
  --card-bg:        #FFFFFF;
  --surface-0:      #FFFFFF;
  --surface-1:      #F3F4F6;
  --surface-2:      #F8FAFC;

  /* Text */
  --text:           #111827;
  --text-secondary: #374151;
  --text-muted:     #9CA3AF;

  /* Border */
  --border:         #E5E7EB;
  --border-strong:  #D1D5DB;

  /* Semantic BG */
  --bg-accent:      #D1FAE5;
  --bg-success:     #DCFCE7;
  --bg-warning:     #FEF3C7;
  --bg-danger:      #FEE2E2;
  --bg-info:        #EFF6FF;
  --bg-pro:         #F5F3FF;

  /* Semantic Text */
  --text-accent:    #059669;
  --text-success:   #16A34A;
  --text-warning:   #D97706;
  --text-danger:    #DC2626;
  --text-info:      #2563EB;
  --text-pro:       #7C3AED;

  /* Semantic Border */
  --border-accent:  #A7F3D0;
  --border-success: #86EFAC;
  --border-warning: #FDE68A;
  --border-danger:  #FCA5A5;
  --border-info:    #BFDBFE;

  /* Fills */
  --fill-accent:    #10B981;
  --fill-danger:    #EF4444;
  --fill-warning:   #F59E0B;
  --on-accent:      #FFFFFF;

  /* Semantic aliases */
  --success:        #10B981;
  --warning:        #F59E0B;
  --danger:         #EF4444;
  --info:           #3B82F6;

  /* Radius — pill system */
  --radius-sm:      6px;
  --radius:         8px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      18px;
  --radius-full:    9999px;

  /* Shadow */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
  --shadow:     0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.1);

  /* Layout */
  --sidebar-w:  240px;
  --topbar-h:   56px;
}






 


.dark-toggle { display:flex; align-items:center; gap:6px; cursor:pointer; padding:6px 10px; border-radius:8px; border:1px solid var(--border); background:var(--bg-2); font-size:12px; }
body.view-only .editor-only { display: none !important; }
.role-badge { display:inline-block; font-size:10px; font-weight:700; padding:2px 8px; border-radius:20px; margin-left:6px; letter-spacing:0.3px; }
.role-badge.super_admin { background:#FEF3C7; color:#92400E; }
.role-badge.admin { background:#D1FAE5; color:#065F46; }
.role-badge.bendahara { background:#DBEAFE; color:#1E40AF; }
.role-badge.kepala_sekolah { background:#F3E8FF; color:#6B21A8; }

/* CATATAN: dulu ada rule kedua "html, body { overflow-x:hidden; overflow-y:auto; }"
   di sini yang bentrok dengan rule utama di bagian atas file ini (html sudah
   overflow-y:scroll, body sengaja TANPA overflow supaya bukan scroll
   container terpisah). Rule duplikat itu diam-diam MEMBATALKAN perbaikan
   di atas karena datang lebih belakang di cascade — inilah salah satu
   penyebab bug "konten mobile turun/perlu discroll dulu". Sudah dihapus,
   jangan ditambahkan lagi. Kalau butuh atur html/body, edit rule di baris
   atas file ini saja supaya tidak ada duplikat lagi. */
body { font-family: 'Plus Jakarta Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* LOGIN */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0F2417 0%, #065F46 50%, #0F2417 100%); }
.login-card { background: white; border-radius: 16px; padding: 32px; width: 100%; max-width: 400px; box-shadow: 0 4px 24px rgba(0,0,0,0.12); overflow: hidden; }
.login-logo { text-align: center; margin-bottom: 20px; }
.login-logo h1 { font-family: 'Fraunces', serif; font-size: 26px; color: #065F46; margin-top: 4px; }
.login-logo p { color: #9CA3AF; font-size: 12px; margin-top: 2px; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; }
.form-group input, .form-group select { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-family: inherit; font-size: 14px; outline: none; transition: border 0.2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--primary); }
.btn-login { width: 100%; padding: 13px; background: var(--primary); color: white; border: none; border-radius: 10px; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 8px; }
.error-msg { background: #FEE2E2; color: #991B1B; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: none; }

/* APP */
.app { display: none; }


.sidebar-logo { padding: 28px 24px 20px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.sidebar-logo h2 { font-family: 'Fraunces', serif; font-size: 22px; }
.sidebar-logo span { font-size: 11px; opacity: 0.6; }
.sidebar-user { padding: 16px 24px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: white; flex-shrink: 0; }
.user-info p { font-size: 13px; font-weight: 600; }
.user-info span { font-size: 11px; opacity: 0.6; }
.sidebar-nav { flex: 1; min-height: 0; padding: 16px 12px; overflow-y: auto; }
.nav-section { font-size: 10px; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; opacity: 0.4; padding: 12px 12px 6px; }


/* Tab outline keuangan */
.tab-group { display:flex; gap:0; background:var(--bg); border-radius:10px; padding:4px; border:1px solid var(--border); width:fit-content; margin-bottom:20px; }
.tab-btn { border-radius:8px; font-size:13px; padding:7px 18px; background:transparent; color:#9CA3AF; border:2px solid transparent; cursor:pointer; font-family:inherit; font-weight:500; transition:all 0.2s; }
.tab-btn:hover { color: #374151; background: #F3F4F6; border-color: #D1D5DB; }
.tab-btn.active { background:var(--primary); color:white; border-color:var(--primary); font-weight:600; }
.sidebar-footer { padding: 16px 12px; border-top: 1px solid rgba(255,255,255,0.1); }


.topbar h3 { font-size: 17px; font-weight: 600; }
.topbar-actions { display: flex; gap: 10px; }
.btn { padding: 7px 16px; border-radius: 8px; font-family: inherit; font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.15s; display: inline-flex; align-items: center; gap: 5px; border: none; transition: all 0.2s; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: #047857; border-color: #047857; }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: #F3F4F6; color: #111827; border-color: #D1D5DB; }

.btn-danger { background: var(--danger); color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.page { display: none; }
.page.active { display: block; }

/* STATS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #FFFFFF; border-radius: 12px; padding: 16px 18px; border: 0.5px solid #E5E7EB; transition: box-shadow 0.2s, transform 0.15s; box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.stat-card .label { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }

.stat-card .sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.stat-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.icon-green { background: #D8F3DC; color: #2D6A4F; }
.icon-orange { background: #FEF3C7; color: #B45309; }
.icon-red { background: #FFE5D9; color: #C2410C; }
.icon-blue { background: #E0F2FE; color: #0369A1; }
.stat-card.clickable { cursor: pointer; transition: box-shadow 0.15s, transform 0.15s; }
.stat-card.clickable:hover { box-shadow: 0 4px 16px rgba(6,95,70,0.1); transform: translateY(-1px); border-color: #065F46; background: #FAFFFE; }
.charts-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 24px; }
.mini-cal { background: white; border-radius: 18px; border: 1px solid var(--border); padding: 18px; }
.mini-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.mini-cal-head .ttl { font-size: 14px; font-weight: 700; }
.mini-cal-nav { display: flex; gap: 4px; }
.mini-cal-nav button { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--bg-2); cursor: pointer; font-size: 13px; color: var(--text-muted); }
.mini-cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; text-align: center; }
.mini-cal-grid .dow { font-size: 10px; color: var(--text-muted); font-weight: 700; padding: 4px 0; }
.mini-cal-grid .day { font-size: 12px; padding: 6px 0; border-radius: 8px; position: relative; color: var(--text); }
.mini-cal-grid .day.muted { color: #D1D5DB; }
.mini-cal-grid .day.today { background: var(--primary); color: white; font-weight: 700; }
.mini-cal-grid .day.due { background: #FED7AA; color: #9A3412; font-weight: 700; }
.mini-cal-grid .day.today.due { background: var(--primary); color: white; box-shadow: inset 0 0 0 2px #FB923C; }
.mini-cal-legend { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 11px; color: var(--text-muted); }
.mini-cal-legend .dot { width: 10px; height: 10px; border-radius: 3px; background: #FED7AA; display: inline-block; }
.chart-card { background: white; border-radius: 14px; padding: 20px; border: 1px solid var(--border); }
.chart-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.table-card { background: #FFFFFF; border-radius: 16px; border: 1px solid #F3F4F6; overflow: hidden; margin-bottom: 20px; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.table-header { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #F3F4F6; gap: 12px; flex-wrap: wrap; }
.table-header h4 { font-size: 15px; font-weight: 700; color: #111827; }
.search-input { padding: 10px 14px; border: 1.5px solid #E5E7EB; border-radius: 10px; font-family: inherit; font-size: 14px; outline: none; width: 240px; transition: border 0.2s, box-shadow 0.2s; }
.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(16,185,129,0.1); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th { padding: 14px 18px; text-align: left; font-size: 12px; font-weight: 700; color: #6B7280; text-transform: uppercase; letter-spacing: 0.7px; background: #F9FAFB; border-bottom: 1px solid #F3F4F6; position: sticky; top: 0; z-index: 10; }
td { padding: 14px 18px; font-size: 14px; color: #374151; border-bottom: 1px solid #F3F4F6; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: #FAFAFA; }
tr:hover td { background: #F0FDF4; cursor: pointer; transition: background 0.15s; }

.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }


/* MODAL */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.show { display: flex; }
.modal { background: #FFFFFF; border-radius: 16px; padding: 24px; width: 100%; max-width: min(520px, 96vw); max-height: 90vh; overflow-y: auto; display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.05); }
.modal h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin: 20px -28px -28px; padding: 16px 28px; position: sticky; bottom: -28px; background: white; border-top: 1px solid var(--border); flex-shrink: 0; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* CHECKOUT BAR */
.checkout-bar { position:fixed; bottom:0; left:0; right:0; background:white; border-top:2px solid var(--primary); padding:14px 20px; display:none; align-items:center; justify-content:space-between; gap:12px; z-index:500; box-shadow:0 -4px 20px rgba(0,0,0,0.12); flex-wrap:wrap; }
.checkout-bar.show { display:flex; }
.checkout-info { display:flex; flex-direction:column; gap:2px; }
.checkout-actions { display:flex; gap:8px; flex-wrap:wrap; }


/* CHECKBOX TAGIHAN */
.tagihan-check { width:18px; height:18px; cursor:pointer; accent-color:var(--primary); flex-shrink:0; }
.tagihan-row.selected { background:rgba(27,67,50,0.04); }

/* TOAST NOTIFIKASI */
@keyframes slideInRight {
  from { transform: translateX(120%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* MIDTRANS SNAP OVERRIDE */
#snapContainer iframe,
#snapContainer > div,
#snapContainer > * {
  width: 100% !important;
  max-width: 100% !important;
  min-width: unset !important;
}
.laporan-tab-btn { background:none;border:none;border-bottom:2px solid transparent;padding:8px 14px;font-size:13px;font-weight:500;color:var(--text-muted);cursor:pointer;margin-bottom:-2px;transition:all 0.15s;white-space:nowrap }
.laporan-tab-btn:hover { color:var(--text) }
.laporan-tab-btn.active { color:var(--primary);border-bottom-color:var(--primary);font-weight:700 }
.laporan-tab-btn:focus { outline:none }

/* Laporan table responsive — mobile: card list, no horizontal scroll */


  #snapOverlay { padding: 0 !important; align-items: flex-end !important; }
  #snapOverlay > div { border-radius: 16px 16px 0 0 !important; max-height: 95vh; overflow-y: auto; margin: 0 !important; }
  #snapContainer { min-height: 60vh !important; }
}

/* NOTIF WA */
.wa-btn { display: inline-flex; align-items: center; gap: 6px; background: #25D366; color: white; border: none; padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; }

/* LIGHTBOX GAMBAR */
.lightbox { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.88); z-index:9999; align-items:center; justify-content:center; padding:20px; cursor:zoom-out; }
.lightbox.show { display:flex; }
.lightbox img { max-width:90vw; max-height:90vh; border-radius:10px; box-shadow:0 8px 40px rgba(0,0,0,0.5); object-fit:contain; cursor:default; }
.lightbox-close { position:fixed; top:18px; right:22px; color:white; font-size:28px; cursor:pointer; font-weight:300; line-height:1; background:rgba(0,0,0,0.4); border:none; width:38px; height:38px; border-radius:50%; display:flex; align-items:center; justify-content:center; }

/* FOTO PROFIL */
.foto-profil-wrap { position:relative; width:90px; height:90px; flex-shrink:0; }
.foto-profil-wrap img, .foto-profil-wrap .foto-inisial { width:90px; height:90px; border-radius:50%; object-fit:cover; border:3px solid var(--border); }
.foto-profil-wrap .foto-inisial { background:var(--primary); color:white; font-size:32px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.foto-profil-wrap .foto-edit-btn { position:absolute; bottom:2px; right:2px; width:26px; height:26px; border-radius:50%; background:var(--primary); color:white; border:2px solid white; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; }


/* BURGER MENU MOBILE */
.burger-btn { display:none; flex-direction:column; gap:5px; cursor:pointer; padding:6px; border:none; background:transparent; }
.burger-btn span { display:block; width:22px; height:2px; background:var(--text); border-radius:2px; transition:all 0.3s; }


/* Tabel: card-row layout HANYA di layar HP (<= 520px) - tidak aktif di browser desktop */


/* Collapsible nav groups */




.nav-group-header span { flex:1; }
/* Items inside group: indent + smaller */
.nav-group-items { overflow:hidden; }

.nav-group-items .nav-subitem { font-size:12px; }
/* Chevron animation */
.nav-group-chevron { transition:transform 0.2s ease; }
.nav-group.open .nav-group-chevron { transform:rotate(0deg) !important; }

body{font-family:sans-serif;padding:24px}table{width:100%;border-collapse:collapse}th,td{border:1px solid #ddd;padding:8px;font-size:12px}th{background:#1B4332;color:white}h2{color:#1B4332}
/* MOBILE: Modal responsif — tidak meluber di layar kecil */


/* MOBILE: Touch target minimum 44px */


/* MOBILE: Halaman Informasi — stack mode bukan split pane */


/* MOBILE: Search bar sticky saat scroll */


.stat-label { color: #475569 !important; font-size: 12px; }

/* FIX: Stat label contrast */
.label, .stat-label { color: #475569 !important; }

/* Soft palette: input refinement */
input, select, textarea {
  background: #F9FAFB;
  border-color: #E5E7EB !important;
  color: #111827;
}
input:focus, select:focus, textarea:focus {
  background: #FFFFFF;
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.12) !important;
  outline: none;
}
/* Badge reset using CSS vars */
.badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; font-weight:500; padding:3px 9px; border-radius:20px; }
.badge-green  { background:#DCFCE7; color:#166534; }
.badge-amber  { background:#FEF3C7; color:#92400E; }
.badge-red    { background:#FEE2E2; color:#991B1B; }
.badge-blue   { background:#DBEAFE; color:#1E40AF; }
.badge-purple { background:#EDE9FE; color:#5B21B6; }

/* Mobile: no margin-left when sidebar is overlay */


/* ═══ MODERN PILL SIDEBAR ═══ */
/* Sub-item dot */


/* Nav item icon color */
.nav-item svg, .nav-item i { opacity: 0.6; }
.nav-item.active svg, .nav-item.active i { opacity: 1; color: #065F46; }
.nav-item:hover svg, .nav-item:hover i { opacity: 0.8; }

/* Nav group header open state */


/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 4px; }

/* Mobile sidebar overlay */
.sidebar-overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.3); z-index:199; }
.sidebar-overlay.show { display:block; }

/* ═══════════════════════════════════════════════════
   MODERN PILL — Final Polish
   ═══════════════════════════════════════════════════ */

/* Page title in topbar */
#pageTitle { font-size: 15px; font-weight: 600; color: #111827; }

/* Table header — force pill style globally */
table thead th {
  background: #F9FAFB !important;
  color: #6B7280 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 10px 14px !important;
  border-bottom: 0.5px solid #E5E7EB !important;
}

/* Override any dark table headers */
thead { background: #F9FAFB !important; }

/* Table rows */
tbody tr { border-bottom: 0.5px solid #F3F4F6; }
tbody tr:last-child { border-bottom: none; }

/* Stat card label */
.stat-card .label, .stat-card [class*="label"] {
  font-size: 11px !important;
  color: #6B7280 !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Stat card value */
.stat-card .value { font-size: 28px; font-weight: 600; }

/* Month pills */
.month-pill, [class*="bulan-"] {
  border-radius: 9999px;
  font-size: 12px;
}

/* Section cards */
.section-card, .kpi-card {
  background: #fff;
  border: 0.5px solid #E5E7EB;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Table wrapper */
.table-card .table-header {
  padding: 14px 18px;
  background: #fff;
  border-bottom: 0.5px solid #E5E7EB;
}

.table-card .table-header h4 {
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

/* Scrollbar global */
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #E5E7EB transparent;
}
*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 9999px; }
*::-webkit-scrollbar-thumb:hover { background: #D1D5DB; }

/* Loading state */
.loading { color: #9CA3AF; font-size: 13px; padding: 32px; text-align: center; }

/* Empty state */
.empty-state { color: #9CA3AF; font-size: 13px; text-align: center; padding: 48px 16px; }

/* Override content background in inline style */
.content, #app .content { background: #F8FAFC !important; }

/* ══════════════════════════════════════
   LIGHT SIDEBAR NAV — Master Override
   ══════════════════════════════════════ */

/* Override all old dark sidebar nav colors */
.nav-item {
  color: #374151 !important;
  background: transparent !important;
  border-radius: 8px !important;
  padding: 7px 10px !important;
  margin: 1px 0 !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: 13px !important;
  font-weight: 400 !important;
  cursor: pointer !important;
  opacity: 1 !important;
  transition: background 0.1s, color 0.1s !important;
}
.nav-item:hover {
  background: #F0FDF4 !important;
  color: #065F46 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06) !important;
}
.nav-item.active {
  background: #FFFFFF !important;
  color: #065F46 !important;
  font-weight: 500 !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08) !important;
}
.nav-item svg { 
  width: 16px !important; 
  height: 16px !important; 
  flex-shrink: 0 !important; 
  color: #9CA3AF !important;
  opacity: 1 !important;
}
.nav-item.active svg { color: #065F46 !important; }
.nav-item:hover svg { color: #374151 !important; }

/* Subitem */
.nav-subitem {
  color: #9CA3AF !important;
  padding: 5px 10px 5px 32px !important;
  font-size: 12px !important;
  cursor: pointer !important;
  border-radius: 7px !important;
  display: flex !important;
  align-items: center !important;
  min-height: 32px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  position: relative !important;
}
.nav-subitem:hover { color: #374151 !important; background: #F9FAFB !important; }
.nav-subitem.active { color: #065F46 !important; font-weight: 500 !important; }
.nav-subitem::before {
  content: '' !important;
  width: 4px !important;
  height: 4px !important;
  border-radius: 50% !important;
  background: #D1D5DB !important;
  flex-shrink: 0 !important;
}
.nav-subitem.active::before { background: #10B981 !important; }
.nav-subitem:hover::before { background: #9CA3AF !important; }

/* Section/group header */
.nav-section, .nav-group-header {
  color: #9CA3AF !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.6px !important;
  padding: 8px 10px 2px !important;
}




/* Nav group items */
.nav-group-items .nav-item { margin-left: 0 !important; }

/* Mobile: dark overlay sidebar */


/* ═══ RESPONSIVE ═══ */

@media (max-width: 768px) {

  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0 !important; }
  .stats-grid { grid-template-columns: repeat(2,1fr); }
  .burger-btn { display:flex; }
  .topbar { padding:12px 16px; }
  .content { padding:12px; }
  .form-row { grid-template-columns:1fr; }
  .btn { min-height: 40px; }
  .btn-sm { min-height: 36px; padding: 6px 12px; }
  .nav-group-header { min-height: 44px !important; padding: 10px 14px !important; }
  /* Tombol aksi tabel */
  table button, .data-table button { min-height: 36px; 
    min-width: 36px; 
    padding: 6px 10px !important; }
  #page-pengumuman > div { flex-direction: column !important;
    height: auto !important;
    min-height: unset !important;
    border: none !important;
    border-radius: 0 !important; }
  #page-pengumuman .pane-list,
  #page-pengumuman [style*="width:320px"] { width: 100% !important;
    max-width: 100% !important;
    flex-shrink: unset !important;
    border-right: none !important;
    border-bottom: 0.5px solid #E2E8F0 !important;
    max-height: none !important;
    height: auto !important; }
  /* Preview panel: fullscreen opaque overlay */
  #pngPreviewPanel { position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 500 !important;
    background: #ffffff !important;
    transform: translateX(110%) !important;
    transition: transform 0.28s cubic-bezier(0.4,0,0.2,1) !important;
    border-radius: 0 !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important; }
  #pngPreviewPanel.mobile-open { transform: translateX(0) !important; }
  #pngPreviewContent { height: 100% !important;
    display: flex !important;
    flex-direction: column !important; }
  #pngPreviewHeader { position: sticky !important;
    top: 0 !important;
    background: #ffffff !important;
    z-index: 1 !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid #E2E8F0 !important;
    flex-wrap: wrap !important;
    gap: 6px !important; }
  #pngPreviewBody { padding: 16px !important;
    flex: 1 !important;
    overflow-y: auto !important; }
  #pngPreviewEmpty { display: none !important; }
  .nav-item:hover { background: rgba(255,255,255,0.08) !important; color: #fff !important; box-shadow: none !important; }
  .nav-item.active { background: rgba(16,185,129,0.2) !important; color: #6EE7B7 !important; box-shadow: none !important; }
  .nav-item svg { color: rgba(255,255,255,0.5) !important; }
  .nav-subitem { color: rgba(255,255,255,0.4) !important; }
  .nav-subitem.active { color: #A7F3D0 !important; }
}

@media (max-width: 600px) {
  .checkout-bar { padding:12px 16px; }
  .checkout-actions .btn { font-size:12px; padding:8px 12px; }
}

@media (max-width: 600px) {
  #page-laporan .table-card { overflow:hidden }
  #tabelLaporan table { display:block }
  #tabelLaporan thead { display:none }
  #tabelLaporan tbody { display:block }
  #tabelLaporan tr { display:flex; flex-wrap:wrap; gap:4px;
    padding:10px 12px; border-bottom:1px solid var(--border);
    position:relative; }
  #tabelLaporan td { display:inline-flex; align-items:center; font-size:13px;
    padding:0; border:none;
    text-align:left !important; white-space:normal !important; }
  #tabelLaporan td:first-child { width:100%; font-weight:700; font-size:14px; margin-bottom:2px }
  #tabelLaporan td[data-m]:before { content:attr(data-m)' '; font-size:10px; color:var(--text-muted); font-weight:600; text-transform:uppercase; margin-right:4px }
  #statsLaporan { grid-template-columns:1fr 1fr !important }
  #laporanFilterBar { gap:6px }
  #laporanFilterBar > div { min-width:calc(50% - 10px) }
  #laporanFilterBar > div select,
  #laporanFilterBar > div input { width:100% !important }
  .laporan-tab-btn { padding:6px 10px; font-size:12px }
  .content { padding: 10px; }
  #dashboardMainGrid,
  #dashboardWaliMainGrid { gap: 12px !important; }
  /* Greeting: center di mobile */
  #dashboardGreeting { padding: 20px 16px !important; }
  #dashboardGreeting > div > div { flex-direction: column !important; align-items: center !important; }
  #greetingLeft, #greetingRight { text-align: center !important; width: 100% !important; }
  #greetingRight { margin-top: 4px; }
  #salamText { font-size: 17px !important; }
  /* Wali greeting mobile center */
  #waliGreetingInner { flex-direction: column !important; align-items: center !important; text-align: center !important; }
  #waliGreetingInner > div:last-child { text-align: center !important; }
  /* Wrapper peeking: extend ke tepi layar */
  #statsGridOuter { margin: 0 -10px; }
  /* Horizontal scroll peeking untuk stat cards */
  #statsGrid { display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 10px !important;
    padding: 2px 10px 10px !important;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important; }
  #statsGrid::-webkit-scrollbar { display: none; }
  #statsGrid .stat-card { min-width: 80vw !important;
    max-width: 80vw !important;
    flex-shrink: 0 !important;
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important; }
  /* Strip hari ini: stack vertikal di mobile sangat sempit */
  #statsHariIni { grid-template-columns: 1fr !important;
    gap: 8px !important; }
  /* Tanggal di greeting: sembunyikan di mobile sangat sempit */
  #dashboardGreeting { flex-direction: column; align-items: flex-start; gap: 4px; }
  #dashboardGreeting > div:last-child { text-align: left; }
  .modal-overlay { align-items: flex-end !important; padding: 0 !important; }
  .modal { border-radius: 16px 16px 0 0 !important;
    max-width: 100vw !important;
    width: 100vw !important;
    max-height: 88vh !important;
    padding: 20px 16px !important;
    margin: 0 !important; }
  .table-header { position: sticky;
    top: 0;
    z-index: 10;
    background: var(--card);
    padding-bottom: 10px; }
  /* Tabel yayasan → card di mobile */
  .data-table thead { display: none; }
  .data-table tbody tr { display: flex;
    flex-direction: column;
    border: 0.5px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    padding: 10px 12px; }
  .data-table tbody td { border: none;
    padding: 3px 0;
    font-size: 13px; }
  .data-table tbody td::before { content: attr(data-label) ": ";
    font-weight: 600;
    font-size: 11px;
    color: var(--text-muted);
    display: block; }
}

@media (max-width: 900px) {
  #dashboardMainGrid,
  #dashboardWaliMainGrid { grid-template-columns: 1fr !important; }
}

@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .content { padding:10px; }
  #belumBayarContent table,
  #tabelRiwayat table, #tabelRiwayatMenunggu table, #tabelRiwayatDitolak table,
  #tabelKeuangan table, #tabelSiswa table, #listKonfirmasiTransfer table { display:block; }
  #belumBayarContent thead,
  #tabelRiwayat thead, #tabelRiwayatMenunggu thead, #tabelRiwayatDitolak thead,
  #tabelKeuangan thead, #tabelSiswa thead, #listKonfirmasiTransfer thead { display:none; }
  #belumBayarContent tbody,
  #tabelRiwayat tbody, #tabelRiwayatMenunggu tbody, #tabelRiwayatDitolak tbody,
  #tabelKeuangan tbody, #tabelSiswa tbody, #listKonfirmasiTransfer tbody { display:block; }
  #belumBayarContent tr,
  #tabelRiwayat tr, #tabelRiwayatMenunggu tr, #tabelRiwayatDitolak tr,
  #tabelKeuangan tr, #tabelSiswa tr, #listKonfirmasiTransfer tr { display:flex; flex-wrap:wrap; align-items:flex-start;
    padding:10px 12px; border-bottom:0.5px solid var(--border); gap:4px; }
  td[data-label]::before { content: attr(data-label);
    display:block; font-size:9px; font-weight:700; text-transform:uppercase;
    letter-spacing:0.5px; color:var(--text-muted); margin-bottom:2px; }
  /* Wali: belum bayar */
  #belumBayarContent td { font-size:12px; padding:3px 0; }
  #belumBayarContent td:nth-child(1) { flex:0 0 28px; }
  #belumBayarContent td:nth-child(2) { flex:1 1 calc(100% - 36px); font-size:13px; font-weight:700; }
  #belumBayarContent td:nth-child(3) { display:none; }
  #belumBayarContent td:nth-child(4), #belumBayarContent td:nth-child(5) { flex:1; }
  #belumBayarContent td:nth-child(6) { display:none; }
  #belumBayarContent td:nth-child(7) { flex:1; font-weight:700; color:var(--danger); }
  #belumBayarContent td:nth-child(8) { flex:0 0 auto; margin-left:auto; }
  /* Wali: riwayat lunas */
  #tabelRiwayat td { font-size:12px; padding:3px 0; }
  #tabelRiwayat td:nth-child(1) { flex:0 0 auto; font-size:11px; color:var(--text-muted); }
  #tabelRiwayat td:nth-child(2) { flex:1 1 100%; font-size:13px; font-weight:700; }
  #tabelRiwayat td:nth-child(3), #tabelRiwayat td:nth-child(4) { flex:1; }
  #tabelRiwayat td:nth-child(5) { font-weight:700; color:var(--success); flex:1; }
  #tabelRiwayat td:nth-child(6) { flex:0 0 auto; }
  #tabelRiwayat td:nth-child(7) { flex:0 0 auto; margin-left:auto; }
  /* Admin: keuangan */
  #tabelKeuangan td { font-size:12px; padding:3px 0; }
  #tabelKeuangan td:nth-child(1) { flex:1 1 100%; font-size:13px; font-weight:700; padding-bottom:4px; }
  #tabelKeuangan td:nth-child(2), #tabelKeuangan td:nth-child(3) { display:none; }
  #tabelKeuangan td:nth-child(4), #tabelKeuangan td:nth-child(5) { flex:1; }
  #tabelKeuangan td:nth-child(6) { flex:1; font-weight:700; }
  #tabelKeuangan td:nth-child(7) { flex:0 0 auto; }
  #tabelKeuangan td:last-child { flex:0 0 auto; margin-left:auto; }
  /* Admin: siswa */
  #tabelSiswa td { font-size:12px; padding:3px 0; }
  #tabelSiswa td:nth-child(1), #tabelSiswa td:nth-child(2) { flex:1 1 50%; font-weight:700; }
  #tabelSiswa td:nth-child(3), #tabelSiswa td:nth-child(4) { flex:1; }
  #tabelSiswa td:nth-child(5) { display:none; }
  #tabelSiswa td:last-child { flex:0 0 auto; margin-left:auto; }
  /* Admin: konfirmasi */
  #listKonfirmasiTransfer td { font-size:12px; padding:3px 0; }
  #listKonfirmasiTransfer td:nth-child(1) { flex:0 0 auto; font-size:11px; color:var(--text-muted); }
  #listKonfirmasiTransfer td:nth-child(2), #listKonfirmasiTransfer td:nth-child(3) { flex:1 1 100%; font-weight:700; }
  #listKonfirmasiTransfer td:nth-child(4), #listKonfirmasiTransfer td:nth-child(5) { flex:1; }
  #listKonfirmasiTransfer td:nth-child(6) { flex:0 0 auto; }
  #listKonfirmasiTransfer td:last-child { flex:0 0 auto; margin-left:auto; }
  .tab-group { overflow-x:auto; white-space:nowrap; padding-bottom:2px; }
  .tab-btn { font-size:12px; padding:8px 12px; }
  .stats-grid { gap:8px; }
  .stat-card { padding:12px 10px; }
  .stat-card .value { font-size:18px; }
  .modal { padding:20px 16px; }
  .mini-cal-grid .day { font-size:11px; padding:5px 0; }
}

@media print {
  .no-print { display:none }
}

/* Nav group clean labels */
.nav-group-header {
  color: #9CA3AF !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.7px !important;
  padding: 8px 10px 3px !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
  border-radius: 0 !important;
  margin: 0 !important;
  cursor: pointer !important;
  background: transparent !important;
  user-select: none !important;
}
.nav-group-header svg { 
  width: 13px !important; 
  height: 13px !important;
  opacity: 0.45 !important;
  flex-shrink: 0 !important;
}
.nav-group-header .nav-group-chevron {
  margin-left: auto !important;
  opacity: 0.4 !important;
}
.nav-group-header:hover { background: #F0FDF4 !important; color: #065F46 !important; }
.nav-group.open > .nav-group-header {
  color: #065F46 !important;
  background: transparent !important;
}
.nav-group.open > .nav-group-header svg { opacity: 0.7 !important; }

/* Nav group header dark mode */
body.dark .nav-group-header {
  color: rgba(255,255,255,0.35) !important;
}
body.dark .nav-group-header:hover {
  background: rgba(16,185,129,0.1) !important;
  color: #6EE7B7 !important;
}
body.dark .nav-group.open > .nav-group-header {
  color: #6EE7B7 !important;
}
body.dark .nav-group-header svg {
  opacity: 0.3 !important;
}
body.dark .nav-group.open > .nav-group-header svg {
  opacity: 0.6 !important;
}

/* Stat card dark mode improvements */
body.dark .stat-card {
  box-shadow: 0 1px 3px rgba(0,0,0,0.4) !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease !important;
}
body.dark .stat-card:hover {
  background: #27303F !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

/* Greeting header dark mode improvements */
body.dark #dashboardGreeting {
  filter: none !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3) !important;
}

/* Tab group dark mode */
body.dark .tab-group {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.1) !important;
}
body.dark .tab-btn {
  color: rgba(255,255,255,0.4) !important;
}
body.dark .tab-btn.active {
  background: rgba(16,185,129,0.18) !important;
  color: #6EE7B7 !important;
  border-color: rgba(16,185,129,0.3) !important;
}
body.dark .tab-btn:hover {
  background: rgba(255,255,255,0.06) !important;
  color: rgba(255,255,255,0.7) !important;
}

/* Detail pengumuman panel dark mode */
body.dark .detail-pengumuman-panel {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
body.dark .detail-pengumuman-panel > div:first-child {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .detail-pengumuman-panel > div:last-child {
  border-color: rgba(255,255,255,0.08) !important;
}

/* ═══ AKSI DROPDOWN MENU ═══ */
.aksi-dd-item {
  padding: 8px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 6px;
  color: #374151;
  white-space: nowrap;
}
.aksi-dd-item:hover { background: #F9FAFB; }
.aksi-menu-wrap { position: relative; display: inline-block; }


/* ════════════════════════════════════════════════
   MASTER LAYOUT — FINAL (highest priority, no !important)
   These override everything above via source order.
   ════════════════════════════════════════════════ */

/* App container */

.app.show {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
}

/* Desktop layout: keep sidebar in normal flow to avoid login shift */
.sidebar {
  position: sticky;
  top: 0;
  width: 240px;
  height: 100vh;
  z-index: 200;
  background: #F8FAFC;
  border-right: 0.5px solid #E5E7EB;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #E5E7EB transparent;
}

/* Main content area */
.main {
  flex: 1;
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 0.5px solid #E5E7EB;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

/* Content */
.content {
  flex: 1;
  padding: 20px;
  background: #F8FAFC;
  min-height: calc(100vh - 56px);
  /* overflow-x dihapus dari sini (lihat catatan di html/body di atas file
     ini) — html sudah meng-clip overflow horizontal untuk seluruh halaman,
     jadi .content tidak perlu overflow-x sendiri. Kalau di sini juga
     diset overflow-x:hidden tanpa overflow-y, .content jadi scroll
     container ketiga yang bisa bikin posisi konten "meleset" di mobile. */
}

/* Mobile */
@media (max-width: 768px) {
  .app.show {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
  }
  .content { padding: 16px; }
}

/* ════════════════════════════════════════════════
   DARK MODE — Systematic Color System
   Toggle: body.dark class
   Palette: 3-layer depth system
   ════════════════════════════════════════════════ */

body.dark {
  /* Page layers */
  --bg:          #111827;
  --bg-2:        #1F2937;
  --bg-sidebar:  #0F2417;

  /* Card surface */
  --card-bg:     #1F2937;
  --surface-0:   #1F2937;
  --surface-1:   #27303F;
  --surface-2:   #1F2937;

  /* Text - WCAG AA compliant contrast */
  --text:           #FFFFFF;
  --text-primary:   #FFFFFF;
  --text-secondary: #D1D5DB;
  --text-muted:     #9CA3AF;

  /* Border */
  --border:        rgba(255,255,255,0.12);
  --border-strong: rgba(255,255,255,0.18);

  /* Semantic keep colors, adjust for dark */
  --bg-accent:  rgba(16,185,129,0.18);
  --bg-success: rgba(34,197,94,0.18);
  --bg-warning: rgba(245,158,11,0.18);
  --bg-danger:  rgba(239,68,68,0.18);
  --bg-info:    rgba(59,130,246,0.18);

  --text-accent:  #6EE7B7;
  --text-success: #86EFAC;
  --text-warning: #FCD34D;
  --text-danger:  #F87171;
  --text-info:    #93C5FD;

  --border-accent:  rgba(16,185,129,0.35);
  --border-success: rgba(34,197,94,0.35);
  --border-warning: rgba(245,158,11,0.35);
  --border-danger:  rgba(239,68,68,0.35);

  color: #FFFFFF;
}

/* Page background */
body.dark { background: #111827; }

/* SIDEBAR — brand dark green */
body.dark .sidebar {
  background: #0F2417 !important;
  border-right: 0.5px solid rgba(255,255,255,0.12) !important;
}

/* Sidebar user card */
body.dark #sidebarUserCard {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body.dark #userName { color: #FFFFFF !important; }
body.dark #userRole  { color: #D1D5DB !important; }

/* TOPBAR */
body.dark .topbar {
  background: #1F2937 !important;
  border-bottom: 0.5px solid rgba(255,255,255,0.12) !important;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3) !important;
}
body.dark .topbar * { color: #FFFFFF; }
body.dark #pageTitle { color: #FFFFFF !important; }

/* CONTENT AREA */
body.dark .content { background: #111827 !important; }
body.dark .app.show { background: #111827; }

/* CARDS */
body.dark .stat-card,
body.dark .table-card,
body.dark .chart-card,
body.dark .modal,
body.dark .kpi-card,
body.dark .section-card,
body.dark .info-card {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.12) !important;
  color: #FFFFFF !important;
}

/* Greeting cards — keep their colors, just darken slightly */
body.dark #dashboardGreeting { filter: brightness(0.9) !important; }

/* TABLE */
body.dark table { color: #FFFFFF; }
body.dark thead th {
  background: #27303F !important;
  color: #D1D5DB !important;
  border-bottom-color: rgba(255,255,255,0.12) !important;
}
body.dark tbody tr { border-bottom-color: rgba(255,255,255,0.12) !important; }
body.dark tbody tr:hover { background: rgba(255,255,255,0.08) !important; }
body.dark tbody td { color: #FFFFFF; }

/* TABLE CARD HEADER */
body.dark .table-header {
  background: #1F2937 !important;
  border-bottom-color: rgba(255,255,255,0.12) !important;
}
body.dark .table-header h4,
body.dark .table-header span { color: #FFFFFF !important; }

/* INPUTS */
body.dark input,
body.dark select,
body.dark textarea {
  background: rgba(255,255,255,0.08) !important;
  color: #FFFFFF !important;
  border-color: rgba(255,255,255,0.18) !important;
}
body.dark input::placeholder,
body.dark textarea::placeholder { color: #9CA3AF !important; }
body.dark input:focus,
body.dark select:focus {
  border-color: #10B981 !important;
  box-shadow: 0 0 0 3px rgba(16,185,129,0.2) !important;
  background: rgba(255,255,255,0.1) !important;
}

/* BUTTONS */
body.dark .btn-outline {
  background: rgba(255,255,255,0.08) !important;
  border-color: rgba(255,255,255,0.18) !important;
  color: #FFFFFF !important;
}
body.dark .btn-outline:hover {
  background: rgba(255,255,255,0.12) !important;
  border-color: rgba(255,255,255,0.25) !important;
}
body.dark .btn-primary {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #fff !important;
}

/* BADGES */
body.dark .badge-green  { background: rgba(34,197,94,0.15)  !important; color: #86EFAC !important; }
body.dark .badge-red    { background: rgba(239,68,68,0.15)  !important; color: #F87171 !important; }
body.dark .badge-amber  { background: rgba(245,158,11,0.15) !important; color: #FCD34D !important; }
body.dark .badge-blue   { background: rgba(59,130,246,0.15) !important; color: #93C5FD !important; }
body.dark .badge-purple { background: rgba(139,92,246,0.15) !important; color: #C4B5FD !important; }

/* NAV ITEMS — sidebar overrides */
body.dark .nav-item {
  color: #FFFFFF !important;
  background: transparent !important;
  box-shadow: none !important;
  transition: all 0.15s ease !important;
  border-radius: 10px !important;
  margin: 2px 6px !important;
}
body.dark .nav-item:hover {
  background: rgba(16,185,129,0.15) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  transform: translateX(2px) !important;
}
body.dark .nav-item.active {
  background: rgba(16,185,129,0.22) !important;
  color: #6EE7B7 !important;
  box-shadow: none !important;
  border-left: 3px solid #10B981 !important;
}
body.dark .nav-item svg,
body.dark .nav-item i { color: #D1D5DB !important; }
body.dark .nav-item.active svg,
body.dark .nav-item.active i { color: #6EE7B7 !important; }

/* Nav subitems dark mode */
body.dark .nav-subitem {
  color: #D1D5DB !important;
  transition: all 0.15s ease !important;
  border-radius: 8px !important;
  margin: 2px 0 !important;
}
body.dark .nav-subitem:hover {
  background: rgba(16,185,129,0.12) !important;
  color: #FFFFFF !important;
  transform: translateX(2px) !important;
}
body.dark .nav-subitem::before {
  background: rgba(255,255,255,0.25) !important;
  transition: background 0.15s ease !important;
}
body.dark .nav-subitem.active {
  color: #A7F3D0 !important;
}
body.dark .nav-subitem.active::before {
  background: #10B981 !important;
}

/* Sidebar overlay dark mode */
body.dark .sidebar-overlay {
  background: rgba(0,0,0,0.6) !important;
  backdrop-filter: blur(2px) !important;
}

/* TA BADGE in topbar */
body.dark [style*="background:#D1FAE5"],
body.dark [style*="background: #D1FAE5"] {
  background: rgba(16,185,129,0.15) !important;
  color: #6EE7B7 !important;
}

/* INLINE WHITE BACKGROUNDS → card dark */
body.dark [style*="background:white"],
body.dark [style*="background: white"],
body.dark [style*="background:#fff"],
body.dark [style*="background: #fff"],
body.dark [style*="background:#FFFFFF"],
body.dark [style*="background: #FFFFFF"] {
  background: #1F2937 !important;
}

/* INLINE TEXT COLOR overrides for dark */
body.dark [style*="color:#111827"],
body.dark [style*="color: #111827"],
body.dark [style*="color:#374151"],
body.dark [style*="color:#1A1A2E"] {
  color: #FFFFFF !important;
}
body.dark [style*="color:#9CA3AF"],
body.dark [style*="color: #9CA3AF"] {
  color: #D1D5DB !important;
}
body.dark [style*="color:#6B7280"],
body.dark [style*="color: #6B7280"] {
  color: #9CA3AF !important;
}

/* DARK MODE TABLE STYLES */
body.dark .table-card {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.1) !important;
}
body.dark .table-header {
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .table-header h4 {
  color: rgba(255,255,255,0.85) !important;
}
body.dark .search-input {
  background: #111827 !important;
  border-color: rgba(255,255,255,0.15) !important;
  color: rgba(255,255,255,0.85) !important;
}
body.dark .search-input::placeholder {
  color: rgba(255,255,255,0.35) !important;
}
body.dark th {
  background: #1F2937 !important;
  color: rgba(255,255,255,0.45) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark td {
  color: rgba(255,255,255,0.8) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark tr:nth-child(even) td {
  background: rgba(255,255,255,0.02) !important;
}
body.dark tr:hover td {
  background: rgba(16,185,129,0.1) !important;
}

/* MODAL */
body.dark .modal-overlay { background: rgba(0,0,0,0.7); }
body.dark .modal { background: #1F2937 !important; border: 0.5px solid rgba(255,255,255,0.1) !important; }
body.dark .modal h3,
body.dark .modal label { color: rgba(255,255,255,0.85) !important; }

/* MONTH PILLS */
body.dark .bulan-pill,
body.dark [class*="bulan-"] {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: rgba(255,255,255,0.60) !important;
}

/* STAT CARD LABELS */
body.dark .stat-card .label,
body.dark .stat-card [style*="text-transform:uppercase"] {
  color: rgba(255,255,255,0.35) !important;
}

/* LOGIN (no change needed — already dark gradient) */

/* SCROLLBAR in dark */
body.dark * {
  scrollbar-color: rgba(255,255,255,0.1) transparent;
}
body.dark *::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); }

/* Calendar in dark mode */
body.dark .calendar-widget,
body.dark [id*="kalender"],
body.dark [id*="calendar"],
body.dark #dashCalendar,
body.dark #calendarPanel {
  background: #1F2937 !important;
  color: rgba(255,255,255,0.85) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .calendar-widget th,
body.dark [id*="kalender"] th {
  color: rgba(255,255,255,0.35) !important;
  background: #27303F !important;
}
body.dark .calendar-widget td {
  color: rgba(255,255,255,0.65) !important;
}
body.dark .calendar-widget td.today {
  background: rgba(16,185,129,0.2) !important;
  color: #6EE7B7 !important;
}
body.dark .calendar-widget td.has-event {
  background: rgba(245,158,11,0.15) !important;
}

/* Fix quick action buttons in dark */
body.dark #dashQuickActions button {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.18) !important;
  color: #FFFFFF !important;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease !important;
}
body.dark #dashQuickActions button:hover {
  background: #27303F !important;
  border-color: rgba(255,255,255,0.28) !important;
  box-shadow: 0 4px 12px rgba(0,0,0,0.22) !important;
  transform: translateY(-1px) !important;
}
body.dark #dashQuickActions button > div {
  background: transparent !important;
}
body.dark .dashboard-quick-icon { color: #FFFFFF !important; }
body.dark #dashQuickActions div[style*="color:var(--text-muted"],
body.dark #dashQuickActions div[style*="color:#9CA3AF"] {
  color: #FFFFFF !important;
}

/* Fix stat card icon boxes in dark */  
body.dark [style*="background:#ECFDF5"],
body.dark [style*="background:#EFF6FF"],
body.dark [style*="background:#FEF3C7"],
body.dark [style*="background:#FEE2E2"],
body.dark [style*="background:#FFFBEB"],
body.dark [style*="background:#DBEAFE"],
body.dark [style*="background:#FEF2F2"] {
  filter: brightness(0.25) saturate(2) !important;
}

/* Fix stat card text and hari ini strip in dark mode */
body.dark .stat-card .label,
body.dark .stat-card div[style*="font-size:11px"][style*="text-transform:uppercase"] {
  color: #D1D5DB !important;
}
body.dark .stat-card .value,
body.dark .stat-card div[style*="font-size:30px"],
body.dark .stat-card div[style*="font-size:20px"][style*="font-weight:800"] {
  color: #FFFFFF !important;
}
body.dark .stat-card div[style*="font-size:12px"] {
  color: #9CA3AF !important;
}
body.dark .stat-card div[style*="font-size:11px"][style*="color:#9CA3AF"] {
  color: #D1D5DB !important;
}

/* Fix hari ini strip in dark mode */
body.dark [style*="background:#ffffff"][style*="border-radius:12px"][style*="border:1px solid #E5E7EB"],
body.dark [style*="background:#ffffff"][style*="border-radius:12px"][style*="border:1px solid #E5E7EB"] {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.12) !important;
}
body.dark [style*="font-size:11px"][style*="text-transform:uppercase"][style*="letter-spacing:0.5px"][style*="color:#9CA3AF"] {
  color: #D1D5DB !important;
}

/* Fix stat card "siswa terdaftar" link color and similar links */
body.dark .stat-card div[style*="color:#3B82F6"],
body.dark .stat-card div[style*="color:#10B981"] {
  filter: brightness(1.2);
}

/* Chart/grafik area */
body.dark canvas { filter: brightness(0.85); }

/* Greeting card date in dark mode */
body.dark #greetingDate { color: #FEF3C7 !important; }
body.dark #tanggalHijriah { color: #D97706 !important; }
body.dark #waliTanggalMasehi { color: rgba(255,255,255,0.9) !important; }
body.dark #waliTanggalHijriah { color: #6EE7B7 !important; }

/* Chart text in dark */
body.dark .chart-card {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .chart-card h4,
body.dark .chart-card span { color: rgba(255,255,255,0.75) !important; }

/* Table card header in dark */
body.dark .table-header h4 { color: rgba(255,255,255,0.9) !important; }

/* Stat value text in dark - keep semantic colors */
body.dark .stat-card [style*="color:#EF4444"] { color: #F87171 !important; }
body.dark .stat-card [style*="color:#10B981"] { color: #6EE7B7 !important; }
body.dark .stat-card [style*="color:#F59E0B"] { color: #FCD34D !important; }

/* Mini calendar dark mode */
body.dark .mini-cal {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.08) !important;
}
body.dark .mini-cal-head { border-color: rgba(255,255,255,0.06) !important; }
body.dark .mini-cal-head .ttl { color: rgba(255,255,255,0.85) !important; }
body.dark .mini-cal-grid .dow { color: rgba(255,255,255,0.35) !important; }
body.dark .mini-cal-grid .day { color: rgba(255,255,255,0.60) !important; }
body.dark .mini-cal-grid .day.muted { color: rgba(255,255,255,0.15) !important; }
body.dark .mini-cal-grid .day.today {
  background: rgba(16,185,129,0.25) !important;
  color: #6EE7B7 !important;
}
body.dark .mini-cal-grid .day.due {
  background: rgba(245,158,11,0.2) !important;
  color: #FCD34D !important;
}
body.dark .mini-cal-legend { color: rgba(255,255,255,0.35) !important; }

/* Chart card dark */
body.dark .chart-card {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.08) !important;
}

/* Jatuh tempo panel dark */
body.dark [style*="var(--card-bg"] { 
  background: #1F2937 !important; 
  border-color: rgba(255,255,255,0.08) !important;
}

/* Topbar buttons/links dark */
body.dark #pageTitle { color: rgba(255,255,255,0.9) !important; }
body.dark .topbar button { 
  color: rgba(255,255,255,0.7) !important;
  border-color: rgba(255,255,255,0.15) !important;
  background: rgba(255,255,255,0.06) !important;
}
body.dark .topbar .btn-primary {
  background: #10B981 !important;
  color: #fff !important;
}

/* Stat card label ALL CAPS text in dark */
body.dark .stat-card * { color: var(--text) !important; }
body.dark .stat-card [style*="color:#10B981"] { color: #6EE7B7 !important; }
body.dark .stat-card [style*="color:#EF4444"] { color: #F87171 !important; }
body.dark .stat-card [style*="color:#F59E0B"] { color: #FCD34D !important; }
body.dark .stat-card [style*="color:#3B82F6"] { color: #93C5FD !important; }
body.dark .stat-card a { color: #6EE7B7 !important; }

/* Login mobile responsive */
@media (max-width: 480px) {
  .login-wrap { padding: 16px; align-items: flex-start; padding-top: 40px; }
  .login-card { padding: 24px 20px !important; border-radius: 14px !important; }
  .login-logo img { width: 60px !important; height: 60px !important; }
  .login-logo h1 { font-size: 22px !important; }
  .btn-login { padding: 13px !important; font-size: 15px !important; }
  .form-group input { font-size: 16px !important; } /* prevent zoom on iOS */
}

/* Login inputs with left icon — ensure no overflow */
.login-card input {
  box-sizing: border-box !important;
  width: 100% !important;
  max-width: 100% !important;
}
.login-card .form-group div[style*="position:relative"] {
  overflow: hidden;
}

/* ════════════════════════════════════════════════════
   MOBILE SIDEBAR — Soft Dark Sage Green
   #2D4A3E = hijau sage tua yang soft, tidak pekat
   ════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* Sidebar mobile: soft dark sage, full height, scrollable */
  .sidebar {
    background: #2D4A3E !important;
    border-right: none !important;
    width: min(280px, 85vw) !important;
    box-shadow: none;
  }
  .sidebar.open {
    box-shadow: 8px 0 32px rgba(0,0,0,0.25) !important;
  }

  /* Logo text on dark bg */
  .sidebar [style*="color:#111"],
  .sidebar [style*="color: #111"] { color: #fff !important; }
  .sidebar [style*="color:#9CA3AF"],
  .sidebar [style*="color: #9CA3AF"] { color: rgba(255,255,255,0.45) !important; }

  /* User card on dark bg */
  .sidebar #sidebarUserCard {
    background: rgba(255,255,255,0.08) !important;
    border-color: rgba(255,255,255,0.1) !important;
  }
  .sidebar #userName { color: #fff !important; }
  .sidebar #userRole { color: rgba(255,255,255,0.45) !important; }
  .sidebar #userRoleBadge {
    background: rgba(217,119,6,0.3) !important;
    color: #FCD34D !important;
  }

  /* Nav items — white text on sage dark */
  .sidebar .nav-item {
    color: rgba(255,255,255,0.65) !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 44px !important;
  }
  .sidebar .nav-item:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
    box-shadow: none !important;
  }
  .sidebar .nav-item.active {
    background: rgba(16,185,129,0.18) !important;
    color: #6EE7B7 !important;
    box-shadow: none !important;
  }
  .sidebar .nav-item svg,
  .sidebar .nav-item i { color: rgba(255,255,255,0.4) !important; }
  .sidebar .nav-item.active svg,
  .sidebar .nav-item.active i { color: #6EE7B7 !important; }

  /* Sub-items visible on dark */
  .sidebar .nav-subitem {
    color: rgba(255,255,255,0.5) !important;
    min-height: 36px !important;
    display: flex !important;
    align-items: center !important;
  }
  .sidebar .nav-subitem:hover {
    color: rgba(255,255,255,0.85) !important;
    background: rgba(255,255,255,0.06) !important;
  }
  .sidebar .nav-subitem.active {
    color: #A7F3D0 !important;
  }
  .sidebar .nav-subitem::before {
    background: rgba(255,255,255,0.25) !important;
  }
  .sidebar .nav-subitem.active::before {
    background: #10B981 !important;
  }

  /* Section headers / group headers */
  .sidebar .nav-group-header {
    color: rgba(255,255,255,0.35) !important;
    min-height: 40px !important;
  }
  .sidebar .nav-group.open > .nav-group-header {
    color: rgba(255,255,255,0.7) !important;
  }
  .sidebar .nav-group-header svg { opacity: 0.4 !important; }
  .sidebar [style*="height:0.5px"] {
    background: rgba(255,255,255,0.08) !important;
  }

  /* Section label text */
  .sidebar [style*="color:#9CA3AF;text-transform:uppercase"] {
    color: rgba(255,255,255,0.3) !important;
  }

  /* Footer logout */
  .sidebar .sidebar-footer div,
  .sidebar [onclick*="doLogout"] {
    color: rgba(255,255,255,0.4) !important;
  }
  .sidebar [onclick*="doLogout"]:hover {
    color: rgba(255,255,255,0.8) !important;
    background: rgba(255,255,255,0.06) !important;
  }

  /* Overlay — lebih gelap untuk fokus ke sidebar */
  .sidebar-overlay {
    background: rgba(0,0,0,0.55) !important;
    backdrop-filter: blur(2px) !important;
  }
}

/* ═══ HOVER IMPROVEMENTS — Better contrast & feedback ═══ */

/* Button sm hover */
.btn-sm:hover { opacity: 0.88; transform: translateY(-0.5px); }

/* Badge hover (when clickable) */
.badge[onclick]:hover { opacity: 0.82; cursor: pointer; }

/* Nav item active+hover — don't override active with hover */
.nav-item.active:hover {
  background: #ECFDF5 !important;
  color: #047857 !important;
}

/* Quick action buttons hover */
#dashQuickActions button:hover {
  background: #F0FDF4 !important;
  border-color: #A7F3D0 !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(6,95,70,0.08) !important;
  transition: all 0.15s ease;
}

.dashboard-quick-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  color: #334155;
}
.dashboard-quick-icon svg,
#statsHariIni svg,
#dashAlertBanner svg,
#dashAlertChip svg {
  flex-shrink: 0;
}

.kalpend-shell {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.kalpend-hero {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid #A7F3D0;
  background: linear-gradient(135deg, #ECFDF5 0%, #F0FDF4 50%, #DCFCE7 100%);
}

.kalpend-hero-main {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.95fr);
  gap: 18px;
  align-items: stretch;
}

.kalpend-hero-copy {
  flex: 1;
  min-width: 0;
  padding-right: 6px;
}

.kalpend-hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 16px;
}

.kalpend-year-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(16,185,129,0.16);
  color: #047857;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4px;
}

.kalpend-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.66);
  color: #065F46;
  font-size: 12px;
  font-weight: 700;
}

.kalpend-hero h3 {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  color: #064E3B;
}

.kalpend-hero p {
  margin: 0;
  max-width: 620px;
  color: #166534;
  line-height: 1.65;
  font-size: 13px;
}

.kalpend-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 12px;
  min-width: 0;
}

.kalpend-stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 104px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.72);
  border: 1px solid rgba(255,255,255,0.86);
}

.kalpend-stat-copy {
  min-width: 0;
}

.kalpend-stat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #D1FAE5;
  color: #047857;
  flex-shrink: 0;
}

.kalpend-stat-value {
  font-size: 22px;
  font-weight: 800;
  color: #064E3B;
  line-height: 1;
  margin-bottom: 4px;
}

.kalpend-stat-label,
.kalpend-muted {
  font-size: 12px;
  color: #6B7280;
}

.kalpend-grid-main {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.95fr);
  gap: 18px;
}

.kalpend-month-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.kalpend-month-pill {
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #374151;
  border-radius: 12px;
  min-height: 64px;
  padding: 10px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all 0.15s ease;
}

.kalpend-month-pill span {
  font-size: 11px;
  font-weight: 600;
  color: #9CA3AF;
}

.kalpend-month-pill:hover {
  background: #F8FAFC;
  border-color: #D1D5DB;
}

.kalpend-month-pill.active {
  background: linear-gradient(180deg, #DCFCE7 0%, #ECFDF5 100%);
  border-color: #6EE7B7;
  color: #065F46;
  box-shadow: 0 6px 16px rgba(16,185,129,0.12);
}

.kalpend-month-pill.active span {
  color: #047857;
}

.kalpend-agenda-list,
.kalpend-month-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dashboard-kaldik-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.dashboard-kaldik-title {
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.dashboard-kaldik-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dashboard-kaldik-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #6B7280;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  transition: all 0.15s ease;
}

.dashboard-kaldik-arrow:hover {
  border-color: #A7F3D0;
  background: #F0FDF4;
  color: #065F46;
}

.wali-pengumuman-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wali-pengumuman-card {
  width: 100%;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  border-radius: 12px;
  padding: 0;
  display: flex;
  align-items: stretch;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  overflow: hidden;
}

.wali-pengumuman-list .wali-pengumuman-card + .wali-pengumuman-card {
  margin-top: 2px;
}

.wali-pengumuman-card:hover {
  border-color: #A7F3D0;
  background: #F0FDF4;
  transform: translateY(-1px);
}

.wali-pengumuman-thumb {
  width: 108px;
  min-width: 108px;
  background: #ECFDF5;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #065F46;
}

.wali-pengumuman-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.wali-pengumuman-thumb-fallback {
  background: linear-gradient(135deg, #065F46, #10B981);
  color: #FFFFFF;
}

.wali-pengumuman-main {
  min-width: 0;
  flex: 1;
  padding: 11px 13px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.wali-pengumuman-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.wali-pengumuman-title {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

.wali-pengumuman-meta {
  font-size: 11px;
  color: #9CA3AF;
}

.wali-pengumuman-excerpt {
  font-size: 12px;
  line-height: 1.5;
  color: #6B7280;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.wali-pengumuman-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 10px;
  font-weight: 700;
}

.wali-section-header h4 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wali-section-icon {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ECFDF5;
  color: #065F46;
  flex-shrink: 0;
}

.wali-sidebar-card {
  overflow: hidden;
}

.wali-sidebar-card .table-header {
  padding: 18px 18px 10px;
  border-bottom: none;
}

#waliListPengumuman,
#waliAgendaTerdekat {
  padding: 12px 14px 16px;
}

.wali-stat-card .label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.akademik-wali-header {
  padding: 18px 18px 12px;
  border-bottom: none;
}

.akademik-wali-chiplist {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.akademik-wali-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border-top: 0.5px solid #E5E7EB;
  border-bottom: 0.5px solid #E5E7EB;
}

.akademik-wali-kpi {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.akademik-wali-kpi .stat-card .sub {
  margin-top: 6px;
  font-size: 12px;
  color: #6B7280;
  line-height: 1.5;
}

@media (max-width: 1024px) {
  .akademik-wali-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .akademik-wali-kpi { grid-template-columns: 1fr; }
}

.wali-kaldik-calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.wali-kaldik-calendar .dow {
  font-size: 10px;
  color: #9CA3AF;
  font-weight: 700;
  padding: 4px 0;
}

.wali-kaldik-calendar .day {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #111827;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  position: relative;
  transition: all 0.15s ease;
}

.wali-kaldik-calendar .day span {
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.wali-kaldik-calendar .day i {
  font-style: normal;
  font-size: 9px;
  font-weight: 700;
  color: #10B981;
  line-height: 1;
}

.wali-kaldik-calendar .day.has-agenda {
  border-color: #A7F3D0;
  background: #ECFDF5;
  cursor: help;
}

.wali-kaldik-calendar .day.has-agenda:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(6,95,70,0.10);
}

.wali-kaldik-calendar .day.today {
  background: #065F46;
  border-color: #065F46;
  color: #FFFFFF;
}

.wali-kaldik-calendar .day.today i {
  color: #D1FAE5;
}

.wali-kaldik-calendar .day.muted {
  background: #F9FAFB;
  color: #D1D5DB;
  border-style: dashed;
}

.wali-kaldik-legend {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #9CA3AF;
}

.wali-kaldik-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #10B981;
}

.kalpend-agenda-item,
.kalpend-summary-card {
  border: 1px solid #E5E7EB;
  border-radius: 16px;
  background: #FFFFFF;
  padding: 14px 16px;
}

.kalpend-agenda-item {
  display: flex;
  gap: 12px;
}

.kalpend-agenda-badge,
.kalpend-summary-type {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.kalpend-agenda-main {
  min-width: 0;
}

.kalpend-agenda-title,
.kalpend-summary-title {
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.4;
}

.kalpend-agenda-meta,
.kalpend-agenda-desc,
.kalpend-summary-date,
.kalpend-summary-desc,
.kalpend-summary-audience {
  font-size: 12px;
  color: #6B7280;
  line-height: 1.6;
}

.kalpend-agenda-meta,
.kalpend-summary-audience {
  margin-top: 4px;
}

.kalpend-agenda-desc,
.kalpend-summary-desc {
  margin-top: 6px;
}

.kalpend-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.kalpend-nav-label {
  min-width: 156px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.kalpend-filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.kalpend-filter-chip {
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  color: #374151;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kalpend-filter-chip.active {
  background: var(--kalpend-chip-soft);
  color: var(--kalpend-chip);
  border-color: var(--kalpend-chip);
}

.kalpend-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.kalpend-weekday {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #9CA3AF;
  text-align: center;
  padding: 8px 0;
}

.kalpend-day {
  min-height: 122px;
  border-radius: 14px;
  border: 1px solid #E5E7EB;
  background: #FFFFFF;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kalpend-day.is-outside {
  background: #F9FAFB;
  border-style: dashed;
  opacity: 0.65;
}

.kalpend-day.has-event {
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.10);
}

.kalpend-day.is-today {
  border-color: #34D399;
  box-shadow: 0 0 0 2px rgba(52,211,153,0.18);
}

.kalpend-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kalpend-day-num {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.kalpend-dot-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ECFDF5;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
}

.kalpend-day-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kalpend-day-chip {
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  -webkit-line-clamp: 2;
}

.kalpend-day-more {
  font-size: 10px;
  color: #6B7280;
  font-weight: 700;
}

.kalpend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.kalpend-legend-item,
.kalpend-summary-audience {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.kalpend-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.kalpend-summary-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.kalpend-empty {
  text-align: center;
  padding: 28px 14px;
  color: #9CA3AF;
  font-size: 13px;
  border: 1px dashed #D1D5DB;
  border-radius: 16px;
  background: #F9FAFB;
}

.kalpend-summary-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.kalpend-load-note {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.65);
  color: #92400E;
  font-size: 12px;
}

body.dark .kalpend-hero {
  background: linear-gradient(135deg, rgba(16,185,129,0.16) 0%, rgba(31,41,55,0.96) 48%, rgba(17,24,39,1) 100%);
  border-color: rgba(110,231,183,0.16);
}

body.dark .kalpend-eyebrow,
body.dark .kalpend-stat-card,
body.dark .kalpend-month-pill,
body.dark .kalpend-agenda-item,
body.dark .kalpend-summary-card,
body.dark .kalpend-day,
body.dark .kalpend-filter-chip {
  background: #1F2937 !important;
  border-color: rgba(255,255,255,0.10) !important;
}

body.dark .kalpend-hero h3,
body.dark .kalpend-stat-value,
body.dark .kalpend-agenda-title,
body.dark .kalpend-summary-title,
body.dark .kalpend-nav-label,
body.dark .kalpend-day-num,
body.dark .dashboard-kaldik-title {
  color: #FFFFFF !important;
}

body.dark .kalpend-hero p,
body.dark .kalpend-stat-label,
body.dark .kalpend-muted,
body.dark .kalpend-agenda-meta,
body.dark .kalpend-agenda-desc,
body.dark .kalpend-summary-date,
body.dark .kalpend-summary-desc,
body.dark .kalpend-summary-audience,
body.dark .kalpend-day-more,
body.dark .kalpend-weekday,
body.dark .kalpend-month-pill span {
  color: #D1D5DB !important;
}

body.dark .kalpend-eyebrow {
  color: #A7F3D0 !important;
  background: rgba(255,255,255,0.06) !important;
}

body.dark .kalpend-year-badge {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(110,231,183,0.16) !important;
  color: #A7F3D0 !important;
}

body.dark .dashboard-kaldik-arrow {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #D1D5DB !important;
}

body.dark .dashboard-kaldik-arrow:hover {
  background: rgba(16,185,129,0.14) !important;
  border-color: rgba(110,231,183,0.24) !important;
  color: #A7F3D0 !important;
}

body.dark .wali-pengumuman-card {
  background: #111827 !important;
  border-color: rgba(255,255,255,0.08) !important;
}

body.dark .wali-pengumuman-card:hover {
  background: rgba(16,185,129,0.10) !important;
  border-color: rgba(110,231,183,0.20) !important;
}

body.dark .wali-pengumuman-thumb {
  background: #0F172A !important;
}

body.dark .wali-pengumuman-title {
  color: #FFFFFF !important;
}

body.dark .wali-pengumuman-excerpt {
  color: #CBD5E1 !important;
}

body.dark .wali-pengumuman-meta,
body.dark .wali-kaldik-legend,
body.dark .wali-kaldik-calendar .dow {
  color: #9CA3AF !important;
}

body.dark .wali-section-icon {
  background: rgba(16,185,129,0.14) !important;
  color: #A7F3D0 !important;
}

body.dark .akademik-wali-tabs {
  border-top-color: rgba(255,255,255,0.10) !important;
  border-bottom-color: rgba(255,255,255,0.10) !important;
}

body.dark .wali-kaldik-calendar .day {
  background: #111827 !important;
  border-color: rgba(255,255,255,0.10) !important;
  color: #FFFFFF !important;
}

body.dark .wali-kaldik-calendar .day.has-agenda {
  background: rgba(16,185,129,0.12) !important;
  border-color: rgba(110,231,183,0.24) !important;
}

body.dark .wali-kaldik-calendar .day.today {
  background: #10B981 !important;
  border-color: #10B981 !important;
  color: #FFFFFF !important;
}

body.dark .wali-kaldik-calendar .day.today i {
  color: #ECFDF5 !important;
}

body.dark .wali-kaldik-calendar .day.muted {
  background: rgba(255,255,255,0.03) !important;
  color: rgba(255,255,255,0.22) !important;
}

body.dark .kalpend-stat-icon {
  background: rgba(16,185,129,0.18) !important;
  color: #6EE7B7 !important;
}

body.dark .kalpend-month-pill.active {
  background: linear-gradient(180deg, rgba(16,185,129,0.28) 0%, rgba(16,185,129,0.16) 100%) !important;
  border-color: rgba(110,231,183,0.28) !important;
  color: #A7F3D0 !important;
}

body.dark .kalpend-filter-chip.active {
  border-color: transparent !important;
}

body.dark .kalpend-day.is-outside,
body.dark .kalpend-empty {
  background: rgba(255,255,255,0.03) !important;
  border-color: rgba(255,255,255,0.08) !important;
}

body.dark .kalpend-day.is-today {
  box-shadow: 0 0 0 2px rgba(52,211,153,0.18) !important;
}

body.dark .kalpend-dot-count {
  background: rgba(16,185,129,0.20) !important;
  color: #A7F3D0 !important;
}

body.dark .kalpend-load-note {
  background: rgba(245,158,11,0.10) !important;
  color: #FCD34D !important;
}

@media (max-width: 1100px) {
  .kalpend-hero-main,
  .kalpend-grid-main,
  .kalpend-stat-row {
    grid-template-columns: 1fr;
  }

  .kalpend-month-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .kalpend-hero {
    padding: 18px;
  }

  .kalpend-hero h3 {
    font-size: 22px;
  }

  .kalpend-hero-actions {
    align-items: stretch;
  }

  .kalpend-month-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kalpend-calendar {
    gap: 6px;
  }

  .kalpend-day {
    min-height: 106px;
    padding: 8px;
  }

  .kalpend-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .kalpend-month-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Table action buttons hover */
table button:hover,
.data-table button:hover {
  border-color: #D1D5DB !important;
  background: #F9FAFB !important;
}

/* Sidebar footer logout hover */
.sidebar [onclick*="doLogout"]:hover {
  background: #F0FDF4 !important;
  color: #065F46 !important;
}

/* aksi dropdown items */
.aksi-dd-item:hover { background: #F3F4F6; }

/* Dark mode: better btn hover */
body.dark .btn-primary:hover { background: #059669 !important; border-color: #059669 !important; }
body.dark .btn-outline:hover { background: rgba(255,255,255,0.12) !important; }
body.dark .nav-item.active:hover { background: rgba(16,185,129,0.22) !important; color: #6EE7B7 !important; }
body.dark .stat-card.clickable:hover { border-color: #10B981 !important; background: rgba(16,185,129,0.05) !important; }
body.dark tbody tr:hover { background: rgba(255,255,255,0.04) !important; }

/* Navigation hierarchy improvements */
.sidebar-nav > .nav-item {
  min-height: 42px !important;
  padding: 9px 12px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
}

.sidebar-nav > .nav-item.active {
  background: linear-gradient(90deg, #DCFCE7 0%, #F0FDF4 100%) !important;
  color: #065F46 !important;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.16), 0 2px 8px rgba(6,95,70,0.08) !important;
}

.sidebar-nav > .nav-item.active svg,
.sidebar-nav > .nav-item.active i {
  color: #059669 !important;
}

.sidebar-nav > .nav-item.parent-active,
.nav-group-items > .nav-item.parent-active {
  background: linear-gradient(90deg, #D1FAE5 0%, #ECFDF5 100%) !important;
  color: #065F46 !important;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.22), 0 2px 8px rgba(6,95,70,0.08) !important;
  border-left: 3px solid #10B981 !important;
}

.sidebar-nav > .nav-item.parent-active svg,
.sidebar-nav > .nav-item.parent-active i,
.nav-group-items > .nav-item.parent-active svg,
.nav-group-items > .nav-item.parent-active i {
  color: #059669 !important;
}

.nav-group {
  margin-top: 8px !important;
}

.nav-group-header {
  margin-bottom: 4px !important;
  border-radius: 10px !important;
  min-height: 36px !important;
}

.nav-group-items {
  margin: 0 0 8px 10px !important;
  padding: 4px 0 4px 10px !important;
  border-left: 1px solid #E5E7EB !important;
}

.nav-group-items > .nav-item {
  min-height: 38px !important;
  padding: 8px 12px !important;
  margin: 2px 0 !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  border-radius: 10px !important;
}

.nav-group-items > .nav-item.active {
  background: linear-gradient(90deg, #DCFCE7 0%, #F0FDF4 100%) !important;
  color: #065F46 !important;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.16), 0 2px 8px rgba(6,95,70,0.08) !important;
}

.nav-group-items > .nav-item.active svg,
.nav-group-items > .nav-item.active i {
  color: #059669 !important;
}

.nav-group-items > .nav-subitem {
  min-height: 34px !important;
  margin: 1px 0 !important;
  padding: 6px 10px 6px 18px !important;
  font-size: 12px !important;
  border-radius: 8px !important;
  color: #6B7280 !important;
}

.nav-group-items > .nav-subitem::before {
  width: 6px !important;
  height: 6px !important;
  margin-right: 2px !important;
  background: #C7CDD4 !important;
}

.nav-group-items > .nav-subitem:hover {
  background: #F8FAFC !important;
  color: #374151 !important;
}

.nav-group-items > .nav-subitem.active {
  background: linear-gradient(90deg, #ECFDF5 0%, #F8FFFB 100%) !important;
  color: #065F46 !important;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.18), 0 1px 4px rgba(6,95,70,0.06) !important;
}

body.dark .sidebar-nav > .nav-item {
  color: #F9FAFB !important;
}

body.dark .sidebar-nav > .nav-item.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.30) 0%, rgba(16,185,129,0.18) 100%) !important;
  color: #D1FAE5 !important;
  box-shadow: inset 0 0 0 1px rgba(110,231,183,0.16), 0 6px 14px rgba(0,0,0,0.20) !important;
  border-left: 3px solid #34D399 !important;
}

body.dark .sidebar-nav > .nav-item.parent-active,
body.dark .nav-group-items > .nav-item.parent-active {
  background: linear-gradient(90deg, rgba(52,211,153,0.26) 0%, rgba(16,185,129,0.12) 100%) !important;
  color: #D1FAE5 !important;
  box-shadow: inset 0 0 0 1px rgba(110,231,183,0.20), 0 4px 10px rgba(0,0,0,0.18) !important;
  border-left: 3px solid #6EE7B7 !important;
}

body.dark .nav-group {
  margin-top: 10px !important;
}

body.dark .nav-group-header {
  background: rgba(255,255,255,0.02) !important;
  border: 1px solid rgba(255,255,255,0.04) !important;
}

body.dark .nav-group.open > .nav-group-header {
  background: rgba(16,185,129,0.08) !important;
  border-color: rgba(16,185,129,0.18) !important;
}

body.dark .nav-group-items {
  border-left: 1px solid rgba(255,255,255,0.10) !important;
}

body.dark .nav-group-items > .nav-item {
  background: rgba(255,255,255,0.02) !important;
  color: #E5E7EB !important;
  margin: 3px 0 !important;
}

body.dark .nav-group-items > .nav-item:hover {
  background: rgba(255,255,255,0.07) !important;
  color: #FFFFFF !important;
}

body.dark .nav-group-items > .nav-item.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.28) 0%, rgba(16,185,129,0.14) 100%) !important;
  color: #A7F3D0 !important;
  border-left: 3px solid #34D399 !important;
  box-shadow: inset 0 0 0 1px rgba(110,231,183,0.14), 0 4px 10px rgba(0,0,0,0.18) !important;
}

body.dark .sidebar-nav > .nav-item.parent-active svg,
body.dark .sidebar-nav > .nav-item.parent-active i,
body.dark .nav-group-items > .nav-item.parent-active svg,
body.dark .nav-group-items > .nav-item.parent-active i {
  color: #A7F3D0 !important;
}

body.dark .nav-group-items > .nav-subitem {
  color: #AEB7C3 !important;
  background: transparent !important;
}

body.dark .nav-group-items > .nav-subitem::before {
  background: rgba(255,255,255,0.30) !important;
}

body.dark .nav-group-items > .nav-subitem:hover {
  background: rgba(255,255,255,0.06) !important;
  color: #FFFFFF !important;
}

body.dark .nav-group-items > .nav-subitem.active {
  background: linear-gradient(90deg, rgba(16,185,129,0.20) 0%, rgba(16,185,129,0.08) 100%) !important;
  color: #A7F3D0 !important;
  box-shadow: inset 0 0 0 1px rgba(16,185,129,0.22), 0 2px 8px rgba(0,0,0,0.12) !important;
}

/* ═══ LITE TABLE STYLE — terinspirasi referensi ═══ */

/* Table border: hanya baris bawah, sangat tipis */
.data-table tbody tr,
table.belum-bayar-table tbody tr {
  border-bottom: 0.5px solid #F3F4F6 !important;
  transition: background 0.1s;
}
.data-table tbody tr:last-child,
table.belum-bayar-table tbody tr:last-child {
  border-bottom: none !important;
}

/* TD padding consistent */
.data-table tbody td { padding: 10px 12px !important; }

/* TH lighter weight */
.data-table thead th {
  padding: 8px 12px !important;
  font-weight: 500 !important;
  color: #9CA3AF !important;
  font-size: 11px !important;
  background: #FAFAFA !important;
  border-bottom: 0.5px solid #F3F4F6 !important;
}

/* Row hover: very subtle green tint */
.data-table tbody tr:hover,
table tbody tr:hover {
  background: #FAFFFE !important;
}

/* Status badge consistent */
.badge-danger  { background: #FEE2E2 !important; color: #991B1B !important; }
.badge-warning { background: #FEF3C7 !important; color: #92400E !important; }
.badge-success { background: #DCFCE7 !important; color: #166534 !important; }

/* ═══ FORCE LITE TABLE HEADERS — override all inline dark headers ═══ */
table thead th,
.data-table thead th,
table th {
  background: #FAFAFA !important;
  color: #9CA3AF !important;
  font-weight: 500 !important;
  font-size: 11px !important;
  padding: 8px 12px !important;
  border-bottom: 0.5px solid #F3F4F6 !important;
  text-transform: none !important;
}

/* Force row borders lite */
table tbody tr,
.data-table tbody tr {
  border-bottom: 0.5px solid #F3F4F6 !important;
}
table tbody tr:last-child,
.data-table tbody tr:last-child {
  border-bottom: none !important;
}
table tbody tr:hover,
.data-table tbody tr:hover {
  background: #FAFFFE !important;
}

/* Keep dark mode headers different */
body.dark table thead th,
body.dark .data-table thead th {
  background: #27303F !important;
  color: rgba(255,255,255,0.40) !important;
  border-bottom: 0.5px solid rgba(255,255,255,0.06) !important;
}

/* Dark mode: confirmation dialog */
body.dark #confirmDialog {
  background: #1f2937 !important;
}

body.dark #confirmTitle {
  color: #f9fafb !important;
}

body.dark #confirmMessage {
  color: #d1d5db !important;
}
