/* =============================================================================
   style.css — komponen Buku Kerja Digital Guru
   -----------------------------------------------------------------------------
   Token desain (warna, ruang, huruf, radius, bayangan) ada di tokens.css.
   Kerangka aplikasi (sidebar, topbar, tabbar, drawer) ada di shell.css.
   Berkas ini hanya berisi komponen isi halaman.
   ========================================================================== */

/* -----------------------------------------------------------------------------
   Alias nama token lama -> token baru.
   Komponen di bawah masih memakai --radius, --gap, --pad, dan --nav-h. Alias
   ini menjaganya tetap bekerja tanpa harus mengganti ratusan baris sekaligus,
   sekaligus memastikan angkanya tetap berasal dari satu skala.
   -------------------------------------------------------------------------- */

:root {
  --radius-sm: var(--r-sm);
  --radius: var(--r-md);
  --radius-lg: var(--r-lg);
  --shadow: var(--shadow-sm);
  --header-h: var(--topbar-h);
  --nav-h: var(--tabbar-h);
  --gap: var(--sp-3);
  --pad: var(--sp-4);
}

@keyframes slide {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.section { display: flex; flex-direction: column; gap: 10px; }

.section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.section__title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section__link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}
.section__link [data-lucide] { width: 15px; height: 15px; }

.pad { padding: var(--sp-6); }

/* -------------------------------- hero ---------------------------------- */

.hero { display: flex; flex-direction: column; gap: 3px; }

.hero__hi { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.hero__meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hero__meta [data-lucide] { width: 15px; height: 15px; }
.hero__meta--strong { color: var(--primary); font-weight: 600; }

/* -------------------------------- kartu --------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--pad);
  box-shadow: var(--shadow-sm);
}

.card__row { display: flex; align-items: center; gap: 12px; }

/* Kartu "kelas berikutnya" */
.card--next {
  background: linear-gradient(145deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: var(--text-invert);
  border: none;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card--next__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  background: rgba(255, 255, 255, .18);
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.card--next__badge [data-lucide] { width: 15px; height: 15px; }

.card--next__mapel { font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.card--next__kelas { font-size: 15px; opacity: .95; font-weight: 600; }

.card--next__waktu {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  opacity: .92;
  margin-top: 2px;
}
.card--next__waktu [data-lucide] { width: 15px; height: 15px; }

.card--next__aksi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.card--next__aksi .btn--primary { background: #fff; color: var(--primary-strong); }
.card--next__aksi .btn--ghost {
  background: rgba(255, 255, 255, .16);
  color: #fff;
  border-color: rgba(255, 255, 255, .3);
}

.card--next-empty {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
.card--next-empty [data-lucide] { color: var(--success); }

.card--cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: var(--primary);
  background: var(--primary-soft-2);
}
.card--cta strong { display: block; font-size: 16px; }

.card--meta { display: flex; flex-direction: column; gap: 12px; }

.meta-row { display: flex; align-items: flex-start; gap: 12px; }
.meta-row [data-lucide] { color: var(--primary); margin-top: 2px; }
.meta-row strong { display: block; font-weight: 600; font-size: 14.5px; }

.card--score {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.big-score {
  font-size: 46px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--primary);
}

.card--score__sub {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.card--score__sub span { display: inline-flex; align-items: center; gap: 5px; }
.card--score__sub [data-lucide] { width: 15px; height: 15px; }

/* ------------------------------ quick action ---------------------------- */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.quick {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 86px;
  padding: 12px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, border-color .12s ease;
}
.quick:active { transform: scale(.97); }
.quick [data-lucide] { width: 24px; height: 24px; color: var(--primary); }

.quick--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-invert);
}
.quick--primary [data-lucide] { color: #fff; }

/* -------------------------------- daftar -------------------------------- */

.list { display: flex; flex-direction: column; gap: 8px; }
.list--compact { gap: 6px; }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--tap);
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .12s ease, transform .12s ease;
}
a.list-item:active { transform: scale(.99); border-color: var(--primary); }

.list-item.is-highlight { border-color: var(--primary); background: var(--primary-soft-2); }

.list-item__main { flex: 1; min-width: 0; }
.list-item__main strong {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item__main p { font-size: 12.5px; color: var(--text-muted); }
.list-item__main--link { display: block; }

.list-item__chev { color: var(--border-strong); width: 18px; height: 18px; }

.list-item__time {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 52px;
  padding-right: 11px;
  border-right: 1px solid var(--border);
}
.list-item__time strong { font-size: 14px; font-weight: 700; }
.list-item__time span { font-size: 11.5px; color: var(--text-muted); }

.list-item__icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.list-item__icon--warn { background: var(--warning-soft); color: var(--warning); }

/* Badge nomor absen / pertemuan */
.absen-badge {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--surface-3);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.absen-badge--lg {
  min-width: 52px;
  height: 52px;
  font-size: 22px;
  border-radius: 14px;
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.pert-badge {
  display: grid;
  place-items: center;
  min-width: 40px;
  height: 34px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 700;
}
.pert-badge--lg { min-width: 52px; height: 44px; font-size: 17px; }

.rank-badge {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface-3);
  font-size: 13px;
  font-weight: 700;
}
.rank-1 { background: #fde68a; color: #92400e; }
.rank-2 { background: #e2e8f0; color: #334155; }
.rank-3 { background: #fed7aa; color: #9a3412; }

/* ------------------------------- kelas ---------------------------------- */

.class-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }

.class-card {
  display: block;
  position: relative;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, border-color .12s ease;
}
a.class-card:active { transform: scale(.99); }

.class-card--full { padding: 0; }
.class-card__link { display: block; padding: 14px 14px 12px; }

.class-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.class-card__nama { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.class-card__head [data-lucide] { color: var(--border-strong); }

.class-card__mapel {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-top: 2px;
}

.class-card__stat {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.class-card__stat span { display: inline-flex; align-items: center; gap: 5px; }
.class-card__stat [data-lucide] { width: 15px; height: 15px; }

.class-card__actions {
  display: flex;
  gap: 4px;
  padding: 0 10px 10px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 8px;
  margin-top: 2px;
}

/* -------------------------------- stat ---------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.stat-grid--4 { grid-template-columns: repeat(2, 1fr); }

.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.stat [data-lucide] { color: var(--primary); width: 18px; height: 18px; }
.stat strong { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--text-muted); }

/* -------------------------------- menu ---------------------------------- */

/*
 * Mobile memakai satu kolom: label seperti "Jurnal Pembelajaran" beserta
 * keterangannya tidak muat di kartu selebar ~165px, sehingga teks membungkus
 * dan tinggi kartu jadi tidak rata. Dua kolom baru dipakai mulai 600px.
 */
.menu-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.menu-grid--list { grid-template-columns: 1fr; gap: 8px; }

.menu-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform .12s ease, border-color .12s ease;
}
.menu-card:active { transform: scale(.98); border-color: var(--primary); }
.menu-card > [data-lucide]:first-child { color: var(--primary); width: 22px; height: 22px; }
.menu-card strong { display: block; font-size: 14px; font-weight: 700; }
.menu-card span { font-size: 12px; color: var(--text-muted); }
.menu-card__chev { margin-left: auto; color: var(--border-strong); width: 18px; height: 18px; }
.menu-card--row { min-height: 56px; }

.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-list__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: var(--tap);
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.menu-list__item [data-lucide] { color: var(--primary); }

/* -------------------------------- tombol -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: var(--tap);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .1s ease, background .15s ease, opacity .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn [data-lucide] { width: 17px; height: 17px; }

.btn--primary { background: var(--primary); color: var(--text-invert); }
.btn--primary:hover { background: var(--primary-strong); }

.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { background: var(--surface-2); }

.btn--danger { background: var(--danger); color: #fff; }
.btn--danger-text { color: var(--danger); }
.btn--block { flex: 1; width: 100%; }
.btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn--icon { padding: 0 14px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  flex: none;
}
.icon-btn:active { background: var(--surface-3); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm [data-lucide] { width: 17px; height: 17px; }
.icon-btn--danger { color: var(--danger); }

.fab {
  position: fixed;
  right: 18px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  z-index: 30;
}
.fab:active { transform: scale(.95); }
.fab [data-lucide] { width: 26px; height: 26px; }

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ------------------------------- toolbar -------------------------------- */

.toolbar { display: flex; align-items: center; gap: 8px; }
.toolbar--end { justify-content: flex-end; }

.search-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: var(--tap);
  padding: 0 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.search-inline [data-lucide] { color: var(--text-muted); width: 18px; height: 18px; }
.search-inline input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text);
}

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  flex: 1;
}
.segmented button {
  flex: 1;
  min-height: 38px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.segmented button.is-active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------ keaktifan ------------------------------- */

.ctx-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.ctx-bar::-webkit-scrollbar { display: none; }

.ctx-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.ctx-chip [data-lucide] { width: 15px; height: 15px; color: var(--primary); }

.student-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.student-card__main { flex: 1; min-width: 0; }
.student-card__main strong {
  display: block;
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.student-card--empty {
  justify-content: center;
  color: var(--text-muted);
  border-style: dashed;
  box-shadow: none;
  background: var(--surface-2);
}
.student-card--none { border-color: var(--warning); }

.score-pad {
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: opacity .15s ease;
}
.score-pad.is-disabled { opacity: .4; pointer-events: none; }
.score-pad.is-busy { opacity: .6; pointer-events: none; }

.score-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }

.score-btn {
  min-height: 56px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  cursor: pointer;
  transition: transform .1s ease, filter .15s ease;
}
.score-btn:active { transform: scale(.95); }

.score-btn--plus { background: var(--success); color: #fff; }
.score-btn--minus { background: var(--danger); color: #fff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips--static { margin-top: 2px; }

.chip {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .12s ease;
}
.chip.is-active { border-color: transparent; color: #fff; }
.chip--plus.is-active { background: var(--success); }
.chip--minus.is-active { background: var(--danger); }
.chip.is-static { cursor: default; }
.chip b { font-weight: 800; }

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.key {
  min-height: 58px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 23px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform .08s ease, background .12s ease;
}
.key:active { transform: scale(.95); background: var(--primary-soft); }
.key--fn { font-size: 14px; font-weight: 600; color: var(--text-muted); }

.quick-input {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.quick-input label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.quick-input input {
  height: 56px;
  padding: 0 14px;
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  outline: none;
}

.score-pill {
  display: inline-grid;
  place-items: center;
  min-width: 46px;
  height: 30px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: var(--surface-3);
}
.score-pill--lg { min-width: 60px; height: 40px; font-size: 19px; }

/* ------------------------------- badge ---------------------------------- */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  background: var(--surface-3);
  color: var(--text-muted);
}
.badge--primary { background: var(--primary-soft); color: var(--primary-strong); }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--danger { background: var(--danger-soft); color: var(--danger); }
.badge--muted { background: var(--surface-3); color: var(--text-muted); }

/* ------------------------------ timeline -------------------------------- */

.timeline { display: flex; flex-direction: column; gap: 8px; }

.timeline__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-sm);
}
.timeline__item.is-plus { border-left-color: var(--success); }
.timeline__item.is-minus { border-left-color: var(--danger); }

.timeline__score {
  min-width: 42px;
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.timeline__item.is-plus .timeline__score { color: var(--success); }
.timeline__item.is-minus .timeline__score { color: var(--danger); }

.timeline__body { flex: 1; min-width: 0; }
.timeline__body strong { font-size: 14px; font-weight: 600; }

.meeting-timeline { display: flex; flex-direction: column; gap: 8px; }

.meeting {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.meeting__no {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
  font-size: 14px;
}
.meeting__body { flex: 1; min-width: 0; }
.meeting__body strong { display: block; font-size: 15px; font-weight: 700; }
.meeting > [data-lucide]:last-child { color: var(--border-strong); margin-top: 12px; }

/* ------------------------------- jadwal --------------------------------- */

.pill-today {
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
}

/* ---------------------------- rencana (baca) ---------------------------- */

.plan-head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.plan-head h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }

.link-row { display: flex; flex-wrap: wrap; gap: 8px; }

.plan-block {
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.plan-block h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.plan-block h3 [data-lucide] { width: 16px; height: 16px; color: var(--primary); }
.plan-block p { font-size: 15px; line-height: 1.6; }

.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

/* -------------------------------- form ---------------------------------- */

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field--half { flex: 1; min-width: 0; }
.field-row { display: flex; gap: 10px; }

.field label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.field .req { color: var(--danger); }

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px; /* >=16px di iOS mencegah zoom otomatis, lihat responsive.css */
  outline: none;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field textarea { resize: vertical; line-height: 1.5; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.field__help { font-size: 12px; color: var(--text-muted); }

.form-section {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--primary);
  margin: 6px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.switch {
  position: relative;
  width: 50px;
  height: 30px;
  border: none;
  border-radius: 999px;
  background: var(--border-strong);
  cursor: pointer;
  transition: background .15s ease;
  flex: none;
}
.switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s ease;
}
.switch.is-on { background: var(--primary); }
.switch.is-on span { transform: translateX(20px); }

.hint-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  margin-bottom: 14px;
  background: var(--surface-2);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.hint-box strong { font-size: 12.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.hint-box code { display: inline-block; }

/* -------------------------------- profil -------------------------------- */

.profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: var(--pad);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.profile-card strong { font-size: 16px; font-weight: 700; }

.avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  flex: none;
}
.avatar [data-lucide] { width: 26px; height: 26px; }

/* ------------------------------- welcome -------------------------------- */

.welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  padding: 24px 8px;
}
.welcome__logo {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 22px;
  background: var(--primary);
  color: #fff;
}
.welcome__logo [data-lucide] { width: 36px; height: 36px; }
.welcome h2 { font-size: 22px; font-weight: 800; }
.welcome__steps {
  text-align: left;
  align-self: stretch;
  margin: 8px 0;
  padding-left: 22px;
  font-size: var(--fs-body);
  color: var(--text-muted);
  line-height: 1.9;
}

/* Layar "Akses terbatas": tegas tanpa terasa seperti halaman galat */
.welcome__logo--lock { background: var(--surface-3); color: var(--text-muted); }

.welcome { max-width: 440px; margin: 0 auto; }
.welcome__aksi { align-self: stretch; margin-top: var(--sp-2); }

.welcome__bantuan {
  align-self: stretch;
  text-align: left;
  margin-top: var(--sp-2);
  padding: var(--sp-3);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
}
.welcome__bantuan summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-2);
}
.welcome__bantuan[open] summary { margin-bottom: var(--sp-2); }
.welcome__bantuan .welcome__steps { margin: 0 0 var(--sp-2); }

/* ------------------------------- masuk ---------------------------------- */

/*
 * Layar masuk dibuat sempit dan terpusat, tanpa kartu berbayang: satu
 * formulir pendek tidak perlu wadah yang memisahkannya dari apa pun.
 */
.masuk {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: var(--sp-6) 0 var(--sp-8);
  text-align: center;
}

.masuk__logo {
  display: grid;
  place-items: center;
  width: 60px; height: 60px;
  border-radius: var(--r-lg);
  background: var(--primary);
  color: var(--text-invert);
}
.masuk__logo [data-lucide] { width: 30px; height: 30px; }

.masuk h2 {
  font-size: var(--fs-h1);
  font-weight: var(--fw-extrabold);
  letter-spacing: var(--tracking-tight);
}

.masuk__form {
  align-self: stretch;
  text-align: left;
  margin-top: var(--sp-2);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

/* Pesan galat di dalam formulir, bukan toast: posisinya tetap terlihat saat
   papan ketik ponsel terbuka, dan tidak hilang sendiri sebelum terbaca. */
.masuk__pesan {
  display: flex;
  gap: var(--sp-2);
  margin: var(--sp-1) 0 var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  border: 1px solid var(--danger);
  border-radius: var(--r-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: var(--fs-sm);
  text-align: left;
}

.masuk__bantuan {
  align-self: stretch;
  text-align: left;
  margin-top: var(--sp-2);
}
.masuk__bantuan summary {
  cursor: pointer;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--primary);
}
.masuk__bantuan p { margin-top: var(--sp-2); }
.masuk__bantuan code { overflow-wrap: anywhere; }

.masuk__siswa {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-start;
  margin-top: var(--sp-6);
  padding: var(--sp-3);
  border-top: 1px solid var(--border);
  font-size: var(--fs-sm);
  color: var(--text-muted);
  text-align: left;
}
.masuk__siswa [data-lucide] { width: 16px; height: 16px; margin-top: 2px; }

/* ----------------------------- short link ------------------------------- */

.section--slug { gap: var(--sp-2); }

/*
 * Link ditampilkan utuh dan dapat dipilih. Guru sering menyalinnya manual
 * lewat seleksi teks, bukan lewat tombol, terutama di laptop sekolah tanpa
 * izin clipboard.
 */
.slug-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-md);
  background: var(--surface-2);
}
.slug-preview [data-lucide] { width: 16px; height: 16px; color: var(--text-muted); }
.slug-preview code {
  flex: 1;
  min-width: 0;
  background: none;
  padding: 0;
  font-size: var(--fs-sm);
  color: var(--text);
  overflow-wrap: anywhere;
  user-select: all;
}

/* -------------------------------- toast --------------------------------- */

.toast-wrap {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 12px);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 460px;
  width: fit-content;
  padding: 11px 15px;
  border-radius: 999px;
  background: #0f172a;
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  cursor: pointer;
  animation: toastIn .22s cubic-bezier(.2, .9, .3, 1.2);
}
.toast [data-lucide] { width: 17px; height: 17px; }
.toast--success { background: #15803d; }
.toast--error { background: #b91c1c; }
.toast--info { background: #1e40af; }
.toast--out { animation: toastOut .2s forwards; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: none; }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(8px) scale(.97); }
}

/* -------------------------------- modal --------------------------------- */

.modal-backdrop, .sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, .5);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(2px);
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: sheetIn .24s cubic-bezier(.2, .9, .3, 1);
}

@keyframes sheetIn {
  from { transform: translateY(28px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 8px 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal__head h2 { font-size: 16px; font-weight: 700; }

.modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  -webkit-overflow-scrolling: touch;
}

.modal__foot {
  display: flex;
  gap: 10px;
  padding: 12px 18px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--border);
}
.modal__foot .btn { flex: 1; }

.modal-text { font-size: 14.5px; line-height: 1.6; margin-bottom: 12px; }

/* ----------------------------- panel cari ------------------------------- */

.sheet-backdrop { align-items: flex-start; }

.search-panel {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  margin-top: 0;
  background: var(--surface);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.search-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 16px;
  border-bottom: 1px solid var(--border);
}
.search-panel__head [data-lucide] { color: var(--text-muted); }
.search-panel__head input {
  flex: 1;
  min-width: 0;
  height: var(--tap);
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--text);
}

.search-panel__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-group {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-top: 4px;
}

.empty-hint { color: var(--text-muted); font-size: 14px; text-align: center; padding: 24px 0; }

/* ---------------------------- state kosong ------------------------------ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 34px 18px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  text-align: center;
}
.empty-state [data-lucide] { width: 34px; height: 34px; color: var(--border-strong); }
.empty-state p { font-size: 14px; color: var(--text-muted); max-width: 40ch; }
.empty-state--error [data-lucide] { color: var(--danger); }

/* ------------------------------ skeleton -------------------------------- */

.skeleton-page { display: flex; flex-direction: column; gap: 12px; padding: 2px; }

.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 37%, var(--surface-3) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
}
.skeleton--title { height: 26px; width: 62%; border-radius: 8px; }
.skeleton--card { height: 88px; }

@keyframes shimmer {
  from { background-position: 100% 50%; }
  to { background-position: 0 50%; }
}

.spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2.5px solid var(--border-strong);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  vertical-align: middle;
}
.spinner--sm { width: 15px; height: 15px; border-width: 2px; border-top-color: currentColor; }

@keyframes spin { to { transform: rotate(360deg); } }

/* -------------------------------- chart --------------------------------- */

.chart-box {
  position: relative;
  height: 240px;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* --------------------------- aksesibilitas ------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =============================================================================
   TAMBAHAN — Pekan A/B, Bank Pembelajaran, Pengumpulan Tugas, Input Cepat
   ========================================================================== */

/* ----------------------------- Pekan A / B ------------------------------ */

.week-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.segmented--week { width: 100%; }

.week-now {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.week-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: none;
}
.week-dot--a { background: var(--primary); }
.week-dot--b { background: var(--accent-b); }

/* Penanda pekan pada baris jadwal & dashboard */
.week-tag {
  flex: none;
  letter-spacing: .02em;
}
.week-tag--a { background: var(--primary-soft); color: var(--primary-strong); }
.week-tag--b { background: var(--accent-b-soft); color: var(--accent-b); }

.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.notice > [data-lucide]:first-child { color: var(--primary); flex: none; }
.notice strong { display: block; font-size: 14px; }
.notice .btn { flex: none; }

.pekan-preview {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.pekan-preview__judul {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.pekan-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.pekan-row.is-now { border-color: var(--primary); background: var(--primary-soft-2); }
.pekan-row .badge { margin-left: auto; }

/* -------------------------- Input cepat keaktifan ----------------------- */

.quick-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 34px;
  align-items: center;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text);
}
.preview-chip b { font-weight: 800; }
.preview-chip__skor { font-weight: 800; font-variant-numeric: tabular-nums; }

.preview-chip--plus { background: var(--success-soft); color: var(--success); }
.preview-chip--minus { background: var(--danger-soft); color: var(--danger); }
.preview-chip--error {
  background: var(--warning-soft);
  color: var(--warning);
  text-decoration: line-through;
}

.quick-help { margin-top: 2px; }
.quick-help summary {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  padding: 4px 0;
}
.help-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12.5px; }
.help-table td { padding: 5px 4px; border-bottom: 1px solid var(--border); vertical-align: top; }
.help-table td:first-child { width: 92px; white-space: nowrap; }
.help-table code { font-size: 12px; }

.student-card--multi { border-color: var(--primary); background: var(--primary-soft-2); }

/* --------------------------- Bank Pembelajaran -------------------------- */

.material-flags {
  display: inline-flex;
  gap: 5px;
  color: var(--text-muted);
  flex: none;
}
.material-flags [data-lucide] { width: 15px; height: 15px; }

.picker-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 14px;
  background: var(--primary-soft-2);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
}
.picker-card label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary-strong);
}
.picker-card label [data-lucide] { width: 17px; height: 17px; }
.picker-card select {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}

/* -------------------------- Pengumpulan (guru) -------------------------- */

.submit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.submit-card.is-open { border-color: var(--success); }

.submit-card__main { display: block; padding: 13px; }
.submit-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}
.submit-card__head strong { font-size: 15px; font-weight: 700; }

.submit-card__stat {
  display: flex;
  gap: 14px;
  margin-top: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.submit-card__stat span { display: inline-flex; align-items: center; gap: 5px; }
.submit-card__stat [data-lucide] { width: 15px; height: 15px; }

.kode-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 13px;
  background: var(--success-soft);
  border-top: 1px solid var(--border);
}
.kode-teks {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--success);
}

.card--kode {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  border-color: var(--success);
}
.card--kode__label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
}

.kode-besar {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 42px;
  font-weight: 800;
  letter-spacing: .16em;
  line-height: 1.1;
  color: var(--success);
  cursor: pointer;
  user-select: all;
  padding: 4px 0;
}

.card--kode__sisa {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}
.card--kode__sisa [data-lucide] { width: 15px; height: 15px; }

.card--kode__aksi {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 6px;
}

.card--kode-off {
  flex-direction: row;
  align-items: center;
  text-align: left;
  border-color: var(--border);
}
.card--kode-off > [data-lucide]:first-child { color: var(--text-muted); flex: none; }
.card--kode-off strong { display: block; font-size: 15px; }
.card--kode-off .btn { flex: none; }

/* Pilihan kelas tujuan */
.check-grid { display: flex; flex-wrap: wrap; gap: 8px; }

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
}
.check-chip input { width: 16px; height: 16px; accent-color: var(--primary); }
.check-chip.is-on { border-color: var(--primary); background: var(--primary-soft-2); color: var(--primary-strong); }

/* Kartu penyusun pertanyaan */
.qcard {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.qcard__head { display: flex; align-items: center; gap: 8px; }
.qcard__no {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12.5px;
  font-weight: 700;
  flex: none;
}
.qcard__tipe {
  flex: 1;
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
}
.qcard__teks, .qcard__opsi {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.qcard__opsi { resize: vertical; line-height: 1.5; }
.qcard__wajib {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-muted);
}
.qcard__wajib input { width: 16px; height: 16px; accent-color: var(--primary); }

/* Kartu jawaban masuk */
.answer-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.answer-card__head { display: flex; align-items: center; gap: 12px; }
.answer-card__isi {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-left: 4px;
  border-left: 3px solid var(--border);
}
.jawab-item p { font-size: 14px; line-height: 1.5; padding-left: 8px; }
.jawab-item .muted { padding-left: 8px; }
.answer-card .btn { align-self: flex-start; }

/* -------------------------- Halaman siswa ------------------------------- */

.body--siswa { padding-bottom: 32px; }

.welcome--siswa { padding-top: 32px; }

.kode-input-wrap { width: 100%; margin: 6px 0; }

.kode-input {
  width: 100%;
  height: 72px;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: .22em;
  text-align: center;
  text-transform: uppercase;
  outline: none;
}
.kode-input:focus { box-shadow: 0 0 0 4px var(--primary-soft); }
.kode-input::placeholder { color: var(--border-strong); letter-spacing: .22em; }

.kode-error {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  color: var(--danger);
  text-align: left;
}
.kode-error [data-lucide] { width: 17px; height: 17px; flex: none; }

.card--petunjuk h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  margin-bottom: 7px;
}
.card--petunjuk h3 [data-lucide] { width: 16px; height: 16px; color: var(--primary); }
.card--petunjuk p { font-size: 15px; line-height: 1.6; }

.sisa-waktu {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--warning);
  font-weight: 600;
}
.sisa-waktu [data-lucide] { width: 16px; height: 16px; }

.opsi-list { display: flex; flex-direction: column; gap: 7px; }

.opsi {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: var(--tap);
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 14.5px;
  cursor: pointer;
}
.opsi input { width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.opsi:has(input:checked) { border-color: var(--primary); background: var(--primary-soft-2); }

.upload-box {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.upload-box:active { border-color: var(--primary); background: var(--primary-soft-2); }

.upload-box__kosong {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 28px 16px;
  text-align: center;
}
.upload-box__kosong [data-lucide] { width: 32px; height: 32px; color: var(--primary); }
.upload-box__kosong strong { font-size: 14.5px; }

.upload-box__isi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
}
.upload-box__isi > [data-lucide] { color: var(--success); flex: none; }
.upload-box__meta { flex: 1; min-width: 0; }
.upload-box__meta strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.welcome__logo--sukses { background: var(--success); }
.welcome--sukses .card--meta { width: 100%; text-align: left; margin: 8px 0; }

/* ---------------- Penyempurnaan UX: konteks & status ------------------- */

/* Chip kelas pada bar keaktifan — sekaligus jalan keluar dari pintasan otomatis */
.ctx-chip--kelas {
  background: var(--primary-soft-2);
  border-color: var(--primary);
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration: none;
}
.ctx-chip--kelas [data-lucide]:last-child {
  width: 13px;
  height: 13px;
  opacity: .7;
}

/* Penanda siswa yang sudah dinilai hari ini */
.tanda-hariini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--success);
  font-weight: 600;
}
.tanda-hariini [data-lucide] { width: 14px; height: 14px; }

/* Pintasan kelas pada pemilih keaktifan */
.card--cta .muted [data-lucide] {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
}

/* Dua tombol aksi utama pada detail kelas */
.form-actions .btn--block + .btn--block { margin-left: 0; }

/* Nama kelas pada kartu "kelas berikutnya" berfungsi sebagai tautan */
a.card--next__kelas {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  text-decoration: none;
}
a.card--next__kelas [data-lucide] { width: 17px; height: 17px; opacity: .8; }

/* Tawaran tafsir lain saat input bisa dibaca dua cara */
.preview-alt {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px dashed var(--warning);
  border-radius: var(--radius-sm);
  background: var(--warning-soft);
  color: var(--warning);
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.preview-alt [data-lucide] { width: 15px; height: 15px; flex: none; }

/* Baris jadwal non-mengajar (piket) dibedakan tanpa menarik perhatian */
.list-item.is-piket { background: var(--surface-2); border-style: dashed; }
.list-item.is-piket .list-item__main strong { color: var(--text-muted); }

.jam-ke {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
}

.card--next-piket { background: linear-gradient(145deg, #475569 0%, #334155 100%); }
.card--next__kelas-teks { font-size: 14px; opacity: .92; font-weight: 600; }

/* Judul piket boleh membungkus dua baris — memotongnya jadi
   "Piket Admini..." membuat kegiatannya tidak terbaca */
.list-item.is-piket .list-item__main strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================================================
   JADWAL — tata ulang
   Rel waktu di kiri, konten di kanan, aksi disembunyikan di balik satu tombol.
   ========================================================================== */

.sched-pekan { display: flex; flex-direction: column; gap: 7px; }

/* --- pemilih hari --- */

/*
 * Grid 7 kolom, bukan baris yang bisa di-scroll: seluruh hari harus terlihat
 * sekaligus. Chip yang terpotong di tepi layar membuat guru mengira ada hari
 * yang hilang, dan menggulir mendatar di dalam halaman yang juga menggulir
 * vertikal terasa canggung.
 */
.day-chips {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  padding: 2px 0 4px;
}

.day-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: var(--tap);
  padding: 6px 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.day-chip__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Label "Semua" lebih panjang dari nama hari yang disingkat */
.day-chip[data-hari="semua"] .day-chip__label { font-size: 10px; letter-spacing: -.01em; }
.day-chip__count { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.day-chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text-invert);
}
.day-chip.is-active .day-chip__count { color: rgba(255, 255, 255, .85); }

/* Titik kecil menandai hari ini, tetap terlihat saat chip aktif */
.day-chip.is-today::after {
  content: "";
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--primary);
}
.day-chip.is-today.is-active::after { background: #fff; }

/* --- kelompok hari --- */

.sched-day { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
/* Ruang bawah supaya baris terakhir tidak tertutup tombol tambah melayang */
.sched-day:last-child { margin-bottom: 76px; }

.sched-day__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px 0 2px;
}
.sched-day__head h3 {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}
.sched-day__head.is-today h3 { color: var(--primary); }
.sched-day__sum {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.sched-list { display: flex; flex-direction: column; gap: 8px; }

/* --- satu baris jadwal --- */

.sched-item {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 12px 4px 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  transition: border-color .12s ease, background .12s ease;
}
.sched-item.is-piket {
  border-left-color: var(--border-strong);
  background: var(--surface-2);
}

/* Yang sudah lewat diredupkan supaya perhatian jatuh ke yang akan datang.
   Tidak lebih redup dari ini: isinya harus tetap terbaca saat dicari. */
.sched-item.is-lewat { opacity: .62; }

.sched-item.is-sekarang {
  border-color: var(--primary);
  border-left-width: 4px;
  background: var(--primary-soft-2);
  box-shadow: 0 0 0 1px var(--primary) inset;
}

/* Seluruh baris dapat diketuk untuk membuka kelas; tombol "..." tetap di atasnya */
.sched-item__link {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  z-index: 1;
}
.sched-item__link:active { background: rgba(37, 99, 235, .06); }

.sched-item__time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-width: 52px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
}
.sched-item__time strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.sched-item__time span { font-size: 12px; color: var(--text-muted); margin-top: 1px; }

.sched-item__body { flex: 1; min-width: 0; }

.sched-item__title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.sched-item__nama {
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.25;
}
.sched-item.is-piket .sched-item__nama { color: var(--text-muted); font-weight: 600; }

.sched-item__sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.sched-item__meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  opacity: .85;
}

/* Target sentuh penuh 44px walau ikonnya kecil — tombol ini dipakai
   sambil berdiri, sering dengan satu tangan. */
.sched-item__more {
  position: relative;
  z-index: 2;
  align-self: center;
  flex: none;
  width: 44px;
  height: 44px;
  color: var(--text-muted);
}
.sched-item__more [data-lucide] { width: 18px; height: 18px; }

.pill-now {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--text-invert);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .02em;
}

.week-tag { flex: none; }

/* Item berbahaya di dalam menu aksi */
.menu-list__item--danger { color: var(--danger); }
.menu-list__item--danger [data-lucide] { color: var(--danger); }
