/* Font mushaf sebagai WEBFONT — "Traditional Arabic"/"Scheherazade New"
   hanya ada di Windows; tanpa import ini, HP Android/iOS jatuh ke font serif
   bawaan yang bentuknya jauh berbeda. (@import wajib di baris pertama CSS.) */
@import url('https://fonts.googleapis.com/css2?family=Scheherazade+New:wght@400;700&display=swap');

:root {
  --brand: #10b981;
  --brand-2: #059669;
  --brand-dark: #065f46;
  --brand-glow: rgba(16, 185, 129, 0.35);
  --gold: #f2b705;
  --gold-glow: rgba(242, 183, 5, 0.4);
  --bg-a: #eafff5;
  --bg-b: #eef4ff;
  --card: #ffffff;
  --text: #10201a;
  --muted: #66796f;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.3);
  --locked: #a3ada6;
  --unlocked: #3b82f6;
  --unlocked-glow: rgba(59, 130, 246, 0.3);
  --lulus: #0d9488;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-card: 0 4px 18px rgba(16, 60, 45, 0.08), 0 1px 3px rgba(16, 60, 45, 0.06);
}

* { box-sizing: border-box; }

[class^="fi-"], [class*=" fi-"] { line-height: 1; }

.attribution {
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  margin-top: 18px;
}
.attribution a { color: var(--muted); }

/* Jadwal Sholat (jadwal-sholat.html) */
.sholat-next-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
  margin-bottom: 14px;
}
.sholat-next-label { font-size: 12px; opacity: 0.9; }
.sholat-next-nama { font-size: 26px; font-weight: 800; margin-top: 2px; }
.sholat-next-countdown { font-size: 13px; font-weight: 700; margin-top: 2px; opacity: 0.95; }

.sholat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sholat-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: var(--shadow-card);
}
.sholat-nama { font-weight: 700; font-size: 14px; }
.sholat-jam { font-weight: 800; font-size: 15px; color: var(--brand-dark); font-variant-numeric: tabular-nums; }
.sholat-item.is-next {
  background: linear-gradient(135deg, #eafff5, #ffffff);
  box-shadow: var(--shadow-card), 0 0 0 1.5px var(--brand);
}
.sholat-item.is-next .sholat-nama::after { content: ' • berikutnya'; font-size: 11px; color: var(--brand); }

/* Amaliyah NU (amaliyah.html): grid kotak kecil, isi dibuka lewat dialog */
.amaliyah-grid-item { text-align: center; }
.amaliyah-grid-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(160deg, #eafff5, #ffffff);
  color: var(--brand);
  font-size: 18px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-card);
}
.amaliyah-keterangan { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }
.amaliyah-arti { font-size: 12.5px; color: var(--text); line-height: 1.6; margin-top: 6px; }
.amaliyah-topik-judul { font-size: 13.5px; font-weight: 700; color: var(--brand-dark); }
.amaliyah-arab-dalil { font-size: 21px; line-height: 1.9; margin-top: 4px; }
.amaliyah-sumber { font-size: 11px; color: var(--muted); margin: 12px 0 0; font-style: italic; }
.amaliyah-bagian { padding: 10px 0; border-top: 1px dashed #e8eeea; }
.amaliyah-arab {
  direction: rtl;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 26px; line-height: 2;
  text-align: right;
  color: var(--brand-dark);
}
.amaliyah-hitungan {
  display: inline-block;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 11px; font-weight: 800; color: #fff;
  background: var(--brand);
  border-radius: 999px;
  padding: 2px 9px;
  vertical-align: middle;
}
.amaliyah-latin { font-size: 12.5px; color: var(--muted); font-style: italic; margin-top: 6px; }

/* Footer identitas di semua halaman (dipasang otomatis oleh header.js) */
.app-footer {
  margin-top: 28px;
  padding: 14px 0 4px;
  border-top: 1px solid #e8eeea;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
}
.app-footer strong { color: var(--brand-dark); font-weight: 700; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 10% -10%, var(--bg-a) 0%, transparent 45%),
    radial-gradient(circle at 90% 0%, var(--bg-b) 0%, transparent 50%),
    #f6f9f7;
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.01em; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-sm);
  padding: 13px 20px;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
button:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px var(--brand-glow);
}
.btn-primary:hover { box-shadow: 0 8px 24px var(--brand-glow); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 18px var(--danger-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-dark);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
}

input:focus-visible, button:focus-visible, select:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Auth screen */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--card);
  border-radius: 24px;
  padding: 36px 30px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 50px rgba(6, 95, 70, 0.18), 0 0 0 1px rgba(16, 185, 129, 0.06);
  text-align: center;
}

.auth-logo {
  width: 68px; height: 68px; margin-bottom: 14px;
  filter: drop-shadow(0 8px 16px var(--brand-glow));
}
.auth-card h1 { margin: 0 0 4px; font-size: 24px; font-weight: 800; }
.auth-subtitle { color: var(--muted); margin: 0 0 26px; font-size: 14px; }

#login-form { text-align: left; display: flex; flex-direction: column; gap: 6px; }
#login-form label { font-size: 13px; font-weight: 700; margin-top: 10px; color: var(--brand-dark); }
#login-form input {
  padding: 13px 15px;
  border: 1.5px solid #dce8e2;
  border-radius: var(--radius-sm);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
#login-form input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-glow);
  outline: none;
}
#login-form button { margin-top: 22px; width: 100%; }

/* Topbar (dipertahankan untuk halaman sederhana) */
.topbar {
  background: linear-gradient(120deg, var(--brand-2) 0%, var(--brand-dark) 100%);
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(6, 95, 70, 0.25);
}
.topbar .btn-ghost { color: #fff; opacity: 0.95; }
.topbar-title { font-weight: 800; font-size: 17px; }
.topbar-user { font-size: 12px; opacity: 0.85; margin-top: 2px; }

/* Hero header: kartu gradient rounded-bottom di puncak tiap halaman utama */
/* Header ringkas: satu baris (tombol kembali? + judul/subjudul + avatar),
   bukan lagi 4 baris bertumpuk (eyebrow/title/subtitle/brand-tag) — tombol
   kembali juga dipindah ke DALAM header (bukan link terpisah di bawahnya)
   supaya polanya sesuai kebiasaan aplikasi mobile pada umumnya. */
.hero-header {
  /* Sticky = tetap menempel di atas saat discroll, TANPA perlu kompensasi
     padding konten (tinggi header berbeda-beda antar halaman). z-index di
     bawah toast/modal (300) tapi di atas isi halaman. */
  position: sticky;
  top: 0;
  z-index: 180;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 55%, var(--brand-dark) 100%);
  color: #fff;
  padding: 12px 14px;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 12px 32px rgba(6, 95, 70, 0.28);
}
.hero-header::before, .hero-header::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.hero-header::before { width: 180px; height: 180px; top: -80px; right: -40px; }
.hero-header::after { width: 120px; height: 120px; bottom: -60px; left: 10%; }

.hero-top { display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.hero-icon-btn {
  width: 34px; height: 34px; flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  font-size: 15px;
  border: none;
  padding: 0;
  backdrop-filter: blur(6px);
}
.hero-icon-btn:active { transform: scale(0.93); }

.profile-menu-wrap { position: relative; flex-shrink: 0; }
.hero-avatar-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), #d99a04);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
  border: 2px solid rgba(255,255,255,0.6);
  padding: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.hero-avatar-btn:active { transform: scale(0.93); }
.profile-dropdown {
  /* position: fixed (bukan absolute) + koordinat dihitung JS (lihat header.js)
     supaya menu tidak ikut terpotong oleh overflow:hidden pada .hero-header
     (dipakai buat membingkai lingkaran dekoratif di background header). */
  position: fixed;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 6px;
  min-width: 150px;
  z-index: 220;
}
.profile-dropdown-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  text-align: left;
}
.profile-dropdown-item:hover { background: var(--bg-a); }
.profile-dropdown-item i { color: var(--brand); width: 16px; }

.hero-title-group { flex: 1; min-width: 0; }
.hero-title {
  font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 7px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hero-title i { font-size: 15px; opacity: 0.9; flex-shrink: 0; }
.hero-subtitle {
  font-size: 11.5px; opacity: 0.85; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}
.page-after-hero { margin-top: 14px; position: relative; z-index: 2; }
.page.has-bottom-nav { padding-bottom: 92px; }

.message {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
}
.message-info { background: #e7f0ff; color: #244a8f; }
.message-error { background: #fdecea; color: #b91c1c; }
.message-success { background: #e6f6ec; color: #0f6b4c; }

/* Tabs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tab-button {
  flex: 1;
  background: #e4f5ec;
  color: var(--brand-dark);
  font-weight: 700;
  border-radius: var(--radius-sm);
}
.tab-button.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: 0 6px 16px var(--brand-glow);
}

/* Laporan */
.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.summary-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.summary-icon { display: block; font-size: 18px; color: var(--brand); margin-bottom: 6px; }
.summary-value {
  font-size: 26px; font-weight: 800;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.summary-label { font-size: 12px; color: var(--muted); margin-top: 4px; font-weight: 600; }

.kelas-picker { display: flex; flex-direction: column; gap: 6px; }
.kelas-picker label { font-size: 13px; font-weight: 700; color: var(--brand-dark); }
.kelas-picker select {
  padding: 13px 15px;
  border: 1.5px solid #dce8e2;
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: #fff;
}

.roster-item { cursor: pointer; }

.tandai-dibaca-btn {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: #f1f0ef; color: var(--locked);
  display: flex; align-items: center; justify-content: center;
  border: none; padding: 0; font-size: 13px;
}
.tandai-dibaca-btn.is-dibaca { background: var(--brand); color: #fff; }

/* Kotak pencarian (live search), dipakai di daftar surat Tadarus */
.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1.5px solid #dce8e2;
  border-radius: 999px;
  padding: 12px 16px;
  margin-bottom: 16px;
  color: var(--muted);
}
.search-box[hidden] { display: none; }
.search-box input {
  border: none; outline: none; background: transparent;
  font-size: 14px; color: var(--text);
  flex: 1; min-width: 0;
  font-family: inherit;
}
.search-box input::placeholder { color: var(--muted); }

/* Daftar surat Tadarus sebagai kotak-kotak kecil (grid), bukan baris memanjang */
.surah-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.surah-grid[hidden] { display: none; }
@media (min-width: 420px) {
  .surah-grid { grid-template-columns: repeat(3, 1fr); }
}
.surah-grid-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
}
.surah-grid-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.surah-grid-name {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  line-height: 1.3;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.surah-grid-info { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Daftar unit Tahsin/Tahfidz sebagai kotak-kotak kecil, pola sama seperti
   Tadarus (.surah-grid) — cuma item-nya butuh status locked/unlocked/lulus. */
.progress-grid-item {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.progress-grid-item.status-locked { opacity: 0.6; }
.progress-grid-item.status-unlocked, .progress-grid-item.status-lulus { cursor: pointer; }
.progress-grid-item.status-unlocked:hover, .progress-grid-item.status-lulus:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 60, 45, 0.14);
}
.progress-grid-item.status-lulus { box-shadow: var(--shadow-card), 0 0 0 1.5px rgba(13, 148, 136, 0.25); }
.progress-grid-item.status-lulus .corner-check {
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 32px 32px 0;
  border-color: transparent var(--gold) transparent transparent;
}
.progress-grid-item.status-lulus .corner-check::after {
  content: "\e35f";
  font-family: "uicons-solid-rounded" !important;
  position: absolute; top: 2px; right: -28px;
  color: #fff; font-size: 9px; font-weight: 800;
}

/* Form kelola soal kuis (guru/koordinator) */
.soal-form {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-card);
}
.soal-form label { font-size: 13px; font-weight: 700; color: var(--brand-dark); margin-top: 10px; }
.soal-form textarea {
  padding: 13px 15px;
  border: 1.5px solid #dce8e2;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.soal-pilihan-list { display: flex; flex-direction: column; gap: 8px; }
.soal-pilihan-row { display: flex; align-items: center; gap: 8px; }
.soal-pilihan-row input[type="radio"] { flex-shrink: 0; width: 18px; height: 18px; accent-color: var(--brand); }
.soal-pilihan-input {
  flex: 1; min-width: 0;
  padding: 10px 12px;
  border: 1.5px solid #dce8e2;
  border-radius: var(--radius-sm);
  font-size: 14px;
}
.soal-pilihan-remove {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  background: #fdecea; color: var(--danger);
  display: flex; align-items: center; justify-content: center;
  border: none; padding: 0; font-size: 12px;
}

/* Halaman kelola-tipe-soal.html: pengaturan jenis soal otomatis per tingkat */
.tipe-setting-hint { font-size: 12px; color: var(--muted); margin: 0 0 10px; }
.tipe-setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0;
  border-top: 1px solid #eef1ef;
}
.tipe-setting-row:first-of-type { border-top: none; }
.tipe-setting-label { font-size: 14px; font-weight: 700; color: var(--text); }
.tipe-setting-note { font-size: 11px; color: var(--muted); margin-top: 2px; }

.tipe-switch { position: relative; display: inline-block; width: 42px; height: 24px; flex-shrink: 0; }
.tipe-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tipe-switch-track {
  position: absolute; inset: 0; border-radius: 999px;
  background: #d7ded9; cursor: pointer;
  transition: background 0.15s ease;
}
.tipe-switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.tipe-switch input:checked ~ .tipe-switch-track { background: var(--brand); }
.tipe-switch input:checked ~ .tipe-switch-track::after { transform: translateX(18px); }
.tipe-switch input:disabled ~ .tipe-switch-track { opacity: 0.4; cursor: not-allowed; }

/* Unit list */
.unit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.unit-list[hidden] { display: none; }

.unit-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.unit-item.status-locked { opacity: 0.6; }
.unit-item.status-unlocked, .unit-item.status-lulus, .unit-item.roster-item {
  cursor: pointer;
}
.unit-item.status-unlocked:hover, .unit-item.status-lulus:hover, .unit-item.roster-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 60, 45, 0.14);
}
.unit-item.status-lulus { box-shadow: var(--shadow-card), 0 0 0 1.5px rgba(13, 148, 136, 0.25); }

.unit-list.read-only .unit-item { cursor: default; }
.unit-list.read-only .unit-item:hover { transform: none; box-shadow: var(--shadow-card); }
.unit-list.read-only .unit-item.status-lulus:hover { box-shadow: var(--shadow-card), 0 0 0 1.5px rgba(13, 148, 136, 0.25); }

.unit-item-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.unit-order {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #eafff5, #eef4ff);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; color: var(--brand-dark); flex-shrink: 0;
}
.unit-item.status-lulus .unit-order {
  background: linear-gradient(135deg, var(--gold), #d99a04);
  color: #fff;
}
.unit-name { font-weight: 700; font-size: 15px; }
.unit-range { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* Riwayat percobaan */
.history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.history-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  font-size: 13px;
}
.history-item span { color: var(--muted); }
.history-item strong { color: var(--brand-dark); font-size: 15px; }

/* Pemutar audio referensi guru di kartu ayat */
.ayat-ref-player {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #dce8e2;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ayat-ref-player span { font-size: 12px; font-weight: 700; color: var(--brand-dark); }
.ayat-ref-player audio { width: 100%; height: 36px; }

.ket-input {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid #dce8e2;
  border-radius: var(--radius-sm);
  font-size: 15px;
  margin-bottom: 14px;
  font-family: inherit;
}

.badge { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; white-space: nowrap; flex-shrink: 0; }
.badge-locked { background: #eef1ef; color: var(--locked); }
.badge-unlocked { background: #e5edff; color: var(--unlocked); box-shadow: 0 0 12px var(--unlocked-glow); }
.badge-lulus { background: linear-gradient(135deg, var(--gold), #d99a04); color: #fff; box-shadow: 0 0 14px var(--gold-glow); }

/* Score chip: dipakai di laporan (read-only) sebagai pengganti badge aksi */
.score-chip {
  flex-shrink: 0;
  text-align: center;
  min-width: 56px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 15px;
}
.score-chip .score-chip-label { display: block; font-size: 10px; font-weight: 700; opacity: 0.8; letter-spacing: 0.02em; }
.score-chip-lulus { background: linear-gradient(135deg, var(--gold), #d99a04); color: #fff; box-shadow: 0 0 14px var(--gold-glow); }
.score-chip-mencoba { background: #e5edff; color: var(--unlocked); }
.score-chip-belum { background: #eef1ef; color: var(--muted); font-weight: 600; font-size: 12px; }
.score-chip-locked { background: transparent; color: var(--locked); font-weight: 600; font-size: 12px; }

/* Grafik/infografis laporan siswa (halaman laporan-siswa.html) */
.progress-ring-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin: 6px 0 4px; }
.progress-ring-item { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.progress-ring { width: 92px; height: 92px; }
.progress-ring-track { fill: none; stroke: #e4f5ec; stroke-width: 9; }
.progress-ring-fill {
  fill: none; stroke-width: 9; stroke-linecap: round;
  stroke-dasharray: 213.6;
  stroke-dashoffset: 213.6;
  transition: stroke-dashoffset 0.8s ease;
}
.progress-ring-fill.ring-bacaan { stroke: var(--brand); }
.progress-ring-fill.ring-hafalan { stroke: #8b5cf6; }
.progress-ring-text { font-size: 18px; font-weight: 800; fill: var(--text); }
.progress-ring-label { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; }
.progress-ring-sub { font-size: 11px; color: var(--muted); text-align: center; margin-top: -4px; }

.bar-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 90px;
  padding: 6px 4px 0;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
}
.bar-chart-col { flex: 1; min-width: 4px; display: flex; align-items: flex-end; height: 100%; }
.bar-chart-bar {
  width: 100%; min-height: 3px;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  border-radius: 3px 3px 0 0;
  transition: height 0.5s ease;
}
.bar-chart-empty { font-size: 12px; color: var(--muted); text-align: center; padding: 30px 0; }

.linear-progress { height: 10px; border-radius: 999px; background: #eef1ef; overflow: hidden; margin: 8px 0 4px; }
.linear-progress-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand-2), var(--brand));
  transition: width 0.6s ease;
}

/* Ayat */
.ayat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.ayat-card {
  background: linear-gradient(160deg, var(--bg-a) 0%, #ffffff 65%);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  position: relative;
}
.ayat-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ayat-actions-left { display: flex; align-items: center; gap: 8px; }
.ayat-actions-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-tarjim {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); color: #0284c7;
  font-size: 12px; font-weight: 700;
  padding: 8px 12px;
  border-radius: 999px;
  box-shadow: var(--shadow-card);
  border: none;
}
.btn-tarjim i { font-size: 12px; }

.ayat-card-lulus { border-left-color: var(--gold); }

.btn-mulai-baca {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px var(--brand-glow);
  border: none;
  flex-shrink: 0;
}
.btn-mulai-baca i { font-size: 12px; }
.ayat-card-lulus .btn-mulai-baca {
  background: linear-gradient(135deg, var(--gold), #d99a04);
  box-shadow: 0 4px 12px var(--gold-glow);
}

.btn-mulai-hafal {
  display: flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
  border: none;
  flex-shrink: 0;
}
.btn-mulai-hafal i { font-size: 12px; }
.ayat-card-lulus .btn-mulai-hafal {
  background: linear-gradient(135deg, var(--gold), #d99a04);
  box-shadow: 0 4px 12px var(--gold-glow);
}

/* Dialog Tahfidz: sembunyikan teks saat tahap uji hafalan */
.hafal-play-qori {
  width: auto; height: auto; border-radius: 999px;
  padding: 8px 16px; gap: 8px;
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700;
  background: var(--bg-a); color: var(--brand-dark);
  box-shadow: none;
}
.hafal-blank-box {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: #f4f6f5; color: var(--muted);
  border-radius: var(--radius);
  padding: 28px 16px;
  font-size: 14px; font-weight: 600;
  margin-bottom: 14px;
  border: 1.5px dashed #d7ddda;
}

/* Badge nomor ayat bergaya rosette/stempel akhir-ayat Al-Qur'an */
.ayat-nomor-badge {
  position: relative;
  width: 28px; height: 28px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: var(--brand-dark);
}
.ayat-nomor-badge::before, .ayat-nomor-badge::after {
  content: '';
  position: absolute; inset: 0;
  background: var(--card);
  box-shadow: var(--shadow-card);
  clip-path: polygon(30% 0%, 70% 0%, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0% 70%, 0% 30%);
}
.ayat-nomor-badge::after { transform: rotate(22.5deg); }
.ayat-nomor-badge span { position: relative; z-index: 1; }

.ayat-icon-btn {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  background: var(--card); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; box-shadow: var(--shadow-card); border: none; padding: 0;
}
.ayat-icon-btn[hidden] { display: none; }
.ayat-icon-btn:active { transform: scale(0.92); }
.ayat-play-btn.playing { background: var(--brand); color: #fff; }
.ayat-copy-btn { color: #2563eb; }
.ayat-share-btn { color: #ea580c; }
.ayat-arab {
  direction: rtl;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 34px;
  line-height: 2;
  text-align: right;
  color: var(--brand-dark);
  margin-top: 8px;
}
.ayat-latin { color: var(--muted); font-style: italic; margin-top: 6px; font-size: 13px; }
.ayat-nomor { color: var(--muted); font-size: 12px; margin-top: 6px; font-weight: 600; }

/* Anotasi tajwid: penanda lokasi kaidah di teks ayat (edukatif, bukan penilai) */
.ayat-arab .tajwid-ghunnah { color: #7c3aed; text-decoration: underline dotted #7c3aed; }
.ayat-arab .tajwid-ikhfa { color: #ea580c; text-decoration: underline dotted #ea580c; }
.ayat-arab .tajwid-qalqalah { color: #2563eb; text-decoration: underline dotted #2563eb; }
.ayat-arab .tajwid-madd { color: #16a34a; text-decoration: underline dotted #16a34a; }
.ayat-arab .tajwid-lain { color: #78716c; text-decoration: underline dotted #78716c; }
.ayat-arab .tajwid-silent { color: var(--locked); opacity: 0.55; }

.tajwid-legend {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center;
  margin: 4px 0 8px;
  direction: ltr;
}
.tajwid-legend span { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: #f4f6f5; }
.tajwid-legend .tajwid-ghunnah { color: #7c3aed; background: #f3e8ff; }
.tajwid-legend .tajwid-ikhfa { color: #ea580c; background: #ffedd5; }
.tajwid-legend .tajwid-qalqalah { color: #2563eb; background: #dbeafe; }
.tajwid-legend .tajwid-madd { color: #16a34a; background: #dcfce7; }
.tajwid-legend .tajwid-lain { color: #78716c; background: #f1f0ef; }

/* Tombol kembali di bawah header (bukan di dalam header) */
.back-link-row { margin: 16px 0 12px; }
/* Varian dengan tombol aksi di pojok kanan atas (halaman Tahsin) */
.back-link-row-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.belajar-btn-group { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.btn-belajar-top { padding: 10px 16px; font-size: 13px; flex-shrink: 0; }
.btn-belajar-top[hidden] { display: none; }
.btn-ulang-top {
  display: flex; align-items: center; gap: 6px;
  background: var(--card); box-shadow: var(--shadow-card);
  font-weight: 700; font-size: 12.5px;
  color: var(--brand-dark);
  padding: 10px 14px; border-radius: 999px;
}
.btn-ulang-top[hidden] { display: none; }

/* Info surat & rentang ayat di atas kartu mushaf */
.unit-info {
  font-size: 12.5px; font-weight: 700; color: var(--muted);
  margin: 0 0 8px 2px;
}
.btn-belajar-top.is-recording {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  animation: pulse-record 1.4s ease-in-out infinite;
}

/* Indikator status sesi rekam (di bawah mushaf): HIJAU berdenyut = sedang
   merekam, EMAS = sedang dinilai — dibedakan mencolok supaya siswa langsung
   tahu fase yang sedang berjalan. */
.message-rekam {
  background: #d1fae5;
  color: #065f46;
  box-shadow: inset 0 0 0 1.5px var(--brand);
  animation: pulse-status 1.6s ease-in-out infinite;
}
.message-rekam::first-letter { color: #dc2626; } /* titik ● merah ala tombol rekam */
.message-nilai {
  background: #fef3c7;
  color: #92400e;
  box-shadow: inset 0 0 0 1.5px var(--gold);
}
@keyframes pulse-status {
  0%, 100% { box-shadow: inset 0 0 0 1.5px var(--brand); }
  50% { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 5px var(--brand-glow); }
}

/* Panel koreksi per ayat di halaman Tahsin (skor + kata + makhraj/tajwid) */
.koreksi-panel {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 14px 16px;
  margin-top: 12px;
  animation: fade-in 0.2s ease;
}
.koreksi-panel[hidden] { display: none; }
.koreksi-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 800; color: var(--brand-dark);
}
.koreksi-head .result-score { font-size: 32px; }
.koreksi-ringkas { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.9; }
.koreksi-chip {
  display: inline-block;
  font-size: 11px; font-weight: 800;
  padding: 1px 8px; border-radius: 999px;
}
.koreksi-chip.is-benar { background: #d1fae5; color: #059669; }
.koreksi-chip.is-salah { background: #fdecea; color: var(--danger); }
.koreksi-chip.is-hilang { background: #eef1ef; color: var(--locked); }

/* Ikon 🔊 mengambang DI ATAS awal teks ayat (halaman Tahsin). Anchor selebar
   nol = tidak menambah spasi sedikit pun di aliran teks; tombolnya bulat
   sempurna, diposisikan absolut di atas baris. */
.ayat-qori-anchor {
  display: inline-block;
  width: 0;
  position: relative;
  overflow: visible;
  vertical-align: top;
}
.ayat-qori-btn {
  position: absolute;
  top: -4px; /* jangan terlalu naik — di baris ke-2+ bisa menempel ayat di atasnya */
  right: -11px; /* RTL: awal ayat ada di sisi kanan anchor */
  width: 22px; height: 22px;
  padding: 0;
  box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 2px 8px rgba(16, 60, 45, 0.22);
  color: var(--brand);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
}
.ayat-qori-btn i { display: block; }
.ayat-qori-btn.is-playing {
  background: var(--brand); color: #fff;
  box-shadow: 0 0 0 4px var(--brand-glow);
}

/* Kotak rekam ala Google Gemini: pil gelap di bawah layar, gelombang batang
   yang bergerak mengikuti VOLUME SUARA ASLI (var --amp dari VAD), dan tombol
   stop (kotak putih dalam lingkaran) untuk menyelesaikan bacaan. */
.mic-overlay {
  --amp: 0;
  position: fixed;
  left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 280;
  width: min(92vw, 400px);
  height: 64px;
  display: flex; align-items: center; gap: 14px;
  background: #1c1d21;
  border-radius: 999px;
  padding: 0 10px 0 12px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.45);
  animation: fade-in 0.2s ease;
}
.mic-overlay[hidden] { display: none; }
.mic-overlay-circle {
  flex-shrink: 0;
  width: 42px; height: 42px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; font-size: 16px;
}
.mic-wave {
  flex: 1;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.mic-wave span {
  width: 4px;
  height: calc(5px + var(--amp) * 26px);
  min-height: 5px;
  border-radius: 999px;
  background: #e8eaed;
  transition: height 0.09s linear;
}
/* Variasi tinggi antar batang supaya bentuk gelombangnya organik ala Gemini */
.mic-wave span:nth-child(2n) { height: calc(5px + var(--amp) * 14px); }
.mic-wave span:nth-child(3n) { height: calc(5px + var(--amp) * 34px); }
.mic-wave span:nth-child(5n) { height: calc(5px + var(--amp) * 20px); }
.mic-wave span:nth-child(7n) { height: calc(5px + var(--amp) * 30px); }
.mic-stop-btn {
  flex-shrink: 0;
  width: 44px; height: 44px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #3c4043;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.mic-stop-btn span {
  width: 15px; height: 15px;
  border-radius: 4px;
  background: #ffffff;
}

/* Review bacaan: di luar sesi rekam, kata pada ayat yang sudah punya hasil
   bisa diketuk untuk melihat evaluasinya (dialog). */
.hafal-ayat-block.punya-hasil .hafal-word { cursor: pointer; }
.review-kata-arab {
  direction: rtl;
  font-family: "Scheherazade New", "Traditional Arabic", serif;
  font-size: 40px; line-height: 1.8;
  text-align: center;
  color: var(--brand-dark);
}
.review-kata-pesan { font-size: 13px; color: var(--text); line-height: 1.7; margin: 6px 0 0; text-align: center; }
.back-link {
  display: flex; align-items: center; gap: 6px;
  color: var(--brand-dark); font-weight: 700; font-size: 13px;
  text-decoration: none;
}
.back-link i { font-size: 12px; }

/* Terjemah & tafsir (equran.id) */
.ayat-list-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 10px; }

/* Halaman ala mushaf cetak (Tadarus): satu halaman = satu kartu, teks Arab
   mengalir menerus (bukan kartu per-ayat) supaya mirip mushaf sungguhan. */
.mushaf-surah-heading { text-align: center; margin-bottom: 10px; }
.mushaf-surah-arab {
  direction: rtl;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 26px; color: var(--brand-dark); font-weight: 700;
}
.mushaf-surah-latin { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.mushaf-page-indicator {
  text-align: center; color: var(--muted);
  font-size: 12px; font-weight: 700;
  margin-bottom: 8px;
}
.mushaf-page-wrap {
  position: relative;
  background: linear-gradient(160deg, var(--bg-a) 0%, #ffffff 65%);
  border-radius: var(--radius);
  padding: 56px 20px 22px;
  box-shadow: var(--shadow-card);
}
.btn-baca-sekarang {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 9px 14px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; font-weight: 700; border: none;
  box-shadow: 0 4px 14px var(--brand-glow);
}
.btn-baca-sekarang[hidden] { display: none; }
.btn-baca-sekarang.is-recording {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  box-shadow: 0 4px 14px var(--danger-glow);
  animation: pulse-record 1.4s ease-in-out infinite;
}
.mushaf-bismillah {
  direction: rtl;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 30px;
  text-align: center;
  color: var(--brand-dark);
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed #dce8e2;
}
.mushaf-arabic-flow {
  direction: rtl;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 30px;
  line-height: 2.3;
  text-align: justify;
  color: var(--brand-dark);
}
.mushaf-ayat-text { cursor: pointer; border-radius: 6px; transition: background 0.15s ease; }
.mushaf-ayat-text.is-playing { background: var(--bg-a); box-shadow: 0 0 0 2px var(--brand-glow); }
.mushaf-ayat-text.is-plain { cursor: default; }

/* Mode Tarjim (Tadarus): tiap kata bisa diketuk satu per satu untuk lihat arti. */
.tarjim-inline-word { cursor: pointer; border-radius: 6px; padding: 0 1px; transition: background 0.15s ease; }
.tarjim-inline-word.is-active-word { background: var(--bg-a); box-shadow: 0 0 0 2px var(--brand-glow); }
.tarjim-word-tooltip {
  position: fixed;
  z-index: 150;
  background: var(--brand-dark);
  color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 8px 12px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(6, 20, 15, 0.3);
  max-width: 220px;
  text-align: center;
  animation: fade-in 0.12s ease;
}
.mushaf-ayat-marker {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  margin: 0 2px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 12px; font-weight: 800;
  color: var(--brand-dark);
  vertical-align: middle;
  cursor: pointer;
}

/* Kartu hafalan Tahfidz: semua ayat unit dalam satu kartu mushaf, kata bisa
   disembunyikan lalu ditampilkan perlahan sesuai bacaan siswa (lihat
   tahfidz-unit.js). Kata & marker pakai transisi supaya "muncul"-nya halus. */
.hafal-word { transition: opacity 0.3s ease, filter 0.3s ease, color 0.3s ease, background 0.3s ease; }
.hafal-word.is-hidden { opacity: 0; filter: blur(7px); }
.hafal-word.is-hint { color: var(--danger); opacity: 1; filter: none; }
/* Halaman Tahsin (unit.js): kata berubah warna live mengikuti bacaan siswa */
.hafal-word.is-read { color: var(--brand); background: var(--bg-a); border-radius: 6px; }
/* Mode Tarjim di halaman Tahsin: kata ber-arti bisa diketuk */
.tarjim-mode .hafal-word { cursor: pointer; border-radius: 6px; }
.tarjim-mode .hafal-word.is-active-word { background: var(--bg-a); box-shadow: 0 0 0 2px var(--brand-glow); }
.hafal-ayat-block.is-current .mushaf-ayat-marker {
  background: var(--brand); color: #fff;
  box-shadow: 0 0 0 3px var(--brand-glow);
}
/* Sorot TEKS ayat yang sedang/harus dibaca (bukan cuma nomornya) — latar
   hangat supaya kata yang berubah hijau saat terbaca tetap kontras. */
.hafal-ayat-block.is-current {
  background: rgba(242, 183, 5, 0.14);
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.14);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.hafal-ayat-block.is-lulus .mushaf-ayat-marker {
  background: linear-gradient(135deg, var(--gold), #d99a04); color: #fff;
}

.hafal-control-bar { margin-top: 16px; text-align: center; }
.hafal-control-row { display: flex; gap: 10px; align-items: stretch; }
.hafal-control-row .btn-primary { flex: 1; }
.hafal-control-bar .btn-primary.is-recording {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  animation: pulse-record 1.4s ease-in-out infinite;
}
#hafal-hint-btn {
  flex-shrink: 0;
  display: flex; align-items: center; gap: 6px;
  background: var(--card); box-shadow: var(--shadow-card);
  font-weight: 700; font-size: 13px;
  color: var(--brand-dark);
}
#hafal-hint-btn[hidden] { display: none; }
.hafal-control-bar .message { margin-top: 10px; }

.hafal-toast {
  position: fixed; left: 50%; top: 14px; transform: translateX(-50%);
  z-index: 300;
  max-width: calc(100vw - 32px);
  background: var(--brand-dark); color: #fff;
  font-size: 13px; font-weight: 700;
  padding: 12px 18px; border-radius: 999px;
  box-shadow: 0 12px 28px rgba(6, 20, 15, 0.3);
  text-align: center;
  animation: fade-in 0.2s ease;
}
.hafal-toast[hidden] { display: none; }
.hafal-toast.is-warning { background: linear-gradient(135deg, #f59e0b, #d97706); }
.hafal-toast.is-error { background: linear-gradient(135deg, var(--danger), #b91c1c); }
.hafal-toast.is-success { background: linear-gradient(135deg, var(--lulus), #0d9488); }

/* Menu kecil saat marker nomor ayat diklik (tandai terakhir dibaca / terjemah) */
.ayat-menu-popover {
  position: fixed;
  background: var(--card);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  padding: 6px;
  min-width: 210px;
  z-index: 120;
  animation: fade-in 0.12s ease;
}
.ayat-menu-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-size: 13px; font-weight: 600;
  text-align: left;
}
.ayat-menu-item:hover { background: var(--bg-a); }
.ayat-menu-item i { color: var(--brand); width: 16px; }
.ayat-menu-item:disabled { opacity: 0.6; }

.mushaf-page-nav {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; padding-top: 14px;
  border-top: 1px dashed #dce8e2;
}
.mushaf-page-btn { font-size: 13px; padding: 10px 14px; }
.mushaf-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.terjemah-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.terjemah-list[hidden] { display: none; }
.terjemah-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px; color: var(--muted); line-height: 1.5;
}
.terjemah-item strong { color: var(--brand-dark); }

/* Mengambang di atas halaman (bukan modal) supaya siswa tetap bisa scroll &
   membaca ayat sambil merekam/mengirim — dibuat sekompak mungkin & diletakkan
   di bawah layar supaya tidak menutupi teks Arab. */
.rekam-panel {
  position: fixed;
  left: 50%; bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 28px);
  max-width: 400px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 14px;
  box-shadow: 0 12px 34px rgba(6, 20, 15, 0.22), var(--shadow-card);
  z-index: 60;
  animation: fade-in 0.15s ease;
}
.rekam-panel .message { padding: 9px 12px; font-size: 12.5px; margin: 0; }
.rekam-panel #rekam-preview { height: 36px; margin-top: 8px !important; }
.rekam-panel .mic-sub-actions { margin-top: 8px; gap: 8px; }
.rekam-panel .mic-sub-actions button { padding: 9px 16px; font-size: 13px; }
.rekam-stop-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 10px;
  padding: 10px 16px; font-size: 13px;
}
.rekam-stop-btn[hidden] { display: none; }
.rekam-total { font-size: 12px; color: var(--muted); margin-top: 12px; margin-bottom: 0; text-align: center; }
.mushaf-toolbar-left {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.btn-toggle-terjemah {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; padding: 8px 12px;
  border-radius: 14px;
  background: var(--card);
  color: var(--brand-dark);
  font-weight: 700;
  border: none;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}

/* Toggle on/off mode Tarjim (Tadarus): satu saklar, bukan dua tombol tab. */
.tarjim-mode-switch {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--card);
  border-radius: 14px;
  padding: 8px 12px 8px 8px;
  box-shadow: var(--shadow-card);
  font-size: 11.5px; font-weight: 700; color: var(--brand-dark);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}
.tarjim-mode-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tarjim-mode-switch-track {
  position: relative; flex-shrink: 0;
  width: 30px; height: 18px; border-radius: 999px;
  background: #d7ded9;
  transition: background 0.15s ease;
}
.tarjim-mode-switch-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}
.tarjim-mode-switch input:checked ~ .tarjim-mode-switch-track {
  background: var(--brand);
}
.tarjim-mode-switch input:checked ~ .tarjim-mode-switch-track .tarjim-mode-switch-thumb {
  transform: translateX(12px);
}
/* Tombol terjemah di halaman Tahsin/Tahfidz (unit.html, tahfidz-unit.html):
   mengambang di pojok kanan atas area konten supaya tidak numpuk dengan
   link "Kembali" (yang tetap di alur normal, kiri). */
/* Baris toggle di pojok kanan atas kartu mushaf (Tarjim + Terjemah) */
.mushaf-toggle-row {
  position: absolute; top: 14px; right: 0; z-index: 5;
  display: flex; gap: 8px;
}
.btn-toggle-terjemah-page.is-inline { position: static; }
.btn-toggle-terjemah-page.is-active {
  background: var(--brand); color: #fff;
}

.btn-toggle-terjemah-page {
  position: absolute; top: 14px; right: 0; z-index: 5;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 9px 14px;
  border-radius: 14px;
  background: var(--card);
  color: var(--brand-dark);
  font-weight: 700;
  border: none;
  box-shadow: var(--shadow-card);
  white-space: nowrap;
}
.ayat-terjemah { display: none; color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.ayat-list.show-terjemah .ayat-terjemah { display: block; }

.tafsir-toggle {
  background: transparent; border: none; padding: 0;
  margin-top: 8px; font-size: 13px; font-weight: 700;
  color: var(--brand); display: flex; align-items: center; gap: 6px;
}
.tafsir-toggle.is-open { color: var(--brand-dark); }
.tafsir-content {
  margin-top: 6px; padding: 10px 12px;
  background: #f8faf9; border-radius: 12px;
  font-size: 13px; line-height: 1.6; color: var(--text);
  white-space: pre-line;
}

/* Recording */
.record-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 18px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.record-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 18px; align-items: center; }
#preview-audio { width: 100%; margin-top: 12px; border-radius: var(--radius-sm); }

.mic-button-large {
  width: 84px; height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  font-size: 32px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px var(--brand-glow);
  border: 4px solid #fff;
  outline: 3px solid var(--brand-glow);
}
.mic-button-large.is-recording {
  background: linear-gradient(135deg, var(--danger) 0%, #b91c1c 100%);
  box-shadow: 0 10px 28px var(--danger-glow);
  outline-color: var(--danger-glow);
  animation: pulse-record 1.4s ease-in-out infinite;
}
@keyframes pulse-record {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.mic-button-large[hidden] { display: none; }
.mic-sub-actions { display: flex; gap: 10px; justify-content: center; }
.mic-sub-actions[hidden] { display: none; }

.result-box {
  background: var(--card);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-top: 18px;
  box-shadow: var(--shadow-card);
}
.result-score {
  font-size: 46px; font-weight: 800;
  background: linear-gradient(135deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-box.result-lulus {
  box-shadow: var(--shadow-card), 0 0 0 2px var(--gold-glow);
}
.result-box.result-lulus .result-score {
  background: linear-gradient(135deg, var(--gold), #d99a04);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-box.result-belum .result-score {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.result-box a { margin-top: 14px; }

.result-score-lulus { background: linear-gradient(135deg, var(--gold), #d99a04); -webkit-background-clip: text; background-clip: text; color: transparent; }
.result-score-belum { background: linear-gradient(135deg, var(--danger), #b91c1c); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Koreksi bacaan per-kata */
.koreksi-box {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px dashed #dce8e2;
  text-align: left;
}
.koreksi-box h4 { margin: 0 0 10px; font-size: 14px; color: var(--brand-dark); }
.koreksi-text { font-size: 26px; line-height: 2.1; }
.koreksi-text span { padding: 2px 3px; border-radius: 6px; }
.kata-benar { color: var(--lulus); }
.kata-salah { color: var(--danger); background: #fdecea; text-decoration: underline wavy var(--danger); }
.kata-hilang { color: var(--locked); background: #eef1ef; text-decoration: line-through; }
.koreksi-legend { font-size: 11px; color: var(--muted); margin-top: 10px; direction: ltr; text-align: center; }
.koreksi-legend span { font-weight: 700; padding: 2px 6px; }

/* Analisis makhraj/tajwid (uji coba) — lihat makhraj-service/, cuma
   informasi tambahan di bawah koreksi kata, tidak mempengaruhi skor. */
.makhraj-box {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed #dce8e2;
  text-align: left;
}
.makhraj-box h4 {
  margin: 0; font-size: 13px; color: var(--brand-dark);
  display: flex; align-items: center; gap: 6px;
}
.makhraj-issue-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.makhraj-issue-list li {
  font-size: 12.5px; color: var(--text);
  background: #fff7ed; border-radius: 8px;
  padding: 8px 10px;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.makhraj-issue-arab {
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 18px; color: #c2410c; direction: rtl;
  flex-shrink: 0;
}
.makhraj-issue-detail { flex: 1; min-width: 0; line-height: 1.5; }
.makhraj-issue-detail em { font-style: normal; font-weight: 700; color: #c2410c; }
.makhraj-issue-detail strong { color: var(--brand-dark); }

/* Dialog latihan tarjim kata-per-kata */
.tarjim-word-list { display: flex; flex-direction: column; gap: 16px; margin-top: 14px; }
.tarjim-word-item { text-align: right; direction: rtl; }
.tarjim-word-arab {
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 38px; color: var(--brand-dark); margin-bottom: 8px;
}
.tarjim-word-options { display: flex; flex-wrap: wrap; gap: 8px; direction: ltr; }
.tarjim-option {
  background: #f4f6f5; color: var(--text);
  font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 10px;
  border: 1.5px solid transparent;
}
.tarjim-option.is-selected { border-color: var(--unlocked); background: #e5edff; }
.tarjim-option-benar { border-color: var(--lulus) !important; background: #dcfce7 !important; color: var(--lulus); }
.tarjim-option-salah { border-color: var(--danger) !important; background: #fdecea !important; color: var(--danger); }

/* Corner check-ribbon untuk unit yang sudah lulus */
.unit-item { position: relative; overflow: hidden; }
.unit-item.status-lulus .corner-check {
  position: absolute; top: 0; right: 0;
  width: 0; height: 0;
  border-style: solid;
  border-width: 0 42px 42px 0;
  border-color: transparent var(--gold) transparent transparent;
}
.unit-item.status-lulus .corner-check::after {
  content: "\e35f";
  font-family: "uicons-solid-rounded" !important;
  position: absolute; top: 3px; right: -37px;
  color: #fff; font-size: 11px; font-weight: 800;
}

/* Modal dialog (dipakai halaman rekam referensi guru) */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 20, 15, 0.55);
  backdrop-filter: blur(2px);
  display: flex; align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fade-in 0.15s ease;
}
@media (min-width: 560px) {
  .modal-backdrop { align-items: center; }
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  background: var(--card);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 24px 24px 0 0;
  padding: 22px 20px 28px;
  box-shadow: 0 -10px 40px rgba(6, 20, 15, 0.3);
  animation: slide-up 0.2s ease;
}
@media (min-width: 560px) {
  .modal-card { border-radius: 24px; }
}

/* Sedikit margin kanan-kiri dari tepi layar, dipakai dialog Uji Tarjim
   supaya tidak terasa mepet edge-to-edge di layar sempit. */
.modal-card-inset { width: calc(100% - 32px); border-radius: 24px; }
@keyframes slide-up { from { transform: translateY(24px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.modal-header h3 { margin: 0; font-size: 17px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: #eef1ef; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  border: none; padding: 0; font-size: 15px;
}

/* Leaderboard */
.leaderboard-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.leaderboard-list[hidden] { display: none; }
.leaderboard-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow-card);
}
.leaderboard-item.is-me { box-shadow: var(--shadow-card), 0 0 0 2px var(--brand); }
.leaderboard-rank {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: #eef1ef; color: var(--muted);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px;
}
.leaderboard-item.rank-1 .leaderboard-rank { background: linear-gradient(135deg, #ffd700, #d99a04); color: #fff; }
.leaderboard-item.rank-2 .leaderboard-rank { background: linear-gradient(135deg, #c7cdd4, #94a0ab); color: #fff; }
.leaderboard-item.rank-3 .leaderboard-rank { background: linear-gradient(135deg, #d99a5c, #a9642f); color: #fff; }
.leaderboard-name { flex: 1; font-weight: 700; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leaderboard-points { font-weight: 800; color: var(--brand-dark); font-size: 14px; white-space: nowrap; }

/* Kuis Harian */
.quiz-progress { display: flex; gap: 6px; margin-bottom: 20px; }
.quiz-progress-seg { flex: 1; height: 6px; border-radius: 999px; background: #e4f5ec; }
.quiz-progress-seg.filled { background: linear-gradient(135deg, var(--brand), var(--brand-2)); }

.quiz-play-btn {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  font-size: 36px;
  display: flex; align-items: center; justify-content: center;
  margin: 12px auto 24px;
  box-shadow: 0 10px 28px var(--brand-glow);
  border: none;
}

.quiz-options { display: flex; flex-direction: column; gap: 10px; }
.quiz-option {
  background: var(--card);
  border: 2px solid #e4f5ec;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: left;
  font-size: 14px; font-weight: 600;
  color: var(--text);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.quiz-option-arab {
  text-align: right;
  direction: rtl;
  font-family: "Traditional Arabic", "Scheherazade New", serif;
  font-size: 20px;
  font-weight: 400;
}
.quiz-option-huruf { text-align: center; font-size: 36px; padding: 18px 16px; }
.quiz-option.selected { border-color: var(--brand); background: #e4f5ec; }
.quiz-option.correct { border-color: var(--lulus); background: #e1f6f1; }
.quiz-option.incorrect { border-color: var(--danger); background: #fdecea; }

.quiz-result-summary { text-align: center; }
.quiz-result-score { font-size: 46px; font-weight: 800; color: var(--brand); }
.quiz-result-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.quiz-result-actions .btn-ghost { padding: 12px; font-weight: 700; }

.quiz-koreksi { margin-top: 16px; }
.quiz-koreksi h3 { font-size: 15px; margin: 0 0 10px; }
.quiz-koreksi-item {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 10px;
}
.quiz-koreksi-teks { font-weight: 700; font-size: 13.5px; margin: 0 0 8px; }
.quiz-koreksi-line { margin: 4px 0; font-size: 13px; }
.quiz-koreksi-line .kata-benar, .quiz-koreksi-line .kata-salah, .quiz-koreksi-line .kata-hilang {
  padding: 2px 6px; border-radius: 6px; font-weight: 700;
}

/* Mini-player audio sticky (halaman unit) */
.mini-player {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  box-shadow: 0 -8px 24px rgba(6, 20, 15, 0.14);
  border-radius: 18px 18px 0 0;
  padding: 10px 16px 14px;
  z-index: 20;
  transform: translateY(110%);
  transition: transform 0.25s ease;
}
.mini-player.visible { transform: translateY(0); }
.mini-player-info { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.mini-player-info strong { color: var(--brand-dark); }
.mini-player-progress { height: 4px; border-radius: 999px; background: #e4f5ec; margin-bottom: 10px; overflow: hidden; }
.mini-player-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); width: 0%; }
.mini-player-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.mini-player-controls button {
  background: transparent; border: none; color: var(--brand-dark);
  font-size: 20px; padding: 4px; display: flex; align-items: center; justify-content: center;
}
.mini-player-controls .mini-player-playpause {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 18px;
  box-shadow: 0 6px 16px var(--brand-glow);
}

/* Bottom-tab navigation */
.bottom-nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  max-width: 640px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 24px rgba(6, 20, 15, 0.12);
  display: flex;
  padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
  z-index: 15;
}
.bottom-nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  padding: 6px 2px;
  border-radius: var(--radius-sm);
}
.bottom-nav-item .bottom-nav-icon { font-size: 20px; }
.bottom-nav-item.active { color: var(--brand-dark); background: #e4f5ec; }

/* Grid ikon menu (Beranda) */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 6px;
  margin-top: 4px;
}
.icon-grid-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  text-decoration: none;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
  text-align: center;
  min-width: 0;
}
.icon-grid-icon {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(160deg, var(--bg-a), #ffffff);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  box-shadow: var(--shadow-card);
  color: var(--brand-dark);
}
.icon-grid-icon-1 { background: linear-gradient(160deg, #d1fae5, #ffffff); color: #059669; }
.icon-grid-icon-2 { background: linear-gradient(160deg, #fef3c7, #ffffff); color: #d97706; }
.icon-grid-icon-3 { background: linear-gradient(160deg, #ede9fe, #ffffff); color: #7c3aed; }
.icon-grid-icon-4 { background: linear-gradient(160deg, #dbeafe, #ffffff); color: #2563eb; }
.icon-grid-icon-5 { background: linear-gradient(160deg, #ffe4e6, #ffffff); color: #e11d48; }
.icon-grid-icon-6 { background: linear-gradient(160deg, #e0f2fe, #ffffff); color: #0284c7; }
.icon-grid-icon-7 { background: linear-gradient(160deg, #f3e8ff, #ffffff); color: #9333ea; }
.icon-grid-icon-8 { background: linear-gradient(160deg, #ccfbf1, #ffffff); color: #0d9488; }
.icon-grid-icon-9 { background: linear-gradient(160deg, #fee2e2, #ffffff); color: #dc2626; }

/* Rangkuman Belajar (Beranda) */
.ringkasan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ringkasan-card {
  border-radius: var(--radius);
  padding: 16px;
  color: #fff;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.ringkasan-card-bacaan { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); }
.ringkasan-card-hafalan { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.ringkasan-card-icon { font-size: 20px; opacity: 0.9; }
.ringkasan-card-value { font-size: 22px; font-weight: 800; margin-top: 8px; }
.ringkasan-card-label { font-size: 12px; opacity: 0.9; margin-top: 2px; }

.progress-harian-card {
  margin-top: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.progress-harian-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; }
.progress-harian-head i { color: var(--gold); margin-right: 4px; }
.progress-harian-bar-track { height: 10px; border-radius: 999px; background: #eef1ef; margin-top: 10px; overflow: hidden; }
.progress-harian-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--danger), #f97316);
  transition: width 0.3s ease;
}
.progress-harian-bar-mid { background: linear-gradient(90deg, #f97316, var(--gold)); }
.progress-harian-bar-full { background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.progress-harian-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px;
}
.btn-tadarus-sekarang {
  display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
  font-size: 12px; padding: 9px 14px;
  text-decoration: none;
  border-radius: 16px;
}
.progress-harian-list { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.progress-harian-item {
  background: var(--bg-a);
  color: var(--brand-dark);
  font-size: 12px; font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}
.progress-harian-item em { font-style: normal; color: var(--muted); font-weight: 600; }
.progress-harian-empty { color: var(--muted); font-size: 13px; margin: 0; }

/* Akun */
.profile-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 28px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.profile-name { font-size: 18px; font-weight: 800; }
.profile-email { color: var(--muted); font-size: 13px; margin-top: 2px; }
.profile-card .btn-danger { margin-top: 20px; width: 100%; }

/* Logo sekolah, mengambang di pojok kiri bawah tiap halaman (lihat brand-badge.js) */
.brand-badge {
  position: fixed;
  left: 12px; bottom: 14px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  box-shadow: var(--shadow-card);
  object-fit: contain;
  z-index: 12;
  pointer-events: none;
  transition: bottom 0.2s ease;
}

/* Panduan penggunaan (coach-mark) — muncul sekali di kunjungan pertama,
   spotlight animasi berdenyut mengarahkan perhatian ke tiap elemen. */
.tour-backdrop {
  position: fixed; inset: 0;
  background: rgba(6, 20, 15, 0.6);
  z-index: 200;
  animation: fade-in 0.2s ease;
}
.tour-spotlight {
  position: fixed;
  border: 3px solid var(--gold);
  border-radius: 16px;
  z-index: 201;
  pointer-events: none;
  transition: top 0.3s ease, left 0.3s ease, width 0.3s ease, height 0.3s ease;
  animation: tour-pulse 1.6s ease-in-out infinite;
}
@keyframes tour-pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(242, 183, 5, 0.35), 0 0 24px rgba(242, 183, 5, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(242, 183, 5, 0.22), 0 0 32px rgba(242, 183, 5, 0.65); }
}
.tour-caption {
  position: fixed;
  z-index: 202;
  width: 280px;
  max-width: calc(100vw - 32px);
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: 0 12px 32px rgba(6, 20, 15, 0.35);
  animation: fade-in 0.25s ease;
}
.tour-caption p { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: var(--text); font-weight: 600; }
.tour-caption-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tour-dots { display: flex; gap: 5px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: #dce8e2; transition: all 0.2s ease; }
.tour-dot.is-active { background: var(--brand); width: 16px; border-radius: 999px; }
.tour-caption-actions { display: flex; gap: 8px; }
.tour-skip-btn { background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; padding: 8px 10px; }
.tour-next-btn {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff; font-size: 12px; font-weight: 700;
  padding: 8px 14px; border-radius: 10px;
}

/* ===== Skeleton loading (shimmer placeholder) =====
   Dipakai gantikan pesan teks "Memuat..." di semua halaman, supaya loading
   terasa lebih hidup/native (mirip pola skeleton screen aplikasi Android)
   dan bentuknya kurang-lebih mengikuti bentuk konten asli yang akan tampil. */
.skeleton-block {
  background: linear-gradient(100deg, #e9eeec 20%, #f4f6f5 40%, #e9eeec 60%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}
@keyframes skeleton-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.skeleton-line { height: 13px; margin: 6px 0; }
.skeleton-line.w-40 { width: 40%; }
.skeleton-line.w-50 { width: 50%; }
.skeleton-line.w-60 { width: 60%; }
.skeleton-line.w-70 { width: 70%; }
.skeleton-line.w-80 { width: 80%; }
.skeleton-line.w-100 { width: 100%; }
.skeleton-circle { border-radius: 50%; flex-shrink: 0; }
.skeleton-block.on-dark {
  background: linear-gradient(100deg, rgba(255,255,255,0.22) 20%, rgba(255,255,255,0.45) 40%, rgba(255,255,255,0.22) 60%);
  background-size: 200% 100%;
}

.skeleton-row {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 10px;
}
.skeleton-row-body { flex: 1; min-width: 0; }

.skeleton-card {
  background: var(--card);
  border-radius: var(--radius-sm);
  padding: 12px;
  box-shadow: var(--shadow-card);
}

.skeleton-list { display: flex; flex-direction: column; }
.skeleton-list[hidden] { display: none; }
.skeleton-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.skeleton-grid[hidden] { display: none; }
@media (min-width: 420px) {
  .skeleton-grid { grid-template-columns: repeat(3, 1fr); }
}
