/* =========================================================
   NALARKU LMS — sistem desain
   Terinspirasi Canvas, Google Classroom & Notion: bersih, berwarna per mapel,
   kartu membulat, mode gelap, responsif penuh (mobile-first di area penting).
   ========================================================= */
:root {
  --brand: #5b5bf7;
  --brand-2: #22d3ee;
  --bg: #f4f6fb;
  --bg-2: #eef1f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #0f172a;
  --text-2: #475569;
  --muted: #64748b;
  --line: #e2e8f0;
  --ok: #16a34a;
  --ok-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --info: #2563eb;
  --info-bg: #dbeafe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --shadow-lg: 0 10px 40px rgba(15, 23, 42, .14);
  --side: 264px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0b1020;
  --bg-2: #0f152a;
  --surface: #131a30;
  --surface-2: #182041;
  --text: #e5e9f5;
  --text-2: #b6bfd6;
  --muted: #8a94b0;
  --line: #24304f;
  --ok-bg: #0f2e1d;
  --warn-bg: #33270b;
  --danger-bg: #3a1414;
  --info-bg: #0f2347;
  --ok: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.55; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 800; }
h2 { font-size: 1.3rem; font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 .8em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
code, .code { font-family: ui-monospace, 'SFMono-Regular', Menlo, monospace; font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
pre.code { display: block; padding: 12px; white-space: pre-wrap; overflow: auto; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.c-ok { color: var(--ok); }
.c-bad { color: var(--danger); }
.dim { opacity: .5; }
[hidden] { display: none !important; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side); background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 40; transition: transform .25s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 40px; height: 40px; border-radius: 12px; object-fit: contain; }
.brand b { display: block; font-weight: 800; letter-spacing: .04em; font-size: 1.05rem; background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; color: var(--muted); font-size: .75rem; line-height: 1.2; max-width: 170px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: 4px 10px 16px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text-2); font-weight: 500; font-size: .93rem; }
.sidebar nav a:hover { background: var(--bg-2); text-decoration: none; color: var(--text); }
.sidebar nav a.active { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); font-weight: 700; }
.sidebar nav a .ic { width: 22px; text-align: center; }
.sidebar nav a.mini { font-size: .86rem; padding: 7px 12px; }
.nav-h { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 16px 12px 6px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.side-foot { font-size: .72rem; color: var(--muted); padding: 12px 18px; border-top: 1px solid var(--line); }
.main { flex: 1; margin-left: var(--side); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-title { font-weight: 700; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; font-size: 1rem; }
.icon-btn:hover { text-decoration: none; background: var(--bg-2); }
.bell i { position: absolute; top: -4px; right: -4px; background: var(--danger); color: #fff; font-style: normal; font-size: .65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--text); border-radius: 999px; padding: 3px 10px 3px 3px; cursor: pointer; font: inherit; font-weight: 600; }
.content { padding: 24px; max-width: 1320px; width: 100%; margin: 0 auto; }
.scrim { display: none; }
.only-m { display: none; }

.dropdown { position: relative; }
.dd-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dd-menu.scroll { max-height: 60vh; overflow: auto; }
.dropdown.open .dd-menu { display: block; }
.dd-menu a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-size: .92rem; }
.dd-menu a:hover { background: var(--bg-2); text-decoration: none; }
.dd-head { padding: 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.dd-head small { display: block; color: var(--muted); }

.avatar { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: #fff; font-weight: 700; font-size: .9rem; object-fit: cover; flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .72rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.6rem; }

/* ---------- Komponen ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-h h2, .card-h h3 { margin: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.gap { gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.inline { display: inline; }
.page-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-h h1 { margin-bottom: 4px; }
.sec-t { margin: 26px 0 12px; font-size: 1.1rem; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: 14px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 11px; border: 1px solid transparent; background: var(--brand); color: #fff; font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; transition: transform .08s, filter .15s, background .15s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 6px 11px; font-size: .82rem; border-radius: 9px; }
.btn.lg { padding: 13px 22px; font-size: 1rem; }
.btn.block { width: 100%; }
.btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--bg-2); filter: none; }
.btn.danger { background: var(--danger); }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.link { background: none; border: 0; color: var(--brand); cursor: pointer; font: inherit; padding: 0; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--bg-2); color: var(--text-2); white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); font-size: .78rem; font-weight: 600; color: var(--text-2); }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.callout { background: color-mix(in srgb, var(--brand) 8%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-left: 4px solid var(--brand); padding: 12px 14px; border-radius: 12px; margin: 14px 0; font-size: .93rem; }
.alert { padding: 12px 14px; border-radius: 12px; margin: 12px 0; font-size: .93rem; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--danger-bg); color: var(--danger); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

.toasts { position: fixed; top: 70px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 40px)); }
.toast { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 12px; padding: 12px 36px 12px 14px; box-shadow: var(--shadow-lg); position: relative; font-size: .92rem; animation: tin .3s; transition: opacity .4s, transform .4s; }
.toast.error { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast.hide { opacity: 0; transform: translateX(30px); pointer-events: none; }
.toast button { position: absolute; right: 8px; top: 8px; background: none; border: 0; font-size: 1.1rem; color: var(--muted); cursor: pointer; }
@keyframes tin { from { opacity: 0; transform: translateY(-10px); } }

.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-ic { font-size: 2.6rem; margin-bottom: 6px; }
.empty h3 { color: var(--text); }
.empty.big { padding: 80px 16px; }

/* Formulir */
.form label { display: block; font-weight: 600; font-size: .87rem; margin-bottom: 12px; color: var(--text-2); }
.form input:not([type=checkbox]):not([type=radio]):not([type=color]), .form select, .form textarea, select, input.search, .in-sm, .token-in {
  display: block; width: 100%; margin-top: 5px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; font-size: .93rem; transition: border .15s, box-shadow .15s; }
select { width: auto; margin-top: 0; padding: 8px 32px 8px 10px; }
.form select { width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.form input[type=file] { padding: 8px; background: var(--surface-2); }
.form input[type=color] { width: 100%; height: 42px; border: 1px solid var(--line); border-radius: 10px; margin-top: 5px; background: var(--surface); padding: 3px; }
.form.compact > * { margin-bottom: 10px; }
.form.compact label { margin-bottom: 8px; }
.check { display: flex !important; align-items: center; gap: 8px; font-weight: 500 !important; color: var(--text) !important; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 10px; }
.search { max-width: 360px; margin: 0 0 14px; }
.search.sm { max-width: 260px; margin: 0; padding: 8px 12px; }
.in-sm { margin: 0; padding: 6px 8px; width: 80px; }
.in-sm.wide { width: 100%; min-width: 140px; }
.token-in { text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 800; font-size: 1.1rem; }
.pw { display: flex; gap: 6px; }
.pw input { flex: 1; }
.pw button { margin-top: 5px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; width: 46px; cursor: pointer; }
.quill-box { background: var(--surface); min-height: 320px; border-radius: 0 0 10px 10px; font-size: 1rem; }
.quill-box.sm { min-height: 160px; }
.ql-toolbar.ql-snow { border-radius: 10px 10px 0 0; border-color: var(--line) !important; background: var(--surface-2); }
.ql-container.ql-snow { border-color: var(--line) !important; }
[data-theme="dark"] .ql-snow .ql-stroke { stroke: var(--text-2); }
[data-theme="dark"] .ql-snow .ql-fill, [data-theme="dark"] .ql-snow .ql-picker-label { fill: var(--text-2); color: var(--text-2); }
.ql-editor { min-height: inherit; }

/* Tabel */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; }
.card.table-wrap > h3 { padding: 16px 16px 0; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: color-mix(in srgb, var(--brand) 4%, transparent); }
.table .sticky { position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 170px; }
.table th.sticky { background: var(--surface-2); }
.grade td { text-align: center; }
.grade td.sticky { text-align: left; }
.matrix .sel-sm, .sel-sm { padding: 5px 24px 5px 6px; font-size: .8rem; max-width: 150px; }

/* Statistik */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--text); }
a.stat:hover { text-decoration: none; transform: translateY(-2px); transition: transform .15s; }
.stat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; background: color-mix(in srgb, var(--brand) 12%, transparent); flex: none; }
.stat b { display: block; font-size: 1.4rem; font-weight: 800; line-height: 1.1; }
.stat small { color: var(--muted); font-weight: 600; }
.chart-box { position: relative; height: 300px; }
.prog { height: 7px; background: var(--bg-2); border-radius: 9px; overflow: hidden; margin: 8px 0 4px; }
.prog.sm { height: 5px; margin: 2px 0; min-width: 70px; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--c, var(--brand)), var(--brand-2)); border-radius: 9px; }
.donut { --p: 0; width: 140px; height: 140px; margin: 10px auto; border-radius: 50%; background: conic-gradient(var(--brand) calc(var(--p) * 1%), var(--bg-2) 0); display: grid; place-items: center; position: relative; }
.donut::before { content: ''; position: absolute; inset: 14px; background: var(--surface); border-radius: 50%; }
.donut b, .donut small { position: relative; display: block; text-align: center; }
.donut b { font-size: 1.5rem; }
.score-big { text-align: center; margin: 10px 0; }
.score-big b { font-size: 3.2rem; font-weight: 800; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; }
.score-big small { display: block; color: var(--muted); font-weight: 600; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.list li:last-child { border: 0; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-left: 4px solid var(--c, var(--brand)); background: var(--surface-2); padding: 8px 12px; border-radius: 8px; margin-bottom: 8px; font-size: .9rem; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quick a { padding: 10px; border: 1px solid var(--line); border-radius: 10px; font-size: .86rem; font-weight: 600; color: var(--text); background: var(--surface-2); }
.person { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.person.sm { margin: 0; gap: 8px; }

/* Sambutan */
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px; background: linear-gradient(120deg, var(--brand), color-mix(in srgb, var(--brand) 55%, var(--brand-2))); color: #fff; border-radius: 22px; padding: 26px 30px; margin-bottom: 22px; overflow: hidden; position: relative; }
.welcome::after { content: ''; position: absolute; width: 300px; height: 300px; right: -80px; top: -120px; border-radius: 50%; background: rgba(255, 255, 255, .1); }
.welcome h1 { color: #fff; margin-bottom: 4px; }
.welcome p { opacity: .9; margin: 0; }
.welcome-anim { width: 170px; height: auto; position: relative; z-index: 1; flex: none; }

/* Kartu mapel */
.mapel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.mapel-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); color: var(--text); display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
a.mapel-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); text-decoration: none; }
.cover { position: relative; aspect-ratio: 16/8; overflow: hidden; background: var(--bg-2); }
.cover img, .mat-cover img, .reader-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-fallback { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 60%, #fff), var(--c)); }
.cover-fallback span { font-size: 2.6rem; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .2)); }
.mapel-card .cover::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--c) 70%, transparent)); }
.mc-body { padding: 14px 16px 16px; position: relative; flex: 1; }
.mc-ic { position: absolute; top: -26px; left: 14px; width: 46px; height: 46px; border-radius: 14px; background: var(--surface); display: grid; place-items: center; font-size: 1.5rem; box-shadow: var(--shadow); border: 3px solid var(--c); z-index: 2; }
.mc-body h3 { margin: 18px 0 2px; font-size: 1rem; }
.mc-body small { color: var(--muted); font-size: .8rem; }

/* Halaman mapel */
.mapel-hero { position: relative; border-radius: 22px; overflow: hidden; min-height: 190px; display: flex; align-items: flex-end; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); margin-bottom: 14px; }
.mapel-hero > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mh-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, color-mix(in srgb, var(--c) 92%, #000) 0%, color-mix(in srgb, var(--c) 60%, transparent) 60%, rgba(0, 0, 0, .15)); }
.mh-body { position: relative; display: flex; align-items: center; gap: 18px; padding: 26px 28px; color: #fff; }
.mh-ic { width: 72px; height: 72px; border-radius: 20px; background: rgba(255, 255, 255, .2); backdrop-filter: blur(8px); display: grid; place-items: center; font-size: 2.3rem; border: 1px solid rgba(255, 255, 255, .35); flex: none; }
.mh-body h1 { color: #fff; font-size: 1.9rem; margin: 2px 0; text-shadow: 0 2px 12px rgba(0, 0, 0, .25); }
.mh-k { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.mh-meta { font-size: .82rem; opacity: .9; }
.tabs { display: flex; gap: 4px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 5px; margin-bottom: 20px; scrollbar-width: none; position: sticky; top: 60px; z-index: 20; box-shadow: var(--shadow); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 14px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: .88rem; white-space: nowrap; }
.tabs a:hover { background: var(--bg-2); text-decoration: none; }
.tabs a.active { background: var(--brand); color: #fff; }
.seg-tabs { display: inline-flex; background: var(--bg-2); border-radius: 11px; padding: 4px; gap: 2px; flex-wrap: wrap; }
.seg-tabs a { padding: 7px 14px; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: .86rem; }
.seg-tabs a:hover { text-decoration: none; color: var(--text); }
.seg-tabs a.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.kelas-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .88rem; }
.cp-box summary { cursor: pointer; font-weight: 700; padding: 8px 0; }

.bab { margin-bottom: 26px; }
.bab-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.bab-h > div { flex: 1; }
.bab-h h3 { margin: 0; }
.bab-n { width: 36px; height: 36px; border-radius: 11px; background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); display: grid; place-items: center; font-weight: 800; flex: none; }
.tp { font-size: .88rem; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin: 6px 0 12px; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.mat-grid.sm { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.mat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; color: var(--text); box-shadow: var(--shadow); transition: transform .15s; display: flex; flex-direction: column; }
.mat-card:hover { transform: translateY(-3px); text-decoration: none; }
.mat-cover { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--bg-2); }
.mat-cover.anim { background: linear-gradient(135deg, #0f172a, #1e1b4b); display: grid; place-items: center; }
.mat-cover.anim img { position: static; width: 92%; height: 92%; object-fit: contain; }
.mat-b { padding: 12px 14px; }
.mat-b small { color: var(--muted); font-weight: 600; font-size: .75rem; }
.mat-b b { display: block; margin: 2px 0 4px; line-height: 1.3; }
.mat-b p { font-size: .83rem; color: var(--text-2); margin: 0 0 6px; }
.sem-h { margin: 14px 0 8px; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.atp { padding-left: 22px; margin: 0; }
.atp li { margin-bottom: 10px; }
.atp-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.atp-act { margin-left: auto; display: flex; gap: 6px; }
.atp-act form { display: inline; }
.add-box summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: 8px 0; }

/* Pembaca materi */
.reader { max-width: 880px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.reader-cover { position: relative; aspect-ratio: 21/8; overflow: hidden; }
.reader-h, .reader-body, .reader > h3, .reader > .embed, .reader > .callout, .reader > .anim-box, .reader > .file-chip, .reader > .media, .reader > p, .reader-f { margin-left: 32px; margin-right: 32px; }
.reader-h { padding-top: 26px; }
.reader-h h1 { font-size: 2rem; margin: 10px 0 6px; }
.lead { font-size: 1.08rem; color: var(--text-2); }
.reader-body { font-size: 1.04rem; line-height: 1.75; }
.reader-f { padding: 20px 0 30px; border-top: 1px solid var(--line); margin-top: 26px; }
.anim-box { margin-top: 16px; margin-bottom: 16px; background: radial-gradient(circle at 50% 30%, #1e1b4b, #0b1020); border-radius: 18px; padding: 16px; text-align: center; }
.anim-box img { width: 100%; max-height: 420px; object-fit: contain; }
.anim-box figcaption { color: #c7d2fe; font-size: .85rem; margin-top: 6px; }
.anim-preview img { width: 100%; max-height: 220px; object-fit: contain; background: #0f172a; border-radius: 12px; padding: 8px; margin-bottom: 12px; }
.embed { position: relative; aspect-ratio: 16/9; border-radius: 14px; overflow: hidden; margin: 16px 0; background: #000; }
.embed.tall { aspect-ratio: 4/3; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media { width: 100%; border-radius: 12px; margin: 10px 0; display: block; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; color: var(--text); font-weight: 600; margin: 6px 0; }
.file-chip small { color: var(--brand); }
.done-box { background: var(--ok-bg); color: var(--ok); padding: 14px; border-radius: 12px; font-weight: 700; }
.reflect { margin-top: 14px; font-size: .92rem; padding: 12px 14px; background: var(--warn-bg); border-radius: 12px; }
.pager { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

.rich { overflow-wrap: anywhere; }
.rich img { border-radius: 10px; height: auto; }
.rich table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.rich td, .rich th { border: 1px solid var(--line); padding: 6px 10px; }
.rich blockquote { border-left: 4px solid var(--brand); margin: 12px 0; padding: 6px 14px; background: var(--surface-2); border-radius: 0 10px 10px 0; }
.rich pre { background: #0f172a; color: #e2e8f0; padding: 12px; border-radius: 10px; overflow: auto; }
.rich iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 12px; }
.rich .ql-align-center { text-align: center; }
.rich .ql-align-right { text-align: right; }
.rich.box { background: var(--surface-2); padding: 12px; border-radius: 10px; }

/* Tugas / daftar */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task { display: flex; align-items: center; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; color: var(--text); box-shadow: var(--shadow); border-left: 4px solid var(--c, var(--brand)); }
.task:hover { text-decoration: none; transform: translateX(3px); transition: transform .15s; }
.task-ic { width: 42px; height: 42px; border-radius: 12px; background: var(--bg-2); display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.task-b { flex: 1; min-width: 0; }
.task-b b { display: block; }
.task-s { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* CBT daftar */
.exam-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.exam-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); border-top: 5px solid var(--c); }
.ec-top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.ec-ic { font-size: 1.8rem; width: 52px; height: 52px; border-radius: 14px; background: color-mix(in srgb, var(--c) 15%, transparent); display: grid; place-items: center; flex: none; }
.ec-top small { color: var(--muted); font-weight: 600; }
.ec-top h3 { margin: 0; }
.ec-meta { list-style: none; padding: 0; margin: 0 0 8px; display: flex; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--text-2); }
.ec-score { text-align: center; padding: 12px; border-radius: 12px; margin: 12px 0 8px; }
.ec-score b { font-size: 2.2rem; display: block; line-height: 1; }
.ec-score.pass { background: var(--ok-bg); color: var(--ok); }
.ec-score.fail { background: var(--danger-bg); color: var(--danger); }
.token { font-weight: 800; letter-spacing: .15em; color: var(--brand); }
.token-box { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 2px dashed var(--brand); border-radius: 12px; padding: 6px 12px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.token-box b { font-size: 1.25rem; letter-spacing: .2em; color: var(--brand); }
.live { color: var(--ok); font-weight: 700; font-size: .8rem; animation: blink 1.4s infinite; }
@keyframes blink { 50% { opacity: .4; } }
.soal-list { max-height: 480px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.soal-pick { display: flex !important; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); margin: 0 !important; font-weight: 500 !important; color: var(--text) !important; cursor: pointer; font-size: .9rem; }
.soal-pick:hover { background: var(--surface-2); }
.soal-pick input { margin-top: 4px; accent-color: var(--brand); }
.type-pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.type-pick label { margin: 0 !important; }
.type-pick input { display: none; }
.type-pick span { display: inline-block; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; color: var(--text-2); }
.type-pick input:checked + span { background: var(--brand); color: #fff; border-color: var(--brand); }
.opt-edit { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.opt-edit input:not([type=checkbox]) { flex: 1; margin: 0 !important; }
.opt-edit select { width: auto !important; }
.opt-edit .check { margin: 0 !important; white-space: nowrap; }
.review { border-left: 4px solid var(--line); padding: 12px 16px; margin: 12px 0; border-radius: 0 12px 12px 0; background: var(--surface-2); }
.card.review { border-left-width: 5px; }
.review.right { border-left-color: var(--ok); }
.review.half { border-left-color: var(--warn); }
.review.wrong { border-left-color: var(--danger); }

/* ---------- Lembar ujian ---------- */
.exam-body { background: var(--bg); user-select: none; -webkit-user-select: none; }
.exam-body textarea, .exam-body input { user-select: text; -webkit-user-select: text; }
.exam { --fs: 1; min-height: 100vh; display: flex; flex-direction: column; }
.exam-top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 60%, #000)); color: #fff; }
.et-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.et-l b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.et-l small { opacity: .85; font-size: .8rem; }
.et-ic { font-size: 1.6rem; }
.et-r { display: flex; align-items: center; gap: 10px; }
.timer { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.3rem; background: rgba(255, 255, 255, .18); padding: 6px 14px; border-radius: 10px; }
.timer.warn { background: #f59e0b; }
.timer.crit { background: #dc2626; animation: blink 1s infinite; }
.save-st { font-size: .8rem; opacity: .9; }
.save-st.err { color: #fecaca; font-weight: 700; }
.exam-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; padding: 20px; max-width: 1200px; width: 100%; margin: 0 auto; }
.exam-q { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); font-size: calc(1rem * var(--fs)); }
.font-ctl { font-size: .8rem; color: var(--muted); text-align: right; margin-bottom: 8px; }
.font-ctl button { border: 1px solid var(--line); background: var(--surface); border-radius: 6px; margin-left: 4px; cursor: pointer; padding: 2px 8px; color: var(--text); }
.q-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.q-no { font-weight: 800; color: var(--brand); }
.q-text { font-size: 1.05em; margin-bottom: 14px; }
.q-img { max-height: 320px; border-radius: 12px; margin: 8px 0 14px; display: block; }
.opts { display: flex; flex-direction: column; gap: 10px; }
.opt { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 2px solid var(--line); border-radius: 14px; cursor: pointer; transition: border .15s, background .15s; }
.opt:hover { border-color: color-mix(in srgb, var(--brand) 50%, transparent); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-l { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--bg-2); font-weight: 800; flex: none; }
.opt-t { padding-top: 4px; }
.opt-t p { margin: 0; }
.opt:has(input:checked) { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.opt:has(input:checked) .opt-l { background: var(--brand); color: #fff; }
.hint { font-size: .85rem; color: var(--muted); margin-top: 8px; }
.bs-table { width: 100%; border-collapse: collapse; }
.bs-table th, .bs-table td { border: 1px solid var(--line); padding: 10px; }
.bs-table td:not(:first-child), .bs-table th:not(:first-child) { text-align: center; width: 80px; }
.bs-table input { width: 20px; height: 20px; accent-color: var(--brand); }
.isian, .esai { width: 100%; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; font: inherit; font-size: 1em; background: var(--surface); color: var(--text); }
.jodoh { display: flex; flex-direction: column; gap: 10px; }
.jd-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; }
.jd-l { padding: 10px 12px; background: var(--surface-2); border-radius: 10px; border: 1px solid var(--line); }
.jd-row select { width: 100%; padding: 10px; }
.exam-ctl { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); }
.ragu { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--warn); cursor: pointer; }
.ragu input { width: 18px; height: 18px; accent-color: #f59e0b; }
.qnav { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); align-self: start; position: sticky; top: 76px; }
.qnav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-bottom: 12px; }
.qnav-grid button { aspect-ratio: 1; border-radius: 10px; border: 2px solid var(--line); background: var(--surface); font-weight: 700; cursor: pointer; color: var(--text); }
.qnav-grid button.done { background: var(--brand); color: #fff; border-color: var(--brand); }
.qnav-grid button.ragu { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.qnav-grid button.cur { outline: 3px solid color-mix(in srgb, var(--brand) 40%, transparent); outline-offset: 1px; }
.qnav-leg { display: flex; gap: 10px; font-size: .75rem; color: var(--muted); margin-bottom: 14px; flex-wrap: wrap; }
.qnav-leg i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 4px; }
.l-done { background: var(--brand); }
.l-ragu { background: #f59e0b; }
.l-cur { border: 2px solid var(--brand); }
.modal { position: fixed; inset: 0; background: rgba(2, 6, 23, .6); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 200; padding: 16px; }
.modal-box { background: var(--surface); border-radius: 20px; padding: 26px; max-width: 440px; width: 100%; box-shadow: var(--shadow-lg); }

/* Forum */
.forum-list { display: flex; flex-direction: column; gap: 10px; }
.forum-item { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; color: var(--text); }
.forum-item > div { flex: 1; min-width: 0; }
.forum-item p { margin: 0; }
.forum-item:hover { text-decoration: none; border-color: var(--brand); }
.forum-item.pinned { border-color: color-mix(in srgb, var(--brand) 50%, transparent); background: color-mix(in srgb, var(--brand) 4%, var(--surface)); }
.thread { max-width: 860px; display: flex; flex-direction: column; gap: 12px; }
.post { display: flex; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.post.main { border-width: 2px; border-color: color-mix(in srgb, var(--brand) 30%, var(--line)); }
.post.teacher { background: color-mix(in srgb, var(--info) 6%, var(--surface)); }
.post-b { flex: 1; min-width: 0; }
.post-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.ann-list { display: flex; flex-direction: column; gap: 12px; }
.ann { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.ann.pinned { border-left: 4px solid var(--brand); }
.ann.mini { padding: 10px 0; border: 0; border-top: 1px dashed var(--line); border-radius: 0; }
.ann-h { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.ann-h small { color: var(--muted); }

/* Nilai & presensi */
.g-tugas, .g-ujian, .g-harian { font-size: .9rem; }
.grade-input { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 16px; margin: 10px 0 16px; }
.grade-input label { display: flex !important; align-items: center; justify-content: space-between; gap: 8px; margin: 0 !important; padding: 6px 0; border-bottom: 1px dashed var(--line); color: var(--text) !important; font-weight: 500 !important; }
.grade-input input { width: 80px !important; margin: 0 !important; }
.att td { text-align: center; }
.att td:nth-child(2) { text-align: left; }
.att-r input { display: none; }
.att-r span { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--line); font-weight: 800; cursor: pointer; color: var(--muted); }
.att-r.ok input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.att-r.info input:checked + span { background: var(--info); border-color: var(--info); color: #fff; }
.att-r.warn input:checked + span { background: #f59e0b; border-color: #f59e0b; color: #fff; }
.att-r.danger input:checked + span { background: var(--danger); border-color: var(--danger); color: #fff; }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.doc-row > div:nth-child(2) { flex: 1; min-width: 0; }
.doc-ic { font-size: 1.5rem; }

/* Jadwal & kalender */
.week { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.day.today { border: 2px solid var(--brand); }
.day h4 { margin: 0 0 10px; }
.slot { position: relative; border-left: 4px solid var(--c); background: var(--surface-2); padding: 8px 10px; border-radius: 8px; margin-bottom: 8px; }
.slot b, .slot small { display: block; }
.slot b { font-size: .88rem; }
.slot-x { position: absolute; top: 2px; right: 6px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-h { text-align: center; font-size: .75rem; font-weight: 700; color: var(--muted); padding: 6px 0; }
.cal-d { min-height: 92px; border: 1px solid var(--line); border-radius: 10px; padding: 4px; background: var(--surface-2); overflow: hidden; }
.cal-d.empty { background: transparent; border: 0; }
.cal-d.today { border: 2px solid var(--brand); }
.cal-d > span { font-size: .8rem; font-weight: 700; }
.ev { display: block; font-style: normal; font-size: .68rem; padding: 2px 5px; border-radius: 5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: var(--info-bg); color: var(--info); }
.ev-libur { background: var(--danger-bg); color: var(--danger); }
.ev-ujian { background: var(--warn-bg); color: var(--warn); }
.ev-tugas { background: var(--ok-bg); color: var(--ok); }
.legend { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.legend .ev { display: inline-block; }
.profile-top { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.notif { list-style: none; padding: 0; margin: 0; }
.notif li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.notif li.new { background: color-mix(in srgb, var(--brand) 6%, transparent); font-weight: 600; }
.class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.class-card { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); }
.class-card p { margin: 0; }
.cc-n { font-size: 1.8rem; font-weight: 800; color: var(--brand); }
.class-card.t8 .cc-n { color: #0b8043; }
.class-card.t9 .cc-n { color: #e8710a; }
.pager-n { display: inline-flex; gap: 4px; margin-left: auto; }
.pager-n a { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line); }
.pager-n a.active { background: var(--brand); color: #fff; }
.danger-zone summary { color: var(--danger); font-weight: 700; cursor: pointer; }

/* ---------- Installer ---------- */
.install-body { min-height: 100vh; display: grid; place-items: center; padding: 30px 16px; background: radial-gradient(circle at 20% 10%, #c7d2fe, transparent 40%), radial-gradient(circle at 90% 80%, #a5f3fc, transparent 40%), #eef2ff; }
.install-card { background: #fff; color: #0f172a; border-radius: 24px; padding: 30px; max-width: 640px; width: 100%; box-shadow: 0 30px 80px rgba(30, 27, 75, .18); }
.install-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.install-head img { width: 56px; }
.install-head h1 { margin: 0; }
.install-head p { margin: 0; color: #64748b; }
.req { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .88rem; }
.req .ok { color: #16a34a; }
.req .bad { color: #dc2626; font-weight: 700; }
.seg { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.seg label { display: flex; gap: 8px; align-items: center; font-weight: 600; }

/* ---------- Intro ---------- */
.intro { --dur: 4s; position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; background: radial-gradient(ellipse at center, #1e1b4b 0%, #0b1020 70%); color: #fff; overflow: hidden; transition: opacity .8s, transform .8s; }
.intro.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
body.intro-on { overflow: hidden; }
.intro-stars { position: absolute; inset: -50%; background-image: radial-gradient(1px 1px at 20% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 70% 60%, #c7d2fe, transparent), radial-gradient(1px 1px at 40% 80%, #fff, transparent), radial-gradient(2px 2px at 85% 20%, #a5f3fc, transparent), radial-gradient(1px 1px at 10% 70%, #fff, transparent), radial-gradient(1.5px 1.5px at 55% 15%, #fff, transparent); background-size: 300px 300px; animation: drift 40s linear infinite; opacity: .7; }
@keyframes drift { to { transform: translate(150px, 150px); } }
.intro-orbit { position: absolute; width: min(80vmin, 620px); height: min(80vmin, 620px); animation: spin 22s linear infinite; }
.intro-orbit span { position: absolute; left: 50%; top: 50%; font-size: clamp(1.4rem, 4vmin, 2.2rem); transform: rotate(calc(360deg / var(--n) * var(--i))) translate(min(40vmin, 310px)) rotate(calc(-360deg / var(--n) * var(--i))); margin: -.6em; opacity: 0; animation: popin .5s calc(var(--i) * .08s + .3s) forwards; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes popin { to { opacity: 1; } }
.intro-center { position: relative; text-align: center; padding: 20px; max-width: 560px; }
.intro-logo { width: 120px; height: 120px; margin-bottom: 14px; filter: drop-shadow(0 0 30px rgba(124, 124, 255, .6)); }
.il-ring { stroke-dasharray: 330; stroke-dashoffset: 330; animation: draw 1.4s .2s ease forwards; }
.il-n { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.2s .7s ease forwards; }
.il-dot { transform-origin: 82px 30px; transform: scale(0); animation: dot .5s 1.6s cubic-bezier(.3, 1.8, .5, 1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes dot { to { transform: scale(1); } }
.intro-title { font-size: clamp(1.6rem, 5vw, 2.6rem); font-weight: 800; color: #fff; opacity: 0; animation: up .8s 1.2s forwards; background: linear-gradient(90deg, #fff, #c7d2fe, #a5f3fc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.intro-sub { opacity: 0; animation: up .8s 1.5s forwards; color: #c7d2fe; font-size: 1.05rem; }
.intro-school { opacity: 0; animation: up .8s 1.8s forwards; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; color: #a5b4fc; }
@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.intro-bar { width: 220px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .15); margin: 22px auto 0; overflow: hidden; }
.intro-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7c7cff, #22d3ee); animation: load var(--dur) linear forwards; }
@keyframes load { to { width: 100%; } }
.intro-skip { position: absolute; right: 20px; bottom: 20px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); color: #fff; padding: 8px 16px; border-radius: 999px; cursor: pointer; font: inherit; }

/* ---------- Landing & Login ---------- */
.bare { min-height: 100vh; }
.landing-body { background: var(--bg); }
.land-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; padding: 16px clamp(16px, 4vw, 48px); }
.land-nav .brand { color: #fff; padding: 0; }
.land-nav .brand b { background: none; color: #fff; -webkit-background-clip: initial; background-clip: initial; }
.land-nav .brand small { color: rgba(255, 255, 255, .8); }
.land-hero { position: relative; min-height: 92vh; display: flex; align-items: center; overflow: hidden; background: linear-gradient(135deg, #312e81, #0e7490); color: #fff; }
.lh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lh-overlay { position: absolute; inset: 0; background: linear-gradient(100deg, rgba(30, 27, 75, .92) 0%, rgba(30, 27, 75, .7) 50%, rgba(14, 116, 144, .4)); }
.lh-body { position: relative; padding: 110px clamp(16px, 6vw, 80px) 60px; max-width: 820px; }
.lh-body h1 { font-size: clamp(2rem, 5.4vw, 3.6rem); color: #fff; font-weight: 800; margin: 16px 0; letter-spacing: -.02em; }
.lh-body p { font-size: 1.15rem; color: #e0e7ff; }
.grad { background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pill { display: inline-block; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); font-size: .82rem; font-weight: 600; backdrop-filter: blur(6px); }
.lh-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0; }
.lh-cta .btn.ghost { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .3); }
.lh-stats { display: flex; gap: 30px; flex-wrap: wrap; }
.lh-stats b { display: block; font-size: 2rem; font-weight: 800; }
.lh-stats span { color: #c7d2fe; font-size: .85rem; }
.land-sec { padding: 60px clamp(16px, 6vw, 80px); max-width: 1300px; margin: 0 auto; }
.land-sec h2 { font-size: 1.8rem; text-align: center; margin-bottom: 30px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.feat-ic { font-size: 2rem; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 12%, transparent); margin-bottom: 12px; }
.feat p { color: var(--text-2); font-size: .92rem; margin: 0; }
.land-foot { text-align: center; padding: 30px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { position: relative; overflow: hidden; background: linear-gradient(135deg, #312e81, #0e7490); color: #fff; display: flex; align-items: flex-end; }
.login-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.la-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(30, 27, 75, .95), rgba(30, 27, 75, .35)); }
.la-body { position: relative; padding: 48px; }
.la-body h2 { color: #fff; font-size: 2.2rem; }
.la-body p { color: #c7d2fe; }
.la-anim { width: 220px; margin-bottom: 10px; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(20px, 6vw, 80px); background: var(--surface); }
.login-form .brand { padding: 0; margin-bottom: 30px; }
.login-form h1 { font-size: 2rem; }

/* ---------- Responsif ---------- */
@media (max-width: 1100px) {
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .exam-main { grid-template-columns: minmax(0, 1fr); }
  .qnav { position: fixed; inset: auto 0 0 0; top: auto; border-radius: 20px 20px 0 0; transform: translateY(105%); transition: transform .25s; z-index: 50; max-height: 75vh; overflow: auto; box-shadow: var(--shadow-lg); }
  .qnav.open { transform: none; }
  .exam-top .only-m { display: inline-grid; background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .3); }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .45); z-index: 35; }
  .main { margin-left: 0; }
  .only-m { display: inline-grid; }
  .only-d { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .grid-2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { min-height: 34vh; }
  .la-body { padding: 24px; }
  .la-body h2 { font-size: 1.5rem; }
  .la-anim { width: 120px; }
  .tabs { top: 58px; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  h1 { font-size: 1.35rem; }
  .welcome { padding: 20px; border-radius: 18px; }
  .welcome-anim { width: 90px; }
  .mapel-hero { min-height: 150px; border-radius: 18px; }
  .mh-body { padding: 18px; gap: 12px; }
  .mh-ic { width: 54px; height: 54px; font-size: 1.7rem; border-radius: 16px; }
  .mh-body h1 { font-size: 1.35rem; }
  .mapel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mc-body { padding: 12px; }
  .mc-body h3 { font-size: .9rem; }
  .mc-ic { width: 38px; height: 38px; font-size: 1.2rem; top: -20px; left: 10px; }
  .grid2 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 12px; gap: 10px; }
  .stat-ic { width: 38px; height: 38px; font-size: 1.1rem; }
  .stat b { font-size: 1.15rem; }
  .card { padding: 16px; border-radius: 14px; }
  .reader { border-radius: 16px; }
  .reader-h, .reader-body, .reader > h3, .reader > .embed, .reader > .callout, .reader > .anim-box, .reader > .file-chip, .reader > .media, .reader > p, .reader-f { margin-left: 16px; margin-right: 16px; }
  .reader-h h1 { font-size: 1.45rem; }
  .task { padding: 12px; gap: 10px; flex-wrap: wrap; }
  .task-s { width: 100%; justify-content: flex-start; }
  .exam-main { padding: 12px; }
  .exam-q { padding: 16px; border-radius: 14px; }
  .exam-top { padding: 8px 12px; }
  .et-l small { display: none; }
  .save-st { display: none; }
  .timer { font-size: 1.05rem; padding: 5px 10px; }
  .exam-ctl { flex-wrap: wrap; }
  .exam-ctl .ragu { order: -1; width: 100%; justify-content: center; }
  .exam-ctl .btn { flex: 1; }
  .jd-row { grid-template-columns: 1fr; }
  .jd-row > span { display: none; }
  .cal-d { min-height: 60px; }
  .ev { font-size: 0; height: 6px; padding: 0; }
  .search, .search.sm { max-width: none; width: 100%; }
  .toolbar > * { flex: 1 1 auto; }
  .seg-tabs { width: 100%; }
  .seg-tabs a { flex: 1; text-align: center; }
  .page-h { flex-direction: column; }
  .lh-stats { gap: 18px; }
  .req { grid-template-columns: 1fr; }
  .install-card { padding: 20px; }
  .toasts { right: 10px; left: 10px; max-width: none; }
}

/* Cetak */
@media print {
  .sidebar, .topbar, .tabs, .toolbar, .no-print, .btn, .toasts { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ccc; }
  body { background: #fff; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- Portal login per peran & Google ---------- */
.role-siswa { --role: #5b5bf7; }
.role-guru { --role: #0b8043; }
.role-admin { --role: #b91c1c; }
.login-body .login-form .btn:not(.ghost) { background: var(--role, var(--brand)); }
.login-body .la-overlay { background: linear-gradient(0deg, color-mix(in srgb, var(--role, #1e1b4b) 85%, #000), color-mix(in srgb, var(--role, #1e1b4b) 35%, transparent)); }
.role-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--bg-2); padding: 5px; border-radius: 14px; margin-bottom: 22px; }
.role-tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 10px; color: var(--text-2); font-weight: 700; font-size: .88rem; }
.role-tabs a span { font-size: 1.4rem; }
.role-tabs a:hover { text-decoration: none; background: var(--surface); }
.role-tabs a.active { background: var(--surface); color: var(--role, var(--brand)); box-shadow: var(--shadow); outline: 2px solid color-mix(in srgb, var(--role, var(--brand)) 35%, transparent); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--text); font-weight: 700; margin: 6px 0 8px; box-shadow: var(--shadow); }
.btn-google:hover { text-decoration: none; background: var(--surface-2); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 14px 0; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.portal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.portal { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; color: var(--text); box-shadow: var(--shadow); border-top: 5px solid var(--role); transition: transform .15s; }
.portal:hover { transform: translateY(-4px); text-decoration: none; }
.portal .p-ic { font-size: 2.2rem; }
.portal h3 { margin: 8px 0 4px; }
.portal p { color: var(--text-2); font-size: .9rem; margin: 0 0 12px; }
.portal b.go { color: var(--role); }
.copy-box { display: flex; gap: 6px; align-items: center; }
.copy-box code { flex: 1; padding: 9px 10px; overflow-x: auto; white-space: nowrap; }
@media (max-width: 700px) { .portal-grid { grid-template-columns: 1fr; } }
.back-link { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; font-weight: 700; font-size: .9rem; color: var(--text-2); padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 22px; background: var(--surface); }
.back-link:hover { text-decoration: none; color: var(--role, var(--brand)); border-color: var(--role, var(--brand)); }
.forgot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: .88rem; }
.forgot a { font-weight: 700; color: var(--role, var(--brand)); }

/* =========================================================
   Panggung 3D mapel (gaya "Try the Look")
   ========================================================= */
.s3d-wrap { --sc: var(--brand); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: auto 1fr; gap: 0 24px;
  background: radial-gradient(ellipse 70% 60% at 45% 75%, color-mix(in srgb, var(--sc) 10%, #fff) 0%, #f7f8fb 45%, #eef0f5 100%);
  border-radius: 28px; padding: 26px 28px 22px; overflow: hidden; border: 1px solid var(--line); transition: background .8s; }
[data-theme="dark"] .s3d-wrap { background: radial-gradient(ellipse 70% 60% at 45% 75%, color-mix(in srgb, var(--sc) 22%, #131a30) 0%, #0f152a 55%, #0b1020 100%); }
.s3d-head { grid-column: 1; z-index: 2; }
.s3d-head h2 { font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -.03em; margin: 0; }
.s3d-head p { color: var(--muted); margin: 4px 0 0; font-size: .9rem; }
.s3d { grid-column: 1; grid-row: 2; position: relative; height: clamp(340px, 56vh, 540px); perspective: 1500px; perspective-origin: 50% 35%; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; }
.s3d:active { cursor: grabbing; }
.s3d:focus-visible { box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--sc) 40%, transparent); border-radius: 20px; }
.s3d-floor { position: absolute; left: 4%; right: 4%; bottom: 8%; height: 34%; border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--sc) 18%, transparent) 0%, transparent 70%); transform: rotateX(70deg); transition: background .8s; }
.s3d-track { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .5s ease-out; }
.s3d-item { --w: clamp(92px, 15vw, 170px); position: absolute; left: 50%; bottom: 17%; width: var(--w); margin-left: calc(var(--w) / -2); padding: 0; border: 0; background: none; cursor: pointer;
  transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2, .85, .25, 1), opacity .7s, filter .7s; display: flex; flex-direction: column; align-items: center; color: var(--text); font: inherit; }
.s3d-float { display: block; width: 100%; aspect-ratio: 1; animation: s3dBob 4s ease-in-out infinite; }
.s3d-float img, .s3d-emoji { width: 100%; height: 100%; object-fit: contain; display: grid; place-items: center; pointer-events: none;
  filter: drop-shadow(0 18px 18px rgba(15, 23, 42, .22)) drop-shadow(0 4px 4px rgba(15, 23, 42, .12)); }
.s3d-emoji { font-size: calc(var(--w) * .72); line-height: 1; }
.s3d-shadow { width: 62%; height: 14px; margin-top: 4px; border-radius: 50%; background: radial-gradient(ellipse, rgba(15, 23, 42, .35), transparent 70%); animation: s3dShadow 4s ease-in-out infinite; }
.s3d-item:nth-child(odd) .s3d-float, .s3d-item:nth-child(odd) .s3d-shadow { animation-duration: 4.6s; }
@keyframes s3dBob { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-14px) rotate(1.5deg); } }
@keyframes s3dShadow { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(.78); opacity: .55; } }
.s3d-label { margin-top: 8px; font-weight: 800; font-size: .82rem; white-space: nowrap; opacity: 0; transform: translateY(6px); transition: opacity .4s, transform .4s; }
.s3d-item.active .s3d-label { opacity: 1; transform: none; }
.s3d-item.active .s3d-float { animation-duration: 3.2s; }
.s3d-item:not(.active):hover { filter: none !important; opacity: 1 !important; }
.s3d-nav { position: absolute; top: 46%; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 85%, transparent); color: var(--text); font-size: 1.5rem; line-height: 1; cursor: pointer; z-index: 200; backdrop-filter: blur(6px); box-shadow: var(--shadow); }
.s3d-nav.prev { left: 4px; }
.s3d-nav.next { right: 4px; }
.s3d-nav:hover { background: var(--sc); color: #fff; }
.s3d-dots { position: absolute; bottom: 2%; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 200; flex-wrap: wrap; padding: 0 50px; }
.s3d-dots i { width: 7px; height: 7px; border-radius: 9px; background: color-mix(in srgb, var(--text) 22%, transparent); cursor: pointer; transition: width .3s, background .3s; }
.s3d-dots i.active { width: 22px; background: var(--sc); }
.s3d-panel { grid-column: 2; grid-row: 1 / 3; align-self: center; background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 20px; padding: 20px; box-shadow: var(--shadow); z-index: 3; }
.s3d-panel.swap > :not(.s3d-thumbs) { animation: s3dIn .5s ease; }
@keyframes s3dIn { from { opacity: 0; transform: translateY(8px); } }
.s3d-k { color: var(--sc); font-weight: 800; text-transform: uppercase; letter-spacing: .06em; font-size: .72rem; }
.s3d-t { font-size: 1.35rem; margin: 4px 0 8px; }
.s3d-d { font-size: .86rem; color: var(--text-2); min-height: 4.4em; }
.s3d-chips .chip { font-size: .7rem; padding: 3px 8px; margin: 0 4px 4px 0; display: inline-block; }
.s3d-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 14px; text-align: center; }
.s3d-stats div { background: var(--bg-2); border-radius: 12px; padding: 8px 4px; }
.s3d-stats b { display: block; font-size: 1.15rem; color: var(--sc); }
.s3d-stats small { font-size: .66rem; color: var(--muted); }
.s3d-go { background: var(--sc) !important; }
.s3d-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-top: 16px; }
.s3d-thumbs button { aspect-ratio: 1; border-radius: 10px; border: 2px solid transparent; background: var(--bg-2); cursor: pointer; padding: 3px; font-size: 1.1rem; display: grid; place-items: center; transition: transform .2s, border-color .2s; }
.s3d-thumbs button img { width: 100%; height: 100%; object-fit: contain; }
.s3d-thumbs button:hover { transform: translateY(-2px); }
.s3d-thumbs button.active { border-color: var(--c); background: var(--surface); }

/* Hero landing dengan panggung 3D */
.land-3d { padding: 96px clamp(12px, 4vw, 48px) 30px; max-width: 1360px; margin: 0 auto; }
.land-3d .lh-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.land-3d .lh-intro h1 { font-size: clamp(1.8rem, 4.6vw, 3.2rem); font-weight: 800; letter-spacing: -.03em; margin: 8px 0 6px; line-height: 1.08; }
.land-3d .lh-intro p { color: var(--text-2); margin: 0; max-width: 560px; }
.land-3d .pill { background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 25%, transparent); color: var(--brand); }
.land-3d .grad { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-body .land-nav.light .brand { color: var(--text); }
.landing-body .land-nav.light .brand b { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.landing-body .land-nav.light .brand small { color: var(--muted); }
.view-toggle { display: inline-flex; background: var(--bg-2); border-radius: 10px; padding: 3px; }
.view-toggle a { padding: 6px 12px; border-radius: 8px; font-weight: 700; font-size: .84rem; color: var(--text-2); }
.view-toggle a.active { background: var(--surface); color: var(--brand); box-shadow: var(--shadow); }
.view-toggle a:hover { text-decoration: none; }

@media (max-width: 980px) {
  .s3d-wrap { grid-template-columns: minmax(0, 1fr); padding: 18px 12px; border-radius: 22px; }
  .s3d-panel { grid-column: 1; grid-row: auto; margin-top: 10px; }
  .s3d-thumbs { grid-template-columns: repeat(9, 1fr); }
}
@media (max-width: 600px) {
  .s3d { height: 330px; }
  .s3d-item { --w: 96px; bottom: 19%; }
  .s3d-thumbs { grid-template-columns: repeat(6, 1fr); }
  .s3d-nav { width: 36px; height: 36px; font-size: 1.2rem; }
  .land-3d { padding-top: 84px; }
}
.g3d-edit { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.g3d-edit > div:last-child { flex: 1; }
.g3d-prev { width: 96px; height: 96px; flex: none; border-radius: 18px; display: grid; place-items: center; font-size: 3rem; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--c) 22%, #fff), #f1f5f9); }
.g3d-prev img { width: 82%; height: 82%; object-fit: contain; filter: drop-shadow(0 8px 8px rgba(0,0,0,.2)); }
.s3d-wrap, .s3d { overflow: hidden; overflow: clip; }
.land-3d .lh-cta .btn.ghost { background: var(--surface); color: var(--text); border-color: var(--line); }
.s3d-item { --w: clamp(88px, 12.5vw, 150px); }
@media (max-width: 600px) { .s3d-item { --w: 92px; } }
.s3d { height: clamp(320px, 50vh, 480px); }
@media (max-width: 600px) { .s3d { height: 320px; } }
.role-tabs.two { grid-template-columns: repeat(2, 1fr); }
.nav-act { display: flex; gap: 8px; align-items: center; }
.dd-sep { border-top: 1px solid var(--line); margin: 6px 4px; }
.portal .p-daftar { display: block; margin-top: 8px; font-size: .84rem; font-weight: 700; color: var(--text-2); text-decoration: underline; cursor: pointer; }
.portal .p-daftar:hover { color: var(--role); }
@media (max-width: 480px) { .nav-act .btn.ghost { padding: 9px 10px; } }
.school-chip { font-size: .8rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); color: var(--brand); white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.school-chip:hover { text-decoration: none; }
.row-aktif { background: color-mix(in srgb, var(--brand) 6%, transparent); }
.kode-box { font-size: .82rem; background: var(--bg-2); border: 1px dashed color-mix(in srgb, var(--brand) 40%, transparent); padding: 6px 10px; border-radius: 10px; display: flex; align-items: center; gap: 6px; }
.kode-box b { letter-spacing: .15em; color: var(--brand); font-size: 1rem; }
.share-kode { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-kode .big { font-size: 1.6rem; font-weight: 800; letter-spacing: .2em; color: var(--brand); background: var(--bg-2); padding: 6px 16px; border-radius: 12px; border: 2px dashed var(--brand); }
@media (max-width: 700px) { .school-chip { display: none; } }
.sp-grid { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sp-item { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font-weight: 600; font-size: .9rem; }
.sp-item:hover, .sp-item.active { border-color: var(--brand); color: var(--brand); text-decoration: none; }
.cta-sekolah { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: linear-gradient(120deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface)); border: 1px solid var(--line); border-radius: 22px; padding: 28px; }
.cta-sekolah h2 { text-align: left; margin: 0 0 6px; }
.cta-sekolah p { margin: 0; color: var(--text-2); max-width: 640px; }
