/* =====================================================
   SIABSEN — Sistem Absensi Sekolah
   Tema: DARK + LIME (Bold Mono)  ·  Responsive · Smooth
   ===================================================== */
:root {
  --primary: #C6FF3E;          /* lime accent */
  --primary-2: #a3e635;
  --primary-soft: rgba(198,255,62,.14);
  --on-accent: #0E0F12;        /* teks di atas lime */
  --accent: #7DD3FC;
  --ok: #4ADE80;
  --warn: #F59E0B;
  --danger: #FF6B6B;
  --ink: #F4F5F7;              /* teks terang */
  --muted: #7C818C;            /* teks abu */
  --line: #22242A;            /* border */
  --line-2: #2c2f37;
  --bg: #0E0F12;              /* background utama */
  --card: #17181C;           /* permukaan kartu */
  --card-2: #1d1f24;
  --radius: 20px;
  --shadow: 0 12px 40px -18px rgba(0,0,0,.7);
  --shadow-lg: 0 30px 70px -22px rgba(0,0,0,.8);
  --sidebar-w: 268px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-family: var(--font-display); letter-spacing:-.01em; }
::selection { background: var(--primary); color: var(--on-accent); }

/* Glow background (pengganti aurora) */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; background:var(--bg); }
.aurora span { position: absolute; border-radius: 50%; filter: blur(120px); opacity: .16; animation: float 20s ease-in-out infinite; }
.aurora span:nth-child(1){ width: 520px; height: 520px; background:#C6FF3E; top:-160px; left:-120px; }
.aurora span:nth-child(2){ width: 440px; height: 440px; background:#7DD3FC; bottom:-160px; right:-100px; animation-delay:-7s; opacity:.10; }
.aurora span:nth-child(3){ width: 380px; height: 380px; background:#a3e635; top:45%; left:60%; animation-delay:-13s; opacity:.08; }
@keyframes float { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(30px,-40px) scale(1.08)} }

/* ---------- AUTH / LOGIN ---------- */
.auth-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
}
.auth-card {
  width: 100%; max-width: 420px; background: var(--card);
  border: 1px solid var(--line);
  border-radius: 26px; padding: 42px 34px; box-shadow: var(--shadow-lg);
  animation: pop .5s cubic-bezier(.16,1,.3,1);
}
@keyframes pop { from{opacity:0; transform:translateY(18px) scale(.97)} to{opacity:1; transform:none} }
.auth-logo {
  width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px;
  display: grid; place-items: center; color:var(--on-accent); font-size: 30px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 30px -10px rgba(198,255,62,.5);
}
.auth-card h1 { font-size: 23px; text-align: center; color:var(--ink); }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 26px; font-size: 14px; }

/* ---------- FORM ---------- */
.field { margin-bottom: 16px; }
.field label { display:block; font-size: 13px; font-weight: 600; margin-bottom: 7px; color:#c3c7cf; }
.input, select, textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 12px; font-family: inherit; font-size: 14.5px; background:#111216;
  transition: border-color .2s, box-shadow .2s; color: var(--ink);
}
.input::placeholder, textarea::placeholder { color:#5b606b; }
.input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}
select option { background:#17181C; color:var(--ink); }
textarea { resize: vertical; min-height: 84px; }
input[type="date"], input[type="time"], input[type="month"], input[type="color"] { color-scheme: dark; }
.input-icon { position: relative; }
.input-icon .input { padding-left: 42px; }
.input-icon svg { position:absolute; left:13px; top:50%; transform:translateY(-50%); color:var(--muted); }

/* ---------- BUTTON ---------- */
.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 12px 20px; border:none; border-radius: 14px; cursor:pointer;
  font-family: inherit; font-weight: 700; font-size: 14.5px; color:var(--on-accent);
  background: var(--primary);
  box-shadow: 0 10px 24px -12px rgba(198,255,62,.6); transition: transform .15s, box-shadow .2s, filter .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(198,255,62,.55); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-block { width: 100%; }
.btn-ghost { background: var(--card-2); color: var(--ink); border:1.5px solid var(--line); box-shadow:none; }
.btn-ghost:hover { background:#24262c; border-color:var(--line-2); filter:none; }
.btn-danger { background: var(--danger); color:#2a0a0a; box-shadow:0 10px 22px -12px var(--danger); }
.btn-ok { background: var(--ok); color:#052e16; box-shadow:0 10px 22px -12px var(--ok); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-icon { padding: 9px; border-radius: 10px; }

/* ---------- LAYOUT ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; padding: 22px 16px;
  background: #101114; border-right: 1px solid var(--line);
  position: fixed; inset: 0 auto 0 0; z-index: 50; overflow-y: auto;
  transition: transform .32s cubic-bezier(.4,0,.2,1);
}
.brand { display:flex; align-items:center; gap:12px; padding: 6px 10px 20px; }
.brand-logo {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink:0; overflow:hidden;
  display:grid; place-items:center; color:var(--on-accent); font-weight:800; font-size:18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}
.brand-logo img { width:100%; height:100%; object-fit:cover; }
.brand-name { font-weight: 800; font-size: 15.5px; line-height:1.2; font-family:var(--font-display); }
.brand-name small { display:block; font-weight:500; font-size:11.5px; color:var(--muted); font-family:var(--font); }
.nav-group { font-size: 11px; text-transform: uppercase; letter-spacing:.08em; color:#565b66; margin: 16px 12px 6px; font-weight: 700; }
.nav a {
  display:flex; align-items:center; gap:12px; padding: 11px 14px; border-radius: 12px;
  color:#9aa0ab; font-weight: 600; font-size: 14.5px; margin-bottom: 3px;
  transition: background .2s, color .2s, transform .12s;
}
.nav a svg { flex-shrink:0; }
.nav a:hover { background: var(--primary-soft); color: var(--primary); transform: translateX(3px); }
.nav a.active { background: var(--primary); color:var(--on-accent); box-shadow: 0 12px 24px -14px rgba(198,255,62,.7); }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 40; display:flex; align-items:center; gap:14px;
  padding: 14px 24px; background: rgba(14,15,18,.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar h2 { font-size: 19px; color:var(--ink); }
.topbar .push { margin-left:auto; }
.hamburger { display:none; background:var(--card); border:1.5px solid var(--line); border-radius:10px; padding:9px; cursor:pointer; color:var(--ink); }
.user-chip { display:flex; align-items:center; gap:10px; background:var(--card); border:1px solid var(--line); padding: 6px 12px 6px 6px; border-radius: 40px; }
.user-chip .av { width:32px; height:32px; border-radius:50%; background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:var(--on-accent); display:grid; place-items:center; font-weight:800; font-size:13px; }
.user-chip strong { color:var(--ink); }
.user-chip small { color:var(--muted); font-size:12px; display:block; }
.content { padding: 26px 24px 60px; }

/* ---------- CARD ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.card-head { display:flex; align-items:center; gap:12px; margin-bottom: 18px; }
.card-head h3 { font-size: 16.5px; color:var(--ink); }
.card-head .push { margin-left:auto; }

/* ---------- STAT CARDS ---------- */
.stats { display:grid; grid-template-columns: repeat(4,1fr); gap: 18px; margin-bottom: 24px; }
.stat {
  background: var(--card); border-radius: var(--radius); padding: 20px; position:relative;
  overflow:hidden; box-shadow: var(--shadow); border:1px solid var(--line);
  transition: transform .2s, box-shadow .25s, border-color .2s;
}
.stat:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color:var(--line-2); }
.stat .ic { width:46px; height:46px; border-radius:14px; display:grid; place-items:center; color:var(--on-accent); margin-bottom: 14px; }
.stat .num { font-size: 32px; font-weight: 700; line-height:1; font-family:var(--font-display); color:var(--ink); }
.stat .lbl { color: var(--muted); font-size: 13.5px; margin-top: 6px; font-weight:600; }
.stat::after { content:''; position:absolute; right:-24px; top:-24px; width:90px; height:90px; border-radius:50%; background:currentColor; opacity:.06; }
.ic-blue{background:linear-gradient(135deg,#C6FF3E,#a3e635); color:#0E0F12} .c-blue{color:#C6FF3E}
.ic-green{background:linear-gradient(135deg,#4ADE80,#22c55e); color:#052e16} .c-green{color:#4ADE80}
.ic-amber{background:linear-gradient(135deg,#F59E0B,#d97706); color:#2a1900} .c-amber{color:#F59E0B}
.ic-red{background:linear-gradient(135deg,#FF6B6B,#ef4444); color:#2a0a0a} .c-red{color:#FF6B6B}
.ic-cyan{background:linear-gradient(135deg,#7DD3FC,#38bdf8); color:#04283a} .c-cyan{color:#7DD3FC}

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; }
table { width:100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
thead th { text-align:left; padding: 12px 14px; background:#101114; color:#8b909b; font-weight:700; font-size:12.5px; text-transform:uppercase; letter-spacing:.03em; border-bottom:1px solid var(--line); white-space:nowrap; }
tbody td { padding: 13px 14px; border-bottom:1px solid var(--line); vertical-align:middle; color:var(--ink); }
tbody tr { transition: background .15s; }
tbody tr:hover { background:#1c1e23; }
tbody tr:last-child td { border-bottom:none; }
.t-photo { width:38px; height:38px; border-radius:10px; object-fit:cover; background:var(--line); }
.t-av { width:38px; height:38px; border-radius:10px; display:grid; place-items:center; font-weight:700; color:var(--on-accent); font-size:14px; background:linear-gradient(135deg,var(--primary),var(--primary-2)); }

/* ---------- BADGE ---------- */
.badge { display:inline-flex; align-items:center; gap:5px; padding: 4px 11px; border-radius: 30px; font-size: 12px; font-weight: 700; }
.badge::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-hadir{ background:rgba(74,222,128,.15); color:#4ADE80; }
.badge-telat{ background:rgba(245,158,11,.15); color:#F59E0B; }
.badge-izin { background:rgba(125,211,252,.15); color:#7DD3FC; }
.badge-sakit{ background:rgba(167,139,250,.16); color:#c4b5fd; }
.badge-alpa { background:rgba(255,107,107,.15); color:#FF6B6B; }
.badge-aktif{ background:rgba(74,222,128,.15); color:#4ADE80; }
.badge-off  { background:#22242A; color:#8b909b; }

/* ---------- ALERT / FLASH ---------- */
.flash {
  position: fixed; top: 20px; right: 20px; z-index: 200; max-width: 340px;
  padding: 14px 18px; border-radius: 14px; color:var(--on-accent); font-weight:700; font-size:14px;
  box-shadow: var(--shadow-lg); animation: slideIn .4s cubic-bezier(.16,1,.3,1);
  display:flex; align-items:center; gap:10px;
}
@keyframes slideIn { from{opacity:0; transform:translateX(40px)} to{opacity:1; transform:none} }
.flash-success{ background:var(--ok); color:#052e16; }
.flash-error{ background:var(--danger); color:#2a0a0a; }
.flash-info{ background:var(--primary); color:var(--on-accent); }

/* ---------- MODAL ---------- */
.modal-bg {
  position: fixed; inset:0; z-index:100; background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px); display:none; place-items:center; padding: 20px;
}
.modal-bg.show { display:grid; animation: fade .2s; }
@keyframes fade { from{opacity:0} to{opacity:1} }
.modal {
  background:var(--card); border:1px solid var(--line); border-radius: 22px; padding: 26px; width:100%; max-width: 520px;
  max-height: 90vh; overflow-y:auto; box-shadow: var(--shadow-lg);
  animation: pop .35s cubic-bezier(.16,1,.3,1);
}
.modal h3 { font-size:18px; margin-bottom: 4px; color:var(--ink); }
.modal .modal-sub { color:var(--muted); font-size:13.5px; margin-bottom: 20px; }
.modal-close { float:right; background:#22242A; border:none; width:34px; height:34px; border-radius:10px; cursor:pointer; font-size:18px; color:#9aa0ab; }

.grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:14px; }

/* ---------- SCAN PAGE ---------- */
.scan-layout { display:grid; grid-template-columns: 1.1fr .9fr; gap: 22px; }
#reader { width:100%; border-radius: 18px; overflow:hidden; border:2px solid var(--line); }
#reader video { border-radius:16px; }
.scan-result {
  border-radius: 18px; padding: 26px; text-align:center; min-height: 260px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap: 8px;
  background: #111216; border:2px dashed #2c2f37; transition:.3s; color:var(--ink);
}
.scan-result.ok { background: rgba(74,222,128,.08); border-color:rgba(74,222,128,.5); }
.scan-result.err { background: rgba(255,107,107,.08); border-color:rgba(255,107,107,.5); }
.scan-avatar { width:82px; height:82px; border-radius:24px; object-fit:cover; box-shadow:var(--shadow); }
.scan-big { font-size:22px; font-weight:700; font-family:var(--font-display); }
.pulse-ring { width:74px; height:74px; border-radius:50%; background:var(--primary-soft); display:grid; place-items:center; color:var(--primary); animation:pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 var(--primary-soft)} 70%{box-shadow:0 0 0 18px transparent} 100%{box-shadow:0 0 0 0 transparent} }

/* ---------- QR CARD (cetak) ---------- */
.qr-grid { display:grid; grid-template-columns: repeat(auto-fill,minmax(230px,1fr)); gap:18px; }
.qr-card {
  border:1px solid var(--line); border-radius:16px; padding:18px; text-align:center; background:var(--card);
  break-inside: avoid;
}
.qr-card .qr-box { display:grid; place-items:center; margin: 8px 0; background:#fff; border-radius:12px; padding:8px; }
.qr-card .qr-box img, .qr-card .qr-box canvas { width:170px; height:170px; }
.qr-card h4 { font-size:15px; margin-top:6px; color:var(--ink); }
.qr-card p { color:var(--muted); font-size:13px; }
.qr-school { font-weight:800; font-size:13px; color:var(--primary); }

/* ---------- MISC ---------- */
.row-actions { display:flex; gap:6px; }
.empty { text-align:center; padding: 50px 20px; color:var(--muted); }
.empty svg { margin-bottom: 12px; color:#3a3d45; }
.toolbar { display:flex; gap:12px; flex-wrap:wrap; align-items:center; margin-bottom:18px; }
.toolbar .search { flex:1; min-width: 200px; }
.pill { padding:6px 12px; border-radius:30px; font-size:12.5px; font-weight:700; background:var(--primary-soft); color:var(--primary); }
.divider { height:1px; background:var(--line); margin:18px 0; }
.text-muted { color: var(--muted); }
.mt-2{margin-top:8px}.mt-3{margin-top:16px}.mb-3{margin-bottom:16px}
.overlay-mob { display:none; position:fixed; inset:0; background:rgba(0,0,0,.55); z-index:45; }

/* ---------- RESPONSIVE / APP SHELL ---------- */
.topbar-logo { display:none; width:36px; height:36px; border-radius:11px; overflow:hidden;
  place-items:center; color:var(--on-accent); font-size:17px; flex-shrink:0;
  background:linear-gradient(135deg,var(--primary),var(--primary-2)); }
.topbar-logo img { width:100%; height:100%; object-fit:cover; }

.tabbar { position:fixed; left:0; right:0; bottom:0; z-index:60; display:none;
  justify-content:space-around; align-items:flex-end; gap:2px;
  background:rgba(16,17,20,.94); -webkit-backdrop-filter:blur(20px); backdrop-filter:blur(20px);
  border-top:1px solid var(--line);
  padding:8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow:0 -12px 30px -14px rgba(0,0,0,.6); }
.tab { flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; padding:4px 0;
  color:#6b7079; font-size:10.5px; font-weight:700; background:none; border:none; cursor:pointer;
  font-family:var(--font); text-decoration:none; transition:color .18s; -webkit-tap-highlight-color:transparent; }
.tab svg { width:24px; height:24px; }
.tab span { line-height:1; }
.tab.active { color:var(--primary); }
.tab-scan { flex:0 0 auto; }
.scan-fab { width:58px; height:58px; margin-top:-26px; margin-bottom:2px; border-radius:50%;
  display:grid; place-items:center; color:var(--on-accent); border:4px solid var(--bg);
  background:linear-gradient(135deg,var(--primary),var(--primary-2));
  box-shadow:0 12px 24px -6px rgba(198,255,62,.6); transition:transform .18s; }
.scan-fab svg { width:26px; height:26px; }
.tab-scan:active .scan-fab { transform:scale(.92); }
.tab-scan.active .scan-fab { transform:scale(1.06); }
.tab-scan.active span { color:var(--primary); }

.sheet-bg { position:fixed; inset:0; z-index:120; background:rgba(0,0,0,.6);
  -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); display:none; align-items:flex-end; }
.sheet-bg.show { display:flex; animation:fade .2s; }
.sheet { width:100%; background:var(--card); border-top:1px solid var(--line); border-radius:26px 26px 0 0;
  padding:12px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow:var(--shadow-lg); animation:slideUp .34s cubic-bezier(.16,1,.3,1);
  max-height:88dvh; overflow-y:auto; }
.sheet-handle { width:44px; height:5px; border-radius:99px; background:#3a3d45; margin:0 auto 14px; }
.sheet-user { display:flex; align-items:center; gap:12px; padding:2px 2px 16px;
  border-bottom:1px solid var(--line); margin-bottom:16px; }
.sheet-user .av { width:46px; height:46px; border-radius:14px; flex-shrink:0;
  background:linear-gradient(135deg,var(--primary),var(--primary-2)); color:var(--on-accent);
  display:grid; place-items:center; font-weight:800; font-size:19px; }
.sheet-user strong { font-size:15px; color:var(--ink); }
.sheet-user small { display:block; color:var(--muted); font-size:12px; }
.sheet-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
.sheet-item { display:flex; flex-direction:column; align-items:center; gap:8px; padding:15px 4px;
  border-radius:16px; background:#1c1e23; color:#c3c7cf; font-size:11.5px; font-weight:600;
  text-align:center; text-decoration:none; transition:transform .12s, background .15s;
  -webkit-tap-highlight-color:transparent; }
.sheet-item svg { width:24px; height:24px; color:var(--primary); }
.sheet-item:active { transform:scale(.93); background:var(--primary-soft); }
.sheet-item.active { background:var(--primary-soft); color:var(--primary); }
.sheet-item.danger { color:var(--danger); } .sheet-item.danger svg { color:var(--danger); }
@keyframes slideUp { from{ transform:translateY(100%) } to{ transform:translateY(0) } }

/* Tablet */
@media (max-width: 1024px){
  .stats { grid-template-columns: repeat(2,1fr); }
  .scan-layout { grid-template-columns: 1fr; }
}
/* HP: MODE APLIKASI (bottom-nav) */
@media (max-width: 820px){
  .sidebar { display:none !important; }
  .overlay-mob { display:none !important; }
  .hamburger { display:none !important; }
  .main { margin-left: 0; }
  .topbar-logo { display:grid; }
  .topbar { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background:rgba(14,15,18,.9); }
  .topbar h2 { font-size: 17px; font-weight:800; }
  .content { padding: 16px 14px calc(100px + env(safe-area-inset-bottom)); }
  .tabbar { display:flex; }
  .card-head { flex-wrap:wrap; }
  .modal-bg { place-items:end; padding:0; }
  .modal { max-width:100%; border-radius:24px 24px 0 0; max-height:92dvh;
    padding:22px 18px calc(22px + env(safe-area-inset-bottom)); animation:slideUp .3s cubic-bezier(.16,1,.3,1); }
}
@media (max-width: 560px){
  .stats { grid-template-columns: repeat(2,1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .user-chip { padding:0; border:none; background:transparent; }
  .user-chip .user-meta { display:none; }
  .user-chip .av { width:36px; height:36px; }
}

/* ---------- PRINT ---------- */
@media print {
  .sidebar, .topbar, .no-print, .aurora, .tabbar, .sheet-bg { display:none !important; }
  .main { margin:0 !important; }
  .content { padding:0 !important; }
  body { background:#fff; color:#000; }
  .card { box-shadow:none; border:1px solid #ddd; background:#fff; color:#000; }
  table, tbody td, thead th { color:#000 !important; background:#fff !important; }
  .qr-grid { grid-template-columns: repeat(3,1fr); gap:10px; }
}

/* Spinner */
.spinner { width:20px; height:20px; border:2.5px solid rgba(198,255,62,.25); border-top-color:var(--primary); border-radius:50%; animation:spin .7s linear infinite; }
@keyframes spin { to{ transform:rotate(360deg) } }

/* ===================================================== */
/*  KOMPONEN v2                                          */
/* ===================================================== */
.switch-row{ display:flex; align-items:center; justify-content:space-between; gap:16px;
  padding:14px 0; border-bottom:1px solid var(--line); cursor:default; }
.switch-row:last-of-type{ border-bottom:none; }
.switch-row strong{ color:var(--ink); }
.switch-row p{ font-size:12.5px; color:var(--muted); margin-top:2px; max-width:340px; }
.switch{ position:relative; display:inline-block; width:48px; height:28px; flex:0 0 48px; cursor:pointer; }
.switch input{ opacity:0; width:0; height:0; }
.switch span{ position:absolute; inset:0; background:#3a3d45; border-radius:999px; transition:.28s; }
.switch span:before{ content:""; position:absolute; height:22px; width:22px; left:3px; top:3px;
  background:#fff; border-radius:50%; transition:.28s; box-shadow:0 2px 6px rgba(0,0,0,.4); }
.switch input:checked + span{ background:var(--primary); }
.switch input:checked + span:before{ transform:translateX(20px); background:var(--on-accent); }

.seg{ display:flex; gap:6px; background:#111216; padding:5px; border-radius:14px; margin:14px 0; border:1px solid var(--line); }
.seg-btn{ flex:1; border:none; background:transparent; padding:10px; border-radius:10px;
  font-family:var(--font); font-weight:700; font-size:13.5px; color:var(--muted); cursor:pointer; transition:.2s; }
.seg-btn.on{ background:var(--primary); color:var(--on-accent); }

.scanner-box{ text-align:center; padding:30px 20px; border:2px dashed var(--line);
  border-radius:var(--radius); background:#111216; }
.scanner-ic{ font-size:44px; animation:pulse2 1.6s ease-in-out infinite; }
.scanner-input{ margin-top:14px; text-align:center; font-weight:700; letter-spacing:.5px; }
@keyframes pulse2{ 0%,100%{transform:scale(1);opacity:1} 50%{transform:scale(1.12);opacity:.7} }

.big-verif{ width:150px !important; height:150px !important; border-radius:20px !important;
  object-fit:cover; border:4px solid var(--primary); box-shadow:0 10px 30px -8px rgba(198,255,62,.5);
  animation:pop .35s cubic-bezier(.16,1,.3,1); }

.progress{ height:10px; background:#111216; border-radius:999px; overflow:hidden; }
.progress-bar{ height:100%; border-radius:999px; transition:width .6s cubic-bezier(.16,1,.3,1); }

.chart{ display:flex; align-items:flex-end; gap:6px; padding-top:10px; }
.chart .bar-col{ flex:1; display:flex; flex-direction:column; align-items:center; gap:6px; height:100%; justify-content:flex-end; }
.chart .bar{ width:100%; max-width:26px; border-radius:8px 8px 4px 4px;
  background:linear-gradient(180deg,var(--primary),var(--primary-2)); transition:height .6s cubic-bezier(.16,1,.3,1); min-height:4px; }
.chart .bar-col span{ font-size:10.5px; color:var(--muted); font-weight:600; }

.rank{ display:flex; flex-direction:column; gap:8px; }
.rank-item{ display:flex; align-items:center; gap:12px; padding:10px 12px; border-radius:12px;
  background:#111216; transition:.2s; }
.rank-item:hover{ background:#1c1e23; }
.rank-no{ width:30px; height:30px; flex:0 0 30px; display:grid; place-items:center; border-radius:9px;
  background:var(--primary-soft); color:var(--primary); font-weight:800; font-size:14px; }

.dropzone{ display:flex; flex-direction:column; align-items:center; gap:6px; text-align:center;
  padding:38px 20px; border:2px dashed var(--line); border-radius:var(--radius); cursor:pointer;
  transition:.25s; background:#111216; }
.dropzone:hover{ border-color:var(--primary); background:var(--primary-soft); }
.dropzone input[type=file]{ display:none; }
.dz-ic{ width:56px; height:56px; display:grid; place-items:center; border-radius:16px; font-size:26px; color:var(--on-accent);
  background:linear-gradient(135deg,var(--primary),var(--primary-2)); box-shadow:0 10px 24px -8px rgba(198,255,62,.5); }
.dz-title{ font-weight:700; font-size:15px; color:var(--ink); }

.cek-stats{ display:grid; grid-template-columns:repeat(5,1fr); gap:8px; }
.cek-stat{ border-radius:14px; padding:12px 6px; text-align:center; }
@media(max-width:520px){ .cek-stats{ grid-template-columns:repeat(3,1fr); } }

/* ---------- HERO (Dashboard "Gerbang") ---------- */
.hero { background:linear-gradient(150deg,var(--primary),#b6f13a); color:var(--on-accent);
  border-radius:26px; padding:22px; position:relative; overflow:hidden; box-shadow:0 24px 50px -20px rgba(198,255,62,.4); }
.hero-label { font-size:11.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; display:flex; align-items:center; gap:7px; opacity:.85; }
.hero-label .dot { width:8px; height:8px; border-radius:50%; background:var(--on-accent); animation:pulse2 1.5s infinite; }
.hero-num { font-family:var(--font-display); font-size:58px; font-weight:700; line-height:1; margin:10px 0 2px; }
.hero-sub { font-weight:700; font-size:14px; opacity:.8; }
.hero-btn { display:flex; align-items:center; justify-content:center; gap:9px; width:100%; margin-top:18px;
  background:var(--on-accent); color:var(--primary); border:none; border-radius:16px; padding:15px;
  font-family:var(--font); font-weight:800; font-size:15px; cursor:pointer; transition:transform .15s; }
.hero-btn:active { transform:scale(.97); }
.mini-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:16px 0; }
.mini { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:16px 14px; }
.mini .n { font-family:var(--font-display); font-size:30px; font-weight:700; line-height:1; }
.mini .l { color:var(--muted); font-size:12px; font-weight:600; margin-top:5px; }
.quick-row { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.quick { display:flex; flex-direction:column; align-items:center; gap:8px; padding:16px 8px; border-radius:16px;
  background:var(--card); border:1px solid var(--line); color:var(--ink); font-size:12.5px; font-weight:700; transition:.15s; }
.quick svg { width:22px; height:22px; color:var(--primary); }
.quick:active { transform:scale(.95); background:#1c1e23; }

/* ===================================================== */
/*  FIX ANTI-KEPOTONG (overflow) — ikut ukuran layar     */
/* ===================================================== */
html, body { max-width: 100%; overflow-x: hidden; }
.main { min-width: 0; max-width: 100%; overflow-x: hidden; }
.content { min-width: 0; max-width: 100%; }
/* item grid/flex boleh menyusut (default min-width:auto bikin melebar) */
.stats, .mini-stats, .quick-row, .dash-grid, .anl-grid, .set-grid, .cek-stats { min-width: 0; }
.stats > *, .mini-stats > *, .quick-row > *, .dash-grid > *, .anl-grid > *, .set-grid > *, .cek-stats > * { min-width: 0; }
.card { min-width: 0; }
.card > * { min-width: 0; }
.progress { max-width: 100%; }
.chart { min-width: 0; overflow: hidden; }
.chart .bar-col { min-width: 0; }
.rank-item { min-width: 0; }
.rank-item > div { min-width: 0; overflow: hidden; }
.rank-item strong { display:block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero, .mini, .quick { min-width: 0; max-width: 100%; overflow: hidden; }
.hero-num { word-break: break-word; }
/* pastikan tabel lebar tetap bisa digeser, bukan memaksa halaman melebar */
.table-wrap { max-width: 100%; }
