/* wali.in — gaya tampilan
   Header gelap, panel terang, garis hitam tebal dan bayangan offset. */
:root {
  --night: #161B2E;
  --night-2: #2A3048;
  --paper: #F7F7F4;
  --white: #FFFFFF;
  --ink: #12131A;
  --muted: #545867;
  --line: #D6D6CF;
  --lime: #DDFB5A;
  --indigo: #4F46E5;
  --lilac: #E4E2FF;
  --violet: #8B85FF;
  --pink: #FFC7D3;
  --rose: #FF8FA3;
  --yellow: #FFF0B3;
  --alert: #C0263C;
  --ok: #2E7D4F;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 4px 4px 0 var(--ink);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--night); }
body {
  font-family: var(--font);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }
[hidden] { display: none !important; }

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--night);
}

/* ---------- Header ---------- */
.bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  background: var(--night);
}
.brand { display: flex; align-items: center; gap: 9px; }
.word { color: var(--white); font-weight: 800; font-size: 21px; letter-spacing: -0.04em; }
.word .dot { color: var(--lime); }
.word .in { color: var(--rose); }
.bar-r { display: flex; align-items: center; gap: 8px; }
.role-pill { border: 1.5px solid currentColor; border-radius: 999px; padding: 3px 9px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.06em; white-space: nowrap; }
.role-wali { color: var(--lime); }
.role-ketua { color: var(--lilac); }
.role-ortu { color: var(--pink); }
.role-pill.on-light { color: var(--ink); background: var(--lime); border: 2px solid var(--ink); align-self: flex-start; }
.role-ketua.on-light { background: var(--lilac); }
.role-ortu.on-light { background: var(--pink); }
.icon-btn {
  position: relative; width: 40px; height: 40px; flex: none;
  border-radius: 50%; border: 0; background: var(--night-2); color: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn.light { background: var(--white); color: var(--ink); border: 2px solid var(--ink); width: 36px; height: 36px; }
.icon-btn.flip svg { transform: scaleX(-1); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.badge {
  position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--rose); color: var(--ink); border: 2px solid var(--night);
  font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.demo-bar { background: var(--yellow); color: var(--ink); font-size: 12.5px; font-weight: 600; padding: calc(6px + env(safe-area-inset-top)) 16px 6px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.demo-bar button { border: 1.5px solid var(--ink); background: var(--white); border-radius: 999px; padding: 2px 10px; font-size: 12px; font-weight: 700; }
.demo-bar + .bar { padding-top: 14px; }

.menu-card {
  margin: 0 16px 12px; background: var(--white); border: 2px solid var(--ink); border-radius: 18px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}

/* ---------- Panel ---------- */
.panel {
  flex: 1; background: var(--paper); border-radius: 26px 26px 0 0;
  padding: 22px 16px 24px; display: flex; flex-direction: column; gap: 14px;
}
.nav {
  position: sticky; bottom: 0; z-index: 10; display: grid; gap: 6px;
  background: var(--white); border-top: 2px solid var(--ink);
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
}
.nav button {
  border: 2px solid transparent; background: none; border-radius: 999px; padding: 7px 4px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--muted); min-height: 44px;
}
.nav button.on { background: var(--lime); border-color: var(--ink); color: var(--ink); font-weight: 800; }
@media (max-width: 380px) { .nav button svg { display: none; } }

/* ---------- Tipografi ---------- */
.h1 { margin: 0; font-size: 27px; line-height: 1.12; font-weight: 800; letter-spacing: -0.03em; text-wrap: balance; }
.h2 { margin: 6px 0 0; font-size: 17px; font-weight: 800; letter-spacing: -0.01em; }
.eyebrow { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.accent { color: var(--indigo); font-weight: 800; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.ink { color: var(--ink); }
.mono { font-variant-numeric: tabular-nums; }
.hello { display: flex; flex-direction: column; gap: 4px; }
.hello p { margin: 0; }
.big { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.big small { font-size: 14px; }
.count { background: var(--ink); color: var(--lime); border-radius: 999px; padding: 1px 10px; font-size: 12.5px; font-weight: 800; letter-spacing: 0; }
.h1 .count { font-size: 14px; vertical-align: middle; }

/* ---------- Tata letak ---------- */
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.empty { margin: 0; padding: 16px; border: 2px dashed var(--line); border-radius: 16px; color: var(--muted); text-align: center; font-size: 14px; }

/* ---------- Kartu ---------- */
.card {
  background: var(--white); border: 2px solid var(--ink); border-radius: 20px;
  padding: 14px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow);
}
.card h3 { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.25; }
.card p { margin: 0; }
.card.soft { box-shadow: none; background: var(--white); }
.card.hero { gap: 8px; }
.card.hero.lime { background: var(--lime); }
.card.hero.pink { background: var(--pink); }
.card.hero.yellow { background: var(--yellow); }
.card.hero.lilac { background: var(--lilac); }
.card.alert-card { background: var(--pink); }
.card.split { flex-direction: row; padding: 0; overflow: hidden; gap: 0; }
.split-side { width: 64px; flex: none; display: flex; justify-content: center; padding-top: 16px; border-right: 2px solid var(--ink); }
.split.lime .split-side { background: var(--lime); }
.split.lilac .split-side { background: var(--lilac); }
.split.yellow .split-side { background: var(--yellow); }
.split-main { flex: 1; min-width: 0; padding: 13px; display: flex; flex-direction: column; gap: 6px; }
.mini-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }

/* ---------- Statistik ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat { border: 2px solid var(--ink); border-radius: 14px; padding: 9px 8px; box-shadow: 3px 3px 0 var(--ink); }
.stat b { display: block; font-size: 22px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { font-size: 11.5px; font-weight: 700; }
.stat.h { background: var(--lime); }
.stat.s { background: var(--lilac); }
.stat.i { background: var(--yellow); }
.stat.a { background: var(--pink); }

/* ---------- Tag status ---------- */
.tag { display: inline-flex; align-self: flex-start; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.tag.h { background: var(--lime); }
.tag.s { background: var(--lilac); }
.tag.i { background: var(--yellow); }
.tag.a { background: var(--pink); }
.tag.t { background: var(--white); border-style: dashed; }

/* ---------- Tombol ---------- */
.btn {
  border: 2px solid var(--ink); background: var(--ink); color: var(--white);
  border-radius: 999px; padding: 10px 16px; font-weight: 800; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  text-decoration: none; min-height: 44px;
}
.btn.block { width: 100%; }
.btn.grow { flex: 1; }
.btn.big-btn { color: var(--lime); padding: 14px; font-size: 15px; box-shadow: 4px 4px 0 var(--lime); border-color: var(--ink); }
.btn.ghost { background: var(--white); color: var(--ink); }
.btn.dark { background: var(--ink); color: var(--white); }
.btn.warn { background: var(--pink); color: var(--ink); }
.btn.wa { background: #25D366; color: var(--ink); }
.btn.small { padding: 6px 12px; font-size: 12.5px; min-height: 36px; }
.btn:disabled { opacity: 0.6; cursor: default; }
.link-btn { border: 0; background: none; padding: 4px 0; font-weight: 700; color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; align-self: flex-start; }
.link-btn.center { align-self: center; }
.attach { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; border: 1.5px dashed var(--ink); background: var(--paper); border-radius: 10px; padding: 5px 9px; font-size: 12.5px; font-weight: 700; }

/* ---------- Formulir ---------- */
.form { display: flex; flex-direction: column; gap: 13px; }
.form.inline { flex-direction: row; gap: 8px; align-items: center; }
.form.inline select { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; background: var(--paper); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 13px; font-weight: 800; }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; border: 2px solid var(--ink); border-radius: 14px;
  padding: 11px 12px; background: var(--paper); font-size: 15px;
}
.field textarea { min-height: 76px; resize: vertical; }
.code-input { font-size: 22px !important; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: block; border: 2px solid var(--ink); border-radius: 999px; padding: 7px 14px; font-size: 13.5px; font-weight: 700; background: var(--white); }
.chip input:checked + span { background: var(--lime); font-weight: 800; }
.chip input:focus-visible + span { outline: 3px solid var(--indigo); outline-offset: 2px; }
.jam { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.jam-cell { position: relative; }
.jam-cell input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.jam-cell span { display: block; text-align: center; border: 2px solid var(--line); border-radius: 10px; padding: 7px 0; font-weight: 700; color: var(--muted); background: var(--white); }
.jam-cell input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--lime); font-weight: 800; }
.jam-cell input:focus-visible + span { outline: 3px solid var(--indigo); outline-offset: 2px; }
.upload { border: 2px dashed var(--ink); border-radius: 14px; padding: 10px 12px; background: var(--paper); display: flex; flex-direction: column; gap: 8px; }
.upload-row { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; line-height: 1.35; }
.upload-ic { width: 38px; height: 38px; flex: none; border-radius: 11px; background: var(--lilac); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.file-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload { position: relative; }
.upload:focus-within { outline: 3px solid var(--indigo); outline-offset: 2px; }
.thumb { width: 100%; max-height: 220px; object-fit: cover; border-radius: 10px; border: 2px solid var(--ink); }
.note { display: flex; gap: 9px; align-items: flex-start; border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; font-size: 13px; line-height: 1.4; }
.note svg { flex: none; margin-top: 1px; }
.note.lilac { background: var(--lilac); }
.note.lime { background: var(--lime); }
.note.warn { background: var(--yellow); }

.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--white); border: 2px solid var(--ink); border-radius: 999px; padding: 3px; gap: 3px; }
.segment button { border: 0; background: none; border-radius: 999px; padding: 8px 6px; font-size: 13px; font-weight: 700; min-height: 40px; }
.segment button.on { background: var(--ink); color: var(--lime); font-weight: 800; }

/* ---------- Daftar ---------- */
.list { display: flex; flex-direction: column; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 10px; background: var(--white); border: 2px solid var(--ink); border-radius: 16px; padding: 9px 11px; }
.list-row.pink { background: var(--pink); }
.list-row b { font-weight: 800; font-size: 14.5px; }
.list-row .tag { align-self: center; }
.avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; background: var(--lime); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 800; }
.list-row.pink .avatar { background: var(--white); }
.seg { display: flex; gap: 4px; flex: none; }
.seg button { width: 34px; height: 34px; border-radius: 10px; border: 2px solid var(--line); background: var(--white); color: var(--muted); font-weight: 800; font-size: 13px; }
.seg button.on { border-color: var(--ink); color: var(--ink); }
.seg button.h.on { background: var(--lime); }
.seg button.s.on { background: var(--lilac); }
.seg button.i.on { background: var(--yellow); }
.seg button.a.on { background: var(--ink); color: var(--pink); }
.progress-row { font-size: 13px; }

.invite { margin-top: 8px; background: var(--paper); border: 2px dashed var(--ink); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.code { font-size: 24px; font-weight: 800; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }

/* ---------- Notifikasi ---------- */
.feed { display: flex; flex-direction: column; gap: 8px; }
.nt { display: flex; gap: 11px; background: var(--white); border: 2px solid var(--ink); border-radius: 16px; padding: 11px 13px; }
.nt-dot { width: 12px; height: 12px; flex: none; border-radius: 50%; border: 2px solid var(--ink); margin-top: 4px; background: var(--lilac); }
.nt.alert .nt-dot { background: var(--rose); }
.nt.warn .nt-dot { background: var(--yellow); }
.nt.ok .nt-dot { background: var(--lime); }
.nt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nt-title { font-weight: 800; font-size: 14.5px; display: flex; align-items: center; gap: 7px; }
.nt-body p { margin: 0; font-size: 13.5px; }
.nt-body time { font-size: 12px; color: var(--muted); }
.new { width: 8px; height: 8px; border-radius: 50%; background: var(--alert); flex: none; }

/* ---------- Rekap ---------- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 6px; border-bottom: 2px solid var(--ink); }
.bar-col { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 2px; }
.bar-col small { font-size: 9.5px; color: var(--muted); line-height: 1; padding-bottom: 2px; }
.bar-fill { display: block; width: 100%; background: var(--indigo); border-radius: 4px 4px 0 0; }
.bar-fill.low { background: var(--alert); }
.table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 16px; background: var(--white); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: center; border-top: 1.5px solid var(--line); }
th { border-top: 0; background: var(--paper); font-size: 12px; }
td:first-child, th:first-child { text-align: left; }
tr.flag td:first-child small, tr.flag td.a { color: var(--alert); font-weight: 800; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.dh { text-align: center; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.day { aspect-ratio: 1; max-width: 100%; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: var(--paper); color: var(--muted); border: 2px solid transparent; }
.day.h { background: var(--lime); color: var(--ink); }
.day.s { background: var(--lilac); color: var(--ink); }
.day.i { background: var(--yellow); color: var(--ink); }
.day.a { background: var(--pink); color: var(--ink); border-color: var(--ink); }
.day.t { background: var(--white); color: var(--ink); border: 2px dashed var(--ink); }
.day.today { outline: 3px solid var(--indigo); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Masuk ---------- */
.login { flex: 1; display: flex; flex-direction: column; }
.login-hero { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: calc(40px + env(safe-area-inset-top)) 24px 28px; text-align: center; color: #C9CCD8; }
.login-hero p { margin: 0; font-size: 15px; }
.login-word { color: var(--white); font-weight: 800; font-size: 44px; letter-spacing: -0.05em; line-height: 1; }
.login-word .dot, .login-top .dot { color: var(--lime); }
.login-word .in, .login-top .in { color: var(--rose); }
.login-top { display: flex; justify-content: space-between; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; }
.login-sheet { background: var(--paper); border-radius: 26px 26px 0 0; padding: 22px 16px calc(28px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 10px; }
.login-sheet.tall { flex: 1; gap: 14px; }
.role-card { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--white); border: 2px solid var(--ink); border-radius: 18px; padding: 12px 14px; box-shadow: 3px 3px 0 var(--ink); min-height: 64px; }
.role-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; }
.role-ic.lime { background: var(--lime); }
.role-ic.lilac { background: var(--lilac); }
.role-ic.pink { background: var(--pink); }
.role-txt { flex: 1; display: flex; flex-direction: column; }
.role-txt b { font-size: 15.5px; font-weight: 800; }
.role-txt span { font-size: 12.5px; color: var(--muted); }
.chev { font-size: 26px; font-weight: 800; }

/* ---------- Lain-lain ---------- */
.loading { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #C9CCD8; min-height: 60vh; }
.spinner { width: 36px; height: 36px; border-radius: 50%; border: 4px solid var(--night-2); border-top-color: var(--lime); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast {
  position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  z-index: 50; max-width: min(440px, calc(100% - 32px)); background: var(--ink); color: var(--white);
  border: 2px solid var(--lime); border-radius: 14px; padding: 11px 16px; font-weight: 700; font-size: 14px; text-align: center;
}
.photo-view { position: fixed; inset: 0; z-index: 40; background: rgb(18 19 26 / 0.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; }
.photo-view img { max-width: 100%; max-height: 80vh; border-radius: 12px; }
.photo-view .btn { background: var(--white); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
@media (min-width: 560px) { #app { border-left: 1px solid var(--night-2); border-right: 1px solid var(--night-2); } }

/* ---------- Admin ---------- */
.search { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 12px; padding: 9px 12px; background: var(--white); font-size: 14px; }
.admin-row .row { margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.4; }
.check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--ink); }
.danger-box { border: 2px solid var(--ink); border-radius: 14px; padding: 12px; background: var(--pink); }
.link-btn.danger { color: var(--alert); }
.link-btn.small { font-size: 12.5px; }

/* ---------- Foto profil & verifikasi ---------- */
.avatar-pic { flex: none; border-radius: 50%; border: 2px solid var(--ink); background: var(--lime); overflow: hidden; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; }
.avatar-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vcheck { vertical-align: -3px; flex: none; }
.wali-card { display: flex; align-items: center; gap: 12px; background: var(--white); border: 2px solid var(--ink); border-radius: 18px; padding: 12px 14px; }
.wali-name { font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
label.btn { cursor: pointer; }

.req { display: inline-block; background: var(--pink); border: 1.5px solid var(--ink); border-radius: 999px; padding: 0 7px; font-size: 11px; font-weight: 800; margin-left: 4px; vertical-align: 1px; }
.nt-del { margin-left: auto; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; }
.nt-del:hover { border-color: var(--ink); color: var(--ink); }
.clear-ask { display: flex; flex-direction: column; gap: 8px; border: 2px solid var(--ink); border-radius: 14px; padding: 10px 12px; background: var(--pink); }

/* ---------- Kerangka halaman (HP & PC) ---------- */
.shell { flex: 1; display: flex; flex-direction: column; }
.nav-side-only { display: none !important; }

/* Daftar siswa: di HP berupa kartu */
.stu-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "av main del" "av status del"; align-items: center; column-gap: 10px; row-gap: 2px; }
.stu-av { grid-area: av; align-self: start; margin-top: 2px; }
.stu-main { grid-area: main; min-width: 0; }
.stu-status { grid-area: status; min-width: 0; }
.stu-del { grid-area: del; }
.stu-c, .stu-head { display: none; }

/* ---------- Tampilan lebar untuk PC / laptop ---------- */
@media (min-width: 900px) {
  #app:has(> .shell) { max-width: 1280px; }
  .shell {
    display: grid; grid-template-columns: 230px minmax(0, 1fr);
    grid-template-rows: auto auto auto 1fr;
    grid-template-areas: "demo demo" "bar bar" "nav menu" "nav main";
    column-gap: 20px; padding: 0 20px 20px;
  }
  .shell.no-nav { grid-template-columns: minmax(0, 1fr); grid-template-areas: "demo" "bar" "menu" "main"; }
  .shell > .demo-bar { grid-area: demo; margin: 0 -20px; }
  .shell > .bar { grid-area: bar; padding-left: 4px; padding-right: 4px; }
  .shell > .menu-card { grid-area: menu; margin: 0 0 14px auto; width: min(420px, 100%); }
  .shell > .panel { grid-area: main; border-radius: 26px; padding: 28px 30px 32px; }
  .shell > .nav {
    grid-area: nav; grid-row: 3 / 5; align-self: start; position: sticky; top: 84px; bottom: auto;
    display: flex !important; flex-direction: column; gap: 6px;
    border: 2px solid var(--ink); border-radius: 22px; padding: 12px;
  }
  .shell > .nav button { justify-content: flex-start; padding: 10px 14px; font-size: 14.5px; }
  .shell > .nav button svg { display: inline-block; }
  .nav-side-only { display: flex !important; }

  /* Daftar siswa jadi tabel */
  .stu-table { gap: 0; border: 2px solid var(--ink); border-radius: 18px; overflow: hidden; background: var(--white); }
  .stu-head, .stu-row {
    display: grid; grid-template-columns: 40px minmax(120px, 1.4fr) minmax(70px, 0.6fr) minmax(110px, 1fr) minmax(120px, 0.9fr) minmax(150px, 1.3fr) 40px;
    grid-template-areas: none; align-items: center; column-gap: 14px;
  }
  .stu-head { padding: 10px 14px; background: var(--night); color: var(--white); font-size: 12.5px; font-weight: 800; letter-spacing: 0.02em; }
  .stu-row { border: 0; border-top: 1.5px solid #E4E2DA; border-radius: 0; padding: 10px 14px; }
  .stu-row:nth-child(odd) { background: #FAF9F4; }
  .stu-row > * { grid-area: auto; }
  .stu-av { align-self: center; margin: 0; }
  .stu-meta { display: none; }
  .stu-c { display: block; font-size: 14px; overflow-wrap: anywhere; }
  .stu-c.mono { white-space: nowrap; }
  .stu-status { font-size: 14px; text-align: left; }
  .stu-status .link-btn { text-align: left; }
  .stu-del { justify-self: end; }
}

/* Petunjuk pasang di iPhone */
.ios-tip { background: var(--lilac); border: 2px solid var(--ink); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.45; }
.ios-tip ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.ios-tip p { margin: 0; }
.ios-tip-x { border: 0; background: none; font-size: 22px; line-height: 1; padding: 0 4px; color: var(--ink); }
