/* ==========================================================================
   Pegon Studio Online — Desain Sistem Editorial Minimalis PP. An Nur Slawi
   Mobile-First untuk HP Ustad & Responsive Desktop Web (Reviewer / Admin).
   Palet & Tipografi identik dengan Aplikasi Desktop Tauri.
   ========================================================================== */
@font-face { font-family: Nunito; font-weight: 400; src: url(fonts/nunito.ttf); }
@font-face { font-family: Nunito; font-weight: 700; src: url(fonts/nunitobold.ttf); }
@font-face { font-family: Rubik; font-weight: 500; src: url(fonts/rubik_medium.ttf); }
@font-face { font-family: Rubik; font-weight: 700; src: url(fonts/rubik_medium.ttf); }
@font-face { font-family: Scheherazade; font-weight: 400; src: url(fonts/scheherazade_new_regular.ttf); }
@font-face { font-family: Scheherazade; font-weight: 700; src: url(fonts/scheherazade_new_bold.ttf); }

:root {
  --annur-dark:         #095a4d;
  --annur-primary:      #0b6a5b;
  --annur-emerald:      #0c7766;
  --annur-mint-bg:      #e6f4f1;
  --annur-mint-chip:    #d1ebe5;
  --annur-gold:         #facc15;
  --annur-gold-soft:    #fef9c3;
  --annur-sky:          #0369a1;
  --annur-amber:        #d97706;
  --annur-rose:         #dc2626;
  --rose-soft:          #fee2e2;
  --amber-soft:         #fef3c7;

  --bg-app:             #f4f7f9;
  --bg-sidebar:         #ffffff;
  --bg-card-active:     #e6f4f1;
  --bg-chip:            #f1f5f9;
  --bg-input:           #f8fafc;
  --radius-card:        16px;
  --radius-pill:        999px;
  --shadow-card:        0 2px 10px rgba(15, 23, 42, 0.03);
  --shadow-pill:        0 4px 14px rgba(11, 106, 91, 0.06);

  --text-primary:       #0f172a;
  --text-secondary:     #475569;
  --text-muted:         #64748b;

  --border-hairline:    #e2e8f0;
  --border-strong:      #cbd5e1;
  --col-rule-color:     #095a4d;

  --font-ui:            Nunito, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display:       Rubik, Nunito, sans-serif;
  --font-pegon:         Scheherazade, "Scheherazade New", serif;
  --font-mono:          ui-monospace, "Cascadia Mono", Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-app:           #081513;
    --bg-sidebar:       #0b1c19;
    --bg-card-active:   #122e29;
    --bg-chip:          #152c28;
    --bg-input:         #0f2420;
    --text-primary:     #f1f5f9;
    --text-secondary:   #94a3b8;
    --text-muted:       #64748b;
    --border-hairline:  #1b3530;
    --border-strong:    #264a43;
    --col-rule-color:   #0c7766;
    --annur-mint-bg:    #122e29;
    --annur-mint-chip:  #1b433c;
    --rose-soft:        #3a1f26;
    --amber-soft:       #3a2e12;
  }
}

:root[data-theme="dark"] {
  --bg-app:             #081513;
  --bg-sidebar:         #0b1c19;
  --bg-card-active:     #122e29;
  --bg-chip:            #152c28;
  --bg-input:           #0f2420;
  --text-primary:       #f1f5f9;
  --text-secondary:     #94a3b8;
  --text-muted:         #64748b;
  --border-hairline:    #1b3530;
  --border-strong:      #264a43;
  --col-rule-color:     #0c7766;
  --annur-mint-bg:      #122e29;
  --annur-mint-chip:    #1b433c;
  --rose-soft:          #3a1f26;
  --amber-soft:         #3a2e12;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100%;
  background: var(--bg-app);
  color: var(--text-primary);
  font: 14px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.font-rubik { font-family: var(--font-display); }
.font-pegon { font-family: var(--font-pegon); line-height: 1.85; }
.tabular-nums { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
code { font: 700 12px var(--font-mono); background: var(--bg-chip); padding: 1px 5px; border-radius: 3px; }

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--annur-primary);
  outline-offset: 1px;
}

/* ==========================================================================
   TOMBOL, INPUT, TAG EDITORIAL
   ========================================================================== */
.btn-primary-square {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 4px;
  border: 1px solid var(--annur-primary);
  background: var(--annur-primary);
  color: #ffffff;
  font: 800 13px var(--font-ui);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(11, 106, 91, 0.18);
  transition: background 0.15s ease;
}
.btn-primary-square:hover:not(:disabled) { background: var(--annur-dark); border-color: var(--annur-dark); }
.btn-primary-square:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary-square.block { width: 100%; }

.btn-ghost-square {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  font: 700 12px var(--font-ui);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.14s ease;
}
.btn-ghost-square:hover:not(:disabled),
.btn-ghost-square.active {
  border-color: var(--annur-primary);
  background: var(--annur-mint-bg);
  color: var(--annur-primary);
}
:root[data-theme="dark"] .btn-ghost-square:hover:not(:disabled),
:root[data-theme="dark"] .btn-ghost-square.active { color: #6ee7b7; }
.btn-ghost-square.rose { color: var(--annur-rose); }
.btn-ghost-square.rose:hover:not(:disabled) { border-color: var(--annur-rose); background: var(--rose-soft); color: var(--annur-rose); }
.btn-ghost-square.sm { min-height: 28px; padding: 0 9px; font-size: 11px; }
.btn-ghost-square:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-ghost-square.block { width: 100%; }

.editorial-input,
.editorial-textarea {
  width: 100%;
  padding: 9px 11px;
  border-radius: 3px;
  border: 1px solid var(--border-strong);
  background: var(--bg-input);
  color: var(--text-primary);
  font: 600 15px/1.45 var(--font-ui);
  color-scheme: light dark;
}
.editorial-input:focus,
.editorial-textarea:focus {
  outline: none;
  border-color: var(--annur-primary);
  background: var(--bg-app);
}
.editorial-textarea { resize: vertical; min-height: 64px; }
.editorial-textarea.ar, .editorial-input.ar {
  font: 400 22px/1.6 var(--font-pegon);
}

.field-label {
  display: block;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.editorial-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 3px;
  background: var(--bg-chip);
  color: var(--text-secondary);
  font: 700 11px var(--font-ui);
  white-space: nowrap;
}
.editorial-tag.mint { background: var(--annur-mint-chip); color: var(--annur-dark); }
:root[data-theme="dark"] .editorial-tag.mint { color: #a7f3d0; }
.editorial-tag.amber { background: var(--amber-soft); color: #92400e; }
:root[data-theme="dark"] .editorial-tag.amber { color: #fde68a; }
.editorial-tag.rose { background: var(--rose-soft); color: var(--annur-rose); }

.status-hollow-ring {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--annur-primary);
  display: inline-block;
  flex-shrink: 0;
}
.status-hollow-ring.draft { border-color: #64748b; }
.status-hollow-ring.submitted { border-color: #0284c7; }
.status-hollow-ring.revision { border-color: #dc2626; }
.status-hollow-ring.approved { border-color: #0b6a5b; }
.status-hollow-ring.printed { border-color: #10b981; }

.editorial-card {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.editorial-card.is-highlighted {
  background: var(--bg-card-active);
  border-top: 2px solid var(--annur-primary);
  padding: 14px 12px;
  border-radius: 2px;
}
.editorial-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.editorial-card-title {
  font: 700 14px var(--font-display);
  color: var(--text-primary);
}
.editorial-card-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  line-height: 1.5;
}

.editorial-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 2px solid var(--col-rule-color);
  padding-bottom: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.col-title-text { font: 700 17px var(--font-display); color: var(--text-primary); }
.col-count-sub { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 2px; }

/* ==========================================================================
   HALAMAN LOGIN (DESAIN BAR ATAS + KAPSUL BERIKON + BUSUR KONSENTRIS ISOMETRIK)
   ========================================================================== */
.login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 38px;
  background: #eff7f6;
  overflow: hidden;
}
/* Lengkung konsentris dekoratif di pojok luar latar (persis foto referensi) */
.login-screen::before {
  content: "";
  position: absolute;
  top: -170px;
  left: -170px;
  width: 470px;
  height: 470px;
  border-radius: 50%;
  background: radial-gradient(circle, #b4ded9 0%, #b4ded9 56%, #d0ebe7 56.5%, #d0ebe7 100%);
  pointer-events: none;
}
.login-screen::after {
  content: "";
  position: absolute;
  bottom: -165px;
  right: -135px;
  width: 410px;
  height: 410px;
  border-radius: 50%;
  background: radial-gradient(circle, #bce2dd 0%, #bce2dd 54%, #d8efec 54.5%, #d8efec 100%);
  pointer-events: none;
}
:root[data-theme="dark"] .login-screen {
  background: #071517;
}
:root[data-theme="dark"] .login-screen::before,
:root[data-theme="dark"] .login-screen::after {
  opacity: 0.14;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-screen {
    background: #071517;
  }
  :root:not([data-theme="light"]) .login-screen::before,
  :root:not([data-theme="light"]) .login-screen::after {
    opacity: 0.14;
  }
}

.login-mobile-hero,
.login-mob-greeting,
.login-mob-links {
  display: none;
}

/* Kartu Utama Landscape Desktop (mengisi layar hampir penuh seperti gambar referensi) */
.login-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1480px;
  height: calc(100vh - 32px);
  min-height: 540px;
  border-radius: 6px;
  background: var(--bg-sidebar);
  border: 1px solid rgba(18, 75, 82, 0.08);
  box-shadow:
    0 24px 60px -15px rgba(16, 72, 78, 0.2),
    0 4px 16px rgba(16, 72, 78, 0.06);
  display: grid;
  grid-template-columns: 0.96fr 1.04fr;
  overflow: hidden;
}
:root[data-theme="dark"] .login-box {
  border-color: var(--border-hairline);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
}

/* Bar Navigasi Atas di Dalam Kartu Login */
.login-card-topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  padding: 26px 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.login-topbar-left {
  display: flex;
  align-items: center;
  gap: 32px;
}
.login-topbar-brand img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
}
.login-topbar-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.login-topnav-link {
  border: none;
  background: transparent;
  padding: 5px 0;
  font: 700 14px var(--font-ui);
  color: #3a6e78;
  text-decoration: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.login-topnav-link:hover,
.login-topnav-link.active {
  color: #0e5a64;
  border-bottom-color: #46b8a7;
}
:root[data-theme="dark"] .login-topnav-link {
  color: var(--text-secondary);
}
:root[data-theme="dark"] .login-topnav-link:hover,
:root[data-theme="dark"] .login-topnav-link.active {
  color: #6ee7b7;
  border-bottom-color: #6ee7b7;
}
.login-topbar-pill {
  height: 38px;
  padding: 0 22px;
  border-radius: 999px;
  background: #0c5472;
  color: #ffffff;
  font: 700 13px var(--font-ui);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(12, 84, 114, 0.22);
  transition: transform 0.15s ease, background 0.15s ease;
}
.login-topbar-pill:hover {
  background: #09425a;
  transform: translateY(-1px);
}

/* Panel Form Kiri */
.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 78px 40px 32px 68px;
  background: var(--bg-sidebar);
  z-index: 3;
}
.login-form-inner {
  width: 100%;
  max-width: 416px;
  margin: 0 auto;
}
.login-pane {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: loginCardIn 0.22s ease-out;
}

.login-tab-header {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 4px;
}
.login-tab-title {
  position: relative;
  padding: 0 14px 10px;
  font: 700 24px/1.2 var(--font-display);
  color: #1e626c;
}
:root[data-theme="dark"] .login-tab-title {
  color: #6ee7b7;
}
.login-tab-title.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  border-radius: 2px;
  background: #58c2b2;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Input Kapsul Putih Berbayangan Halus + Ikon Lingkaran Kiri */
.login-pill-field {
  position: relative;
  height: 50px;
  border-radius: 999px;
  background: var(--bg-sidebar);
  border: 1px solid #e4efee;
  box-shadow: 0 5px 18px rgba(19, 78, 84, 0.07);
  display: flex;
  align-items: center;
  padding: 0 14px 0 10px;
  gap: 12px;
  overflow: hidden;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
:root[data-theme="dark"] .login-pill-field {
  background: var(--bg-input);
  border-color: var(--border-strong);
  box-shadow: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-pill-field {
    background: var(--bg-input);
    border-color: var(--border-strong);
    box-shadow: none;
  }
}
.login-pill-field:focus-within {
  border-color: #48b8a7;
  box-shadow: 0 6px 20px rgba(72, 184, 167, 0.18);
}
.pill-field-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid #63bfb0;
  color: #46a999;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pill-field-icon svg {
  width: 16px;
  height: 16px;
}
.login-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: 600 14.5px var(--font-ui);
}
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0 1000px var(--bg-sidebar) inset;
  transition: background-color 5000s ease-in-out 0s;
}
:root[data-theme="dark"] .login-input:-webkit-autofill,
:root[data-theme="dark"] .login-input:-webkit-autofill:hover,
:root[data-theme="dark"] .login-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .login-input:-webkit-autofill,
  :root:not([data-theme="light"]) .login-input:-webkit-autofill:hover,
  :root:not([data-theme="light"]) .login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset;
  }
}
.login-input::placeholder {
  color: #b0c0c4;
  font-weight: 600;
}
.login-input:focus {
  outline: none;
}

.pass-toggle {
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #93a8ae;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
  transition: color 0.15s ease;
}
.pass-toggle svg {
  width: 18px;
  height: 18px;
}
.pass-toggle:hover {
  color: var(--annur-primary);
}
.pass-toggle .ic-eye-off { display: none; }
.pass-toggle.is-shown .ic-eye { display: none; }
.pass-toggle.is-shown .ic-eye-off { display: block; }

/* Baris Bawah Form: Kiri Lupa Sandi, Kanan Tombol Kapsul Mint-Teal */
.login-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}
.login-forgot-link {
  font: 700 13.5px var(--font-ui);
  color: #3b717c;
  text-decoration: none;
  transition: color 0.15s ease;
}
.login-forgot-link:hover {
  color: var(--annur-primary);
  text-decoration: underline;
}
:root[data-theme="dark"] .login-forgot-link {
  color: #86efac;
}

.login-submit-btn {
  min-width: 132px;
  height: 42px;
  padding: 0 28px;
  border: none;
  border-radius: 999px;
  background: #42b89c;
  color: #ffffff;
  font: 700 14.5px var(--font-ui);
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(66, 184, 156, 0.32);
  transition: background 0.16s ease, transform 0.14s ease, box-shadow 0.16s ease;
}
.login-submit-btn:hover:not(:disabled) {
  background: #2ea387;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(46, 163, 135, 0.4);
}
.login-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}
.login-submit-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Panel Tentang Aplikasi */
.login-about-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 600;
}
.login-about-points {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.login-about-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 600;
}
.about-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--annur-mint-bg);
  color: var(--annur-primary);
  font: 800 11.5px var(--font-mono);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.login-demo-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  color: #97aab0;
  margin-top: 6px;
}
.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-hairline);
}

.demo-roles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.login-demo-chip {
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-input);
  color: var(--text-secondary);
  font: 700 12.5px var(--font-ui);
  cursor: pointer;
  transition: all 0.15s ease;
}
.login-demo-chip:hover {
  border-color: #42b89c;
  background: var(--annur-mint-bg);
  color: var(--annur-primary);
}
:root[data-theme="dark"] .login-demo-chip:hover {
  color: #6ee7b7;
}

.cfg-details {
  text-align: center;
  border-top: 1px solid var(--border-hairline);
  padding-top: 10px;
}
.cfg-details summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  color: #489790;
  list-style: none;
}
@media (min-width: 961px) and (max-height: 700px) {
  .login-form-panel { padding: 66px 40px 24px 68px; }
  .login-pane { gap: 13px; }
  .login-form { gap: 12px; }
}
.cfg-details summary::-webkit-details-marker { display: none; }
:root[data-theme="dark"] .cfg-details summary { color: #6ee7b7; }
.cfg-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  text-align: left;
}

/* Panel Ilustrasi Kanan (Busur Konsentris + Isometrik) */
.login-art-panel {
  position: relative;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}
.login-iso-svg {
  width: 100%;
  height: 100%;
  display: block;
}
@keyframes isoFloatSlow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.iso-float-slow {
  animation: isoFloatSlow 4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .iso-float-slow, .il-float-a, .il-float-b, .il-float-c, .il-float-d,
  .il-arm, .il-dot, .il-steam, .il-spark {
    animation: none !important;
  }
}

/* Animasi Ilustrasi SVG Welcome Mobile */
@keyframes ilFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes ilWrite {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg) translateX(-1.5px); }
}
@keyframes ilDot {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}
@keyframes ilSteam {
  0%, 100% { opacity: 0.2; transform: translateY(1px); }
  50% { opacity: 0.75; transform: translateY(-3px); }
}
@keyframes ilSpark {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.il-float-a { animation: ilFloat 3.4s ease-in-out infinite; }
.il-float-b { animation: ilFloat 2.9s ease-in-out 0.4s infinite; }
.il-float-c { animation: ilFloat 3.2s ease-in-out 0.9s infinite; }
.il-float-d { animation: ilFloat 2.7s ease-in-out 1.3s infinite; }
.il-arm { transform-origin: 200px 118px; animation: ilWrite 1.8s ease-in-out infinite; }
.il-dot { animation: ilDot 1.4s ease-in-out infinite; }
.il-dot2 { animation-delay: 0.22s; }
.il-dot3 { animation-delay: 0.44s; }
.il-steam { animation: ilSteam 2.4s ease-in-out infinite; }
.il-steam2 { animation-delay: 0.9s; }
.il-spark { animation: ilSpark 2.2s ease-in-out infinite; }
.il-spark2 { animation-delay: 0.7s; }
.il-spark3 { animation-delay: 1.3s; }

/* ==========================================================================
   SHELL APLIKASI: HYBRID SIDEBAR RAIL <-> TOP FLOATING PILL NAVBAR
   (Untuk Ustad: 1 halaman penuh tanpa rail/tab!)
   ========================================================================== */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
}
html[data-nav-mode="topnav"] .app-shell {
  grid-template-columns: 1fr;
}
html[data-nav-mode="topnav"] .app-shell .side-rail {
  display: none;
}
.app-shell.role-ustad {
  grid-template-columns: 1fr;
}
.app-shell.role-ustad .side-rail,
.app-shell.role-ustad .tf-topbar,
.app-shell.role-ustad .bottom-nav {
  display: none !important;
}
.app-shell.role-ustad .main-area {
  max-width: 780px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 36px;
}

/* TOP FLOATING PILL NAVBAR (DARI REDESIGN-REFERENCE) */
.tf-topbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
html[data-nav-mode="topnav"] .app-shell:not(.role-ustad) .tf-topbar {
  display: flex;
}
.tf-nav-pill-group {
  background: var(--bg-sidebar);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-pill);
  padding: 5px 8px 5px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-pill);
  flex-wrap: wrap;
}
.tf-brand-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid var(--border-hairline);
}
.tf-brand-btn img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.tf-brand-name {
  font: 700 15.5px var(--font-display);
  color: var(--text-primary);
}
.tf-pill-nav-btn {
  height: 36px;
  padding: 0 15px;
  border-radius: var(--radius-pill);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: 700 12.5px var(--font-ui);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}
.tf-pill-nav-btn:hover {
  color: var(--annur-primary);
  background: var(--annur-mint-bg);
}
.tf-pill-nav-btn.on {
  background: var(--annur-primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(11, 106, 91, 0.25);
}
.tf-nav-count {
  font: 800 10px var(--font-mono);
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--annur-mint-chip);
  color: var(--annur-dark);
}
.tf-nav-count:empty {
  display: none;
}
.tf-pill-nav-btn.on .tf-nav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}
.tf-profile-pill {
  height: 42px;
  padding: 4px 14px 4px 5px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-hairline);
  background: var(--bg-sidebar);
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-card);
}
.tf-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--annur-mint-bg);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tf-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-logo-top { width: 34px; height: 34px; object-fit: contain; display: none; }
.app-shell.role-ustad .brand-logo-top { display: block; }

/* Kotak 3 Field Utama Ustad (Nama Ustad, Kelas, Mata Pelajaran) */
.ustad-top-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 10px;
}
.custom-mapel-wrap {
  margin-top: 7px;
}
.admin-extra-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-hairline);
}
.ustad-history-box {
  margin-top: 22px;
  border-top: 2px solid var(--col-rule-color);
  padding-top: 12px;
}
.ustad-history-box summary {
  cursor: pointer;
  font: 700 14px var(--font-display);
  color: var(--annur-primary);
}
:root[data-theme="dark"] .ustad-history-box summary { color: #6ee7b7; }

/* Dashboard Ringkas Admin */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.dash-kpi-card {
  text-align: left;
  padding: 15px 16px;
  border: 1px solid var(--border-hairline);
  border-top: 3px solid var(--col-rule-color);
  border-radius: var(--radius-card);
  background: var(--bg-sidebar);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.dash-kpi-card:hover,
.dash-kpi-card.is-accent {
  background: var(--bg-card-active);
  border-color: var(--annur-primary);
}
.dash-kpi-lbl { font: 700 12px var(--font-ui); color: var(--text-secondary); }
.dash-kpi-val { font: 700 28px/1.1 var(--font-mono); color: var(--text-primary); }
.dash-split {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

.side-rail {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  position: sticky;
  top: 0;
  height: 100vh;
}
.rail-logo { width: 38px; height: 38px; object-fit: contain; }
.rail-nav { display: flex; flex-direction: column; gap: 16px; align-items: center; }
.nav-item {
  position: relative;
  width: 42px;
  height: 42px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-item:hover, .nav-item.on { background: var(--annur-mint-bg); color: var(--annur-primary); }
:root[data-theme="dark"] .nav-item.on { color: #6ee7b7; }
.nav-item.on::before {
  content: "";
  position: absolute;
  left: -17px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--annur-primary);
  border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 20px; height: 20px; }
.nav-badge {
  position: absolute;
  top: -2px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--annur-primary);
  color: #fff;
  font: 700 9.5px/1 var(--font-mono);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-badge:empty { display: none; }

.main-area {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 20px 28px 32px;
}
.main-area > section.view {
  width: 100%;
  flex: 1;
  background: var(--bg-sidebar);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-card);
  padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
#dictList {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
}

.top-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.top-title-wrap { display: flex; align-items: center; gap: 10px; }
.mobile-brand-logo { display: none; width: 32px; height: 32px; object-fit: contain; }
.top-h1 { font: 700 24px/1.15 var(--font-display); }
.top-sub { font-size: 12px; font-weight: 700; color: var(--text-muted); margin-top: 3px; }
.top-sub:empty { display: none; }
.top-actions,
.top-meta-pills,
.top-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.top-btn-ic { display: none; }

/* Bar Nama Ustad di paling atas workspace Ustad */
.teacher-bar {
  background: var(--bg-card-active);
  border-top: 2px solid var(--annur-primary);
  border-bottom: 1px solid var(--border-hairline);
  padding: 12px 14px;
  border-radius: 2px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.teacher-bar-select { flex: 1; min-width: 200px; }

/* Pencarian garis bawah */
.underline-search {
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 5px;
  min-width: 190px;
  flex: 1;
}
.underline-search svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.underline-search input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font: 600 14px var(--font-ui);
  width: 100%;
}
.underline-search input:focus { outline: none; }

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* Layout Grid Desktop untuk Halaman Review / Admin / Editor */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.9fr);
  gap: 24px;
  align-items: start;
}
.editor-side {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Strip Kapasitas F4 (selalu terlihat di Editor) */
.f4-strip {
  background: var(--bg-input);
  border: 1px solid var(--border-hairline);
  border-top: 2px solid var(--annur-primary);
  border-radius: 3px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.f4-strip.over { border-top-color: var(--annur-rose); background: var(--rose-soft); }
.f4-strip-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
}
.f4-bar-track {
  width: 100%;
  height: 5px;
  background: var(--border-hairline);
  border-radius: 2px;
  overflow: hidden;
}
.f4-bar-fill { height: 100%; background: var(--annur-primary); transition: width 0.2s ease; }
.f4-strip.over .f4-bar-fill { background: var(--annur-rose); }

/* Kartu Butir Soal Mobile-Friendly */
.q-card {
  padding: 14px 10px;
  border-bottom: 1px solid var(--border-hairline);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.q-card:focus-within {
  background: var(--bg-card-active);
  border-top: 2px solid var(--annur-primary);
  padding: 14px 12px;
  border-radius: 2px;
}
.q-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.q-num { font: 700 13px var(--font-display); color: var(--annur-primary); }
:root[data-theme="dark"] .q-num { color: #6ee7b7; }
.q-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.q-preview {
  direction: rtl;
  text-align: right;
  font: 400 20px/1.7 var(--font-pegon);
  color: var(--annur-dark);
  padding: 4px 2px 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
:root[data-theme="dark"] .q-preview { color: #6ee7b7; }
.q-preview:empty { display: none; }
.q-review-box {
  background: var(--amber-soft);
  border-left: 3px solid var(--annur-amber);
  padding: 7px 10px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}
.review-banner {
  background: var(--rose-soft);
  border-left: 4px solid var(--annur-rose);
  padding: 10px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 700;
}
.lock-banner {
  background: var(--bg-chip);
  border-left: 4px solid var(--annur-primary);
  padding: 10px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
  font-size: 12.5px;
  font-weight: 700;
}

.sticky-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border-hairline);
  margin-top: 12px;
}
.sticky-editor-actions button { flex: 1; min-width: 120px; }

/* Konverter & Kamus & Master */
.split-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pegon-paper {
  min-height: 170px;
  background: var(--annur-mint-bg);
  border-top: 2px solid var(--annur-primary);
  padding: 14px;
  border-radius: 2px;
  direction: rtl;
  text-align: right;
  font: 400 28px/1.8 var(--font-pegon);
  white-space: pre-wrap;
  word-break: break-word;
  user-select: text;
}
.master-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.grid-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
  gap: 8px;
}
.grid-tiles button {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 4px;
  border: 1px solid var(--border-hairline);
  background: var(--bg-input);
  border-radius: 3px;
  cursor: pointer;
}
.grid-tiles button:hover { background: var(--annur-mint-bg); border-color: var(--annur-primary); }
.grid-tiles b { font: 700 11px var(--font-mono); color: var(--text-muted); }
.grid-tiles span { font: 400 24px/1.4 var(--font-pegon); color: var(--annur-primary); }

/* Bottom Nav khusus Mobile */
.bottom-nav { display: none; }

/* Modal Pratinjau F4 & Toast */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(9, 90, 77, 0.52);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  z-index: 60;
}
.pvbox {
  background: var(--bg-app);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  max-width: 620px;
  width: 100%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pvhead {
  padding: 12px 16px;
  border-bottom: 2px solid var(--annur-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13.5px;
}
.pvbody { flex: 1; overflow-y: auto; padding: 14px; background: var(--bg-chip); }
.pvfoot {
  padding: 10px 16px;
  border-top: 1px solid var(--border-hairline);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-secondary);
}
.sheet {
  background: #ffffff;
  color: #0f172a;
  width: 100%;
  max-width: 495px;
  min-height: 778px;
  margin: 0 auto;
  padding: 20px 32px 24px;
  font: 11.5px/1.4 "Times New Roman", serif;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
}
.pkop {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 8px;
  text-align: center;
  border-bottom: 3px double #0f172a;
  padding-bottom: 5px;
  margin-bottom: 10px;
}
.pkop img { width: 42px; height: 42px; object-fit: contain; }
.pkop-mid { font-size: 9.8px; line-height: 1.32; }
.pkop .b { font: 700 11.2px/1.3 Arial, sans-serif; }
.ptab { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid #0f172a; margin-bottom: 10px; font-size: 11.2px; }
.ptab div { padding: 3px 6px; border: 0.5px solid #0f172a; }
.ppet { font: 700 17px/1.55 var(--font-pegon); margin-bottom: 4px; }
.pq { font: 16.5px/1.45 var(--font-pegon); }
.pj { text-align: center; font: 700 17.5px/1.4 var(--font-pegon); margin: 12px 0 4px; }
.pline { border-bottom: 1px dashed #334155; height: 18px; }

.toast {
  position: fixed;
  right: 16px;
  bottom: 20px;
  padding: 10px 16px;
  border-radius: 4px;
  background: #095a4d;
  color: #ffffff;
  border-left: 4px solid #facc15;
  font: 700 12.5px var(--font-ui);
  box-shadow: 0 8px 24px rgba(9, 90, 77, 0.32);
  opacity: 0;
  transform: translateY(8px);
  transition: 0.2s ease;
  pointer-events: none;
  z-index: 80;
  max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: none; }

/* ==========================================================================
   RESPONSIVE MOBILE-FIRST (< 960px)
   ========================================================================== */
@media (max-width: 960px) {
  /* Desain Login Mobile khusus Ustadz: Tenang, Berwibawa, & Nyambung dengan Busur Mint-Teal Desktop */
  .login-screen {
    padding: 0;
    align-items: stretch;
    background: var(--bg-sidebar);
  }
  .login-screen::before,
  .login-screen::after {
    display: none;
  }
  .login-box {
    max-width: none;
    height: auto;
    min-height: 100vh;
    border: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    animation: loginCardIn 0.22s ease-out;
  }
  .login-card-topbar,
  .login-art-panel {
    display: none;
  }
  .login-mobile-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 26px 22px 34px;
    overflow: hidden;
  }
  .mobile-hero-arcs {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
  }
  .mob-hero-cut {
    fill: var(--bg-sidebar);
  }
  .mobile-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
  }
  .mobile-hero-medallion {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #ffffff;
    padding: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 22px rgba(7, 68, 57, 0.24);
    margin-bottom: 4px;
  }
  .mobile-hero-medallion img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .mobile-hero-content h2 {
    font: 700 20px/1.2 var(--font-display);
    color: #ffffff;
    letter-spacing: -0.015em;
  }
  .mobile-hero-content p {
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
  }

  .login-form-panel {
    padding: 8px 22px 28px;
    flex: 1;
    justify-content: flex-start;
  }
  .login-form-inner {
    max-width: 420px;
  }
  .login-tab-header {
    justify-content: center;
    margin-bottom: 0;
  }
  .login-tab-title {
    font-size: 21px;
  }
  .login-mob-greeting {
    display: block;
    text-align: center;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--text-muted);
    margin-top: -6px;
    margin-bottom: 2px;
  }
  .login-pill-field {
    height: 48px;
    padding: 0 14px 0 10px;
  }
  .pill-field-icon {
    width: 30px;
    height: 30px;
  }
  .login-input {
    font-size: 14px;
  }
  .login-action-row {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 12px;
    margin-top: 6px;
  }
  .login-submit-btn {
    width: 100%;
    height: 46px;
    font-size: 14px;
    background: #0b6a5b;
  }
  .login-forgot-link {
    text-align: center;
    font-size: 12.5px;
  }
  .login-mob-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    padding-top: 2px;
  }
  .login-mob-link-btn {
    border: none;
    background: transparent;
    color: var(--annur-primary);
    font: 700 12px var(--font-ui);
    text-decoration: none;
    cursor: pointer;
    padding: 2px 0;
  }
  :root[data-theme="dark"] .login-mob-link-btn {
    color: #6ee7b7;
  }
  .login-divider {
    margin-top: 8px;
  }

  .app-shell { grid-template-columns: 1fr; }
  .side-rail { display: none; }
  .brand-logo-top { display: block; }
  .ustad-top-fields,
  .admin-extra-fields { grid-template-columns: 1fr; }
  .dash-kpi-grid { grid-template-columns: 1fr 1fr; }
  .dash-split { grid-template-columns: 1fr; }
  .main-area {
    padding: 12px 12px calc(82px + env(safe-area-inset-bottom, 0px));
  }
  .app-shell.role-ustad .main-area {
    padding-bottom: 28px;
  }
  .main-area > section.view {
    padding: 16px 14px;
  }

  /* Header Mobile: Kartu App Bar Rapi (Logo + Judul + Aksi Pojok Kanan 1 Baris + Strip Status) */
  .top-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 10px;
    background: var(--bg-sidebar);
    border: 1px solid var(--border-hairline);
    border-top: 3px solid var(--annur-primary);
    border-radius: var(--radius-card);
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-card);
  }
  .top-title-wrap,
  .top-title-text,
  .top-actions {
    display: contents;
  }
  .brand-logo-top {
    display: block !important;
    width: 34px;
    height: 34px;
    grid-column: 1;
    grid-row: 1;
  }
  .top-h1 {
    grid-column: 2;
    grid-row: 1;
    font-size: 17px;
    line-height: 1.2;
    min-width: 0;
  }
  .top-action-btns {
    grid-column: 3;
    grid-row: 1;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
  }
  .top-action-btns .btn-ghost-square.sm {
    min-height: 32px;
    border-radius: 8px;
  }
  .top-action-btns .top-btn-ic {
    display: block;
    flex-shrink: 0;
  }
  .top-action-btns .top-btn-lbl:not(.top-btn-lbl-keep) {
    display: none;
  }
  #syncBtn,
  #themeBtnMobile {
    width: 32px;
    padding: 0;
    background: var(--bg-input);
  }
  #logoutBtn {
    padding: 0 10px;
    background: var(--rose-soft);
    border-color: rgba(220, 38, 38, 0.24);
    gap: 4px;
    font-size: 11.5px;
  }
  :root[data-theme="dark"] #logoutBtn {
    color: #fca5a5;
    border-color: rgba(252, 165, 165, 0.25);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) #logoutBtn {
      color: #fca5a5;
      border-color: rgba(252, 165, 165, 0.25);
    }
  }
  .top-sub {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
  }
  .top-meta-pills {
    grid-column: 1 / -1;
    grid-row: 3;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 4px;
    padding-top: 9px;
    border-top: 1px solid var(--border-hairline);
  }
  .top-meta-pills .editorial-tag {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
  }
  .top-meta-pills #demoRoleSwitch {
    margin-left: auto;
    padding: 4px 8px;
    font-size: 11.5px;
    border-radius: 8px;
  }
  .top-meta-pills #webNavModeBtn {
    border-radius: 999px;
    min-height: 26px;
  }

  .editor-grid { grid-template-columns: 1fr; gap: 14px; }
  .editor-side { position: static; order: -1; }
  .split-2 { grid-template-columns: 1fr; }

  .sticky-editor-actions {
    position: sticky;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-app);
    padding: 10px 0;
    z-index: 15;
  }
  .app-shell.role-ustad .sticky-editor-actions {
    bottom: 0;
  }

  .bottom-nav {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-sidebar);
    border-top: 1px solid var(--border-strong);
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
  }
  .bnav-btn {
    position: relative;
    border: none;
    background: transparent;
    color: var(--text-muted);
    min-height: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font: 700 10.5px var(--font-ui);
    cursor: pointer;
  }
  .bnav-btn.on { color: var(--annur-primary); }
  :root[data-theme="dark"] .bnav-btn.on { color: #6ee7b7; }
  .bnav-btn.on::before {
    content: "";
    position: absolute;
    top: -4px;
    left: 22%;
    right: 22%;
    height: 3px;
    background: var(--annur-primary);
  }
  .bnav-btn svg { width: 20px; height: 20px; }
  .toast { bottom: 72px; right: 12px; left: 12px; }
}
