﻿/* ============================================================
   KELASIK SMAN 3 TBT - Tema Play Admin (dark sidebar, ungu)
   Semua nama class lama dipertahankan agar tidak merusak halaman.
   ============================================================ */
:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef0ff;
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --purple: #8b5cf6;
  --purple-bright: #a855f7;
  --indigo: #4f46e5;
  --grad: linear-gradient(135deg, #4f46e5 0%, #8b5cf6 100%);
  --grad-soft: linear-gradient(135deg, #1f1b4b 0%, #3b2f7a 100%);
  --sidebar-text: #cbd2f7;
  --sidebar-title: #ffffff;
  --bg: #f4f6fb;
  --card: #ffffff;
  --border: #e9edf6;
  --text: #2a2f45;
  --muted: #6b7280;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --info: #0891b2;
  --secondary: #6d28d9;
  --shadow-card: 0 2px 8px rgba(20, 23, 60, .06);
  --shadow-pop: 0 12px 28px rgba(20, 23, 60, .18);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* ============ Layout & Sidebar ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px;
  background: var(--grad-soft);
  color: var(--sidebar-text);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.brand {
  padding: 18px 18px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  display: flex; align-items: center; gap: 11px;
}
.brand img { width: 42px; height: 42px; border-radius: 10px; background: #fff; padding: 4px; }
.brand-text { line-height: 1.2; min-width: 0; }
.brand-title { font-weight: 700; font-size: 14px; color: var(--sidebar-title); letter-spacing: .3px; }
.brand-sub { font-size: 10px; color: #b4bdec; margin-top: 2px; }
.nav { padding: 8px 0 20px; overflow-y: auto; flex: 1; }
.nav::-webkit-scrollbar { width: 6px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 4px; }
.nav-head {
  display: flex; align-items: center; gap: 8px; width: fit-content;
  font: inherit; background: none; border: 0; cursor: pointer; text-align: left;
  font-size: 13.5px; text-transform: none; letter-spacing: .3px;
  color: var(--sidebar-text); padding: 9px 18px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.nav-head:hover { background: rgba(255,255,255,.10); color: #fff; }
.nav-caret { margin-left: auto; display: block; flex-shrink: 0; }
.nav-group .nav-items { display: none; }
.nav-group.open .nav-items { display: block; }
.nav-caret::before {
  content: ''; display: block; width: 7px; height: 7px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform .2s;
}
.nav-group.open .nav-head .nav-caret::before { transform: rotate(225deg); }
.nav-group .nav-items .nav-link { padding-left: 32px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; width: fit-content;
  padding: 9px 18px; color: var(--sidebar-text);
  text-decoration: none; font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.nav-link::before {
  content: ''; width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0;
  background: rgba(165, 180, 252, .45);
}
.nav-link:hover { background: rgba(255, 255, 255, .10); color: #fff; }
.nav-link:hover::before { background: #c7d2fe; }
.nav-link.active { background: rgba(255, 255, 255, .16); color: #fff; border-left-color: #fff; }
.nav-link.active::before { background: #fff; }
.nav-link.danger { color: #fca5a5; }
.nav-link.danger::before { background: rgba(252, 165, 165, .55); }
.nav-link.danger:hover { background: rgba(239, 68, 68, .18); color: #fff; }
.nav-link.danger:hover::before { background: #fca5a5; }

/* ============ Topbar ============ */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  background: var(--card); border-bottom: 1px solid var(--border);
  padding: 12px 24px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 1px 3px rgba(20, 23, 60, .04);
  position: sticky; top: 0; z-index: 100;
}
.topbar-title { font-size: 17px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topbar-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .35);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; }
.user-name { font-weight: 600; color: var(--text); }
.user-role { font-size: 11px; color: var(--muted); text-transform: capitalize; }
.content { padding: 24px; flex: 1; }
.footer { padding: 12px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--border); background: var(--card); }

/* ============ Card & Statistik ============ */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 20px; margin-bottom: 18px; box-shadow: var(--shadow-card);
}
.card-title {
  margin: 0 0 14px; font-size: 15px; font-weight: 700;
  padding-left: 10px; border-left: 3px solid var(--purple);
}

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 18px; border-top: 3px solid var(--purple);
  box-shadow: var(--shadow-card); transition: transform .15s, box-shadow .15s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.stat .num { font-size: 26px; font-weight: 800; color: var(--indigo); line-height: 1.15; }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.stat-grid .stat { flex: 1; min-width: 120px; text-align: center; border-top-color: var(--indigo); }
.stat-grid .stat-n { display: block; font-size: 24px; font-weight: 800; color: var(--indigo); line-height: 1.2; }

/* ============ Tabel ============ */
table.tbl { width: 100%; border-collapse: collapse; background: var(--card); }
.tbl th, .tbl td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; font-size: 13px; }
.tbl th { background: #f7f8fd; font-weight: 600; color: #3f4a6b; }
.tbl tr:hover td { background: #fafaff; }

/* ============ Riwayat kehadiran (mobile-friendly) ============ */
.riwayat { display: flex; flex-direction: column; gap: 8px; }
.riwayat-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 13px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--card);
}
.riwayat-item .riwayat-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.riwayat-item .riwayat-main strong { font-size: 14px; }
.riwayat-item .riwayat-main .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============ Forum Diskusi LMS ============ */
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.komentar { display: flex; flex-direction: column; gap: 10px; }
.komentar-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.komentar-item .komentar-main { min-width: 0; flex: 1; }
.komentar-item .komentar-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.komentar-item .komentar-head strong { font-size: 13.5px; }
.komentar-item .komentar-head .badge { font-size: 10px; }
.komentar-item .komentar-waktu { font-size: 11.5px; color: var(--muted); }
.komentar-item .komentar-isi {
  font-size: 13.5px; line-height: 1.65; margin-top: 5px;
  white-space: pre-wrap; word-break: break-word; color: var(--text);
}
.komentar-item .btn { flex-shrink: 0; }
.forum-form { margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--border); }



/* ============ Tombol ============ */
.btn {
  display: inline-block; border: none; border-radius: 8px; cursor: pointer;
  font-size: 13px; padding: 8px 14px; text-decoration: none; font-family: inherit;
  background: var(--primary); color: #fff;
  box-shadow: 0 2px 6px rgba(79, 70, 229, .28);
  transition: background .15s, filter .15s, transform .1s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: translateY(1px); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #b91c1c); box-shadow: none; }
.btn-success { background: linear-gradient(135deg, #22c55e, #15803d); box-shadow: none; }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #b45309); box-shadow: none; }
.btn-secondary { background: linear-gradient(135deg, #a78bfa, #7c3aed); box-shadow: none; }
.btn-outline { background: transparent; color: var(--indigo); border: 1px solid #c7cbf5; box-shadow: none; }
.btn-outline:hover { background: var(--primary-soft); filter: none; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* ============ Form ============ */
form.form label { display: block; font-weight: 600; margin: 12px 0 4px; font-size: 13px; color: #3f4a6b; }
form.form input[type=text], form.form input[type=password], form.form input[type=date],
form.form input[type=time], form.form input[type=number], form.form select, form.form textarea {
  width: 100%; max-width: 460px; padding: 8px 10px; border: 1px solid #d9def2;
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
form.form input:focus, form.form select:focus, form.form textarea:focus {
  outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .16);
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row > div { flex: 1; min-width: 200px; }
form.form .btn { margin-top: 16px; }

/* ============ Alert & Badge ============ */
.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-danger  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info    { background: #eef2ff; color: #4338ca; border: 1px solid #c7d2fe; }

.badge { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12px; color: #fff; font-weight: 600; }
.badge-success { background: var(--success); }
.badge-danger  { background: var(--danger); }
.badge-warning { background: var(--warning); }
.badge-info    { background: var(--info); }
.badge-secondary { background: var(--secondary); }

/* ============ Toolbar ============ */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar select, .toolbar input, .filters select, .filters input {
  padding: 7px 10px; border: 1px solid #d9def2; border-radius: 8px; font-size: 13px; background: #fff;
}

.muted { color: var(--muted); font-size: 13px; }
.pull-right { float: right; }

/* ============ Modal profil ============ */
.modal {
  position: fixed; inset: 0; z-index: 9998; display: flex;
  align-items: center; justify-content: center; background: rgba(20, 23, 60, .55);
  padding: 20px;
}
.modal-box {
  background: #fff; border-radius: 14px; max-width: 520px; width: 100%;
  max-height: 85vh; overflow-y: auto; padding: 20px; box-shadow: var(--shadow-pop);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-head h3 { margin: 0; color: var(--indigo); }
.tbl.profil th { width: 180px; background: #f7f8fd; font-weight: 600; }
.tbl.profil td { white-space: pre-wrap; word-break: break-word; }

/* ============ Scanner ============ */
#cam, #video { width: 100%; max-width: 480px; border-radius: 10px; background: #000; }
#video { display: block; }
.scan-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 18px; align-items: start; }
.scan-cam video { width: 100%; max-width: 480px; }
.scan-status { margin: 10px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.scan-hasil { max-height: 480px; overflow-y: auto; }
.log-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); font-size: 13px; }
.log-item:last-child { border-bottom: none; }
.log-ok { background: #f0fdf4; }
.log-fail { background: #fef2f2; }
.log-dup { background: #fefce8; }
.log-status { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 8px; color: #fff; flex-shrink: 0; }
.log-hadir { background: var(--success); }
.log-telat { background: var(--warning); }
.log-sudah { background: #f59e0b; }
.log-fail .log-status { background: var(--danger); }
.log-jam { margin-left: auto; font-weight: 700; color: var(--indigo); }
.toast {
  position: fixed; top: 68px; right: 16px; z-index: 9999; max-width: 320px;
  padding: 10px 16px; border-radius: 10px; color: #fff; font-size: 13px; font-weight: 700;
  box-shadow: var(--shadow-pop); pointer-events: none;
  opacity: 0; transform: translateY(-8px); transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-warning { background: #f59e0b; }
.toast-danger { background: #dc2626; }

/* Toast global (stack) */
.toast-stack {
  position: fixed; top: 68px; right: 16px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px; max-width: 340px;
  pointer-events: none;
}
.toast-stack .toast { position: static; margin: 0; }
.toast-success { background: #16a34a; }
.toast-info { background: var(--indigo); }
.toast-stack .toast.show { animation: toast-in .25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
body.dark .toast-stack .toast { box-shadow: 0 12px 28px rgba(0,0,0,.45); }
.status-form select { padding: 3px 6px; border: 1px solid #d9def2; border-radius: 6px; font-size: 11px; margin-left: 6px; }
@media (max-width: 900px) { .scan-wrap { grid-template-columns: 1fr; } }
.scan-result { margin-top: 14px; padding: 14px; border-radius: 10px; font-weight: 600; text-align: center; font-size: 15px; }
.scan-ok { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.scan-dup { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.scan-err { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.scan-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.scan-list table { margin: 0; }

/* ============ Login ============ */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #17123a 0%, #3b2f7a 55%, #6d28d9 100%);
  padding: 20px; position: relative; overflow: hidden;
}
.login-wrap::before {
  content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, .05); top: -120px; right: -120px;
}
.login-wrap::after {
  content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%;
  background: rgba(255, 255, 255, .04); bottom: -110px; left: -110px;
}
.login-card {
  background: #fff; border-radius: 18px; padding: 34px; width: 100%; max-width: 380px;
  box-shadow: 0 24px 50px rgba(10, 8, 40, .4); position: relative; z-index: 1;
}
.login-card .logo {
  width: 90px; height: 90px; margin: 0 auto 10px; display: block;
  border-radius: 18px; background: #fff; padding: 6px; box-shadow: 0 6px 14px rgba(79, 70, 229, .25);
}
.setting-logo { width: 72px; height: 72px; object-fit: contain; display: block; margin: 6px 0; background: #fff; padding: 4px; border: 1px solid #e9edf6; border-radius: 10px; }
.login-card h1 { text-align: center; font-size: 18px; margin: 8px 0 2px; color: var(--indigo); }
.login-card .sub { text-align: center; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.login-card input[type=text], .login-card input[type=password] {
  width: 100%; padding: 10px 12px; border: 1px solid #d9def2; border-radius: 10px;
  font-size: 14px; margin-bottom: 12px; transition: border-color .15s, box-shadow .15s;
}
.login-card input:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, .16); }
.login-card .btn { width: 100%; padding: 11px; font-size: 15px; border-radius: 10px; }
.login-hint { text-align: center; font-size: 11px; color: var(--muted); margin-top: 14px; }

/* ============ Kartu cetak (portrait 54 x 85.6 mm) ============
   Susunan: [foto guru], identitas, bingkai QR. Background opsional
   (upload lewat tombol "Upload Background" di halaman cetak). */
.kartu-grid { display: grid; grid-template-columns: repeat(auto-fill, 54mm); gap: 3mm 5mm; justify-content: start; }
.kartu {
  width: 54mm; height: 85.6mm; box-sizing: border-box;
  border: 1px solid #c7bff5; border-radius: 3mm;
  padding: 1.5mm 3mm; background: #fff;
  background-size: cover; background-position: center;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; position: relative; overflow: hidden;
  page-break-inside: avoid; break-inside: avoid;
}
.kartu .k-foto { width: 22mm; height: 28mm; border-radius: 10px; border: 1px solid #e9edf6; flex: 0 0 auto; margin-top: auto; background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.kartu .k-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kartu .k-id { width: 100%; margin-top: auto; }
.kartu.kartu-guru .k-id { margin-top: 1mm; }
.kartu .k-nama { font-weight: 800; font-size: 12px; line-height: 1.25; color: #1e293b; text-transform: uppercase; text-decoration: underline; text-underline-offset: 1.5px; }
.kartu .k-info { font-size: 10px; font-weight: 700; line-height: 1.4; color: #334155; text-transform: uppercase; margin-top: 0.5mm; overflow: hidden; }
.kartu .k-alamat { white-space: normal; }
.kartu .k-qrbox { margin-top: 2mm; border: 0.6pt solid #94a3b8; border-radius: 2.5mm; padding: 1.5mm 2mm; display: flex; align-items: center; justify-content: center; background: #fff; }
.kartu .k-qr { flex: 0 0 auto; }
.kartu .k-qr img { width: 18mm; height: 18mm; image-rendering: pixelated; display: block; }
.kartu.kartu-siswa .k-qr img { width: 26mm; height: 26mm; }
.kartu .k-logo { margin-bottom: 1mm; }
.kartu .k-logo img { width: 8mm; height: 8mm; object-fit: contain; display: block; }
.kartu-grid.no-foto .k-foto { display: none; }
.kartu-grid.no-nip .k-info-nip { display: none; }
.kartu-grid.no-jabatan .k-info-jabatan { display: none; }
.kartu-grid.no-nisn .k-info-nisn { display: none; }
.kartu-grid.no-alamat .k-info-alamat { display: none; }
.kartu-grid.no-logo .k-logo { display: none; }
.checkbox-inline { display: inline-flex; align-items: center; gap: 4px; margin-right: 14px; font-size: 13px; color: #334155; }
body.dark .checkbox-inline { color: #cbd5e1; }

@media print {
  @page { size: A4 portrait; margin: 10mm; }
  html, body { background: #fff !important; }
  .sidebar, .topbar, .footer, .no-print { display: none !important; }
  .layout { display: block; }
  .main { display: block; }
  .content { padding: 0 !important; }
  .card { box-shadow: none !important; border: 1px solid #ccc !important; }
  .tbl { border: 1px solid #999; }
  .print-only { display: block !important; text-align: center; margin-bottom: 10px; }
  .kartu-grid { grid-template-columns: repeat(3, 54mm); gap: 3mm; }
  .kartu { border: 0.4pt solid #888; border-radius: 2.5mm; box-shadow: none; page-break-inside: avoid; }
}
.print-only { display: none; }
.print-only h2 { margin: 0 0 4px; font-size: 20px; }
.print-only h3 { margin: 0 0 4px; font-size: 16px; }
.print-only p { margin: 0 0 8px; color: #333; }

/* ============ Responsif ============ */
@media (max-width: 860px) {
  .layout { display: block; }
  /* Sidebar jadi drawer yang tersembunyi, dibuka via tombol hamburger */
  .sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 300;
    width: 272px; height: 100vh; height: 100dvh;
    transform: translateX(-106%); transition: transform .25s ease;
    box-shadow: 0 0 42px rgba(10, 6, 45, .38);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed; inset: 0; z-index: 290;
    background: rgba(12, 8, 48, .48);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; position: sticky; top: 0; }
  .topbar-user { flex-wrap: wrap; }
  /* Netralkan mode "collapsed" desktop bila tersisa saat ukuran HP */
  .sidebar-collapsed .sidebar { width: 272px; }
  .sidebar-collapsed .brand { justify-content: flex-start; padding: 18px 18px 14px; }
  .sidebar-collapsed .brand-text { display: block; }
  .sidebar-collapsed .nav-head { text-align: left; padding: 9px 18px; font-size: 13.5px; }
  .sidebar-collapsed .nav-head::after { display: none; }
  .sidebar-collapsed .nav-caret { display: block; }
  .sidebar-collapsed .nav-group .nav-items { display: none; }
  .sidebar-collapsed .nav-group.open .nav-items { display: block; }
  .sidebar-collapsed .nav-link { justify-content: flex-start; padding: 9px 18px; gap: 12px; font-size: 13.5px; }
  .sidebar-collapsed .nav-link::before { width: 9px; height: 9px; border-radius: 3px; }
  .sidebar-collapsed .nav-group .nav-items .nav-link { padding-left: 32px; }
  .sidebar-collapsed .main .topbar-title { font-size: inherit; }
}

/* ============ Website publik ============ */
body.web { background: #f4f6fb; }
.web-container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.web-header {
  background: var(--grad-soft); color: #fff;
  box-shadow: 0 3px 12px rgba(20, 16, 70, .25);
  position: sticky; top: 0; z-index: 100;
}
.web-navbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 14px; padding-bottom: 14px; }
.web-brand { display: flex; align-items: center; gap: 12px; }
.web-brand img { width: 46px; height: 46px; border-radius: 12px; background: #fff; padding: 4px; }
.web-brand-name { font-weight: 800; font-size: 17px; }
.web-brand-sub { font-size: 11px; color: #b4bdec; }
.web-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.web-nav a { color: #e7e9fb; text-decoration: none; padding: 8px 14px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.web-nav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.web-nav a.active { background: rgba(255, 255, 255, .20); color: #fff; }
.web-nav a.web-login-btn { background: #fff; color: var(--indigo); box-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.web-nav a.web-login-btn:hover { filter: brightness(.96); }
.web-hero { background: var(--grad); color: #fff; padding: 64px 20px; text-align: center; border-radius: 0 0 28px 28px; box-shadow: 0 6px 20px rgba(79, 70, 229, .3); }
.web-hero-inner { max-width: 760px; margin: 0 auto; }
.web-hero h1 { margin: 0 0 12px; font-size: 30px; }
.web-hero p { margin: 0 0 22px; font-size: 16px; color: #eef2ff; }
.web-content { padding: 28px 20px 40px; }
.web-card { background: #fff; border: 1px solid #e9edf6; border-radius: 14px; padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.web-title { color: var(--indigo); font-size: 19px; margin: 0 0 14px; border-left: 4px solid var(--purple); padding-left: 12px; }
.web-quote { font-size: 15px; color: var(--text); font-style: italic; }
.web-justify { text-align: justify; }
.web-grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.web-news-item { border: 1px solid #e9edf6; border-radius: 12px; padding: 16px; background: #fbfbff; transition: transform .15s, box-shadow .15s; }
.web-news-item:hover { transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.web-news-item h3 { margin: 6px 0 8px; font-size: 15px; }
.web-news-item h3 a { color: var(--indigo); text-decoration: none; }
.web-news-item h3 a:hover { text-decoration: underline; }
.web-news-item p { margin: 0; color: #475569; font-size: 13px; }
.web-news-date { font-size: 12px; color: var(--purple); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.web-list-item { border-bottom: 1px solid #e9edf6; padding: 14px 0; }
.web-list-item:last-child { border: none; }
.web-list-item h3 { margin: 6px 0 6px; font-size: 17px; }
.web-list-item h3 a { color: var(--indigo); text-decoration: none; }
.web-list-item h3 a:hover { text-decoration: underline; }
.web-list-item p { margin: 0; color: #475569; }
.web-profil-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.web-profil-item { border: 1px solid #e9edf6; border-radius: 10px; padding: 12px 14px; background: #fbfbff; }
.web-profil-item span { display: block; font-size: 11px; text-transform: uppercase; color: var(--purple); font-weight: 700; margin-bottom: 4px; }
.web-profil-item strong { font-size: 14px; }
.web-footer { background: #16123a; color: #cbd5e1; margin-top: 20px; }
.web-footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; padding-top: 34px; padding-bottom: 26px; }
.web-footer h4 { color: #fff; margin: 0 0 10px; }
.web-footer p { margin: 0; font-size: 13px; line-height: 1.7; }
.web-sosmed a { display: inline-block; margin-right: 12px; color: #a5b4fc; text-decoration: none; }
.web-sosmed a:hover { color: #fff; }
.web-copy { border-top: 1px solid rgba(255, 255, 255, .12); padding: 14px 0; text-align: center; font-size: 12px; color: #94a3b8; }

/* ============ Web: topbar ============ */
.web-top { background: #141033; color: #c7cef5; font-size: 12.5px; }
.web-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.web-top-contact { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.web-top-item { display: inline-flex; align-items: center; gap: 6px; }
.web-top-item svg { width: 14px; height: 14px; color: #a5b4fc; }
.web-top-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.web-search { display: flex; }
.web-search input {
  border: 1px solid rgba(255, 255, 255, .2); border-right: 0; background: rgba(255, 255, 255, .08);
  color: #fff; border-radius: 999px 0 0 999px; padding: 5px 14px; font-size: 12.5px; outline: none; width: 190px;
}
.web-search input::placeholder { color: #9aa5d8; }
.web-search button {
  border: 1px solid rgba(255, 255, 255, .2); border-left: 0; background: rgba(255, 255, 255, .12); color: #fff;
  border-radius: 0 999px 999px 0; padding: 0 12px; cursor: pointer; display: flex; align-items: center;
}
.web-search button:hover { background: rgba(255, 255, 255, .2); }
.web-search button svg { width: 15px; height: 15px; }
.web-sosmed-top { display: flex; gap: 4px; }
.web-sosmed-top a { color: #c7cef5; padding: 5px; border-radius: 8px; display: flex; }
.web-sosmed-top a:hover { color: #fff; background: rgba(255, 255, 255, .12); }
.web-sosmed-top svg { width: 16px; height: 16px; }

/* ============ Web: slider hero ============ */
.web-slider {
  position: relative; height: 400px; overflow: hidden; border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 20px rgba(20, 16, 70, .25); margin-bottom: 22px;
}
.web-slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease;
  background-size: cover; background-position: center; display: flex; align-items: center;
}
.web-slide.active { opacity: 1; }
.web-slide-inner { max-width: 640px; padding: 0 40px; color: #fff; }
.web-slide-kicker {
  display: inline-block; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .3);
  padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; margin-bottom: 12px;
}
.web-slide h2 { margin: 0 0 10px; font-size: 34px; line-height: 1.2; }
.web-slide p { margin: 0 0 20px; font-size: 15px; color: #eef2ff; max-width: 560px; }
.web-slide .btn { background: #fff; color: var(--indigo); font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.web-slide .btn:hover { filter: brightness(.96); }
.web-slide-btn {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, .16);
  color: #fff; border: 1px solid rgba(255, 255, 255, .3); width: 40px; height: 40px; border-radius: 50%;
  cursor: pointer; font-size: 15px; display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.web-slide-btn:hover { background: rgba(255, 255, 255, .3); }
.web-slide-btn.prev { left: 16px; }
.web-slide-btn.next { right: 16px; }
.web-slide-dots { position: absolute; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; gap: 8px; }
.web-slide-dots span {
  width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .45); cursor: pointer;
  transition: background .15s, transform .15s;
}
.web-slide-dots span.active { background: #fff; transform: scale(1.25); }

/* ============ Web: banner halaman ============ */
.web-page-hero { background: var(--grad); color: #fff; border-radius: 16px; padding: 34px 26px; margin: 0 0 22px; box-shadow: 0 6px 20px rgba(79, 70, 229, .3); }
.web-page-hero h1 { margin: 0 0 6px; font-size: 26px; }
.web-page-hero p { margin: 0; color: #eef2ff; font-size: 14px; }

/* ============ Web: layout beranda ============ */
.web-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.web-news-list { display: flex; flex-direction: column; }
.web-news-block { border-bottom: 1px solid #e9edf6; padding: 16px 0; }
.web-news-block:first-child { padding-top: 0; }
.web-news-block:last-child { border-bottom: 0; padding-bottom: 0; }
.web-news-block h3 { margin: 6px 0 8px; font-size: 17px; }
.web-news-block h3 a { color: var(--indigo); text-decoration: none; }
.web-news-block h3 a:hover { text-decoration: underline; }
.web-news-block p { margin: 0 0 6px; color: #475569; }
.web-more { color: var(--purple); font-weight: 700; font-size: 13px; text-decoration: none; }
.web-more:hover { text-decoration: underline; }

/* ============ Web: sambutan ============ */
.web-sambutan { text-align: center; position: sticky; top: 16px; }
.web-sambutan-foto img {
  width: 120px; height: 120px; object-fit: cover; border-radius: 50%;
  border: 4px solid var(--primary-soft); box-shadow: var(--shadow-card); margin-bottom: 12px;
}
.web-sambutan-nama { display: block; font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 2px; }
.web-sambutan-isi { font-size: 13.5px; color: #475569; line-height: 1.7; margin: 10px 0 0; text-align: justify; }
.web-sambutan .web-more { display: inline-block; margin-top: 10px; }

/* ============ Web: link penting & lain-lain ============ */
.web-links-row { display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap; }
.web-links-row a { opacity: .75; transition: opacity .15s, transform .15s; display: flex; }
.web-links-row a:hover { opacity: 1; transform: translateY(-2px); }
.web-links-row img { height: 54px; width: auto; }
.web-school-badge { align-items: center; gap: 14px; padding: 14px 26px; border: 1px solid #e9edf6; border-radius: 14px; background: #fbfbff; }
.web-school-badge img { height: 64px !important; width: auto; border-radius: 10px; background: #fff; padding: 4px; border: 1px solid #e9edf6; }
.web-school-badge span { font-size: 16px; font-weight: 800; color: var(--indigo); }
.web-cari { display: flex; gap: 10px; margin: 0; }
.web-cari input { flex: 1; border: 1px solid #d9def2; border-radius: 10px; padding: 9px 14px; font-size: 14px; outline: none; }
.web-cari input:focus { border-color: var(--indigo); }
.web-artikel { font-size: 15px; line-height: 1.85; }
.web-footer-brand { margin-bottom: 12px; }
.web-footer-brand .web-brand-sub { color: #b4bdec; }
.web-footer-links { list-style: none; margin: 0; padding: 0; }
.web-footer-links li { margin-bottom: 8px; }
.web-footer-links a { color: #cbd5e1; text-decoration: none; }
.web-footer-links a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 900px) {
  .web-layout { grid-template-columns: 1fr; }
  .web-sambutan { position: static; }
  .web-slider { height: 340px; }
  .web-slide h2 { font-size: 26px; }
}

@media (max-width: 720px) {
  .web-navbar { flex-direction: column; align-items: flex-start; }
  .web-hero h1 { font-size: 24px; }
  .web-topbar { flex-direction: column; align-items: flex-start; }
  .web-search { width: 100%; }
  .web-search input { flex: 1; width: auto; }
  .web-slider { height: 300px; }
  .web-slide-inner { padding: 0 24px; }
  .web-slide-btn { display: none; }
}

/* ============ Berkas & foto ============ */
.file-btn input[type=file] { display: none; }
.file-btn .btn { margin: 0; }
.foto-kecil { width: 42px; height: 52px; object-fit: cover; border-radius: 6px; border: 1px solid #e9edf6; }
.k-foto { width: 46px; height: 56px; object-fit: cover; border-radius: 6px; border: 1px solid #e9edf6; }

/* ============ Kuis ============ */
.list-soal { margin: 10px 0 0; padding-left: 22px; }
.list-soal > li { margin-bottom: 18px; padding: 14px 16px; border: 1px solid #e9edf6; border-radius: 10px; background: #fafbfc; }
.soal-teks { font-size: 15px; line-height: 1.5; }
.soal-opsi { list-style: none; margin: 10px 0 0; padding: 0; }
.soal-opsi > li { padding: 7px 10px; margin-bottom: 5px; border: 1px solid #e9edf6; border-radius: 8px; background: #fff; }
.soal-opsi > li.soal-benar { border-color: #22c55e; background: #f0fdf4; }
.soal-opsi > li.soal-salah { border-color: #ef4444; background: #fef2f2; }
.pilihan-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.pilihan-label input { margin-top: 3px; }
.soal-aksi { margin-top: 10px; display: flex; gap: 6px; }

/* ============ Grafik ============ */
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.chart-box { position: relative; height: 300px; }
.chart-note { font-size: 12px; color: #94a3b8; margin-top: 8px; }

/* ============ Komponen Play Admin ============ */
.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-title { min-width: 0; }

/* Tombol ikon */
.ico-btn {
  background: transparent; border: none; cursor: pointer; color: #4f566e;
  padding: 8px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  position: relative; transition: background .15s, color .15s;
}
.ico-btn:hover { background: var(--primary-soft); color: var(--indigo); }
.ico-btn svg { width: 20px; height: 20px; }
.ico-btn .count-badge {
  position: absolute; top: 2px; right: 2px; background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; border-radius: 999px; min-width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.avatar-btn { border-radius: 50%; }
.avatar-btn .avatar { width: 36px; height: 36px; font-size: 14px; }
.avatar-btn:hover { background: var(--primary-soft); }

/* Dropdown */
.drop-wrap { position: relative; }
.drop-panel {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-pop); opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: opacity .15s, transform .15s, visibility .15s;
  z-index: 500; overflow: hidden;
}
.drop-wrap.open .drop-panel { opacity: 1; visibility: visible; transform: none; }
.drop-head { padding: 12px 16px; font-weight: 700; font-size: 14px; border-bottom: 1px solid var(--border); display: flex; align-items: baseline; gap: 8px; }
.drop-head .user-role { font-size: 11px; color: var(--muted); font-weight: 500; text-transform: capitalize; }
.drop-item {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 16px;
  text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600;
  transition: background .12s;
}
.drop-item:hover { background: var(--primary-soft); }
.drop-item svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; color: var(--indigo); }
.drop-item span { display: block; min-width: 0; }
.drop-item small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
.drop-item.danger { color: var(--danger); }
.drop-item.danger svg { color: var(--danger); }
.drop-empty { padding: 18px 16px; color: var(--muted); font-size: 13px; text-align: center; }

/* Sidebar collapsible */
.sidebar-collapsed .sidebar { width: 64px; }
.sidebar-collapsed .brand { justify-content: center; padding: 18px 8px 14px; }
.sidebar-collapsed .brand-text { display: none; }
.sidebar-collapsed .nav-head { text-align: center; padding: 14px 0 4px; font-size: 0; }
.sidebar-collapsed .nav-head::after { content: ''; display: block; width: 14px; height: 2px; background: rgba(255,255,255,.25); margin: 0 auto; border-radius: 2px; }
.sidebar-collapsed .nav-caret { display: none; }
.sidebar-collapsed .nav-group .nav-items { display: block; }
.sidebar-collapsed .nav-group .nav-items .nav-link { padding-left: 18px; }
.sidebar-collapsed .nav-link { justify-content: center; padding: 11px 0; gap: 0; font-size: 0; border-left: 3px solid transparent; }
.sidebar-collapsed .nav-link::before { width: 16px; height: 16px; border-radius: 5px; }
.sidebar-collapsed .nav-link.active { border-left-color: #fff; }
.sidebar-collapsed .main .topbar-title { font-size: 15px; }

/* Menu akordeon: tiap menu utama jadi dropdown di semua ukuran layar */

/* Preloader */
#preloader {
  position: fixed; inset: 0; z-index: 10000; background: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .3s, visibility .3s;
}
#preloader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
#preloader .spinner {
  width: 44px; height: 44px; border-radius: 50%;
  border: 4px solid #e5e7ff; border-top-color: var(--indigo);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Dark mode */
body.dark {
  --bg: #171a26; --card: #1f2435; --border: #2b3247; --text: #e6eaf5;
  --muted: #98a1b8; --primary-soft: #262c48; --shadow-card: 0 2px 8px rgba(0,0,0,.35);
}
body.dark .topbar, body.dark .footer, body.dark .web-card { background: var(--card); }
body.dark .topbar { border-color: var(--border); }
body.dark .ico-btn { color: #b6bdd2; }
body.dark .tbl th { background: #262c44; color: #cfd6ea; }
body.dark .tbl tr:hover td { background: #232940; }
body.dark form.form input, body.dark form.form select, body.dark form.form textarea,
body.dark .toolbar select, body.dark .toolbar input, body.dark .filters select, body.dark .filters input,
body.dark .status-form select {
  background: #171a26; color: var(--text); border-color: #38405c;
}
body.dark .alert-info { background: #262c48; color: #c7d2fe; border-color: #3b4470; }
body.dark .alert-success { background: #14332a; color: #6ee7b7; border-color: #14532d; }
body.dark .alert-danger { background: #3a1d1d; color: #fca5a5; border-color: #7f1d1d; }
body.dark .alert-warning { background: #3a2c12; color: #fcd34d; border-color: #78350f; }
body.dark .modal-box, body.dark .login-card { background: #1f2435; }
body.dark .modal-head h3, body.dark .login-card h1 { color: #c7d2fe; }
body.dark .login-card input { background: #171a26; color: var(--text); border-color: #38405c; }
body.dark .scan-list, body.dark .list-soal > li, body.dark .soal-opsi > li,
body.dark .web-news-item, body.dark .web-profil-item { background: #1a1f30; border-color: #2b3247; }
body.dark .web-news-item p, body.dark .web-list-item p, body.dark .soal-teks { color: #b6bdd2; }
body.dark .stat, body.dark .card { background: var(--card); border-color: var(--border); }
body.dark .drop-item { color: var(--text); }
body.dark .kartu { background: #fff; }

/* Kartu statistik ber-ikon (Play Admin icon-card) */
.stat-ic { display: flex; align-items: center; gap: 14px; border-top: 3px solid transparent; }
.stat-ic .stat-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-ic .stat-ico svg { width: 24px; height: 24px; }
.stat-ic .num { font-size: 22px; }
.ico-blue   { background: #e0edff; color: #2563eb; }
.ico-purple { background: #ede9fe; color: #7c3aed; }
.ico-indigo { background: #eef2ff; color: #4f46e5; }
.ico-cyan   { background: #cffafe; color: #0891b2; }
.ico-green  { background: #dcfce7; color: #16a34a; }
.ico-orange { background: #ffedd5; color: #ea580c; }
.ico-pink   { background: #fce7f3; color: #db2777; }
.ico-red    { background: #fee2e2; color: #dc2626; }
body.dark .ico-blue   { background: #1e3a5f; color: #93c5fd; }
body.dark .ico-purple { background: #3b2a63; color: #c4b5fd; }
body.dark .ico-indigo { background: #2a2f63; color: #a5b4fc; }
body.dark .ico-cyan   { background: #164e63; color: #67e8f9; }
body.dark .ico-green  { background: #14532d; color: #6ee7b7; }
body.dark .ico-orange { background: #7c2d12; color: #fdba74; }
body.dark .ico-pink   { background: #831843; color: #f9a8d4; }
body.dark .ico-red    { background: #7f1d1d; color: #fca5a5; }

/* ============ Pencarian header ============ */
.search-wrap { margin-left: auto; }
.search-box {
  display: flex; align-items: center; gap: 8px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 10px; padding: 7px 12px; width: 240px;
  color: var(--muted); transition: border-color .15s, box-shadow .15s;
}
.search-box svg { width: 17px; height: 17px; flex-shrink: 0; }
.search-box input { border: none; background: transparent; outline: none; font-size: 13px; color: var(--text); width: 100%; }
.search-box:focus-within { border-color: var(--indigo); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
.search-panel { left: 0; right: auto; min-width: 300px; }
@media (max-width: 860px) {
  .search-wrap { margin-left: 0; width: 100%; order: 3; }
  .search-box { width: 100%; }
}

/* ============ Breadcrumb & judul ============ */
.topbar-title { flex-direction: column; align-items: flex-start; gap: 3px; font-size: 15px; }
.crumb { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.crumb a { color: var(--indigo); text-decoration: none; font-weight: 600; }
.crumb a:hover { text-decoration: underline; }
.crumb .sep { color: #c3c8dd; }
.crumb .cur { color: var(--muted); font-weight: 600; }
.title-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 17px; font-weight: 700; color: var(--text); }
.title-main .badge { font-size: 10.5px; }

/* Avatar ber-foto */
.avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }

/* Badge kecil di menu sidebar */
.nav-badge { margin-left: auto; font-size: 9px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .5px; color: #fff; flex-shrink: 0; }
.nav-badge.new { background: #22c55e; }
.nav-badge.beta { background: #f59e0b; }

/* Sortir tabel */
table.sortable th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
table.sortable th[data-sort]:hover { color: var(--indigo); }
table.sortable th[data-sort]::after { content: ' ⇅'; font-size: 11px; opacity: .45; }
table.sortable th[data-sort][data-dir="asc"]::after { content: ' ▲'; opacity: 1; color: var(--indigo); }
table.sortable th[data-sort][data-dir="desc"]::after { content: ' ▼'; opacity: 1; color: var(--indigo); }

/* ============ Pagination ============ */
.pager { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.pager .pg-info { margin-right: auto; color: var(--muted); font-size: 12.5px; }
.pager a, .pager span {
  min-width: 32px; height: 32px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600;
  background: var(--card); transition: background .15s, color .15s;
}
.pager a:hover { background: var(--primary-soft); color: var(--indigo); }
.pager .pg-cur { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.pager .pg-dim { opacity: .45; pointer-events: none; }

/* ============ Empty state ============ */
.empty-state { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty-state .empty-ico {
  width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px;
  background: var(--primary-soft); color: var(--indigo);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .empty-ico svg { width: 28px; height: 28px; }
.empty-state .empty-title { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.empty-state .empty-sub { font-size: 13px; }

/* ============ Halaman Profil ============ */
.profil-grid { display: grid; grid-template-columns: 180px 1fr; gap: 24px; align-items: start; }
.profil-foto { display: flex; justify-content: center; }
.foto-profil { width: 150px; height: 150px; border-radius: 16px; object-fit: cover; border: 3px solid var(--border); background: #fff; }
.profil-tbl th { background: var(--primary-soft); color: var(--indigo); font-weight: 700; }
@media (max-width: 640px) {
  .profil-grid { grid-template-columns: 1fr; }
  .foto-profil { width: 120px; height: 120px; }
}

/* ============ Banner sambutan dashboard ============ */
.welcome {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--grad); color: #fff; border-radius: 16px; padding: 22px 26px; margin-bottom: 18px;
  box-shadow: 0 6px 20px rgba(79, 70, 229, .3);
}
.welcome-label { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; opacity: .8; margin-bottom: 4px; }
.welcome-title { margin: 0 0 6px; font-size: 22px; line-height: 1.25; }
.welcome-sub { margin: 0; font-size: 13px; color: #eef2ff; }
.welcome-right .btn { box-shadow: 0 2px 8px rgba(0, 0, 0, .18); display: inline-flex; align-items: center; gap: 8px; }
.welcome-right .btn svg { width: 17px; height: 17px; }

/* ============ Quick actions dashboard ============ */
.quick-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px;
}
.qa {
  display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--border); text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.qa svg { width: 22px; height: 22px; color: var(--indigo); margin-bottom: 6px; }
.qa:hover { transform: translateY(-2px); border-color: var(--indigo); box-shadow: var(--shadow-pop); }
.qa-t { font-weight: 700; font-size: 14px; }
.qa-s { font-size: 12px; color: var(--muted); }
