/* ============================================================
   KURADAPT — Design System v2
   "Kurikulum Hidup, Masa Depan Terarah."
   Tema: Light (Ocean Blue) & Night (dark) — ganti via [data-theme]
   ============================================================ */

:root {
  --bg: #f6f8fc;
  --bg2: #eef2f9;
  --surface: #ffffff;
  --surface2: #f1f5f9;
  --line: rgba(15, 23, 42, .10);
  --line2: rgba(15, 23, 42, .18);
  --text: #0f172a;
  --muted: #475569;
  --muted2: #94a3b8;
  --brand: #1d4ed8;
  --brand2: #2563eb;
  --brand-ink: #ffffff;
  --brand-soft: rgba(29, 78, 216, .10);
  --cyan: #0284c7;
  --green: #059669;
  --violet: #4f46e5;
  --amber: #f59e0b;
  --red: #dc2626;
  --grad: linear-gradient(135deg, #2563eb, #1d4ed8);
  --grad-hero:
    radial-gradient(1100px 480px at 12% -12%, rgba(37, 99, 235, .16), transparent 62%),
    radial-gradient(900px 420px at 92% 6%, rgba(2, 132, 199, .14), transparent 60%),
    radial-gradient(700px 380px at 50% 110%, rgba(79, 70, 229, .10), transparent 65%);
  --shadow: 0 18px 44px -26px rgba(15, 23, 42, .45);
  --shadow-lg: 0 34px 80px -44px rgba(15, 23, 42, .6);
  --r: 14px;
  --r-sm: 10px;
  --font: 'Plus Jakarta Sans', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-display: 'Sora', 'Plus Jakarta Sans', 'Segoe UI', system-ui, sans-serif;
  --top-h: 66px;
}

[data-theme="dark"] {
  --bg: #0a1020;
  --bg2: #0d1526;
  --surface: #111a30;
  --surface2: #17203a;
  --line: rgba(148, 163, 184, .16);
  --line2: rgba(148, 163, 184, .32);
  --text: #e7edf9;
  --muted: #a3b2c9;
  --muted2: #728299;
  --brand: #60a5fa;
  --brand2: #3b82f6;
  --brand-ink: #08111f;
  --brand-soft: rgba(96, 165, 250, .14);
  --cyan: #38bdf8;
  --green: #34d399;
  --violet: #a5b4fc;
  --amber: #fbbf24;
  --red: #f87171;
  --grad: linear-gradient(135deg, #60a5fa, #3b82f6);
  --grad-hero:
    radial-gradient(1100px 480px at 12% -12%, rgba(59, 130, 246, .22), transparent 62%),
    radial-gradient(900px 420px at 92% 6%, rgba(56, 189, 248, .16), transparent 60%),
    radial-gradient(700px 380px at 50% 110%, rgba(129, 140, 248, .16), transparent 65%);
  --shadow: 0 18px 44px -26px rgba(0, 0, 0, .8);
  --shadow-lg: 0 34px 80px -40px rgba(0, 0, 0, .9);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Transisi color/background dihapus: membuat teks macet di warna lama
     (gelap di atas latar night) sehingga nyaris tak terlihat. */
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
img, svg { max-width: 100%; }
button { font-family: inherit; }
::selection { background: var(--brand-soft); }

.wrap { width: min(1140px, 92vw); margin-inline: auto; }

/* ---------- ikon ---------- */
.i { width: 1.1em; height: 1.1em; display: inline-block; vertical-align: -.16em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.logo-i { display: block; width: 100%; height: 100%; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5em; justify-content: center;
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  font-weight: 700; font-size: .93rem; padding: .72em 1.5em; line-height: 1.2;
  transition: transform .18s ease, box-shadow .22s ease, background .22s ease, color .22s ease, border-color .22s ease;
  white-space: nowrap; text-align: center;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad); color: var(--brand-ink); box-shadow: 0 14px 30px -16px rgba(37, 99, 235, .85); }
.btn-primary:hover { box-shadow: 0 18px 34px -14px rgba(37, 99, 235, .95); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line2); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: var(--brand); color: var(--brand-ink); }
.btn-danger { background: rgba(220, 38, 38, .10); color: var(--red); border-color: rgba(220, 38, 38, .3); }
.btn-sm { font-size: .82rem; padding: .55em 1.15em; }
.btn-lg { font-size: 1.02rem; padding: .85em 2em; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.icon-btn {
  display: grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: 12px; border: 1px solid var(--line2); background: var(--surface);
  color: var(--text); cursor: pointer; transition: .2s ease; font-size: 1.05rem;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }

/* ---------- lonceng & panel pemberitahuan ---------- */
#btnNotif { position: relative; }
.notif-badge[hidden] { display: none; } /* aturan display di bawah tak boleh menimpa atribut hidden */
.notif-badge {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--red, #ef4444); color: #fff;
  font-size: .64rem; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--surface); line-height: 1;
}
.notif-panel {
  position: absolute; top: calc(100% + 10px); right: 0; width: min(370px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: 0 18px 44px rgba(15, 23, 42, .22); z-index: 60; overflow: hidden;
  max-height: min(70vh, 520px); display: flex; flex-direction: column;
}
.notif-panel[hidden] { display: none; }
.np-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: .92rem;
}
.np-link {
  background: none; border: none; color: var(--brand); font-size: .78rem; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: .35em; padding: 0;
}
.np-item {
  display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left;
  padding: 11px 14px; background: none; border: none; border-bottom: 1px solid var(--line2);
  cursor: pointer; transition: .15s ease; color: var(--text); font: inherit;
}
.np-item:hover { background: var(--brand-soft); }
.np-item.baru { background: rgba(37, 99, 235, .05); }
.np-ico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand); }
.np-txt { min-width: 0; }
.np-txt b { display: block; font-size: .86rem; }
.np-txt small { color: var(--muted2); font-size: .72rem; }
.np-txt p { margin: 3px 0 0; font-size: .78rem; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.np-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin: 0 3px 0 0; }
.np-empty { padding: 26px 18px; text-align: center; color: var(--muted); font-size: .85rem; display: grid; gap: 6px; justify-items: center; }
.np-empty b { color: var(--text); }
.np-empty span { font-size: .76rem; }
.np-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 14px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- halaman profil ---------- */
.profil-page { padding: 34px 0 60px; }
.pf-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 24px; box-shadow: var(--shadow);
}
.pf-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pf-av {
  width: 68px; height: 68px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 1.35rem; letter-spacing: .02em;
}
.pf-id { min-width: 0; flex: 1; }
.pf-id h1 { font-size: 1.5rem; margin: 0 0 3px; }
.pf-id p { margin: 0; color: var(--muted); font-size: .9rem; word-break: break-all; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.pf-act { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-bio { margin-top: 18px; padding: 14px 16px; background: var(--bg, #f8fafc); border: 1px dashed var(--line2); border-radius: 14px; }
.pf-bio b { display: flex; align-items: center; gap: .4em; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); }
.pf-bio p { margin: 7px 0 0; font-size: .93rem; line-height: 1.6; white-space: pre-wrap; }
.pf-muted { color: var(--muted2); font-style: italic; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 18px; }
.pf-stat { background: var(--bg, #f8fafc); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: grid; gap: 3px; }
.pf-stat .lbl { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted2); font-weight: 700; }
.pf-stat .val { font-size: 1.5rem; font-weight: 800; color: var(--brand); }
.pf-block { margin-top: 20px; display: grid; gap: 10px; }
.pf-block > b { display: flex; align-items: center; gap: .4em; font-size: .95rem; }
.pf-notif { max-height: 340px; overflow-y: auto; }
.pf-notif .list-item { width: 100%; text-align: left; }
.np-baru { border-left: 3px solid var(--brand); }
.ac-orang { margin-left: auto; cursor: pointer; font-size: .68rem; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); }
.ac-orang:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.sh-mat { background: none; border: none; font: inherit; cursor: pointer; color: inherit; }
.sh-mat:hover b { color: var(--brand); }
.sh-mat span svg { width: 13px; height: 13px; vertical-align: -2px; }

/* ---------- kartu ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; box-shadow: var(--shadow);
}
.sec { padding: 72px 0; position: relative; }
.sec-head { max-width: 660px; margin-bottom: 34px; }
.sec-tag {
  display: inline-flex; align-items: center; gap: .45em; font-size: .76rem; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--brand);
  background: var(--brand-soft); border: 1px solid rgba(37, 99, 235, .25);
  padding: .4em 1em; border-radius: 999px; margin-bottom: 14px;
}
.sec-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }

/* ===== Halaman khusus pengumuman (#/pengumuman) — TANPA SCROLL =====
   Halaman dikunci se-halaman layar: body & #view overflow hidden, section
   memaksa tinggi 100%. Daftar kartu mengisi sisa ruang (4 kolom → 2 baris);
   gulir hanya terjadi DI GRID saat layar sangat sempit — bukan halaman. */
body[data-route="pengumuman"] { overflow: hidden; }
body[data-route="pengumuman"] #view {
  height: calc(100vh - var(--top-h));
  overflow: hidden;
}
body[data-route="pengumuman"] .ann-only {
  height: 100%;
  display: flex; flex-direction: column;
  padding: 22px 0 16px;
}
body[data-route="pengumuman"] .ann-only > .wrap {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
}
body[data-route="pengumuman"] .ann-only .sec-head { flex: none; margin-bottom: 14px; }
body[data-route="pengumuman"] .ann-only .ann-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  /* Baris WAJIB seukuran isi kartu (max-content) — tanpa ini Chrome memampatkan
     baris auto ke bagi-rata tinggi grid → teks & chip tanggal kartu terpotong.
     Bila konten melebihi layar, grid menggulir internal (bukan halaman). */
  grid-auto-rows: max-content;
  flex: 1; min-height: 0;
  align-content: start;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(37, 99, 235, .45) transparent;
}
body[data-route="pengumuman"] .ann-only .ann-grid::-webkit-scrollbar { width: 9px; }
body[data-route="pengumuman"] .ann-only .ann-grid::-webkit-scrollbar-thumb {
  background: rgba(37, 99, 235, .45); border-radius: 99px;
}
body[data-route="pengumuman"] .ann-only .ann-grid::-webkit-scrollbar-track { background: transparent; }
/* Kartu dirapatkan agar8 info muat dalam 2 baris tanpa memotong teks */
body[data-route="pengumuman"] .ann-card { padding: 16px 16px 14px; }
body[data-route="pengumuman"] .ann-card .ac-head { margin-bottom: 8px; }
body[data-route="pengumuman"] .ann-card .ac-av { width: 34px; height: 34px; font-size: .78rem; }
body[data-route="pengumuman"] .ann-card h3 { margin-bottom: 4px; }
body[data-route="pengumuman"] .ann-card p { margin-bottom: 8px; }
/* Layar pendek (laptop 768px dsb.): subjudul disembunyikan — judul + tag
   tetap ada, daftar info tetap muat penuh tanpa scroll */
@media (max-height: 840px) {
  body[data-route="pengumuman"] .ann-only .sec-head p { display: none; }
  body[data-route="pengumuman"] .ann-only { padding-top: 14px; }
  body[data-route="pengumuman"] .ann-only .sec-head { margin-bottom: 10px; }
}
/* Sangat pendek (viewport kecil / browser ber-UI di laptop 768px): tag ikut
   disembunyikan, judul & kartu dirapatkan — 8 info tetap muat penuh */
@media (max-height: 700px) {
  body[data-route="pengumuman"] .ann-only .sec-tag { display: none; }
  body[data-route="pengumuman"] .ann-only { padding-top: 10px; padding-bottom: 8px; }
  body[data-route="pengumuman"] .ann-only .sec-head { margin-bottom: 8px; }
  body[data-route="pengumuman"] .ann-only .sec-head h2 { font-size: 1.5rem; }
  body[data-route="pengumuman"] .ann-only .ann-grid { gap: 12px; }
  body[data-route="pengumuman"] .ann-card { padding: 12px 12px 10px; }
  body[data-route="pengumuman"] .ann-card .ac-av { width: 30px; height: 30px; font-size: .72rem; }
  body[data-route="pengumuman"] .ann-card p { font-size: .82rem; }
}
.sec-head p { color: var(--muted); font-size: 1.02rem; }

/* ---------- topbar ----------
   Latar navbar = latar halaman (var(--bg)), TANPA border & tanpa efek kaca:
   navbar harus terlihat sebagai bagian dari halaman, bukan kartu terpisah
   yang mengambang (menyerupai notifikasi push — saran Abang, 18/11/2026). */
#topbar {
  position: sticky; top: 0; z-index: 60; height: var(--top-h);
  background: var(--bg);
}
.tb-in { height: 100%; display: flex; align-items: center; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; }
.brand .mark { width: 38px; height: 38px; flex: none; }
.brand .txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.brand .txt b { font-family: var(--font-display); font-size: 1.06rem; letter-spacing: -.02em; color: var(--text); }
.brand .txt small { font-size: .68rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }

.tb-in .brand { margin-right: auto; } /* dorong sisa isi ke kanan — tetap bekerja walau nav tersembunyi */
.tb-nav { display: flex; align-items: center; gap: 4px; }
.tb-nav a {
  padding: .5em .95em; border-radius: 999px; font-size: .88rem; font-weight: 600;
  color: var(--muted); white-space: nowrap; transition: .2s ease;
}
.tb-nav a:hover, .tb-nav a.on { color: var(--brand); background: var(--brand-soft); }
/* Landing pengumuman = halaman tersembunyi: nav marketing tidak tampil sama
   sekali — di halaman pengumuman maupun halaman lain (login, daftar, pilih,
   ruang, admin). Halaman jadi bersih: hanya logo, tema, Masuk/Daftar. */
body[data-route] .tb-nav { display: none; }
body[data-route="masuk"] #btnMasuk, body[data-route="daftar"] #btnDaftar,
body[data-route="lupa"] #btnMasuk, body[data-route="lupa"] #btnDaftar { display: none; }
.tb-act { display: flex; align-items: center; gap: 9px; }
.tb-act .btn { padding: .6em 1.25em; font-size: .86rem; }

#btnMenu { display: none; }
#userChip {
  display: none; align-items: center; gap: 8px; padding: .4em .9em .4em .45em;
  background: var(--brand-soft); border: 1px solid var(--line); border-radius: 999px;
  font-size: .82rem; font-weight: 700; color: var(--text); max-width: 190px;
}
#userChip.show { display: flex; }
#userChip .av {
  width: 26px; height: 26px; border-radius: 50%; background: var(--grad); color: #fff;
  display: grid; place-items: center; font-size: .72rem; font-weight: 800; flex: none;
}
#userChip .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- menu hamburger ---------- */
#mobileMenu {
  position: fixed; inset: var(--top-h) 0 auto 0; z-index: 55; display: none;
  background: var(--surface); border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-lg); padding: 14px 4vw 22px;
  animation: slideDown .25s ease;
}
#mobileMenu.open { display: block; }
#mobileMenu .mm-links { display: flex; flex-direction: column; gap: 6px; }
#mobileMenu .mm-links a {
  display: flex; align-items: center; gap: 10px; padding: .8em 1em; border-radius: 12px;
  font-weight: 600; font-size: .95rem; color: var(--text); background: var(--surface2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#mobileMenu .mm-links a:hover { background: var(--brand-soft); color: var(--brand); }
#mobileMenu .mm-act { display: flex; gap: 10px; margin-top: 14px; }
#mobileMenu .mm-act .btn { flex: 1; }

/* ---------- dekorasi latar ---------- */
#bgDeco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
#bgDeco .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; animation: float 14s ease-in-out infinite; }
#bgDeco .o1 { width: 340px; height: 340px; top: -110px; left: -90px; background: rgba(37, 99, 235, .30); }
#bgDeco .o2 { width: 300px; height: 300px; top: 30%; right: -120px; background: rgba(2, 132, 199, .26); animation-delay: -5s; }
#bgDeco .o3 { width: 260px; height: 260px; bottom: -90px; left: 32%; background: rgba(79, 70, 229, .20); animation-delay: -9s; }
[data-theme="dark"] #bgDeco .o1 { background: rgba(59, 130, 246, .22); }
[data-theme="dark"] #bgDeco .o2 { background: rgba(56, 189, 248, .16); }
[data-theme="dark"] #bgDeco .o3 { background: rgba(129, 140, 248, .16); }

main { position: relative; z-index: 1; min-height: calc(100vh - var(--top-h)); }

/* Layar siap (boot) — tampil di #view selama app.js memuat 5 file data,
   agar area konten tidak pernah kosong / memperlihatkan halaman belakang. */
.boot {
  min-height: calc(100vh - var(--top-h));
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; padding: 40px 20px;
}
.boot-mark {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: var(--brand-soft); border: 1px solid var(--brand-line, var(--brand-soft));
  animation: bootPulse 1.4s ease-in-out infinite;
}
.boot-mark .logo-i { width: 34px; height: 34px; }
.boot-txt { font-size: .92rem; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
@keyframes bootPulse { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.06); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .boot-mark { animation: none; } }

@keyframes float { 0%, 100% { transform: translateY(0) } 50% { transform: translateY(-26px) } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: none } }
@keyframes pop { from { opacity: 0; transform: scale(.94) } to { opacity: 1; transform: none } }
@keyframes rise { from { opacity: 0; transform: translateY(22px) } to { opacity: 1; transform: none } }
@keyframes shimmer { 0% { background-position: -400px 0 } 100% { background-position: 400px 0 } }
@keyframes pulseRing { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .35) } 70% { box-shadow: 0 0 0 14px rgba(37, 99, 235, 0) } 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0) } }
@keyframes liveDot { 0%, 100% { opacity: 1; transform: scale(1) } 50% { opacity: .45; transform: scale(.8) } }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ============================================================
   LANDING — HALAMAN PENGUMUMAN PUBLIK
   ============================================================ */
.hero { position: relative; background: var(--grad-hero); padding: 66px 0 46px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: .6em; font-size: .8rem; font-weight: 700;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: .5em 1.1em; color: var(--muted); box-shadow: var(--shadow); margin-bottom: 18px;
}
.hero-badge .live { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: liveDot 1.2s infinite; }
.hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.03em; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { font-size: clamp(1rem, 1.5vw, 1.12rem); color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 32px; }
.hero-facts .f b { display: block; font-family: var(--font-display); font-size: 1.5rem; color: var(--text); }
.hero-facts .f span { font-size: .8rem; color: var(--muted); }

/* kartu pengumuman melayang di hero */
.hero-visual { position: relative; min-height: 320px; }
.float-card {
  position: absolute; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite; width: min(300px, 84%);
}
.float-card h4 { font-size: .9rem; margin-bottom: 4px; }
.float-card p { font-size: .78rem; color: var(--muted); margin: 0; }
.float-card .fc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.float-card .fc-av { width: 30px; height: 30px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: .74rem; font-weight: 800; }
.float-card .fc-top b { font-size: .8rem; }
.float-card .fc-top small { display: block; font-size: .68rem; color: var(--muted2); }
.fc-1 { top: 6%; left: 0; }
.fc-2 { top: 36%; right: 0; animation-delay: -2.5s; }
.fc-3 { bottom: 2%; left: 8%; animation-delay: -4.5s; }

.chip {
  display: inline-flex; align-items: center; gap: .4em; font-size: .7rem; font-weight: 800;
  padding: .3em .8em; border-radius: 999px; background: var(--surface2);
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.chip.brand { background: var(--brand-soft); color: var(--brand); border-color: rgba(37, 99, 235, .3); }
.chip.green { background: rgba(5, 150, 105, .12); color: var(--green); border-color: rgba(5, 150, 105, .3); }
.chip.amber { background: rgba(245, 158, 11, .14); color: #b45309; border-color: rgba(245, 158, 11, .35); }
[data-theme="dark"] .chip.amber { color: var(--amber); }
.chip.red { background: rgba(220, 38, 38, .1); color: var(--red); border-color: rgba(220, 38, 38, .3); }
.chip.violet { background: rgba(79, 70, 229, .12); color: var(--violet); border-color: rgba(79, 70, 229, .3); }
.chip.cyan { background: rgba(2, 132, 199, .12); color: var(--cyan); border-color: rgba(2, 132, 199, .3); }

/* papan pengumuman */
.ann-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.ann-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: rise .5s ease both;
}
.ann-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: rgba(37, 99, 235, .35); }
.ann-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--grad); }
.ann-card .ac-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ann-card .ac-av { width: 38px; height: 38px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .84rem; flex: none; }
.ann-card .ac-head .meta { min-width: 0; }
.ann-card .ac-head b { display: block; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ann-card .ac-head small { font-size: .72rem; color: var(--muted2); }
.ann-card h3 { font-size: 1rem; margin-bottom: 6px; }
.ann-card p { font-size: .86rem; color: var(--muted); margin-bottom: 12px; }
.ann-card .ac-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-card .baru { position: absolute; top: 14px; right: 14px; }

.pillar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.pillar-card {
  background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--acc, var(--brand));
  border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}
.pillar-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.pillar-card .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc, var(--brand)) 14%, transparent);
  color: var(--acc, var(--brand)); font-size: 1.35rem; margin-bottom: 14px;
}
.pillar-card h3 { font-size: 1.08rem; }
.pillar-card p { font-size: .86rem; color: var(--muted); }
.pillar-card .acc-tag { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--acc, var(--brand)); }

.cta-band {
  background: var(--grad); border-radius: 22px; padding: clamp(30px, 5vw, 54px);
  color: #fff; text-align: center; box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-band::after { content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%; background: rgba(255, 255, 255, .12); top: -140px; right: -80px; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.2rem); position: relative; }
.cta-band p { color: rgba(255, 255, 255, .88); max-width: 560px; margin-inline: auto; position: relative; }
.cta-band .btn { background: #fff; color: #1d4ed8; position: relative; }
.cta-band .btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .5); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: var(--surface); padding: 44px 0 30px; margin-top: 60px; position: relative; z-index: 1; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
.foot-grid h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted2); }
.foot-grid a, .foot-grid span { display: block; font-size: .88rem; color: var(--muted); padding: .22em 0; }
.foot-grid a:hover { color: var(--brand); }
.foot-bot { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: .8rem; color: var(--muted2); }

/* ============================================================
   AUTH — LAYAR MASUK & DAFTAR (sengaja BERBEDA TOTAL)
   ============================================================ */
.auth-split { display: grid; grid-template-columns: 1fr 1fr; min-height: calc(100vh - var(--top-h)); }

/* --- A. MASUK: panel gelap kiri + form kanan --- */
.auth-visual {
  position: relative; overflow: hidden; padding: clamp(30px, 5vw, 60px);
  background: linear-gradient(150deg, #0b1b3f 0%, #123 40%, #0e2f6b 75%, #0ea5e9 140%);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between;
}
[data-theme="dark"] .auth-visual { background: linear-gradient(150deg, #08111f, #0e2f6b 70%, #1d4ed8 160%); }
.auth-visual::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1.6px);
  background-size: 26px 26px; opacity: .5;
}
.auth-visual .av-glow { position: absolute; width: 380px; height: 380px; border-radius: 50%; filter: blur(90px); opacity: .5; }
.auth-visual .g1 { background: #2563eb; top: -120px; right: -110px; animation: float 12s infinite; }
.auth-visual .g2 { background: #06b6d4; bottom: -140px; left: -110px; animation: float 15s infinite reverse; }
.auth-visual .av-body { position: relative; z-index: 1; }
.auth-visual h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); color: #fff; }
.auth-visual p { color: rgba(255, 255, 255, .82); font-size: .95rem; }
.auth-visual .quote {
  position: relative; z-index: 1; background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r);
  padding: 18px 20px; backdrop-filter: blur(8px); font-size: .9rem; color: rgba(255, 255, 255, .92);
}
.auth-visual .quote b { color: #fff; }
.auth-visual .steps { list-style: none; padding: 0; margin: 22px 0 0; position: relative; z-index: 1; }
.auth-visual .steps li { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; font-size: .9rem; color: rgba(255, 255, 255, .85); }
.auth-visual .steps li > b { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); font-size: .76rem; color: #fff; }
.auth-visual .steps li span b { color: #fff; }

.auth-form-side { display: grid; place-items: center; padding: clamp(26px, 5vw, 56px) clamp(20px, 4vw, 50px); background: var(--bg); }
.auth-form { width: min(430px, 100%); }
.auth-form .af-head { margin-bottom: 20px; }
.auth-form .af-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.auth-form .af-head p { color: var(--muted); font-size: .92rem; }
.auth-alt { text-align: center; font-size: .88rem; color: var(--muted); margin-top: 18px; }
/* "Lupa kata sandi?" — tautan kecil di bawah kolom sandi (halaman masuk) */
.auth-alt.forgot { text-align: right; margin-top: -4px; font-size: .84rem; }
.auth-alt.forgot a { color: var(--brand); font-weight: 600; }
.auth-alt.forgot a:hover { text-decoration: underline; }
/* Kotak konfirmasi halaman lupa sandi */
.lupa-ok {
  display: grid; gap: 6px; justify-items: start; padding: 16px 18px; margin-bottom: 16px;
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--green) 35%, transparent); border-radius: var(--r);
}
.lupa-ok .i { width: 26px; height: 26px; color: var(--green); }
.lupa-ok b { font-family: var(--font-display); font-size: 1rem; color: var(--text); }
.lupa-ok p { margin: 0; font-size: .86rem; color: var(--muted); }

/* --- B. DAFTAR: wizard tengah di atas latar berbeda --- */
.reg-page {
  min-height: calc(100vh - var(--top-h)); display: grid; place-items: center;
  padding: 40px 4vw; position: relative; overflow: hidden;
  background:
    radial-gradient(700px 320px at 8% 10%, rgba(245, 158, 11, .16), transparent 60%),
    radial-gradient(760px 340px at 95% 85%, rgba(2, 132, 199, .16), transparent 60%),
    radial-gradient(600px 300px at 70% 5%, rgba(79, 70, 229, .12), transparent 60%),
    var(--bg2);
}
.reg-page .blob { position: absolute; border-radius: 46% 54% 60% 40% / 50% 44% 56% 50%; filter: blur(2px); opacity: .5; animation: float 16s ease-in-out infinite; }
.reg-page .b1 { width: 220px; height: 220px; background: linear-gradient(135deg, rgba(37, 99, 235, .35), rgba(2, 132, 199, .2)); top: 6%; left: 5%; }
.reg-page .b2 { width: 180px; height: 180px; background: linear-gradient(135deg, rgba(245, 158, 11, .32), rgba(219, 39, 119, .18)); bottom: 8%; right: 6%; animation-delay: -6s; }

.wizard { width: min(680px, 100%); position: relative; z-index: 1; }
.wizard-head { text-align: center; margin-bottom: 22px; }
.wizard-head .brand { justify-content: center; margin-bottom: 12px; }
.wizard-head h1 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.wizard-head p { color: var(--muted); font-size: .9rem; }
.wiz-steps { display: flex; justify-content: center; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.wiz-steps .ws {
  display: flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700;
  color: var(--muted2); background: var(--surface); border: 1px solid var(--line);
  padding: .45em 1em; border-radius: 999px; transition: .25s ease;
}
.wiz-steps .ws .n { width: 20px; height: 20px; border-radius: 50%; background: var(--surface2); display: grid; place-items: center; font-size: .7rem; }
.wiz-steps .ws.on { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }
.wiz-steps .ws.on .n, .wiz-steps .ws.done .n { background: var(--brand); color: var(--brand-ink); }
.wiz-steps .ws.done { color: var(--green); border-color: rgba(5, 150, 105, .4); }
.wizard .card { padding: clamp(22px, 4vw, 34px); animation: pop .3s ease; }
.wiz-step { display: none; }
.wiz-step.on { display: block; }
.wiz-foot { display: flex; gap: 10px; margin-top: 22px; }
.wiz-foot .btn { flex: 1; }

/* pilihan peran/jenjang di wizard */
.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.role-opt {
  border: 1.5px solid var(--line); background: var(--surface); border-radius: var(--r-sm);
  padding: 14px 12px; cursor: pointer; text-align: center; transition: .2s ease; font-size: .84rem;
}
.role-opt .ri { font-size: 1.5rem; display: block; margin-bottom: 6px; }
.role-opt b { display: block; font-size: .9rem; }
.role-opt small { color: var(--muted2); font-size: .72rem; }
.role-opt:hover { border-color: var(--brand); transform: translateY(-3px); box-shadow: var(--shadow); }
.role-opt.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }

/* ---------- field ---------- */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.field .inp-wrap { position: relative; display: flex; align-items: center; }
.field .inp-wrap .i { position: absolute; left: 13px; color: var(--muted2); pointer-events: none; }
.field input, .field select, .field textarea {
  width: 100%; padding: .8em 1em .8em 2.6em; border: 1.5px solid var(--line2); border-radius: 12px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .92rem; transition: .2s ease;
}
.field select { padding-left: 1em; }
.field .inp-wrap select { padding-left: 40px; }
.field textarea { padding-left: 1em; min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.field .hint { font-size: .74rem; color: var(--muted2); margin-top: 5px; }
.field.err input, .field.err select { border-color: var(--red); }
.field .errmsg { display: none; font-size: .76rem; color: var(--red); margin-top: 5px; font-weight: 600; }
.field.err .errmsg { display: block; }
.form-note { font-size: .8rem; color: var(--muted); background: var(--surface2); border: 1px dashed var(--line2); border-radius: 10px; padding: 10px 12px; }

/* ============================================================
   PILIH JENJANG
   ============================================================ */
.pick-page { padding: clamp(34px, 6vw, 70px) 0; }
.pick-head { text-align: center; max-width: 640px; margin: 0 auto 34px; }
.pick-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
.pick-head p { color: var(--muted); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.pick-card {
  position: relative; overflow: hidden; cursor: pointer; text-align: left;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px 22px; box-shadow: var(--shadow); transition: .28s ease; color: var(--text);
  display: flex; flex-direction: column; gap: 8px; min-height: 220px;
}
.pick-card::after {
  content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%;
  background: color-mix(in srgb, var(--acc) 16%, transparent); top: -50px; right: -40px; transition: .3s ease;
}
.pick-card:hover { transform: translateY(-7px); border-color: var(--acc); box-shadow: var(--shadow-lg); }
.pick-card:hover::after { transform: scale(1.5); }
.pick-card .pk-ico {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--acc) 15%, transparent); color: var(--acc); font-size: 1.6rem;
  position: relative; z-index: 1;
}
.pick-card h3 { margin: 6px 0 0; font-size: 1.18rem; position: relative; z-index: 1; }
.pick-card .pk-sub { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--acc); position: relative; z-index: 1; }
.pick-card p { font-size: .85rem; color: var(--muted); margin: 0; position: relative; z-index: 1; }
.pick-card .pk-go { margin-top: auto; font-size: .82rem; font-weight: 800; color: var(--acc); display: flex; align-items: center; gap: 6px; position: relative; z-index: 1; }
.pick-card.locked { opacity: .6; cursor: not-allowed; }
.pick-card.locked:hover { transform: none; border-color: var(--line); }

/* ============================================================
   RUANG JENJANG (terpisah per jenjang)
   ============================================================ */
.space { --acc: var(--brand); }
.space[data-j="mini"] { --acc: #f59e0b; }
.space[data-j="muda"] { --acc: #0284c7; }
.space[data-j="mahir"] { --acc: #1d4ed8; }
.space[data-j="tinggi"] { --acc: #7c3aed; }
[data-theme="dark"] .space[data-j="mahir"] { --acc: #60a5fa; }
[data-theme="dark"] .space[data-j="tinggi"] { --acc: #a78bfa; }
[data-theme="dark"] .space[data-j="muda"] { --acc: #38bdf8; }
[data-theme="dark"] .space[data-j="mini"] { --acc: #fbbf24; }

.space-head {
  position: relative; overflow: hidden; padding: clamp(26px, 4vw, 44px) 0 0;
  background: linear-gradient(135deg, color-mix(in srgb, var(--acc) 20%, transparent), transparent 70%), var(--bg2);
  border-bottom: 1px solid var(--line);
}
.space-head .sh-in { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; justify-content: space-between; }
.space-head .sh-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.space-head .sh-ico {
  width: 62px; height: 62px; border-radius: 18px; display: grid; place-items: center; flex: none;
  background: var(--acc); color: #fff; font-size: 1.9rem; box-shadow: 0 16px 34px -18px var(--acc);
}
.space-head h1 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.9rem); }
.space-head .sh-sub { font-size: .84rem; color: var(--muted); }
.space-head .sh-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.space-head .sh-stat { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px; text-align: center; }
.space-head .sh-stat b { display: block; font-family: var(--font-display); font-size: 1.1rem; color: var(--acc); }
.space-head .sh-stat span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

.space-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 16px 0 0; scrollbar-width: thin; }
.space-tabs button {
  display: inline-flex; align-items: center; gap: .5em; border: 1px solid transparent; background: transparent;
  color: var(--muted); font-weight: 700; font-size: .86rem; padding: .62em 1.15em; border-radius: 999px;
  cursor: pointer; white-space: nowrap; transition: .2s ease;
}
.space-tabs button:hover { background: var(--surface); color: var(--acc); border-color: var(--line); }
.space-tabs button.on { background: var(--acc); color: #fff; box-shadow: 0 12px 26px -16px var(--acc); }
[data-theme="dark"] .space-tabs button.on { color: #0b1120; }
.space-body { padding: 26px 0 60px; animation: rise .35s ease; }

/* grid & stat */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow); }
.stat-card .lbl { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted2); }
.stat-card .val { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; color: var(--acc, var(--brand)); line-height: 1.2; }
.stat-card .note { font-size: .76rem; color: var(--muted); }

/* daftar mapel / bab */
.list-item {
  display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 15px 18px; cursor: pointer; transition: .22s ease; width: 100%;
  text-align: left; color: var(--text); font: inherit;
}
.list-item:hover { border-color: var(--acc, var(--brand)); transform: translateX(5px); box-shadow: var(--shadow); }
.list-item .li-ico { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--acc, var(--brand)) 13%, transparent); color: var(--acc, var(--brand)); font-size: 1.2rem; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-body b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-body small { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-end { flex: none; color: var(--muted2); font-size: .8rem; display: flex; align-items: center; gap: 6px; }
.stack { display: flex; flex-direction: column; gap: 12px; }

/* materi */
.material { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.material h2 { font-size: 1.35rem; }
.material .m-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.material .m-body { font-size: .95rem; color: var(--text); line-height: 1.75; }
.material .m-body h4 { margin: 1.4em 0 .5em; font-size: 1.02rem; color: var(--acc, var(--brand)); }
.material .m-body ul, .material .m-body ol { padding-left: 1.3em; margin: 0 0 1em; }
.material .m-body li { margin-bottom: .35em; }
.material .m-body table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .87rem; }
.material .m-body th, .material .m-body td { border: 1px solid var(--line2); padding: .55em .7em; text-align: left; }
.material .m-body th { background: var(--surface2); font-size: .8rem; }
.material .m-body strong { color: var(--acc, var(--brand)); }
.material .m-body blockquote { margin: 0 0 1.2em; padding: 12px 16px; border-left: 4px solid var(--acc, var(--brand)); background: var(--surface2); border-radius: 0 10px 10px 0; font-style: italic; color: var(--muted); }
.m-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

/* ============================================================
   LATIHAN / KUIS
   ============================================================ */
.quiz-wrap { max-width: 780px; margin-inline: auto; }
.quiz-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.q-progress { flex: 1; min-width: 160px; height: 9px; background: var(--surface2); border: 1px solid var(--line); border-radius: 99px; overflow: hidden; }
.q-progress i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .4s ease; }
.q-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.q-dots span { width: 11px; height: 11px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line2); transition: .2s; }
.q-dots span.now { background: var(--acc, var(--brand)); transform: scale(1.25); }
.q-dots span.ok { background: var(--green); border-color: var(--green); }
.q-dots span.no { background: var(--red); border-color: var(--red); }

.q-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(20px, 3.4vw, 32px); box-shadow: var(--shadow); animation: pop .3s ease; }
.q-card .q-src { font-size: .76rem; color: var(--muted2); margin-bottom: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.q-card h3 { font-size: clamp(1.02rem, 2vw, 1.18rem); line-height: 1.5; margin-bottom: 18px; }
.q-opts { display: grid; gap: 10px; }
.q-opt {
  display: flex; align-items: flex-start; gap: 12px; text-align: left; width: 100%;
  background: var(--surface2); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 13px 16px; font: inherit; font-size: .92rem; color: var(--text); cursor: pointer; transition: .18s ease;
}
.q-opt .k {
  width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--surface);
  border: 1px solid var(--line2); display: grid; place-items: center; font-size: .76rem; font-weight: 800;
}
.q-opt:hover:not(:disabled) { border-color: var(--acc, var(--brand)); transform: translateX(4px); }
.q-opt:disabled { cursor: default; }
.q-opt.pilih { border-color: var(--acc, var(--brand)); background: color-mix(in srgb, var(--acc, var(--brand)) 9%, transparent); }
.q-opt.benar { border-color: var(--green); background: rgba(5, 150, 105, .12); }
.q-opt.salah { border-color: var(--red); background: rgba(220, 38, 38, .1); }
.q-feedback { margin-top: 16px; border-radius: 12px; padding: 14px 16px; font-size: .88rem; animation: rise .3s ease; display: none; }
.q-feedback.show { display: block; }
.q-feedback.ok { background: rgba(5, 150, 105, .12); border: 1px solid rgba(5, 150, 105, .4); }
.q-feedback.no { background: rgba(220, 38, 38, .1); border: 1px solid rgba(220, 38, 38, .35); }
.q-feedback b { display: block; margin-bottom: 4px; }
.q-nav { display: flex; gap: 10px; margin-top: 18px; justify-content: space-between; }

.q-result { text-align: center; animation: pop .35s ease; }
.q-result .ring {
  width: 150px; height: 150px; margin: 6px auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--acc, var(--brand)) calc(var(--p) * 1%), var(--surface2) 0);
  position: relative;
}
.q-result .ring::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: var(--surface); }
.q-result .ring b { position: relative; z-index: 1; font-family: var(--font-display); font-size: 2.1rem; }
.q-result .ring small { position: relative; z-index: 1; display: block; font-size: .7rem; color: var(--muted); }
.q-result h3 { font-size: 1.3rem; }
.q-result p { color: var(--muted); font-size: .9rem; }
.q-result .r-meta { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 16px 0 22px; }

/* ============================================================
   TRANSKRIP NILAI
   ============================================================ */
.trans-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.trans-id { display: flex; gap: 14px; align-items: center; }
.trans-id .t-av { width: 58px; height: 58px; border-radius: 16px; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; flex: none; }
.trans-id h2 { margin: 0; font-size: 1.25rem; }
.trans-id p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.trans-sum { display: flex; gap: 10px; flex-wrap: wrap; }
.trans-sum .ts { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; text-align: center; min-width: 96px; }
.trans-sum .ts b { display: block; font-family: var(--font-display); font-size: 1.28rem; color: var(--acc, var(--brand)); }
.trans-sum .ts span { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
table.trans { width: 100%; border-collapse: collapse; font-size: .86rem; min-width: 720px; }
table.trans th, table.trans td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.trans th { background: var(--surface2); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); position: sticky; top: 0; }
table.trans tbody tr:hover { background: var(--brand-soft); }
table.trans td.num { font-variant-numeric: tabular-nums; font-weight: 700; }
.predikat { display: inline-grid; place-items: center; min-width: 30px; height: 24px; padding: 0 8px; border-radius: 7px; font-weight: 800; font-size: .78rem; }
.predikat.A { background: rgba(5, 150, 105, .15); color: var(--green); }
.predikat.B { background: rgba(37, 99, 235, .14); color: var(--brand); }
.predikat.C { background: rgba(245, 158, 11, .16); color: #b45309; }
[data-theme="dark"] .predikat.C { color: var(--amber); }
.predikat.D { background: rgba(220, 38, 38, .12); color: var(--red); }
.status-t { font-size: .76rem; font-weight: 800; }
.status-t.tuntas { color: var(--green); }
.status-t.remed { color: var(--red); }
.predikat.kosong { background: rgba(148, 163, 184, .16); color: var(--muted); }
.status-t.kosong { color: var(--muted2); font-weight: 600; }
.ann-act { display: inline-flex; gap: 6px; margin-left: auto; }
.ac-foot .ann-act .btn { padding: 5px 10px; font-size: .74rem; }

/* ============================================================
   DOKUMEN
   ============================================================ */
.up-zone {
  border: 2px dashed var(--line2); border-radius: 16px; background: var(--surface);
  padding: 34px 20px; text-align: center; cursor: pointer; transition: .22s ease;
}
.up-zone:hover, .up-zone.drag { border-color: var(--acc, var(--brand)); background: color-mix(in srgb, var(--acc, var(--brand)) 6%, transparent); }
.up-zone .uz-ico { font-size: 2rem; color: var(--acc, var(--brand)); margin-bottom: 8px; }
.up-zone b { display: block; font-size: .98rem; }
.up-zone span { font-size: .8rem; color: var(--muted); }
.doc-item {
  display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); padding: 13px 16px; animation: rise .3s ease;
}
.doc-item .d-ico { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; flex: none; font-size: 1.15rem; background: var(--brand-soft); color: var(--brand); }
.doc-item .d-body { flex: 1; min-width: 0; }
.doc-item .d-body b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item .d-body small { color: var(--muted2); font-size: .74rem; }
.doc-item .d-act { display: flex; gap: 7px; flex: none; }

/* ---------- komposer pengumuman (tenaga pendidik) ---------- */
.compose { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--acc, var(--brand)); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); margin-bottom: 20px; }
.compose h3 { font-size: 1rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.compose .row { display: flex; gap: 10px; flex-wrap: wrap; }
.compose .row .field { flex: 1; min-width: 200px; margin-bottom: 10px; }

/* ---------- modal & toast ---------- */
#modal { position: fixed; inset: 0; z-index: 90; display: none; place-items: center; padding: 4vw; background: rgba(2, 8, 20, .55); backdrop-filter: blur(4px); }
#modal.open { display: grid; }
.modal-box { width: min(640px, 100%); max-height: 86vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .3s ease; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { margin: 0; font-size: 1.05rem; flex: 1; }
.modal-body { padding: 22px; font-size: .92rem; }
.modal-body h4 { margin-top: 1.2em; }

#toastBox { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 95; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  background: var(--text); color: var(--bg); padding: .8em 1.4em; border-radius: 999px;
  font-size: .86rem; font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .3s ease;
  display: flex; align-items: center; gap: 8px; max-width: 90vw;
}
.toast.ok { background: #047857; color: #fff; }
.toast.no { background: #b91c1c; color: #fff; }

/* ---------- empty ---------- */
.empty { text-align: center; padding: 44px 20px; color: var(--muted); background: var(--surface); border: 1px dashed var(--line2); border-radius: var(--r); }
.empty .e-ico { font-size: 2.2rem; color: var(--muted2); margin-bottom: 8px; }
.empty b { display: block; color: var(--text); font-size: .98rem; }
.empty span { font-size: .84rem; }

/* ============================================================
   KEGIATAN BERSAMA · PANEL KELOLA · UNDANGAN
   ============================================================ */
.kg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }

.kg-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.kg-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--muted2); opacity: .5;
}
.kg-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--shadow-lg); }
.kg-card.live::before { background: #16a34a; opacity: 1; }
.kg-card.akan::before { background: var(--brand); opacity: 1; }
.kg-card.selesai::before { background: var(--muted2); opacity: .6; }
.kg-card h3 { font-size: 1.02rem; line-height: 1.35; margin: 0; }

.kg-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.kg-status {
  display: inline-flex; align-items: center; gap: 6px; font-size: .7rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; padding: .32em .8em; border-radius: 999px;
  background: var(--surface2); color: var(--muted); border: 1px solid var(--line2);
}
.kg-status.live { background: rgba(22, 163, 74, .14); color: #16a34a; border-color: rgba(22, 163, 74, .35); animation: kgPulse 1.8s ease-in-out infinite; }
.kg-status.akan { background: var(--brand-soft); color: var(--brand); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
@keyframes kgPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .35); } 50% { box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); } }

.kg-meta { display: flex; flex-direction: column; gap: 5px; font-size: .8rem; color: var(--muted); }
.kg-meta span { display: flex; align-items: center; gap: 7px; }
.kg-meta .i { width: 14px; height: 14px; flex: none; color: var(--muted2); }

.kg-peserta { display: flex; flex-wrap: wrap; gap: 6px; }
.kg-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }

/* ---------- Halaman pilih: tukar kode undangan ---------- */
.pick-undang { margin-top: 30px; }
.pu-box {
  display: flex; gap: 16px; align-items: flex-start; background: var(--surface);
  border: 1px dashed color-mix(in srgb, var(--brand) 45%, var(--line2));
  border-radius: var(--r); padding: 20px 22px; box-shadow: var(--shadow);
}
.pu-ico {
  width: 48px; height: 48px; flex: none; border-radius: 14px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand); font-size: 1.35rem;
}
.pu-body { flex: 1; min-width: 0; }
.pu-body h3 { margin: 0 0 4px; font-size: 1.05rem; }
.pu-body p { margin: 0 0 12px; font-size: .85rem; color: var(--muted); }
.pu-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pu-form .inp-wrap { position: relative; display: flex; align-items: center; flex: 1; min-width: 210px; }
.pu-form .inp-wrap .i { position: absolute; left: 13px; color: var(--muted2); pointer-events: none; }
.pu-form input {
  width: 100%; padding: .72em 1em .72em 40px; font: inherit; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--text); background: var(--surface2);
  border: 1px solid var(--line2); border-radius: 10px;
}
.pu-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }

/* ---------- kode undangan ---------- */
.kode-undangan { font-family: var(--font-mono, ui-monospace, monospace); letter-spacing: .08em; color: var(--brand); }

/* ---------- panel admin ---------- */
.admin-page .pick-card { cursor: pointer; }
.admin-page .stat-card .val { color: var(--brand); }
.admin-page .list-item { cursor: default; }
.admin-page .list-item:hover { transform: none; }
/* daftar pengguna: tombol Profil & Hapus turun baris bila kolom sempit */
.admin-page .list-item:has(.li-akun) { flex-wrap: wrap; row-gap: 8px; }
.admin-page .li-akun { width: 100%; flex-wrap: wrap; justify-content: flex-end; }


@media (max-width: 1020px) {
  .tb-nav { display: none; }
  #btnMenu { display: grid; }
  .tb-act .btn.hide-sm { display: none; }
  .brand .txt small { max-width: 150px; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-in { grid-template-columns: 1fr; }
  .hero-visual { min-height: 300px; margin-top: 10px; }
  .auth-split { grid-template-columns: 1fr; }
  .auth-visual { min-height: auto; gap: 24px; }
  .auth-visual .steps { display: none; }
  .sec { padding: 52px 0; }
}
@media (max-width: 560px) {
  :root { --top-h: 60px; }
  .brand .txt small { display: none; }
  .brand .txt b { font-size: .98rem; }
  .tb-act { gap: 6px; }
  .tb-act .btn { padding: .55em 1em; font-size: .8rem; }
  #userChip { max-width: 120px; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 40px; }
  .space-head .sh-in { flex-direction: column; align-items: flex-start; }
  .trans-sum .ts { min-width: 84px; padding: 8px 12px; }
  .wiz-foot { flex-direction: column; }
}

/* ============================================================
   HALAMAN BACA LANGSUNG (#/materi & #/perpustakaan mode baca)
   ============================================================ */
.mx-head { margin-bottom: 6px; }
.mx-head h1 {
  font-family: var(--font-display); font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: -.02em; margin: 10px 0 6px; color: var(--text);
}
.mx-head p { color: var(--muted); max-width: 66ch; line-height: 1.65; }
.mx-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mx-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.mx-chip {
  cursor: pointer; font-size: .76rem; padding: .45em 1em;
  background: var(--surface); border: 1px solid var(--line); color: var(--muted);
  transition: .18s ease;
}
.mx-chip:hover { color: var(--brand); border-color: rgba(37, 99, 235, .35); }
.mx-chip.on {
  background: var(--brand-soft); border-color: var(--brand);
  color: var(--brand); font-weight: 800;
}
.mx-cari { margin-top: 14px; max-width: 480px; }
.mx-ringkas { color: var(--muted); font-size: .86rem; margin: 20px 0 12px; }
.mx-grup { margin-bottom: 26px; }
.mx-grup-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.mx-grup-head .li-body { display: flex; flex-direction: column; gap: 2px; }
.mx-grup-head b {
  font-family: var(--font-display); font-size: 1.12rem; letter-spacing: -.01em; color: var(--text);
}
.mx-grup-head small { color: var(--muted); font-size: .8rem; }
.mx-grup .list-item { text-align: left; }
/* isi buku pada mode baca perpustakaan — paragraf baru dari baris asli */
.bk-isi { white-space: pre-line; word-break: break-word; }
/* chip kehadiran pada kartu kegiatan */
.kg-hadir { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
@media (max-width: 560px) {
  .mx-cari { max-width: none; }
  .mx-chips { gap: 6px; }
  .mx-chip { font-size: .7rem; padding: .4em .8em; }
}

/* ============================================================
   RUANG LIVE KEGIATAN (overlay gabung → ruangan guru/dosen)
   ============================================================ */
.live-room {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(8, 12, 24, .74);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  display: flex; padding: clamp(10px, 3vw, 34px); overflow: auto;
}
[data-theme="dark"] .live-room { background: rgba(3, 6, 14, .84); }
.lr-in {
  margin: auto; width: min(1080px, 100%);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: calc(var(--r) + 6px);
  box-shadow: 0 30px 80px rgba(2, 8, 23, .45);
  display: flex; flex-direction: column; overflow: hidden;
}
.lr-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.lr-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lr-title { padding: 15px 20px 0; }
.lr-title h2 {
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  letter-spacing: -.02em; margin: 0 0 4px;
}
.lr-title p { color: var(--muted); font-size: .86rem; margin: 0; }
.lr-body { display: grid; grid-template-columns: 1.2fr .95fr; gap: 16px; padding: 16px 20px; }
.lr-kiri, .lr-kanan { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.lr-panggung {
  border: 1px solid var(--line); border-radius: var(--r); padding: 24px 20px;
  background: linear-gradient(160deg, var(--brand-soft), transparent 72%), var(--surface2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; text-align: center; min-height: 200px;
}
.lr-panggung.tunggu {
  background: repeating-linear-gradient(135deg, var(--surface2), var(--surface2) 12px,
    var(--surface) 12px, var(--surface) 24px);
}
.lr-panggung b { font-family: var(--font-display); font-size: 1.12rem; }
.lr-panggung p { color: var(--muted); font-size: .86rem; line-height: 1.6; max-width: 54ch; margin: 0; }
.lr-panggung .e-ico { font-size: 2rem; color: var(--muted); }
.lr-live-dot {
  width: 13px; height: 13px; border-radius: 50%; background: var(--green);
  animation: lrPulse 1.7s ease-out infinite;
}
@keyframes lrPulse {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, .55); }
  70% { box-shadow: 0 0 0 13px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}
.lr-kode { font-size: .74rem; color: var(--muted); word-break: break-all; }
.lr-host {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 14px; border: 1px dashed var(--line);
  border-radius: var(--r); background: var(--surface2);
}
.lr-host h4 { width: 100%; display: flex; align-items: center; gap: 6px; font-size: .84rem; margin: 0; }
.lr-host .inp-wrap { flex: 1 1 190px; }
.lr-host select, .lr-host input { font-size: .84rem; }
.lr-hadir, .lr-chat {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface2); padding: 13px 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.lr-hadir h4, .lr-chat h4 {
  display: flex; align-items: center; gap: 6px; font-size: .84rem; margin: 0; color: var(--text);
}
.lr-hadir-list { display: flex; flex-wrap: wrap; gap: 6px; }
.lr-hadir-note { font-size: .75rem; color: var(--muted); margin: 0; }
.lr-host-tag { color: var(--brand); font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; }
.lr-chat { flex: 1; min-height: 0; }
.lr-chat-list {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 250px; overflow: auto; padding-right: 4px;
}
.lr-msg {
  display: grid; grid-template-columns: auto 1fr; gap: 1px 8px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px 12px 12px 4px; padding: 8px 11px;
}
.lr-msg b { font-size: .75rem; color: var(--brand); grid-column: 1; }
.lr-msg small { font-size: .68rem; color: var(--muted); grid-column: 2; text-align: right; }
.lr-msg span { grid-column: 1 / -1; font-size: .86rem; line-height: 1.5; word-break: break-word; }
.lr-msg.saya { background: var(--brand-soft); border-color: rgba(37, 99, 235, .3); border-radius: 12px 12px 4px 12px; }
.lr-msg.kosong span { color: var(--muted); font-style: italic; }
.lr-chat-form { display: flex; gap: 8px; }
.lr-chat-form .inp-wrap { flex: 1; }
.lr-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 13px 20px; border-top: 1px solid var(--line);
  background: var(--surface2); flex-wrap: wrap;
}
.lr-foot-note { display: flex; align-items: center; gap: 6px; font-size: .77rem; color: var(--muted); }
@media (max-width: 860px) {
  .lr-body { grid-template-columns: 1fr; }
  .lr-chat-list { max-height: 190px; }
  .lr-foot { justify-content: center; }
}

