/* ============================================================
   TASKFLOW — Design System v2
   Tema: Islami Modern Minimalis
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
  /* Warna dasar */
  --bg: #f7f4ea;
  --bg-soft: #faf8f0;
  --card: #ffffff;

  /* Warna utama */
  --primary: #1a4d3a;
  --primary-dark: #0f3828;
  --primary-light: #2d7a5a;
  --primary-soft: #e8f0e0;
  --primary-softer: #f0f5e9;

  /* Aksen */
  --sage: #c9d6be;
  --sage-dark: #a8b89c;
  --gold: #c9a961;
  --gold-light: #e6d9b5;

  /* Text */
  --text: #1a3a2e;
  --text-secondary: #4a5c50;
  --text-muted: #6b7c70;
  --text-light: #96a69a;

  /* Border & divider */
  --border: #e8ebe0;
  --border-soft: #f0f2e9;

  /* Status warna (untuk hafalan & muroja'ah) */
  --status-mumtaz-murtafi: #c9a961;
  --status-mumtaz: #1a4d3a;
  --status-jayyid-jiddan: #2d7a5a;
  --status-jayyid: #5da87a;
  --status-maqbul: #d4a017;
  --status-rasib: #c76c6c;
  --status-neutral: #b8c0b5;

  /* Approval */
  --pending-bg: #fef3c7;
  --pending-text: #92400e;
  --approved-bg: #d1e7d1;
  --approved-text: #1a4d3a;
  --rejected-bg: #f8d7d7;
  --rejected-text: #8b2828;

  /* Radius */
  --r-sm: 8px;
  --r: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(26, 58, 46, 0.04);
  --shadow-sm: 0 1px 3px rgba(26, 58, 46, 0.05);
  --shadow: 0 2px 12px rgba(26, 58, 46, 0.06);
  --shadow-md: 0 4px 20px rgba(26, 58, 46, 0.08);
  --shadow-lg: 0 12px 40px rgba(26, 58, 46, 0.12);

  /* Transisi */
  --t-fast: 0.15s ease;
  --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

/* Scrollbar halus */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--sage); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--sage-dark); }

/* Animasi masuk */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes popIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(26, 77, 58, 0.05), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(201, 169, 97, 0.06), transparent 45%),
    var(--bg);
}

.login-container {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  min-height: 580px;
}

.login-brand {
  background: linear-gradient(150deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: #fff;
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.login-brand::before {
  content: "";
  position: absolute;
  top: -100px; right: -100px;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(255,255,255,0.10), transparent 70%);
  border-radius: 50%;
}

.login-brand::after {
  content: "◯";
  position: absolute;
  bottom: -60px; left: -40px;
  font-size: 220px;
  color: rgba(201, 169, 97, 0.10);
  line-height: 1;
  font-weight: 100;
}

.brand-icon { font-size: 2.8rem; margin-bottom: 20px; position: relative; z-index: 1; }

.login-brand h1 {
  font-size: 1.75rem;
  line-height: 1.25;
  margin-bottom: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
}

.brand-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
  max-width: 320px;
}

.brand-quote {
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(255,255,255,0.06);
  border-radius: 0 var(--r) var(--r) 0;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(4px);
}

.brand-quote p {
  font-size: 0.88rem;
  line-height: 1.55;
  font-style: italic;
  margin-bottom: 6px;
}

.brand-quote span {
  font-size: 0.78rem;
  opacity: 0.7;
  font-weight: 600;
}

.login-form-panel {
  padding: 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-header { margin-bottom: 28px; }

.login-header h2 {
  font-size: 1.65rem;
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading, var(--text));
}

.login-header p { color: var(--text-muted); font-size: 0.92rem; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 16px;
  font-size: 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  background: var(--bg-soft);
  color: var(--text);
  outline: none;
  transition: all var(--t-fast);
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(26, 77, 58, 0.08);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-light); }

textarea { resize: vertical; min-height: 70px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-label-block {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  white-space: nowrap;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.25);
}

.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}

.btn-secondary:hover { background: var(--bg-soft); border-color: var(--sage); }

.btn-logout {
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}

.btn-logout:hover { background: var(--primary-soft); border-color: var(--sage); }

.btn-back {
  background: transparent;
  border: 1.5px solid var(--border);
  width: 36px;
  height: 36px;
  border-radius: var(--r);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text);
  display: grid;
  place-items: center;
  transition: all var(--t-fast);
  margin-right: 4px;
}

.btn-back:hover { background: var(--bg-soft); }

/* ---------- Error box ---------- */
.login-error {
  padding: 12px 16px;
  background: var(--rejected-bg);
  color: var(--rejected-text);
  border-radius: var(--r);
  font-size: 0.88rem;
  margin-bottom: 16px;
  line-height: 1.5;
  border-left: 3px solid var(--status-rasib);
}

/* ---------- Footer kontak ---------- */
.login-footer {
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

.contact-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.contact-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.contact-links {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: all var(--t-fast);
}

.contact-links a:hover { background: var(--sage); transform: translateY(-1px); }

/* ============================================================
   DASHBOARD LAYOUT
   ============================================================ */
.dashboard-page { background: var(--bg); min-height: 100vh; }

.topbar {
  background: rgba(247, 244, 234, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: -0.01em;
}

.logo-icon { font-size: 1.4rem; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-info { text-align: right; line-height: 1.3; }

.user-role {
  display: block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 700;
}

.user-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 28px 72px;
}

/* ---------- Page header ---------- */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
  color: var(--heading, var(--text));
}

.subtitle {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.btn-add {
  padding: 11px 20px;
  font-size: 0.9rem;
  width: auto;
}

.btn-add span {
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 400;
}

/* ---------- Loading ---------- */
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.spinner {
  width: 32px;
  height: 32px;
  margin: 0 auto 14px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   STATS & CHART CARDS (untuk dashboard baru)
   ============================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-xs);
  border: 1px solid var(--border-soft);
  transition: all var(--t);
  animation: fadeUp 0.4s ease backwards;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-card-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.stat-card-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--primary-soft);
  display: grid;
  place-items: center;
  font-size: 0.95rem;
}

.stat-card-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 4px;
}

.stat-card-value .unit {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: 4px;
}

.stat-card-trend {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-card-trend.up { color: var(--primary-light); }
.stat-card-trend.down { color: var(--status-rasib); }

/* ---------- Simple Bar Chart (CSS only) ---------- */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 48px;
  margin-top: 12px;
}

.mini-chart-bar {
  flex: 1;
  background: var(--primary-soft);
  border-radius: 4px 4px 2px 2px;
  min-height: 4px;
  transition: all var(--t);
  position: relative;
}

.mini-chart-bar.filled { background: var(--primary); }
.mini-chart-bar:hover { background: var(--primary-light); }

.mini-chart-labels {
  display: flex;
  gap: 5px;
  margin-top: 6px;
  font-size: 0.68rem;
  color: var(--text-light);
  text-align: center;
}

.mini-chart-labels span { flex: 1; }

/* ---------- Donut / Circular Progress ---------- */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 18px;
}

.donut {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.donut svg { transform: rotate(-90deg); }

.donut-bg { stroke: var(--border-soft); }

.donut-fill {
  stroke: var(--primary);
  stroke-linecap: round;
  transition: stroke-dashoffset 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.donut-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

/* ---------- Progress Bar ---------- */
.progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: var(--r-pill);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ============================================================
   SUMMARY CARD (gaya gradient)
   ============================================================ */
.summary-card {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  border-radius: var(--r-lg);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.summary-card::after {
  content: "";
  position: absolute;
  top: -50%; right: -20%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 60%);
  border-radius: 50%;
  pointer-events: none;
}

.summary-item { text-align: center; position: relative; z-index: 1; }

.summary-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.75;
  margin-bottom: 8px;
  font-weight: 600;
}

.summary-value {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

.summary-value.small {
  font-size: 0.85rem;
  font-weight: 500;
  opacity: 0.95;
  line-height: 1.55;
}

.summary-divider {
  width: 1px;
  height: 50px;
  background: rgba(255,255,255,0.18);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--card);
  padding: 5px;
  border-radius: var(--r);
  border: 1px solid var(--border-soft);
  margin-bottom: 22px;
  width: fit-content;
  box-shadow: var(--shadow-xs);
}

.tab {
  padding: 10px 18px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab:hover { color: var(--text); background: var(--bg-soft); }
.tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26, 77, 58, 0.2);
}

.tab-count {
  background: rgba(0,0,0,0.08);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  text-align: center;
}

.tab.active .tab-count { background: rgba(255,255,255,0.22); }

/* ============================================================
   FILTER CHIPS (untuk Peta Surat)
   ============================================================ */
.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.chip {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
}

.chip:hover { border-color: var(--sage); background: var(--bg-soft); }
.chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ============================================================
   SEARCH BOX
   ============================================================ */
.search-box {
  position: relative;
  margin-bottom: 16px;
  max-width: 380px;
}

.search-box input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  font-size: 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--text);
  outline: none;
  transition: all var(--t-fast);
  font-family: inherit;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(26, 77, 58, 0.08);
}

.search-box::before {
  content: "🔍";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  opacity: 0.5;
  pointer-events: none;
}

/* ============================================================
   BADGES (status hafalan)
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--r-pill);
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge-status-mumtaz-murtafi {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #4a3a15;
}

.badge-status-mumtaz {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge-status-jayyid-jiddan {
  background: #dbeada;
  color: #075C42;
}

.badge-status-jayyid {
  background: #e5f0e0;
  color: #2d7a5a;
}

.badge-status-maqbul {
  background: #fbf0d0;
  color: #8a6d15;
}

.badge-status-rasib {
  background: #f5dcdc;
  color: #8b2828;
}

.badge-approval { background: var(--pending-bg); color: var(--pending-text); }
.badge-approval.approved { background: var(--approved-bg); color: var(--approved-text); }
.badge-approval.rejected { background: var(--rejected-bg); color: var(--rejected-text); }

/* ============================================================
   SISWA CARD (dashboard guru)
   ============================================================ */
.siswa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.siswa-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--t);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.35s ease backwards;
}

.siswa-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--sage);
}

.siswa-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.siswa-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.siswa-avatar.big {
  width: 64px;
  height: 64px;
  font-size: 1.4rem;
}

.siswa-nama {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 2px;
  line-height: 1.3;
  color: var(--text);
}

.siswa-username {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

.siswa-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-box {
  background: var(--bg-soft);
  padding: 12px;
  border-radius: var(--r);
  text-align: center;
}

.stat-number {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 5px;
  font-weight: 700;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-lg);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state h3 {
  color: var(--heading, var(--text));
  font-size: 1.1rem;
  margin-bottom: 6px;
  font-weight: 700;
}

.empty-state p { font-size: 0.9rem; }

/* ============================================================
   HISTORY LIST
   ============================================================ */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  transition: all var(--t-fast);
  animation: fadeUp 0.3s ease backwards;
}

.history-item:hover {
  border-color: var(--sage);
  box-shadow: var(--shadow-sm);
}

.history-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.history-title {
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--heading, var(--text));
}

.history-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  padding: 2px 10px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
}

.history-detail {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}

.history-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.empty-history {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--r-md);
}

/* ============================================================
   TABLE (untuk Peta Surat)
   ============================================================ */
.table-wrap {
  background: var(--card);
  border-radius: var(--r-lg);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.table-scroll { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  padding: 14px 18px;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-soft);
}

tbody td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
  color: var(--text);
}

tbody tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background var(--t-fast);
}

tbody tr:hover { background: var(--bg-soft); }

.cell-muted { color: var(--text-muted); font-size: 0.85rem; }
.cell-number {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Legend dots */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 46, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 460px;
  box-shadow: var(--shadow-lg);
  animation: popIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  padding: 24px 26px 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--heading, var(--text));
}

.modal-header-success h2 { color: var(--primary); }

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
  font-family: inherit;
}

.modal-close:hover { background: var(--bg-soft); color: var(--text); }

.modal-body { padding: 8px 26px 20px; }
.modal-desc { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }

.modal-footer {
  padding: 12px 26px 24px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ---------- Info box (hasil) ---------- */
.info-box {
  background: var(--bg-soft);
  border-radius: var(--r-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border-soft);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  gap: 12px;
  font-size: 0.9rem;
}

.info-row + .info-row { border-top: 1px solid var(--border-soft); }

.info-label { color: var(--text-muted); font-weight: 500; }

.info-value {
  font-weight: 600;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}

.info-value.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

.info-value.big {
  font-size: 1.55rem;
  color: var(--primary);
  letter-spacing: 0.12em;
  font-weight: 700;
}

.info-row.highlight {
  background: linear-gradient(135deg, var(--gold-light), #f5ead0);
  border-radius: var(--r);
  padding: 12px 16px;
  margin: 6px -18px 0;
  border-top: none !important;
}

.warning-text {
  font-size: 0.83rem;
  color: #8a6d15;
  background: #fbf0d0;
  padding: 12px 16px;
  border-radius: var(--r);
  line-height: 1.5;
  border-left: 3px solid var(--gold);
}

/* ============================================================
   JUZ TABS (di modal input hafalan)
   ============================================================ */
.juz-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  background: var(--bg-soft);
  padding: 6px;
  border-radius: var(--r);
  border: 1px solid var(--border-soft);
  margin-bottom: 4px;
  max-height: 150px;
  overflow-y: auto;
}

.juz-tab {
  padding: 8px 4px;
  font-size: 0.78rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
}

.juz-tab:hover { background: var(--card); color: var(--text); }
.juz-tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26, 77, 58, 0.2);
}

/* ---------- Surat list ---------- */
.surat-list {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r);
  padding: 6px;
  min-height: 100px;
  max-height: 210px;
  overflow-y: auto;
}

.surat-placeholder {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 30px 20px;
}

.surat-item {
  padding: 11px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.9rem;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.surat-item:hover { background: var(--card); }

.surat-item.selected {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.surat-arab {
  font-family: 'Traditional Arabic', 'Amiri', 'Scheherazade New', serif;
  font-size: 1.15rem;
  opacity: 0.7;
  direction: rtl;
}

.surat-item.selected .surat-arab { opacity: 0.95; }

/* ============================================================
   TARGET INFO (muroja'ah)
   ============================================================ */
.target-info {
  background: var(--primary-softer);
  border: 1px solid var(--sage);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 14px;
}

.target-info-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.target-info-content {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.target-line {
  padding: 5px 0;
  border-bottom: 1px dashed var(--sage);
}

.target-line:last-child { border-bottom: none; }

/* ---------- Checkbox row ---------- */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r);
  margin-bottom: 14px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all var(--t-fast);
}

.checkbox-row:hover { background: var(--card); border-color: var(--sage); }

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.checkbox-row span { color: var(--text); font-weight: 500; }

#manualForm { animation: slideDown 0.25s ease; margin-bottom: 4px; }

/* ============================================================
   PENDING BOX (di detail siswa)
   ============================================================ */
.pending-box {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-left: 4px solid var(--gold);
  border-radius: var(--r);
  padding: 14px 20px;
  margin-bottom: 22px;
  animation: slideDown 0.4s ease;
}

.pending-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--pending-text);
  font-size: 0.9rem;
}

.pending-icon { font-size: 1.2rem; }

/* ============================================================
   HISTORY ACTIONS
   ============================================================ */
.history-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  flex-wrap: wrap;
}

.btn-action {
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-approve {
  color: var(--approved-text);
  background: var(--approved-bg);
  border-color: #b8d8b8;
}
.btn-approve:hover { background: #b8d8b8; transform: translateY(-1px); }

.btn-reject {
  color: var(--rejected-text);
  background: var(--rejected-bg);
  border-color: #e8b8b8;
}
.btn-reject:hover { background: #e8b8b8; transform: translateY(-1px); }

.btn-delete {
  color: var(--text-muted);
  background: var(--bg-soft);
  border-color: var(--border);
}
.btn-delete:hover {
  color: var(--status-rasib);
  background: var(--rejected-bg);
  border-color: #e8b8b8;
}

/* ============================================================
   SISWA INFO CARD (detail siswa)
   ============================================================ */
.siswa-info-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
}

.siswa-info-text h1 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  color: var(--heading, var(--text));
}

.siswa-info-username {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
}

/* ============================================================
   PANEL & PAGE FOOTER
   ============================================================ */
.tab-panel { animation: fadeIn 0.25s ease; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.panel-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  letter-spacing: -0.01em;
}

.page-footer {
  margin-top: 48px;
  padding-top: 26px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 720px) {
  .login-container {
    grid-template-columns: 1fr;
    max-width: 440px;
    min-height: auto;
  }

  .login-brand { padding: 36px 30px; }
  .login-brand h1 { font-size: 1.45rem; }
  .brand-desc { margin-bottom: 20px; font-size: 0.88rem; }
  .brand-quote { padding: 14px 16px; }
  .brand-quote p { font-size: 0.82rem; }

  .login-form-panel { padding: 36px 30px; }
  .login-header h2 { font-size: 1.4rem; }

  .topbar-inner { padding: 12px 18px; }
  .logo-text { display: none; }
  .user-role { display: none; }
  .container { padding: 22px 18px 48px; }
  .page-header { flex-direction: column; align-items: stretch; }
  .page-header h1 { font-size: 1.4rem; }
  .btn-add { width: 100%; justify-content: center; }

  .modal-footer { flex-direction: column-reverse; }
  .modal-footer .btn-primary,
  .modal-footer .btn-secondary { width: 100%; }

  .summary-card { grid-template-columns: 1fr; }
  .summary-divider { height: 1px; width: 60%; margin: 0 auto; }

  .form-row { grid-template-columns: 1fr; }

  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; padding: 10px 12px; font-size: 0.82rem; }

  .siswa-info-card { padding: 18px; }
  .siswa-avatar.big { width: 54px; height: 54px; font-size: 1.2rem; }
  .siswa-info-text h1 { font-size: 1.2rem; }

  .juz-tabs { grid-template-columns: repeat(5, 1fr); }

  table { font-size: 0.82rem; }
  thead th, tbody td { padding: 11px 12px; }
}

@media (max-width: 400px) {
  .login-page { padding: 12px; }
  .login-brand, .login-form-panel { padding: 26px 22px; }
  .stats-grid { grid-template-columns: 1fr; }
}


/* ============================================================
   LOGO (SVG)
   ============================================================ */

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: block;
}

.brand-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 22px;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

/* Sesuaikan logo di topbar mobile */
@media (max-width: 720px) {
  .logo-icon {
    width: 28px;
    height: 28px;
  }
}


/* ============================================================
   LOGO & CONTACT ICONS (v2)
   ============================================================ */

.logo-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
  border-radius: 9px;
}

.brand-icon {
  width: 84px;
  height: 84px;
  margin-bottom: 22px;
  display: block;
  border-radius: 21px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Ikon kontak (WA & Email) */
.contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: -3px;
}

/* Sesuaikan di mobile */
@media (max-width: 720px) {
  .logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .brand-icon {
    width: 72px;
    height: 72px;
    border-radius: 18px;
  }
}


/* ============================================================
   LOGIN — Enhancements (10.4b)
   ============================================================ */

/* Animasi masuk */
.login-brand {
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.login-form-panel {
  animation: fadeUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) 0.1s backwards;
}

/* Input password dengan toggle */
.input-password {
  position: relative;
}

.input-password input {
  padding-right: 46px;
}

.btn-toggle-pw {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--t-fast);
  padding: 0;
  font-family: inherit;
}

.btn-toggle-pw:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.btn-toggle-pw.active {
  color: var(--primary);
}

.btn-toggle-pw .icon-eye {
  width: 18px;
  height: 18px;
  display: block;
}

.btn-toggle-pw.active .icon-eye {
  position: relative;
}

.btn-toggle-pw.active .icon-eye::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: currentColor;
  transform: translateY(-50%) rotate(-45deg);
  border-radius: 2px;
}

/* Tombol submit dengan spinner */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary .btn-spinner {
  display: inline-flex;
  align-items: center;
  animation: spin 0.8s linear infinite;
}

.btn-primary .btn-spinner svg {
  width: 16px;
  height: 16px;
}

/* Tombol submit lebih besar di login */
#loginBtn {
  padding: 14px 22px;
  font-size: 0.98rem;
  margin-top: 4px;
}

/* Perbaiki animasi focus */
.form-group input:focus {
  transition: all 0.2s ease;
}

/* Brand panel lebih hidup */
.login-brand h1 {
  background: linear-gradient(135deg, #ffffff 0%, #e8ebe0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Brand quote lebih elegan */
.brand-quote {
  position: relative;
  padding-left: 22px;
}

.brand-quote::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold), transparent);
  border-radius: 2px;
}

/* Responsive improvement */
@media (max-width: 720px) {
  .login-container {
    box-shadow: var(--shadow-md);
  }
  .login-brand {
    padding: 32px 28px 28px;
  }
  .login-form-panel {
    padding: 30px 28px 34px;
  }
  .brand-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
  }
  .login-brand h1 {
    font-size: 1.35rem;
  }
}


/* ============================================================
   DASHBOARD SISWA — Redesign (10.4c)
   ============================================================ */

/* Greeting */
.greeting {
  margin-bottom: 24px;
  animation: fadeUp 0.5s ease backwards;
}

.greeting h1 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--heading, var(--text));
}

.greeting h1 span {
  color: var(--primary);
}

.greeting p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Stat Card enhancement */
.stat-card {
  position: relative;
}

.stat-card-icon {
  font-size: 1rem;
  line-height: 1;
}

.stat-card-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

/* Target Card */
.target-card {
  background: linear-gradient(135deg, var(--primary-softer), #ffffff);
  border: 1px solid var(--sage);
  border-radius: var(--r-lg);
  padding: 20px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.5s ease 0.15s backwards;
}

.target-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--sage);
}

.target-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.2);
}

.target-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  margin-bottom: 2px;
}

.target-card-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.target-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.target-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 6px 0;
}

.target-item-bullet {
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Progress Card */
.progress-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 22px 24px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.5s ease 0.2s backwards;
}

.progress-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.progress-card-header h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  margin-bottom: 4px;
}

.progress-card-header p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.progress-pct {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
  flex-shrink: 0;
}

.progress-card .progress-track {
  height: 10px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 0;
}

.progress-card .progress-fill {
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  position: relative;
}

.progress-card .progress-fill::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

/* Mobile */
@media (max-width: 720px) {
  .greeting h1 {
    font-size: 1.25rem;
  }
  .progress-pct {
    font-size: 1.35rem;
  }
  .target-card,
  .progress-card {
    padding: 18px 20px;
  }
}


/* ============================================================
   DASHBOARD GURU — Redesign (10.4d)
   ============================================================ */

/* Section header */
.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
  animation: fadeUp 0.5s ease 0.15s backwards;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

/* Pending Alert */
.pending-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #fef9e7, #fdf2d0);
  border: 1px solid #f5d98a;
  border-radius: var(--r-lg);
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-xs);
  animation: slideDown 0.4s ease, pulseAlert 2.5s ease-in-out 1s infinite;
}

@keyframes pulseAlert {
  0%, 100% { box-shadow: var(--shadow-xs); }
  50% { box-shadow: 0 4px 20px rgba(201, 169, 97, 0.15); }
}

.pending-alert-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r);
  background: linear-gradient(135deg, var(--gold), #b08d3f);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(201, 169, 97, 0.3);
}

.pending-alert-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.88rem;
  color: var(--pending-text);
  line-height: 1.4;
}

.pending-alert-body strong {
  font-size: 0.95rem;
  font-weight: 700;
}

/* Siswa card enhancement */
.siswa-card {
  position: relative;
  overflow: hidden;
}

.siswa-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--t-fast);
}

.siswa-card:hover::before {
  opacity: 1;
}

.siswa-card-header > div:last-child {
  min-width: 0;
  flex: 1;
}

.siswa-nama {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile */
@media (max-width: 720px) {
  .section-header h2 {
    font-size: 1.05rem;
  }
  .section-header .btn-add {
    width: 100%;
  }
  .pending-alert {
    padding: 14px 16px;
  }
  .pending-alert-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}


/* ============================================================
   MODAL MUROJA'AH — Redesign v2 (Juz Grid & Surat Grid)
   ============================================================ */

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-soft);
  padding: 6px;
  border-radius: var(--r);
  margin-bottom: 18px;
}

.mode-btn {
  padding: 11px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  transition: all var(--t-fast);
}

.mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26, 77, 58, 0.2);
}

.picker-section {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 14px;
}

.picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.picker-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.picker-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  flex: 1;
}

.picker-selected {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  background: var(--card);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--sage);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Juz Grid */
.juz-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.juz-btn {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
}

.juz-btn .juz-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.juz-btn:hover {
  border-color: var(--sage);
  background: var(--primary-softer);
}

.juz-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.28);
}

.juz-btn.active .juz-label {
  color: rgba(255, 255, 255, 0.8);
}

/* Surat Grid */
.surat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 2px;
}

@media (min-width: 480px) {
  .surat-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.surat-btn {
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.surat-btn:hover {
  border-color: var(--sage);
  background: var(--primary-softer);
}

.surat-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.28);
}

.surat-btn-name {
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.surat-btn.selected .surat-btn-name { color: #fff; }

.surat-btn-ayat {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.surat-btn.selected .surat-btn-ayat {
  color: rgba(255, 255, 255, 0.8);
}

.surat-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Override juz-tabs lama (untuk modal hafalan) tetap ada */


/* ============================================================
   AUTO-COLLAPSE SURAT (Feature 1)
   ============================================================ */

.surat-selected-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(135deg, var(--primary-softer), #ffffff);
  border: 1.5px solid var(--primary);
  border-radius: var(--r);
  padding: 12px 14px;
  animation: popIn 0.25s ease;
}

.surat-selected-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.surat-selected-check {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(26, 77, 58, 0.25);
}

.surat-selected-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.surat-selected-ayat {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-change-surat {
  padding: 7px 14px;
  border: 1.5px solid var(--primary);
  background: var(--card);
  color: var(--primary);
  border-radius: var(--r-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  flex-shrink: 0;
}

.btn-change-surat:hover {
  background: var(--primary);
  color: #fff;
}

/* Pastikan CSS modal muroja'ah dari step sebelumnya tetap ada */
.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-soft);
  padding: 6px;
  border-radius: var(--r);
  margin-bottom: 18px;
}

.mode-btn {
  padding: 11px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  transition: all var(--t-fast);
}

.mode-btn.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26, 77, 58, 0.2);
}

.picker-section {
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 14px;
  margin-bottom: 14px;
}

.picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.picker-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}

.picker-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
  flex: 1;
}

.picker-selected {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 700;
  background: var(--card);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--sage);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.juz-grid {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.juz-btn {
  width: 48px;
  height: 48px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: var(--r-sm);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
}

.juz-btn .juz-label {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.juz-btn:hover { border-color: var(--sage); background: var(--primary-softer); }

.juz-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.28);
}

.juz-btn.active .juz-label { color: rgba(255, 255, 255, 0.8); }

.surat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 2px;
}

@media (min-width: 480px) {
  .surat-grid { grid-template-columns: repeat(3, 1fr); }
}

.surat-btn {
  padding: 9px 11px;
  border: 1.5px solid var(--border);
  background: var(--card);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--t-fast);
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.surat-btn:hover { border-color: var(--sage); background: var(--primary-softer); }

.surat-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.28);
}

.surat-btn-name {
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}

.surat-btn.selected .surat-btn-name { color: #fff; }

.surat-btn-ayat {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 500;
}

.surat-btn.selected .surat-btn-ayat { color: rgba(255, 255, 255, 0.8); }

.surat-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}


/* ============================================================
   PETA SURAT (Feature 2)
   ============================================================ */

.peta-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 22px 22px 8px;
  margin-bottom: 8px;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.4s ease backwards;
}

.peta-card-header {
  margin-bottom: 16px;
}

.peta-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.peta-subtitle {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.peta-card .chips {
  margin-bottom: 12px;
}

.peta-card .search-box {
  max-width: 320px;
  margin-bottom: 14px;
}

.peta-card .legend {
  margin-bottom: 14px;
}

.peta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.peta-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-soft);
  z-index: 1;
}

.peta-loading {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.surat-cell {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.surat-cell-name {
  font-weight: 600;
  color: var(--text);
}

.surat-cell-arab {
  font-family: 'Traditional Arabic', 'Amiri', 'Scheherazade New', serif;
  font-size: 1.05rem;
  opacity: 0.6;
  color: var(--text-muted);
  direction: rtl;
}

.badge-kelancaran {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: var(--r-pill);
  white-space: nowrap;
}

.badge-kelancaran.belum {
  background: #f0f2e9;
  color: var(--text-muted);
}

.badge-kelancaran.bulan_lalu {
  background: var(--border-soft);
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .peta-card {
    padding: 16px 14px 6px;
  }
  .peta-table {
    font-size: 0.78rem;
  }
  .peta-table thead th,
  .peta-table tbody td {
    padding: 10px 10px;
  }
  .surat-cell {
    gap: 6px;
  }
  .surat-cell-arab {
    font-size: 0.9rem;
  }
  .peta-card .search-box {
    max-width: 100%;
  }
}


/* ============================================================
   PETA SURAT v2 — Dibaca Count & Expandable Detail
   ============================================================ */

.peta-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.peta-card-header > div {
  flex: 1;
  min-width: 200px;
}

.peta-card-header .btn-add {
  flex-shrink: 0;
  padding: 11px 18px;
  font-size: 0.88rem;
}

@media (max-width: 720px) {
  .peta-card-header .btn-add {
    width: 100%;
    justify-content: center;
  }
}

/* Kolom Dibaca */
.dibaca-count {
  display: inline-block;
  padding: 3px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.78rem;
  min-width: 32px;
  text-align: center;
}

/* Row interaktif */
.peta-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.peta-row:hover {
  background: var(--primary-softer);
}

.peta-row.expanded {
  background: var(--primary-softer);
}

.peta-row.expanded .surat-cell-name {
  color: var(--primary);
}

/* Detail row */
.peta-row-detail > td {
  padding: 0 !important;
  background: var(--primary-softer);
  border-bottom: 1px solid var(--border) !important;
}

.riwayat-detail-inner {
  padding: 14px 20px 16px;
}

.riwayat-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.riwayat-detail-item {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.riwayat-detail-left {
  flex: 1;
  min-width: 0;
}

.riwayat-detail-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--primary-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  margin-bottom: 4px;
}

.riwayat-detail-date {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
}

.riwayat-detail-ayat {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.riwayat-detail-empty {
  padding: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 720px) {
  .riwayat-detail-inner { padding: 12px 14px; }
  .riwayat-detail-item { padding: 10px 12px; }
}


/* ============================================================
   TAHAP 2 — Tab Full-width, Progress per Juz, Target Compact
   ============================================================ */

/* Tab: full-width, 2 kolom sama besar */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  background: var(--card);
  border-radius: var(--r);
  border: 1px solid var(--border-soft);
  width: 100%;
  margin-bottom: 22px;
  box-shadow: var(--shadow-xs);
}

.tabs .tab {
  padding: 13px 16px;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tabs .tab:hover { color: var(--text); background: var(--bg-soft); }
.tabs .tab.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(26, 77, 58, 0.2);
}

/* Target card — perkecil */
.target-card {
  padding: 14px 18px;
  margin-bottom: 18px;
}

.target-card-header {
  gap: 10px;
  margin-bottom: 10px;
  padding-bottom: 10px;
}

.target-card-icon {
  width: 34px;
  height: 34px;
  font-size: 0.95rem;
  border-radius: var(--r-sm);
}

.target-card-header h3 {
  font-size: 0.88rem;
  margin-bottom: 1px;
}

.target-card-header p {
  font-size: 0.72rem;
}

.target-card-body {
  gap: 5px;
}

.target-item {
  font-size: 0.81rem;
  padding: 3px 0;
  gap: 8px;
}

.target-item-bullet {
  font-size: 0.85rem;
}

/* Progress per Juz */
.juz-progress-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.progress-empty {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.juz-progress-item {
  display: flex;
  flex-direction: column;
}

.juz-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 7px;
}

.juz-progress-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

.juz-progress-pct {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.juz-progress-track {
  height: 8px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-bottom: 6px;
}

.juz-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: var(--r-pill);
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.juz-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2.5s infinite;
}

.juz-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-muted);
  gap: 8px;
  flex-wrap: wrap;
}

.juz-progress-meta > span:last-child {
  font-weight: 500;
  color: var(--text-secondary);
}

/* Stat card value small (untuk hafalan terakhir) */
.stat-card-value.small {
  font-size: 1.15rem !important;
  line-height: 1.3 !important;
}

/* Responsive */
@media (max-width: 720px) {
  .tabs .tab {
    padding: 12px 10px;
    font-size: 0.82rem;
  }
  .juz-progress-pct {
    font-size: 0.95rem;
  }
  .juz-progress-meta {
    font-size: 0.7rem;
  }
}


/* ============================================================
   ACHIEVEMENT CARD — Perayaan Pencapaian
   ============================================================ */

.achievement-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-lg);
  padding: 24px 26px;
  margin-bottom: 22px;
  background: linear-gradient(135deg, #d4a017 0%, #f0d9a0 40%, #d4a017 100%);
  background-size: 200% 200%;
  animation: achShimmer 4s ease-in-out infinite, fadeUp 0.5s ease backwards;
  box-shadow: 0 8px 30px rgba(212, 160, 23, 0.28);
  color: #422006;
}

@keyframes achShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.achievement-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.4), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.25), transparent 45%);
  pointer-events: none;
  animation: achGlow 3s ease-in-out infinite alternate;
}

@keyframes achGlow {
  from { opacity: 0.5; }
  to { opacity: 1; }
}

.ach-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.ach-icon {
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 8px rgba(66, 32, 6, 0.3));
  animation: achBounce 2s ease-in-out infinite;
  display: inline-block;
}

@keyframes achBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.ach-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  color: #422006;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ach-subtitle {
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
  color: #5a3a15;
  max-width: 420px;
  margin: 0 auto 12px;
}

.ach-badge {
  display: inline-block;
  padding: 6px 18px;
  background: rgba(66, 32, 6, 0.92);
  color: #ffe9a8;
  border-radius: var(--r-pill);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 10px rgba(66, 32, 6, 0.35);
}

.ach-badge.progress {
  background: rgba(66, 32, 6, 0.82);
}

/* Sparkles */
.ach-sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.ach-spark {
  position: absolute;
  font-size: 1.2rem;
  color: #fffbe0;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  opacity: 0;
  animation: sparkle 3s ease-in-out infinite;
}

.ach-spark.s1 { top: 12%; left: 10%; font-size: 1rem; animation-delay: 0s; }
.ach-spark.s2 { top: 18%; right: 12%; font-size: 1.4rem; animation-delay: 0.5s; }
.ach-spark.s3 { top: 55%; left: 6%; font-size: 0.9rem; animation-delay: 1s; }
.ach-spark.s4 { top: 75%; right: 8%; font-size: 1.1rem; animation-delay: 1.5s; }
.ach-spark.s5 { top: 35%; right: 30%; font-size: 0.85rem; animation-delay: 2s; }
.ach-spark.s6 { top: 82%; left: 25%; font-size: 1rem; animation-delay: 2.5s; }

@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

@media (max-width: 720px) {
  .achievement-card {
    padding: 20px 18px;
    margin-bottom: 18px;
  }
  .ach-icon { font-size: 2.4rem; }
  .ach-title { font-size: 1.2rem; }
  .ach-subtitle { font-size: 0.88rem; }
  .ach-badge { font-size: 0.76rem; padding: 5px 14px; }
  .ach-spark.s2 { font-size: 1.1rem; }
  .ach-spark.s4 { font-size: 0.9rem; }
}


/* ============================================================
   MONTH SELECTOR (Guru)
   ============================================================ */

.month-selector-wrap {
  margin-bottom: 20px;
}

.month-selector-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.month-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.month-chip {
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.month-chip:hover {
  border-color: var(--sage);
  background: var(--bg-soft);
}

.month-chip.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.22);
}

@media (max-width: 720px) {
  .month-chip {
    padding: 7px 14px;
    font-size: 0.78rem;
  }
}


/* ============================================================
   PENDING NOTIFICATION & MODAL LIST
   ============================================================ */

/* Stat card clickable */
.stat-card.clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.stat-card.clickable:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* Pending alert — clickable */
.pending-alert.clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
}

.pending-alert.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(201, 169, 97, 0.28);
  background: linear-gradient(135deg, #fef3c7, #fce7ac);
}

.pending-alert-arrow {
  font-size: 1.4rem;
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.pending-alert.clickable:hover .pending-alert-arrow {
  transform: translateX(4px);
}

/* Siswa card pending badge */
.siswa-pending-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: linear-gradient(135deg, var(--gold), #b08d3f);
  color: #fff;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 3px 10px rgba(201, 169, 97, 0.4);
  animation: pulseBadge 2s ease-in-out infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.siswa-card.has-pending {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(201, 169, 97, 0.18);
}

/* Modal Pending List */
.pending-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 0;
}

.pending-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  text-decoration: none;
  color: inherit;
  transition: all var(--t-fast);
  cursor: pointer;
}

.pending-item:hover {
  background: var(--primary-softer);
  border-color: var(--primary);
  transform: translateX(3px);
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.1);
}

.pending-item-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.pending-item-info {
  flex: 1;
  min-width: 0;
}

.pending-item-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pending-item-count {
  font-size: 0.8rem;
  color: var(--pending-text);
  font-weight: 600;
}

.pending-item-arrow {
  font-size: 1.3rem;
  color: var(--primary);
  font-weight: 700;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.pending-item:hover .pending-item-arrow {
  transform: translateX(4px);
}

@media (max-width: 720px) {
  .siswa-pending-badge {
    font-size: 0.62rem;
    padding: 3px 8px;
  }
  .pending-item {
    padding: 12px 14px;
    gap: 10px;
  }
  .pending-item-avatar {
    width: 38px;
    height: 38px;
    font-size: 0.85rem;
  }
  .pending-item-name {
    font-size: 0.88rem;
  }
  .pending-item-count {
    font-size: 0.74rem;
  }
}


/* ============================================================
   FINAL POLISH
   ============================================================ */

/* Smooth scroll */
html { scroll-behavior: smooth; }

/* Back to top button */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  box-shadow: 0 6px 20px rgba(26, 77, 58, 0.3);
  transition: all var(--t);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 8px 28px rgba(26, 77, 58, 0.4);
}

.back-to-top:active {
  transform: translateY(0) scale(0.96);
}

@media (max-width: 720px) {
  .back-to-top {
    bottom: 16px;
    right: 16px;
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
  }
}

/* Better empty state */
.empty-history,
.progress-empty {
  position: relative;
}

/* Focus visible for accessibility */
*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline-offset: 2px;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Print friendly */
@media print {
  .topbar, .back-to-top, .btn-logout, .btn-add, .tabs { display: none; }
  body { background: #fff; }
  .container { max-width: 100%; }
}


/* ============================================================
   F1 — Kelola Siswa (Reset Password & Hapus)
   ============================================================ */

.siswa-info-card {
  position: relative;
}

.btn-manage {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: all var(--t-fast);
  font-family: inherit;
}

.btn-manage:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: rotate(45deg);
}

.btn-manage:active {
  transform: rotate(45deg) scale(0.94);
}

/* Manage actions */
.manage-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.manage-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all var(--t-fast);
  width: 100%;
}

.manage-btn:hover {
  background: var(--primary-softer);
  border-color: var(--primary);
  transform: translateX(3px);
}

.manage-btn.danger:hover {
  background: var(--rejected-bg);
  border-color: #e8b8b8;
}

.manage-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--card);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  border: 1px solid var(--border-soft);
}

.manage-btn.danger .manage-icon {
  background: #fef2f2;
  border-color: #fecaca;
}

.manage-info {
  flex: 1;
  min-width: 0;
}

.manage-title {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text);
  margin-bottom: 2px;
}

.manage-btn.danger .manage-title {
  color: var(--rejected-text);
}

.manage-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.manage-arrow {
  font-size: 1.2rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.manage-btn:hover .manage-arrow {
  transform: translateX(4px);
  color: var(--primary);
}

/* Modal danger header */
.modal-header-danger h2 {
  color: var(--rejected-text);
}

.delete-warning-list {
  list-style: none;
  padding: 14px 16px;
  background: var(--rejected-bg);
  border-radius: var(--r);
  border-left: 3px solid var(--status-rasib);
  margin-bottom: 8px;
}

.delete-warning-list li {
  font-size: 0.85rem;
  color: var(--rejected-text);
  padding: 4px 0;
  line-height: 1.5;
}

.delete-warning-list li strong {
  background: rgba(139, 40, 40, 0.12);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Button danger */
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  background: var(--status-rasib);
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
}

.btn-danger:hover:not(:disabled) {
  background: #a85555;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(199, 108, 108, 0.3);
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .btn-manage {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .manage-btn {
    padding: 14px;
    gap: 12px;
  }
  .manage-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
}


/* ============================================================
   F2 — Backup & Section Header
   ============================================================ */

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  margin-top: 32px;
  flex-wrap: wrap;
  animation: fadeUp 0.5s ease 0.15s backwards;
}

.section-header h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.section-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-actions .btn-secondary,
.section-actions .btn-primary {
  padding: 11px 18px;
  font-size: 0.88rem;
}

.backup-info-box {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  background: var(--primary-softer);
  border: 1px solid var(--sage);
  border-radius: var(--r);
  margin-bottom: 16px;
}

.backup-info-icon {
  font-size: 1.3rem;
  flex-shrink: 0;
  line-height: 1;
}

.backup-info-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.backup-info-text strong {
  color: var(--primary);
  font-weight: 700;
}

.btn-create-backup {
  width: 100%;
  justify-content: center;
  margin-bottom: 20px;
}

.backup-list-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
}

.backup-count {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}

.backup-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 360px;
  overflow-y: auto;
}

.backup-loading,
.backup-empty {
  text-align: center;
  padding: 30px 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.backup-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  transition: all var(--t-fast);
}

.backup-item:hover {
  background: var(--primary-softer);
  border-color: var(--sage);
}

.backup-item-main {
  flex: 1;
  min-width: 0;
}

.backup-item-date {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 5px;
}

.backup-item-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.backup-type {
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.68rem;
}

.backup-type.auto {
  background: var(--primary-soft);
  color: var(--primary);
}

.backup-type.manual {
  background: #fbf0d0;
  color: #8a6d15;
}

.backup-size {
  font-family: ui-monospace, monospace;
  font-weight: 600;
}

.backup-counts {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.backup-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.btn-backup-download,
.btn-backup-delete {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  transition: all var(--t-fast);
  font-family: inherit;
  color: var(--text-muted);
}

.btn-backup-download:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-backup-delete:hover {
  background: var(--rejected-bg);
  border-color: #e8b8b8;
  color: var(--rejected-text);
}

@media (max-width: 720px) {
  .section-actions {
    width: 100%;
  }
  .section-actions .btn-secondary,
  .section-actions .btn-primary {
    flex: 1;
    justify-content: center;
  }
  .backup-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .backup-item-actions {
    justify-content: flex-end;
  }
}

/* ============================================================
   F3 — Chart Trend (Compact)
   ============================================================ */

.chart-card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: 16px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.5s ease 0.2s backwards;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.chart-header h3 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}

.chart-header p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-container {
  width: 100%;
  overflow-x: auto;
}

.chart-svg {
  width: 100%;
  height: auto;
  max-height: 150px;
  display: block;
  min-width: 420px;
}

.chart-grid-line {
  stroke: var(--border-soft);
  stroke-width: 1;
  stroke-dasharray: 3 4;
}

.chart-axis-label {
  font-size: 9px;
  fill: var(--text-light);
  font-family: inherit;
}

.chart-month-label {
  font-size: 10px;
  fill: var(--text-muted);
  font-weight: 600;
  font-family: inherit;
}

.chart-line {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line-mur { stroke: var(--primary); }
.chart-line-haf { stroke: var(--gold); }

.chart-area-mur {
  fill: var(--primary);
  opacity: 0.08;
}
.chart-area-haf {
  fill: var(--gold);
  opacity: 0.06;
}

.chart-dot {
  stroke: #fff;
  stroke-width: 1.5;
}

.chart-dot-mur { fill: var(--primary); }
.chart-dot-haf { fill: var(--gold); }

.chart-dot-label {
  font-size: 9px;
  font-weight: 700;
  font-family: inherit;
}
.chart-dot-label-mur { fill: var(--primary); }

.chart-empty {
  text-align: center;
  padding: 30px 16px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 720px) {
  .chart-card {
    padding: 14px 14px;
  }
  .chart-header h3 {
    font-size: 0.85rem;
  }
  .chart-legend {
    font-size: 0.68rem;
    gap: 8px;
  }
  .chart-svg {
    max-height: 130px;
  }
}

/* ============================================================
   F4 — Badge Highlight + Modal + Toast
   ============================================================ */

/* Highlight Card */
.badge-highlight {
  position: relative;
  background: linear-gradient(135deg, var(--primary-softer), #ffffff);
  border: 1.5px solid var(--sage);
  border-radius: var(--r-lg);
  padding: 16px 20px 18px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-xs);
  animation: fadeUp 0.5s ease 0.15s backwards;
  transition: all var(--t);
}

.badge-highlight.clickable {
  cursor: pointer;
}

.badge-highlight.clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 77, 58, 0.12);
  border-color: var(--primary);
}

.badge-highlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.badge-highlight-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.badge-highlight-icon {
  font-size: 1.2rem;
}

.badge-highlight-counter {
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.badge-highlight-body {
  margin-bottom: 12px;
}

.badge-highlight-loading,
.badge-highlight-empty {
  text-align: center;
  padding: 8px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.badge-pill-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--card);
  border: 1px solid var(--sage);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  transition: all var(--t-fast);
}

.badge-pill:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.badge-pill-emoji {
  font-size: 1rem;
  line-height: 1;
}

.badge-pill-title {
  white-space: nowrap;
}

.badge-pill-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: var(--primary-soft);
  border: 1px solid var(--sage);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary);
}

.badge-highlight-footer {
  padding-top: 12px;
  border-top: 1px dashed var(--sage);
}

.badge-next {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-next-emoji {
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.5;
  filter: grayscale(0.6);
}

.badge-next-text {
  font-size: 0.78rem;
  color: var(--text-muted);
  flex: 1;
  min-width: 180px;
}

.badge-next-text strong {
  color: var(--text);
  font-weight: 700;
}

.badge-next-progress {
  color: var(--primary);
  font-weight: 700;
  margin-left: 2px;
}

.badge-next-bar {
  width: 100%;
  height: 4px;
  background: var(--border-soft);
  border-radius: var(--r-pill);
  overflow: hidden;
  margin-top: 4px;
}

.badge-next-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
  border-radius: var(--r-pill);
  transition: width 0.8s ease;
}

.badge-next-complete {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  padding: 4px 0;
}

.badge-highlight-arrow {
  display: none;
}

@media (min-width: 480px) {
  .badge-highlight-arrow {
    display: block;
    position: absolute;
    bottom: 18px;
    right: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    opacity: 0.7;
    transition: all var(--t-fast);
  }
  .badge-highlight.clickable:hover .badge-highlight-arrow {
    opacity: 1;
    transform: translateX(4px);
  }
}

/* Modal Badge Grid */
.badge-modal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  max-height: 60vh;
  overflow-y: auto;
  padding: 2px;
}

.badge-modal-item {
  text-align: center;
  padding: 14px 10px 12px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
  background: var(--bg-soft);
  transition: all var(--t-fast);
}

.badge-modal-item.unlocked {
  background: linear-gradient(135deg, var(--primary-softer), #ffffff);
  border-color: var(--sage);
}

.badge-modal-item.unlocked:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(26, 77, 58, 0.12);
}

.badge-modal-item.locked {
  opacity: 0.55;
}

.badge-modal-emoji {
  font-size: 1.8rem;
  line-height: 1;
  margin-bottom: 8px;
}

.badge-modal-item.locked .badge-modal-emoji {
  filter: grayscale(1);
  opacity: 0.5;
}

.badge-modal-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.25;
}

.badge-modal-item.locked .badge-modal-title {
  color: var(--text-muted);
}

.badge-modal-desc {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 6px;
  min-height: 28px;
}

.badge-modal-progress {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--card);
  color: var(--text-muted);
  display: inline-block;
}

.badge-modal-item.unlocked .badge-modal-progress {
  background: var(--primary);
  color: #fff;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, #ffffff, var(--primary-softer));
  border: 2px solid var(--primary);
  border-radius: var(--r-lg);
  padding: 14px 20px;
  box-shadow: 0 10px 40px rgba(26, 77, 58, 0.22);
  transform: translateX(150%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 240px;
  max-width: 340px;
  pointer-events: auto;
}

.toast.show {
  transform: translateX(0);
}

.toast-emoji {
  font-size: 2rem;
  line-height: 1;
  flex-shrink: 0;
  animation: toastBounce 0.6s ease;
}

@keyframes toastBounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2) rotate(-8deg); }
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 3px;
}

.toast-badge-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

@media (max-width: 720px) {
  .badge-highlight {
    padding: 14px 16px 16px;
  }
  .badge-highlight-title {
    font-size: 0.88rem;
  }
  .badge-pill {
    font-size: 0.72rem;
    padding: 5px 10px;
  }
  .badge-pill-emoji {
    font-size: 0.9rem;
  }
  .badge-next-text {
    font-size: 0.72rem;
  }
  .badge-modal-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  .badge-modal-emoji {
    font-size: 1.5rem;
  }
  .badge-modal-title {
    font-size: 0.75rem;
  }
  .toast-container {
    top: 68px;
    right: 12px;
    left: 12px;
  }
  .toast {
    min-width: 0;
    width: 100%;
    max-width: none;
  }
}


/* ============================================================
   F5 — WhatsApp Integration
   ============================================================ */

.siswa-info-card {
  position: relative;
}

.siswa-info-hp {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 6px;
  font-weight: 500;
}

.siswa-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
}

.btn-manage-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  color: var(--text-muted);
  transition: all var(--t-fast);
  font-family: inherit;
  padding: 0;
}

.btn-manage-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary);
  transform: scale(1.08);
}

/* WA Modal */
.wa-no-phone {
  display: flex;
  gap: 14px;
  padding: 16px;
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: var(--r-md);
  margin-bottom: 16px;
  align-items: flex-start;
}

.wa-no-phone-icon {
  font-size: 1.8rem;
  line-height: 1;
  flex-shrink: 0;
}

.wa-no-phone-text {
  flex: 1;
  min-width: 0;
}

.wa-no-phone-text strong {
  display: block;
  color: var(--pending-text);
  font-size: 0.92rem;
  margin-bottom: 4px;
}

.wa-no-phone-text p {
  font-size: 0.82rem;
  color: #92400e;
  line-height: 1.5;
  margin-bottom: 10px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

/* Template Grid */
.wa-templates {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 4px;
}

.wa-template {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--t-fast);
  font-family: inherit;
  text-align: left;
}

.wa-template:hover {
  border-color: var(--sage);
  background: var(--primary-softer);
}

.wa-template.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.2);
}

.wa-template-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.wa-template-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.wa-template.active .wa-template-name {
  color: #fff;
}

#waMessage {
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 160px;
}

@media (max-width: 720px) {
  .siswa-actions {
    top: 14px;
    right: 14px;
  }
  .btn-manage-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .wa-templates {
    grid-template-columns: 1fr;
  }
}


/* ============================================================
   T4 — Logo click, Footer simetris, Gender icon
   ============================================================ */

/* Logo clickable */
.logo {
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

/* Footer kontak — WA & Email simetris */
.contact-links a {
  min-width: 130px;
  justify-content: center;
}

/* Gender icon */
/* Gender icon — SVG */
.gender-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 6px;
  user-select: none;
}

.gender-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.gender-icon.male {
  background: rgba(20, 61, 46, 0.12);
  color: var(--hf-ink, #075C42);
}

.gender-icon.female {
  background: rgba(184, 147, 90, 0.2);
  color: #8a6d15;
}

/* Siswa card: nama + gender icon */
.siswa-nama {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

/* Detail siswa info card */
.siswa-info-text h1 {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

@media (max-width: 720px) {
  .contact-links a {
    min-width: 110px;
  }
  .gender-icon {
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
  }
}

/* Gender picker di modal tambah siswa */
.gender-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.gender-option {
  cursor: pointer;
  position: relative;
}

.gender-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.gender-option-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--t-fast);
}

.gender-option:hover .gender-option-box {
  border-color: var(--sage);
  background: var(--primary-softer);
}

.gender-option input[type="radio"]:checked + .gender-option-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.2);
}

.gender-option input[type="radio"]:checked + .gender-option-box .gender-symbol.male,
.gender-option input[type="radio"]:checked + .gender-option-box .gender-symbol.female {
  background: rgba(255,255,255,0.22);
  color: #fff;
}

.gender-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
}

.gender-symbol svg {
  width: 18px;
  height: 18px;
  display: block;
}

.gender-symbol.male {
  background: rgba(20, 61, 46, 0.12);
  color: var(--hf-ink, #075C42);
}

.gender-symbol.female {
  background: rgba(184, 147, 90, 0.2);
  color: #8a6d15;
}

.gender-option input[type="radio"]:checked + .gender-option-box .gender-symbol.male,
.gender-option input[type="radio"]:checked + .gender-option-box .gender-symbol.female {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* User gender icon di topbar */
.user-gender-icon {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 6px;
  line-height: 1;
}

.user-gender-icon:empty {
  display: none;
}

.user-gender-icon .gender-icon {
  margin-left: 0;
  width: 18px;
  height: 18px;
}

.user-gender-icon .gender-icon svg {
  width: 11px;
  height: 11px;
}

@media (max-width: 720px) {
  .user-gender-icon .gender-icon {
    width: 16px;
    height: 16px;
  }
  .user-gender-icon .gender-icon svg {
    width: 10px;
    height: 10px;
  }
}


/* ============================================================
   T5 — Toast Notification & Polish
   ============================================================ */

.toast-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(20, 30, 20, 0.14);
  border-left: 3px solid var(--primary);
  transform: translateX(150%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: auto;
  min-width: 260px;
}

.toast.show { transform: translateX(0); }

.toast-success { border-left-color: #16a34a; }
.toast-error { border-left-color: #dc2626; }
.toast-info { border-left-color: var(--primary); }

.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  background: var(--primary);
}

.toast-success .toast-icon { background: #16a34a; }
.toast-error .toast-icon { background: #dc2626; }

.toast-content {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
  min-width: 0;
  padding-top: 2px;
}

@media (max-width: 720px) {
  .toast-container {
    top: 68px;
    right: 12px;
    left: 12px;
    max-width: none;
  }
  .toast {
    min-width: 0;
    width: 100%;
  }
}

/* ============================================================
   UI MODAL — Confirm & Prompt (Elegan)
   ============================================================ */

.ui-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.ui-modal.show { opacity: 1; }

.ui-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 20, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ui-modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  padding: 32px 28px 24px;
  box-shadow: 0 24px 60px rgba(20, 30, 20, 0.24);
  text-align: center;
  transform: scale(0.92) translateY(10px);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.ui-modal.show .ui-modal-card {
  transform: scale(1) translateY(0);
}

.ui-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  font-size: 1.6rem;
  line-height: 1;
}

.ui-modal-icon.question {
  background: linear-gradient(135deg, #f0f5e9, #dbeada);
}

.ui-modal-icon.danger {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.ui-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--hf-ink, #075C42);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
  font-family: 'Inter', system-ui, sans-serif;
}

.ui-modal-message {
  font-size: 0.9rem;
  color: #4F6358;
  line-height: 1.6;
  margin-bottom: 24px;
  white-space: normal;
}

.ui-modal-input-wrap {
  margin-bottom: 20px;
  text-align: left;
}

.ui-modal-input {
  width: 100%;
  padding: 12px 14px;
  font-size: 0.92rem;
  border: 1.5px solid #e8e2d2;
  border-radius: 10px;
  background: #f7f4ee;
  color: var(--hf-ink, #075C42);
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
  box-sizing: border-box;
}

.ui-modal-input:focus {
  border-color: #1a4d3a;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(26, 77, 58, 0.1);
}

.ui-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.ui-modal-btn {
  flex: 1;
  padding: 12px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  border: none;
}

.ui-modal-btn.cancel {
  background: #f7f4ee;
  color: #4F6358;
  border: 1.5px solid #e8e2d2;
}

.ui-modal-btn.cancel:hover {
  background: #efe9dc;
  border-color: #d8d0be;
}

.ui-modal-btn.confirm {
  background: linear-gradient(135deg, #1a4d3a, #2d7a5a);
  color: #fff;
}

.ui-modal-btn.confirm:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(26, 77, 58, 0.28);
}

.ui-modal-btn.confirm.danger {
  background: linear-gradient(135deg, #c76c6c, #a85555);
}

.ui-modal-btn.confirm.danger:hover {
  box-shadow: 0 6px 20px rgba(199, 108, 108, 0.3);
}

.ui-modal-btn:active { transform: scale(0.98); }

@media (max-width: 480px) {
  .ui-modal-card {
    padding: 26px 20px 18px;
    border-radius: 14px;
  }
  .ui-modal-icon {
    width: 48px; height: 48px;
    font-size: 1.4rem;
    margin-bottom: 14px;
  }
  .ui-modal-title { font-size: 1.05rem; }
  .ui-modal-message { font-size: 0.85rem; }
  .ui-modal-btn { padding: 11px 16px; font-size: 0.85rem; }
}

/* Toast posisi final */
.toast-container {
  position: fixed;
  top: 76px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: 380px;
}

@media (max-width: 720px) {
  .toast-container {
    top: 68px;
    left: 12px;
    right: 12px;
    max-width: none;
    align-items: center;
  }
  .toast {
    min-width: 0;
    width: 100%;
    max-width: 400px;
  }
}


/* ============================================================
   JUZ OVERRIDE — Atur Juz Manual
   ============================================================ */

.juz-override-info {
  background: var(--primary-softer);
  border: 1px solid var(--sage);
  border-radius: var(--r);
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.juz-override-info p {
  margin: 0;
}

.juz-override-info strong {
  color: var(--primary);
  font-weight: 700;
}

.juz-override-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}

.juz-override-loading {
  text-align: center;
  padding: 30px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.juz-override-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-soft);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  transition: all var(--t-fast);
}

.juz-override-item.is-manual {
  background: linear-gradient(135deg, var(--primary-softer), #fff);
  border-color: var(--sage);
}

.juz-override-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.juz-override-preview {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
}

.juz-override-select {
  padding: 6px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: all var(--t-fast);
  min-width: 100px;
}

.juz-override-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 77, 58, 0.1);
}

.juz-override-select option[value="full"] {
  font-weight: 700;
}

/* Badge "Manual" di progress per juz */
.juz-manual-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--gold);
  color: #fff;
  border-radius: var(--r-pill);
  vertical-align: middle;
}

.juz-progress-label {
  display: inline-flex;
  align-items: center;
}

/* Tombol khusus juz */
#juzBtn {
  background: linear-gradient(135deg, var(--primary-softer), #fff);
  border-color: var(--sage);
}

#juzBtn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

@media (max-width: 720px) {
  .juz-override-item {
    grid-template-columns: 50px 1fr auto;
    padding: 8px 10px;
    gap: 8px;
  }
  .juz-override-label {
    font-size: 0.78rem;
  }
  .juz-override-select {
    font-size: 0.72rem;
    padding: 5px 8px;
    min-width: 80px;
  }
  .juz-override-preview {
    display: none;
  }
  .juz-override-list {
    max-height: 320px;
  }
}


/* ============================================================
   TAB BAR — Navigasi Horizontal Sticky
   ============================================================ */

.tabbar {
  position: sticky;
  top: 68px;
  z-index: 90;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-soft);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tabbar::-webkit-scrollbar { display: none; }

.tabbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  gap: 2px;
  min-width: max-content;
}

.tabbar-btn {
  padding: 14px 16px;
  background: transparent;
  border: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
}

.tabbar-btn:hover { color: var(--text); }

.tabbar-btn.active { color: var(--primary); }

.tabbar-btn.active::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: -1px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 3px 3px 0 0;
}

.tabbar-btn .tab-icon {
  font-size: 1rem;
  line-height: 1;
}

.tab-content {
  animation: tabFadeIn 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab-content[hidden] { display: none; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Coming Soon Placeholder */
.coming-soon {
  text-align: center;
  padding: 90px 24px;
  max-width: 420px;
  margin: 0 auto;
}

.coming-soon-icon {
  font-size: 4rem;
  line-height: 1;
  margin-bottom: 22px;
  opacity: 0.55;
  display: inline-block;
  animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.coming-soon h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--heading, var(--text));
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.coming-soon p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.coming-soon-badge {
  display: inline-block;
  margin-top: 22px;
  padding: 6px 16px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--r-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 720px) {
  .tabbar { top: 60px; }
  .tabbar-inner { padding: 0 16px; }
  .tabbar-btn {
    padding: 12px 12px;
    font-size: 0.82rem;
  }
  .tabbar-btn.active::after {
    left: 12px;
    right: 12px;
  }
  .coming-soon { padding: 60px 20px; }
  .coming-soon-icon { font-size: 3rem; }
  .coming-soon h2 { font-size: 1.2rem; }
}

@media (max-width: 380px) {
  .tabbar-btn {
    padding: 11px 10px;
    font-size: 0.78rem;
    gap: 5px;
  }
  .tabbar-btn .tab-icon { font-size: 0.9rem; }
}


/* ============================================================
   FAB — Floating Action Button
   ============================================================ */

.fab-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 85;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  font-size: 1.6rem;
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(26, 77, 58, 0.32);
  display: grid;
  place-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1;
  padding: 0;
  font-family: inherit;
}

.fab-main:hover { transform: scale(1.06); }
.fab-main.open { transform: rotate(45deg); }

.fab-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  animation: fabIn 0.25s ease;
}

@keyframes fabIn {
  from { opacity: 0; transform: translateY(10px) scale(0.9); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.fab-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: #fff;
  border: 1.5px solid var(--border-soft);
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(20, 30, 20, 0.1);
  transition: all 0.2s;
  white-space: nowrap;
}

.fab-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-3px);
}

.fab-action-icon { font-size: 1.1rem; line-height: 1; }

/* Geser tombol back-to-top supaya tidak tabrakan dengan FAB */
.back-to-top {
  bottom: 96px;
}

@media (max-width: 720px) {
  .fab-container { bottom: 18px; right: 18px; }
  .fab-main { width: 52px; height: 52px; font-size: 1.5rem; }
  .fab-action { padding: 11px 16px; font-size: 0.82rem; }
  .back-to-top { bottom: 84px; right: 18px; }
}

/* Riwayat: expand toggle */
.riwayat-toggle {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 16px;
  background: var(--bg-soft);
  border: 1.5px dashed var(--border);
  border-radius: var(--r);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.riwayat-toggle:hover {
  background: var(--primary-soft);
  border-color: var(--sage);
  border-style: solid;
}

.riwayat-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.riwayat-section-title h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--heading, var(--text));
}

.riwayat-count-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 3px 10px;
  border-radius: var(--r-pill);
}


/* ============================================================
   GURU — Quick Actions di Dashboard
   ============================================================ */

.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
  animation: fadeUp 0.5s ease 0.2s backwards;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-md);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.quick-action-btn:hover {
  border-color: var(--primary);
  background: var(--primary-softer);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 77, 58, 0.1);
}

.quick-action-icon {
  font-size: 1.6rem;
  line-height: 1;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--primary-soft);
  display: grid;
  place-items: center;
}

.quick-action-text {
  flex: 1;
  min-width: 0;
}

.quick-action-text strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}

.quick-action-text span {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 640px) {
  .quick-actions { grid-template-columns: 1fr; }
  .quick-action-btn { padding: 14px 16px; gap: 12px; }
  .quick-action-icon { width: 40px; height: 40px; font-size: 1.4rem; }
  .quick-action-text strong { font-size: 0.88rem; }
  .quick-action-text span { font-size: 0.74rem; }
}


/* ============================================================
   FOOTER KONTAK — Contact Card (Redesign)
   ============================================================ */

.page-footer {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

.contact-card {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: var(--card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: 0 2px 14px rgba(20, 30, 20, 0.05);
  margin-bottom: 20px;
  text-align: left;
  transition: all 0.25s;
}

.contact-card:hover {
  border-color: var(--sage);
  box-shadow: 0 6px 24px rgba(26, 77, 58, 0.1);
  transform: translateY(-2px);
}

.contact-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 14px rgba(26, 77, 58, 0.22);
}

.contact-info {
  text-align: left;
  min-width: 0;
}

.contact-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.contact-role {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-role::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--primary);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(26, 77, 58, 0.12);
}

.contact-prompt {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  font-style: italic;
}

.contact-links {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 150px;
  padding: 12px 22px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--border-soft);
  border-radius: var(--r);
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.contact-links a:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(20, 30, 20, 0.08);
}

.contact-links a.wa-link {
  color: #128C7E;
  border-color: rgba(37, 211, 102, 0.3);
  background: rgba(37, 211, 102, 0.06);
}

.contact-links a.wa-link:hover {
  background: rgba(37, 211, 102, 0.12);
  border-color: #25D366;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.18);
}

.contact-links a.email-link {
  color: var(--primary);
  border-color: var(--sage);
  background: var(--primary-softer);
}

.contact-links a.email-link:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 6px 18px rgba(26, 77, 58, 0.12);
}

.contact-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .page-footer { margin-top: 40px; padding-top: 28px; }
  .contact-card { padding: 14px 18px; gap: 12px; }
  .contact-avatar { width: 46px; height: 46px; font-size: 1rem; }
  .contact-name { font-size: 0.94rem; }
  .contact-role { font-size: 0.74rem; }
  .contact-prompt { font-size: 0.8rem; }
  .contact-links a { min-width: 130px; padding: 11px 18px; font-size: 0.84rem; }
}

@media (max-width: 380px) {
  .contact-links { flex-direction: column; align-items: stretch; }
  .contact-links a { min-width: 0; }
}

/* ============================================================ */
/* ACTIVITY CARD — Status Online Siswa (13 Okt 2026)           */
/* ============================================================ */
.activity-card {
  background: var(--card, #ffffff);
  border-radius: 20px;
  padding: 16px 18px;
  margin: 16px 0 20px;
  box-shadow: 0 2px 12px rgba(26, 77, 58, 0.08);
  border: 1px solid rgba(201, 214, 190, 0.4);
  animation: fadeUp 0.35s ease;
}

.activity-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #b8c0b5;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.activity-dot.online {
  background: #2d7a5a;
  box-shadow: 0 0 0 0 rgba(45, 122, 90, 0.6);
  animation: pulse-online 2s infinite;
}

.activity-dot.recent {
  background: #6b7c70;
}

.activity-dot.stale {
  background: #c0392b;
}

.activity-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text, #1a3a2e);
  letter-spacing: -0.2px;
}

.activity-time {
  font-size: 0.82rem;
  color: var(--text-muted, #6b7c70);
  margin-left: 20px;
  margin-bottom: 0;
}

.activity-card.has-action .activity-time {
  margin-bottom: 12px;
}

.activity-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  padding: 10px 16px;
  background: #fef2f2;
  color: #c0392b;
  border: 1.5px solid #f5c6c6;
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.activity-action:hover {
  background: #fde8e8;
  border-color: #e8a5a5;
  transform: translateY(-1px);
}

.activity-action:active {
  transform: translateY(0);
}

@keyframes pulse-online {
  0% {
    box-shadow: 0 0 0 0 rgba(45, 122, 90, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(45, 122, 90, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(45, 122, 90, 0);
  }
}

/* Responsif: mobile */
@media (max-width: 480px) {
  .activity-card {
    padding: 14px 16px;
    border-radius: 18px;
  }
  .activity-text {
    font-size: 0.9rem;
  }
  .activity-time {
    font-size: 0.78rem;
    margin-left: 20px;
  }
  .activity-action {
    font-size: 0.84rem;
    padding: 9px 14px;
  }
}
/* ===== END ACTIVITY CARD ===== */

/* ═══════════════════════════════════════════════════════════ */
/* ICON SYSTEM — Hafalanku Premium Duotone Icons               */
/* Ditambahkan: 15 Okt 2026                                    */
/* Prinsip: SVG icons, ukuran konsisten, tap target ≥40px      */
/* ═══════════════════════════════════════════════════════════ */

:root {
  /* ─── Icon Sizes ─── */
  --icon-xs: 14px;    /* chip, badge inline */
  --icon-sm: 16px;    /* chevron, expand */
  --icon-md: 18px;    /* topbar, tombol kecil */
  --icon-lg: 20px;    /* modal, header action */
  --icon-xl: 22px;    /* tab bar, template */
  --icon-2xl: 24px;   /* FAB */
  --icon-hero: 44px;  /* empty state */

  /* ─── Tap Targets (area sentuh) ─── */
  --tap-sm: 38px;
  --tap-md: 40px;
  --tap-lg: 44px;
  --tap-xl: 56px;     /* FAB */

  /* ─── Bar Heights ─── */
  --topbar-h: 60px;
  --tabbar-h: 62px;

  /* ─── Icon Colors (ikut konteks) ─── */
  --icon-active: #1a4d3a;
  --icon-inactive: #9aa89c;
  --icon-gold: #c9a961;
  --icon-danger: #c0392b;
}

/* ═══════════════════════════════════════════════════════════ */
/* A. BASE SVG — semua icon Hafalanku                          */
/* ═══════════════════════════════════════════════════════════ */
.hk-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.hk-icon-xs  { width: var(--icon-xs);  height: var(--icon-xs); }
.hk-icon-sm  { width: var(--icon-sm);  height: var(--icon-sm); }
.hk-icon-md  { width: var(--icon-md);  height: var(--icon-md); }
.hk-icon-lg  { width: var(--icon-lg);  height: var(--icon-lg); }
.hk-icon-xl  { width: var(--icon-xl);  height: var(--icon-xl); }
.hk-icon-2xl { width: var(--icon-2xl); height: var(--icon-2xl); }
.hk-icon-hero{ width: var(--icon-hero);height: var(--icon-hero); }

/* ═══════════════════════════════════════════════════════════ */
/* B. TAB BAR ICON                                             */
/* ═══════════════════════════════════════════════════════════ */

/* Struktur tab item: icon di atas, label di bawah */
.tabbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 6px;
  min-height: var(--tabbar-h);
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 12px;
  transition: background 0.2s ease;
  position: relative;
}

.tabbar-btn.active {
  background: rgba(26, 77, 58, 0.06);
}

/* SVG icon di tab bar */
.tabbar-btn svg {
  width: var(--icon-xl);
  height: var(--icon-xl);
  color: var(--icon-inactive);
  transition: color 0.2s ease, transform 0.2s ease;
  display: block;
}

.tabbar-btn.active svg {
  color: var(--icon-active);
}

/* Garis emas kecil di atas saat aktif (opsional) */
.tabbar-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 2.5px;
  background: var(--gold);
  border-radius: 0 0 2px 2px;
}

/* Label teks di tab bar */
.tabbar-btn > span:not(.tab-icon) {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: -0.1px;
  line-height: 1;
  color: var(--icon-inactive);
  transition: color 0.2s ease;
}

.tabbar-btn.active > span:not(.tab-icon) {
  color: var(--icon-active);
}

/* Fallback emoji (biar tetap rapi selama transisi) */
.tabbar-btn .tab-icon {
  font-size: 20px;
  line-height: 1;
  display: block;
  filter: grayscale(0.15);
}

/* ═══════════════════════════════════════════════════════════ */
/* C. TOPBAR ICON (back, logout)                               */
/* ═══════════════════════════════════════════════════════════ */

/* Tombol kembali */
.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-sm);
  height: var(--tap-sm);
  border-radius: 10px;
  background: rgba(26, 77, 58, 0.06);
  border: none;
  color: var(--icon-active);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  padding: 0;
  font-size: 0; /* sembunyikan teks/emoji kalau ada */
}

.btn-back:hover {
  background: rgba(26, 77, 58, 0.12);
}

.btn-back:active {
  transform: scale(0.96);
}

.btn-back svg {
  width: var(--icon-md);
  height: var(--icon-md);
  stroke-width: 2.2;
}

/* Tombol logout */
.btn-logout {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  min-height: var(--tap-sm);
  background: #fef2f2;
  color: var(--icon-danger);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: -0.1px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-logout:hover {
  background: #fde8e8;
}

.btn-logout:active {
  transform: scale(0.97);
}

.btn-logout svg {
  width: var(--icon-sm);
  height: var(--icon-sm);
  stroke-width: 2.2;
}

/* ═══════════════════════════════════════════════════════════ */
/* D. TOMBOL AKSI HEADER (target, WA, settings)                */
/* ═══════════════════════════════════════════════════════════ */

.btn-manage-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap-md);
  height: var(--tap-md);
  border-radius: 12px;
  background: #f0f5ec;
  border: 1px solid rgba(201, 214, 190, 0.5);
  color: var(--icon-active);
  cursor: pointer;
  padding: 0;
  font-size: 0;
  transition: all 0.2s ease;
}

.btn-manage-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.btn-manage-btn:active {
  transform: translateY(0);
}

.btn-manage-btn svg {
  width: var(--icon-lg);
  height: var(--icon-lg);
  stroke-width: 1.9;
  transition: color 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════ */
/* E. STAT CARD ICON                                           */
/* ═══════════════════════════════════════════════════════════ */

.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(26, 77, 58, 0.08);
  color: var(--icon-active);
  flex-shrink: 0;
}

.stat-card-icon svg {
  width: var(--icon-lg);
  height: var(--icon-lg);
  stroke-width: 1.9;
}

/* ═══════════════════════════════════════════════════════════ */
/* F. MODAL MANAGE ICON                                        */
/* ═══════════════════════════════════════════════════════════ */

.manage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(26, 77, 58, 0.08);
  color: var(--icon-active);
  flex-shrink: 0;
}

.manage-icon svg {
  width: var(--icon-lg);
  height: var(--icon-lg);
  stroke-width: 1.85;
}

.manage-btn.danger .manage-icon {
  background: rgba(192, 57, 43, 0.1);
  color: var(--icon-danger);
}

/* ═══════════════════════════════════════════════════════════ */
/* G. WA TEMPLATE ICON                                         */
/* ═══════════════════════════════════════════════════════════ */

.wa-template-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(26, 77, 58, 0.08);
  color: var(--icon-active);
  flex-shrink: 0;
}

.wa-template.active .wa-template-icon {
  background: var(--primary);
  color: #ffffff;
}

.wa-template-icon svg {
  width: var(--icon-md);
  height: var(--icon-md);
  stroke-width: 2;
}

/* ═══════════════════════════════════════════════════════════ */
/* H. INLINE ICONS (chip, badge, chevron)                      */
/* ═══════════════════════════════════════════════════════════ */

/* Chevron (expand/collapse) */
.chevron-icon {
  width: var(--icon-sm);
  height: var(--icon-sm);
  color: var(--icon-inactive);
  transition: transform 0.25s ease;
  stroke-width: 2.2;
}

/* Icon di judul section / h2 / h3 */
.section-icon {
  width: var(--icon-md);
  height: var(--icon-md);
  color: var(--icon-active);
  stroke-width: 2;
  vertical-align: -3px;
  margin-right: 6px;
  display: inline-block;
}

/* ═══════════════════════════════════════════════════════════ */
/* I. FAB (Floating Action Button)                             */
/* ═══════════════════════════════════════════════════════════ */

.fab-btn svg {
  width: var(--icon-2xl);
  height: var(--icon-2xl);
  stroke-width: 2.4;
}

/* ═══════════════════════════════════════════════════════════ */
/* J. EMPTY STATE & COMING SOON                                */
/* ═══════════════════════════════════════════════════════════ */

.coming-soon-icon {
  color: var(--icon-active);
  opacity: 0.6;
  margin-bottom: 12px;
}

.coming-soon-icon svg {
  width: var(--icon-hero);
  height: var(--icon-hero);
  stroke-width: 1.5;
}

/* ═══════════════════════════════════════════════════════════ */
/* K. RESPONSIVE — mobile kecil                                */
/* ═══════════════════════════════════════════════════════════ */

@media (max-width: 380px) {
  :root {
    --icon-xl: 20px;   /* tab bar sedikit lebih kecil */
    --tabbar-h: 58px;
  }
  .tabbar-btn > span:not(.tab-icon) {
    font-size: 10px;
  }
  .tabbar-btn {
    padding: 6px 2px;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* L. TRANSISI AMAN — support 2 struktur (emoji + svg)         */
/* ═══════════════════════════════════════════════════════════ */

/* Kalau tab button punya SVG DAN emoji, sembunyikan emoji */
.tabbar-btn svg ~ .tab-icon {
  display: none;
}

/* Kalau tombol punya SVG, pastikan tidak ada teks aneh */
.btn-back svg,
.btn-manage-btn svg {
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* END ICON SYSTEM                                             */
/* ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════ */
/* TAB BAR FIX + STAT ICON ANIMATION — 15 Okt 2026             */
/* ═══════════════════════════════════════════════════════════ */

/* ─── 1. FIX TAB BAR: SPACING & UKURAN ─── */
.tabbar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  gap: 4px;
}

.tabbar-btn {
  flex: 1 1 0;
  max-width: 140px;
  min-width: 0;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 12px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.tabbar-btn:active {
  transform: scale(0.95);
}

.tabbar-btn svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}

.tabbar-btn.active svg {
  transform: scale(1.08);
}

.tabbar-btn > span:not(.tab-icon) {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.15px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* ─── 2. STAT CARD ICON — DASAR ─── */
.stat-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(26, 77, 58, 0.08);
  color: var(--primary);
  flex-shrink: 0;
  transition: background 0.25s ease;
}

.stat-card-icon svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s ease;
}

/* Hover efek halus di card */
.stat-card:hover .stat-card-icon {
  background: rgba(26, 77, 58, 0.13);
}

/* ─── 3. ANIMASI BUKU (HAFALAN) — Halaman Bernafas ─── */
@keyframes hk-book-page-breath {
  0%, 100% { opacity: 0.15; }
  50%      { opacity: 0.45; }
}

@keyframes hk-book-flip {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.03); }
}

.icon-anim-book {
  transform-origin: center;
  animation: hk-book-flip 3.5s ease-in-out infinite;
}

.icon-anim-book path[fill="currentColor"] {
  animation: hk-book-page-breath 3.5s ease-in-out infinite;
}

/* ─── 4. ANIMASI REFRESH (MUROJA'AH) — Berputar Pelan ─── */
@keyframes hk-refresh-rotate {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.icon-anim-refresh {
  transform-origin: center;
  animation: hk-refresh-rotate 6s linear infinite;
}

/* ─── 5. ANIMASI API (STREAK) — Hijau Menyala ─── */
@keyframes hk-fire-pulse {
  0%, 100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
  40% {
    transform: scale(1.1) translateY(-1px);
    opacity: 0.9;
  }
  70% {
    transform: scale(0.97) translateY(0);
    opacity: 1;
  }
}

@keyframes hk-fire-glow {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(45, 122, 90, 0);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(45, 122, 90, 0.15);
  }
}

.icon-anim-fire {
  transform-origin: center bottom;
  animation: hk-fire-pulse 1.8s ease-in-out infinite;
}

/* Icon streak: warna hijau terang + glow */
.stat-card-icon.icon-fire-green {
  background: rgba(45, 122, 90, 0.12);
  color: var(--primary-light);
}

.stat-card-icon.icon-fire-green svg path[fill="currentColor"] {
  opacity: 0.35;
  animation: hk-book-page-breath 2s ease-in-out infinite;
}

/* ─── 6. REDUCED MOTION — matikan animasi kalau user prefer ─── */
@media (prefers-reduced-motion: reduce) {
  .icon-anim-book,
  .icon-anim-book path,
  .icon-anim-refresh,
  .icon-anim-fire,
  .stat-card-icon.icon-fire-green svg path {
    animation: none;
  }
  .tabbar-btn.active svg {
    transform: none;
  }
}

/* ─── 7. RESPONSIVE — mobile kecil ─── */
@media (max-width: 380px) {
  .tabbar-btn svg {
    width: 22px;
    height: 22px;
  }
  .tabbar-btn > span:not(.tab-icon) {
    font-size: 10.5px;
  }
  .tabbar-btn {
    padding: 7px 2px;
  }
  .stat-card-icon {
    width: 34px;
    height: 34px;
  }
  .stat-card-icon svg {
    width: 20px;
    height: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* END TAB BAR FIX + STAT ICON ANIMATION                        */
/* ═══════════════════════════════════════════════════════════ */

/* ─── ANIMASI PIALA ACHIEVEMENT — 15 Okt 2026 ─── */
@keyframes hk-trophy-float {
  0%, 100% {
    transform: translateY(0);
    filter: drop-shadow(0 6px 12px rgba(168, 124, 43, 0.25));
  }
  50% {
    transform: translateY(-5px);
    filter: drop-shadow(0 10px 20px rgba(224, 185, 90, 0.5));
  }
}

.ach-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.ach-icon svg {
  width: 52px;
  height: 52px;
  animation: hk-trophy-float 3.2s ease-in-out infinite;
}

.ach-badge {
  display: inline-block;
  margin-top: 10px;
  padding: 8px 22px;
  background: linear-gradient(135deg, #5a3d12 0%, #3a2608 100%);
  color: #f5d987;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 14px rgba(90, 61, 18, 0.35), inset 0 1px 0 rgba(245, 217, 135, 0.3);
  border: 1px solid rgba(245, 217, 135, 0.25);
}

@media (prefers-reduced-motion: reduce) {
  .ach-icon svg {
    animation: none;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* FOOTER PROFESIONAL — 15 Okt 2026                            */
/* ═══════════════════════════════════════════════════════════ */

/* ─── FOOTER DASHBOARD (siswa.html) ─── */
.page-footer {
  margin-top: 40px;
  padding: 24px 0 20px;
  border-top: 1px solid rgba(201, 214, 190, 0.5);
}

.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.footer-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.footer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.2);
}

.footer-profile-text {
  min-width: 0;
  overflow: hidden;
}

.footer-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-role {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0;
}

.footer-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  font-family: inherit;
}

.footer-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.footer-btn-wa {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid var(--primary);
}

.footer-btn-wa:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.25);
}

.footer-btn-email {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--sage);
}

.footer-btn-email:hover {
  background: rgba(26, 77, 58, 0.06);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(201, 214, 190, 0.6) 50%, transparent 100%);
  margin: 0 0 14px;
}

.footer-copy {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 0;
  letter-spacing: 0.1px;
}

/* ─── FOOTER LOGIN (index.html & ganti-password.html) ─── */
.login-footer-new {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(201, 214, 190, 0.4);
}

.login-footer-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.login-footer-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.18);
}

.login-footer-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 2px;
}

.login-footer-role {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin: 0;
}

.login-footer-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.login-footer-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.login-footer-btn svg {
  width: 14px;
  height: 14px;
}

.login-footer-btn-wa {
  background: var(--primary);
  color: #ffffff;
}

.login-footer-btn-wa:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.login-footer-btn-email {
  background: rgba(26, 77, 58, 0.06);
  color: var(--primary);
  border: 1px solid var(--sage);
}

.login-footer-btn-email:hover {
  background: rgba(26, 77, 58, 0.12);
  transform: translateY(-1px);
}

.login-footer-copy {
  text-align: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 560px) {
  .footer-main {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-profile { width: 100%; }
  .footer-actions { width: 100%; }
  .footer-btn { flex: 1; justify-content: center; }
}

@media (max-width: 380px) {
  .footer-name { font-size: 0.95rem; }
  .footer-role { font-size: 0.78rem; }
  .footer-btn { font-size: 0.8rem; padding: 8px 12px; }
}

/* ═══════════════════════════════════════════════════════════ */
/* END FOOTER PROFESIONAL                                       */
/* ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════ */
/* PWA INSTALL BANNER — 16 Okt 2026                            */
/* ═══════════════════════════════════════════════════════════ */

.hk-install-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: calc(100% - 32px);
  max-width: 440px;
  background: #ffffff;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 12px 32px rgba(26, 77, 58, 0.22), 0 0 0 1px rgba(201, 214, 190, 0.4);
  z-index: 9999;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: 'Inter', system-ui, sans-serif;
}

.hk-install-banner.show {
  transform: translateX(-50%) translateY(0);
}

.hk-install-content {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.hk-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.2);
}

.hk-install-text {
  flex: 1;
  min-width: 0;
}

.hk-install-text strong {
  display: block;
  font-size: 0.94rem;
  color: var(--text);
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}

.hk-install-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.hk-install-text b {
  color: var(--primary);
  font-weight: 700;
}

.hk-install-actions {
  display: flex;
  gap: 8px;
}

.hk-install-btn-primary,
.hk-install-btn-secondary {
  flex: 1;
  padding: 10px 16px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  letter-spacing: -0.1px;
}

.hk-install-btn-primary {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(26, 77, 58, 0.25);
}

.hk-install-btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.hk-install-btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid rgba(201, 214, 190, 0.7);
}

.hk-install-btn-secondary:hover {
  background: rgba(26, 77, 58, 0.05);
  color: var(--text);
}

@media (max-width: 380px) {
  .hk-install-banner {
    padding: 14px;
    bottom: 14px;
  }
  .hk-install-text strong { font-size: 0.88rem; }
  .hk-install-text span { font-size: 0.72rem; }
  .hk-install-btn-primary,
  .hk-install-btn-secondary { padding: 9px 12px; font-size: 0.82rem; }
}

/* ═══════════════════════════════════════════════════════════ */
/* FASE 1 — BOTTOM TASKBAR (GLASSMORPHISM) & ONLINE DOT         */
/* ═══════════════════════════════════════════════════════════ */

/* 1. Beri jarak di bawah body agar konten tidak tertutup taskbar */
body.dashboard-page {
  padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
}

/* 2. Style Taskbar Bawah */
.tabbar {
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: auto !important;
  z-index: 9999;
  background: rgba(247, 244, 234, 0.85) !important; /* Cream transparan */
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-top: 1px solid rgba(201, 214, 190, 0.6) !important;
  border-bottom: none !important;
  padding-bottom: env(safe-area-inset-bottom); /* Support iPhone home bar */
  box-shadow: 0 -4px 24px rgba(26, 77, 58, 0.06);
}

.tabbar-inner {
  max-width: 600px !important;
  margin: 0 auto;
  height: 64px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}

/* Penyesuaian tombol tab di bawah */
.tabbar-btn {
  height: 100%;
  border-radius: 0;
  padding: 6px 4px;
  background: transparent;
}

.tabbar-btn.active {
  background: transparent; /* Hilangkan background kotak */
}

/* Garis emas di ATAS icon saat aktif (karena tabbar di bawah) */
.tabbar-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--gold);
  border-radius: 0 0 4px 4px;
}

/* 3. Online Dot (Menyatu dengan nama) */
.hk-online-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b8c0b5; /* Default abu */
  margin-left: 6px;
  vertical-align: middle;
  position: relative;
  top: -1px;
  transition: background 0.3s ease;
}

.hk-online-dot.is-online {
  background: #2d7a5a; /* Hijau */
  box-shadow: 0 0 0 0 rgba(45, 122, 90, 0.6);
  animation: hk-dot-pulse 2s infinite;
}

.hk-online-dot.is-stale {
  background: #c0392b; /* Merah */
}

@keyframes hk-dot-pulse {
  0% { box-shadow: 0 0 0 0 rgba(45, 122, 90, 0.6); }
  70% { box-shadow: 0 0 0 6px rgba(45, 122, 90, 0); }
  100% { box-shadow: 0 0 0 0 rgba(45, 122, 90, 0); }
}

/* Sembunyikan activity-card lama agar tidak dobel (kita ganti dengan dot) */
#activityCard {
  display: none !important;
}

/* Perbaikan Jarak Dot & Teks Status */
.hk-online-dot {
  margin-left: 10px !important; /* Jarak pas dari nama */
  width: 10px !important;       /* Sedikit lebih besar agar jelas */
  height: 10px !important;
}

.hk-status-text {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: -0.1px;
}

.hk-status-text.is-online-text {
  color: var(--primary-light);
  font-weight: 600;
}

.hk-status-text.is-stale-text {
  color: var(--danger);
}

/* ═══════════════════════════════════════════════════════════ */
/* FIX FAB POSITION — Agar tidak tertutup Taskbar Bawah         */
/* ═══════════════════════════════════════════════════════════ */

.fab-container {
  position: fixed !important;
  /* Taskbar tingginya 64px + safe area (untuk iPhone). 
     Kita beri jarak 20px di atas taskbar */
  bottom: calc(84px + env(safe-area-inset-bottom)) !important; 
  right: 20px !important;
  z-index: 10000 !important; /* Harus lebih tinggi dari taskbar (9999) */
}


/* Sesuaikan tombol back-to-top agar tidak menabrak FAB */
.back-to-top {
  bottom: calc(150px + env(safe-area-inset-bottom)) !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* BOTTOM SHEET MUROJAAH & HAFALAN                             */
/* ═══════════════════════════════════════════════════════════ */

/* Container Bottom Sheet */
.hk-bottom-sheet {
  position: fixed;
  bottom: -100%; /* Mulai dari bawah */
  left: 0;
  right: 0;
  height: 90vh; /* 90% tinggi layar */
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transition: bottom 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  font-family: 'Inter', system-ui, sans-serif;
}

/* State saat terbuka */
.hk-bottom-sheet.show {
  bottom: 0;
}

/* Backdrop gelap di belakang */
.hk-bottom-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.hk-bottom-backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* Header Bottom Sheet */
.hk-bs-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(201, 214, 190, 0.5);
  flex-shrink: 0;
}

.hk-bs-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}

.hk-bs-close {
  background: #f0f5ec;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 2O.1 — tombol tutup lama mengikuti ukuran SVG yang sudah dipakai di koleksi.
   Scoped to student + teacher detail; existing close handlers/IDs stay intact. */
.student-dashboard-page .hf-standard-close {
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  flex: 0 0 44px;
  aspect-ratio: 1;
  padding: 12px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.student-dashboard-page .hf-standard-close > svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  pointer-events: none;
}
.student-dashboard-page .hf-standard-close:hover:not(:disabled),
.student-dashboard-page .hf-standard-close:active:not(:disabled) { background: var(--primary-soft); }
.student-dashboard-page .hf-standard-close:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.student-dashboard-page .hf-standard-close:disabled { opacity: .55; cursor: default; }
@media (prefers-reduced-motion: reduce) {
  .student-dashboard-page .hf-standard-close { transition: none; }
}

/* Body Bottom Sheet (Bisa di-scroll) */
.hk-bs-body {
  padding: 16px 20px;
  overflow-y: auto;
  flex: 1;
}

/* Footer Bottom Sheet (Tombol Simpan) */
.hk-bs-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(201, 214, 190, 0.5);
  background: #ffffff;
  border-radius: 0 0 24px 24px;
  flex-shrink: 0;
}

/* Grid Surat */
.hk-surat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.hk-surat-card {
  padding: 12px;
  border: 1.5px solid rgba(201, 214, 190, 0.6);
  border-radius: 12px;
  background: var(--cream-soft);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hk-surat-card.selected {
  border-color: var(--primary);
  background: rgba(26, 77, 58, 0.05);
}

.hk-surat-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.hk-surat-ayat {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Bagian Surat Terpilih (Muncul di bawah grid) */
.hk-selected-section {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px dashed var(--sage);
  display: none; /* Sembunyi jika belum ada yang dipilih */
}

.hk-selected-section.active {
  display: block;
}

.hk-selected-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.hk-selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #fafbf8;
  border: 1px solid var(--sage);
  border-radius: 10px;
  margin-bottom: 8px;
}

.hk-selected-item-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.hk-status-select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--sage);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  outline: none;
}

/* ═══════════════════════════════════════════════════════════ */
/* REVISI BOTTOM SHEET — Inline Status & Color Coding          */
/* ═══════════════════════════════════════════════════════════ */

/* Grid Surat */
.hk-surat-grid {
  display: grid;
  grid-template-columns: 1fr; /* Jadi 1 kolom agar lega dan muat dropdown */
  gap: 10px;
  margin-top: 12px;
}

.hk-surat-card {
  padding: 12px 14px;
  border: 1.5px solid rgba(201, 214, 190, 0.6);
  border-radius: 12px;
  background: var(--cream-soft);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.hk-surat-card:active {
  transform: scale(0.98);
}

.hk-surat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hk-surat-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.hk-surat-ayat {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Dropdown Nilai Inline (Sembunyi jika belum dipilih) */
.hk-status-inline-wrap {
  display: none;
}

.hk-surat-card.selected .hk-status-inline-wrap {
  display: block;
}

.hk-status-inline-wrap select {
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,0.1);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

/* --- Pewarnaan Kartu Sesuai Nilai --- */
/* Default: Hijau (Jayyid & di atasnya) */
.hk-surat-card.selected[data-status="Jayyid"],
.hk-surat-card.selected[data-status="Jayyid Jiddan"],
.hk-surat-card.selected[data-status="Mumtaz"],
.hk-surat-card.selected[data-status="Mumtaz Murtafi'"] {
  border-color: #2d7a5a;
  background: #f0f9f4;
}
.hk-surat-card.selected[data-status="Jayyid"] .hk-surat-name,
.hk-surat-card.selected[data-status="Jayyid Jiddan"] .hk-surat-name,
.hk-surat-card.selected[data-status="Mumtaz"] .hk-surat-name,
.hk-surat-card.selected[data-status="Mumtaz Murtafi'"] .hk-surat-name {
  color: #075C42;
}

/* Default: Kuning (Maqbul) */
.hk-surat-card.selected[data-status="Maqbul"] {
  border-color: #d4a017;
  background: #fff9e6;
}
.hk-surat-card.selected[data-status="Maqbul"] .hk-surat-name {
  color: #7a5a10;
}

/* Default: Merah (Rasib) */
.hk-surat-card.selected[data-status="Rasib"] {
  border-color: #c0392b;
  background: #fdf2f2;
}
.hk-surat-card.selected[data-status="Rasib"] .hk-surat-name {
  color: #c0392b;
}

/* ═══════════════════════════════════════════════════════════ */
/* FIX TAMPILAN BOTTOM SHEET (JUZ & SURAT)                      */
/* ═══════════════════════════════════════════════════════════ */

/* 1. Perbaikan Tombol Juz (Jadikan Pill/Kotak) */
.hk-bottom-sheet .juz-tabs {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
}

.hk-bottom-sheet .juz-tab {
  padding: 8px 16px !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(201, 214, 190, 0.8) !important;
  border-radius: 20px !important; /* Membuat ujung membulat */
  color: var(--text-muted) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  width: auto !important; /* Mencegah melebar penuh */
  display: inline-block !important;
}

/* Warna saat Juz Dipilih */
.hk-bottom-sheet .juz-tab.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(26, 77, 58, 0.2) !important;
}

/* 2. Perbaikan Kartu Surat (Paksa Rata Kiri & Rapi) */
.hk-bottom-sheet .hk-surat-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  text-align: left !important; /* Paksa rata kiri */
  padding: 14px 16px !important;
  background: #ffffff !important;
}

.hk-bottom-sheet .hk-surat-info {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important; /* Paksa rata kiri */
  text-align: left !important;
  width: 100% !important;
}

.hk-bottom-sheet .hk-surat-name {
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 4px !important;
  text-align: left !important;
}

.hk-bottom-sheet .hk-surat-ayat {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
  text-align: left !important;
}

/* 3. Dropdown Nilai */
.hk-bottom-sheet .hk-status-inline-wrap {
  display: none;
  margin-left: 10px;
}

.hk-bottom-sheet .hk-surat-card.selected .hk-status-inline-wrap {
  display: block;
}

.hk-bottom-sheet .hk-status-inline-wrap select {
  padding: 8px 12px !important;
  border-radius: 10px !important;
  border: 1.5px solid var(--sage) !important;
  background: #ffffff !important;
  font-family: inherit !important;
  font-size: 0.8rem !important;
  font-weight: 700 !important;
  color: var(--primary) !important;
  cursor: pointer !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231a4d3a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 32px !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* BOTTOM SHEET HAFALAN (Form & Surat Terpilih)                */
/* ═══════════════════════════════════════════════════════════ */

/* Kartu Surat di Hafalan (Hanya 1 yang bisa aktif) */
.hk-bottom-sheet .hk-surat-card.selected-hafalan {
  border-color: var(--primary);
  background: rgba(26, 77, 58, 0.05);
  box-shadow: 0 0 0 2px rgba(26, 77, 58, 0.2);
}
.hk-bottom-sheet .hk-surat-card.selected-hafalan .hk-surat-name {
  color: var(--primary);
}

/* Form Input di Hafalan */
.hk-bottom-sheet .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.hk-bottom-sheet .form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.hk-bottom-sheet .form-group input[type="number"],
.hk-bottom-sheet .form-group textarea,
.hk-bottom-sheet .form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--sage);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  background: #ffffff;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.hk-bottom-sheet .form-group input[type="number"]:focus,
.hk-bottom-sheet .form-group textarea:focus,
.hk-bottom-sheet .form-group select:focus {
  border-color: var(--primary);
}

/* Tombol Kembali di Form Hafalan */
.btn-back-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.btn-back-step:hover {
  color: var(--primary);
}

/* ═══════════════════════════════════════════════════════════ */
/* PROFILE DROPDOWN MENU (Topbar)                              */
/* ═══════════════════════════════════════════════════════════ */

.profile-dropdown-wrap {
  position: relative;
}

.profile-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 10px;
  transition: background 0.2s;
}

.profile-trigger:hover {
  background: rgba(26, 77, 58, 0.06);
}

.chevron-dropdown {
  color: var(--text-muted);
  transition: transform 0.2s;
}

.profile-trigger.open .chevron-dropdown {
  transform: rotate(180deg);
}

/* Menu Dropdown */
.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(201, 214, 190, 0.5);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
}

.profile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: rgba(26, 77, 58, 0.06);
}

.dropdown-item.danger {
  color: var(--danger);
}

.dropdown-item.danger:hover {
  background: #fef2f2;
}

.dropdown-divider {
  height: 1px;
  background: rgba(201, 214, 190, 0.6);
  margin: 4px 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* ZONA BAHAYA (Edit Profil)                                   */
/* ═══════════════════════════════════════════════════════════ */
.danger-zone {
  margin-top: 24px;
  border-top: 1px dashed rgba(201, 214, 190, 0.8);
  padding-top: 16px;
}

.danger-zone-label {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--danger);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  display: block;
}

.danger-actions {
  display: flex;
  gap: 10px;
}

/* Memperbaiki Tampilan Tombol Juz menjadi Grid Simetris */
.hk-bottom-sheet .juz-tabs {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(65px, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 20px !important;
}

.hk-bottom-sheet .juz-tab {
  padding: 8px 0 !important;
  text-align: center !important;
  justify-content: center !important;
  font-size: 0.8rem !important;
  border-radius: 8px !important;
  border: 1.5px solid var(--sage) !important;
  background: #ffffff !important;
  color: var(--text-muted) !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
}

.hk-bottom-sheet .juz-tab.active {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 10px rgba(26, 77, 58, 0.2) !important;
}

/* ═══════════════════════════════════════════════════════════ */
/* REFRESH FOOTER: MINIMALIST CONTACT LINKS                    */
/* ═══════════════════════════════════════════════════════════ */

/* Container Utama Footer */
.footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

/* Area Kiri: Profil */
.footer-profile {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 4px 10px rgba(26, 77, 58, 0.15);
}

.footer-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 2px;
  letter-spacing: -0.2px;
}

.footer-role {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}

/* Area Kanan: Tautan Kontak (Bukan Tombol) */
.footer-actions {
  display: flex;
  gap: 8px;
}

.footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  color: var(--text-muted); /* Warna teks abu-abu redup */
  background: transparent;
  border: none;
}

.footer-btn svg {
  width: 18px;
  height: 18px;
  transition: color 0.2s ease;
}

/* Efek Hover: Berubah jadi hijau saat disentuh */
.footer-btn:hover {
  background: rgba(26, 77, 58, 0.05);
  color: var(--primary);
}

.footer-btn-wa:hover svg { color: #25D366; } /* Warna khas WA */
.footer-btn-email:hover svg { color: var(--primary); }

/* Garis Pemisah */
.footer-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 214, 190, 0.8), transparent);
  margin: 0 0 16px;
}

/* Teks Copyright */
.footer-copy {
  text-align: center;
  font-size: 0.75rem;
  color: #9ca3af;
  margin: 0;
  letter-spacing: 0.2px;
}

/* Responsif di HP */
@media (max-width: 560px) {
  .footer-main {
    flex-direction: column;
    text-align: center;
  }
  .footer-profile {
    flex-direction: column;
    gap: 8px;
  }
  .footer-actions {
    justify-content: center;
    width: 100%;
  }
}

/* Login Footer Minimalis */
.login-footer-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
}

.login-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid rgba(201, 214, 190, 0.5);
  transition: all 0.2s;
}

.login-footer-btn:hover {
  background: rgba(26, 77, 58, 0.05);
  color: var(--primary);
  border-color: var(--primary);
}
.login-footer-btn svg { width: 16px; height: 16px; }

/* ============================================================
   HAFALANKU — Profil ringkas; tampilan pencapaian kembali ke awal
   ============================================================ */

.student-profile-area {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 64px);
  min-width: 0;
}

.student-profile-details {
  display: grid;
  justify-items: end;
  gap: 0;
  min-width: 0;
}

.student-profile-details .user-name {
  max-width: 300px;
  font-size: 0.9rem;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}

.student-profile-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 44px;
  min-height: 44px;
  padding: 2px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--primary);
  font: inherit;
  cursor: pointer;
}

.student-profile-button:hover,
.student-profile-button[aria-expanded="true"] {
  background: var(--primary-soft);
}

.student-profile-button > svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.student-profile-button #userGenderIcon {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.student-profile-button #userGenderIcon .hf-avatar {
  --hf-avatar-size: 36px;
}

.student-profile-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 110;
  min-width: 160px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 8px 28px rgba(26, 58, 46, 0.14);
}

.student-profile-dropdown[hidden] {
  display: none;
}

.student-profile-dropdown .btn-logout {
  justify-content: flex-start;
  width: 100%;
  min-height: 44px;
}

.student-heading {
  margin-bottom: 20px;
}

.student-heading .greeting {
  margin: 0;
}

.student-heading .greeting h1 {
  margin-bottom: 6px;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.student-heading #greetName {
  display: inline;
  font: inherit;
}

.student-heading .greeting p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.6;
}

/* Akses keyboard tanpa mengubah tampilan kartu awal. */
.student-dashboard-page #badgeHighlight:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .student-dashboard-page > .container {
    padding-top: 20px;
  }
  .student-profile-area {
    gap: 6px;
  }
  .student-profile-details .user-name {
    max-width: 220px;
    font-size: 0.86rem;
  }
  .student-heading .greeting h1 {
    font-size: 1.25rem;
  }
  .student-heading .greeting p {
    font-size: 0.86rem;
  }
}

@media (max-width: 360px) {
  .student-profile-details .user-name {
    max-width: 160px;
    font-size: 0.8rem;
  }
  .student-heading .greeting h1 {
    font-size: 1.15rem;
  }
}

/* ============================================================
   HAFALANKU — Target bulanan (guru dan siswa)
   ============================================================ */
.monthly-target-card {
  margin: 0 0 22px;
  padding: 18px 20px;
  border: 1px solid var(--sage);
  border-radius: var(--r-lg);
  background: var(--card);
  box-shadow: var(--shadow-xs);
}
.monthly-target-card[hidden] { display: none; }
.monthly-target-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.monthly-target-header h2 {
  margin: 0;
  color: var(--heading, var(--text));
  font-size: 1rem;
  font-weight: 700;
}
.monthly-target-month {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.7rem;
}
.monthly-target-card input {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  font: inherit;
}
.monthly-target-month input { width: 155px; font-size: 0.8rem; }
.monthly-target-card input:focus-visible,
.monthly-target-editor summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}
.monthly-target-goals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.monthly-goal { min-width: 0; }
.monthly-goal-label { color: var(--text-muted); font-size: 0.78rem; }
.monthly-goal-count {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 3px;
  margin: 6px 0 8px;
  color: var(--primary);
  font-size: 1.3rem;
  font-weight: 800;
}
.monthly-goal-count span { color: var(--text-muted); font-size: 0.78rem; font-weight: 500; }
.monthly-goal-track { height: 5px; overflow: hidden; border-radius: 99px; background: var(--primary-soft); }
.monthly-goal-fill { height: 100%; border-radius: inherit; background: var(--primary); transition: width 0.5s ease; }
.monthly-goal.is-complete .monthly-goal-fill { background: var(--primary-light); }
.monthly-goal-unset { margin: 7px 0 0; color: var(--text-muted); font-size: 0.8rem; }
.monthly-target-empty { grid-column: 1 / -1; margin: 0; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }
.monthly-target-status { margin: 12px 0 0; color: var(--primary); font-size: 0.78rem; line-height: 1.6; }
.monthly-target-status.is-error { color: var(--danger); }
.monthly-target-note { margin: 8px 0 0; color: var(--text-muted); font-size: 0.7rem; line-height: 1.6; }
.monthly-target-editor { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.monthly-target-editor summary { width: fit-content; min-height: 32px; color: var(--primary); font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.monthly-target-form { margin-top: 10px; }
.monthly-target-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.monthly-target-fields label { display: grid; gap: 6px; color: var(--text); font-size: 0.8rem; }
.monthly-target-fields small { color: var(--text-muted); font-size: 0.7rem; font-weight: 400; line-height: 1.5; }
.monthly-target-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.monthly-target-actions .btn-primary,
.monthly-target-actions .btn-secondary { width: auto; min-height: 42px; font-size: 0.8rem; }
.monthly-target-actions button:disabled { opacity: 0.55; cursor: not-allowed; }
@media (max-width: 600px) {
  .monthly-target-card { padding: 16px; }
  .monthly-target-fields { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .monthly-goal-fill { transition: none; }
}

/* ============================================================
   HAFALANKU — Statistik siswa ringkas
   ============================================================ */
.student-stats.stats-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.student-stats > .stat-card {
  min-width: 0;
  padding: 16px;
  border-radius: 18px;
}

.student-stats .stat-card-header {
  align-items: flex-start;
  gap: 8px;
  min-height: 32px;
  margin-bottom: 10px;
}

.student-stats .stat-card-label {
  min-width: 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.student-stats .stat-card-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.student-stats .stat-card-icon svg {
  width: 18px;
  height: 18px;
}

.student-stats .stat-card-value {
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 7px;
  font-size: clamp(1.5rem, 4.8vw, 1.9rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.student-stats .stat-card-value .unit {
  margin-left: 0;
  font-size: 0.78rem;
}

.student-stats .stat-card-trend {
  display: block;
  font-size: 0.74rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Rutinitas menjadi baris ringkas selebar dua kartu. */
.student-stats > .student-stat-streak {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 12px;
  padding: 12px 16px;
}

.student-stat-streak .stat-card-header {
  grid-column: 1;
  grid-row: 1;
  align-items: center;
  justify-content: flex-start;
  min-height: 0;
  margin: 0;
}

.student-stat-streak .stat-card-icon {
  order: -1;
  width: 28px;
  height: 28px;
}

.student-stat-streak .stat-card-label {
  font-weight: 600;
}

.student-stat-streak .stat-card-value {
  grid-column: 2;
  grid-row: 1 / 3;
  justify-content: flex-end;
  margin: 0;
  font-size: 1.35rem;
}

.student-stat-streak .stat-card-trend {
  grid-column: 1;
  grid-row: 2;
  padding-left: 36px;
}

@media (max-width: 400px) {
  .student-stats.stats-grid {
    gap: 10px;
  }
  .student-stats > .stat-card {
    padding: 12px;
  }
  .student-stats .stat-card-header {
    min-height: 34px;
    gap: 6px;
  }
  .student-stats .stat-card-label {
    font-size: 0.74rem;
  }
  .student-stats .stat-card-icon {
    width: 26px;
    height: 26px;
  }
  .student-stats .stat-card-icon svg {
    width: 16px;
    height: 16px;
  }
  .student-stats .stat-card-trend {
    font-size: 0.7rem;
  }
  .student-stats > .student-stat-streak {
    padding: 10px 12px;
  }
  .student-stat-streak .stat-card-header {
    min-height: 0;
  }
  .student-stat-streak .stat-card-trend {
    padding-left: 32px;
  }
}

/* ============================================================
   HAFALANKU — Dua kartu dengan kedalaman dan perpindahan manual
   ============================================================ */
.card-stack {
  --stack-height: 260px;
  --stack-peek: 44px;
  position: relative;
  margin: 0 0 24px;
  padding-bottom: var(--stack-peek);
}
.card-stack[hidden], .card-stack [hidden] { display: none !important; }
.card-stack-stage {
  position: relative;
  height: var(--stack-height);
  perspective: 1100px;
  isolation: isolate;
}
.stack-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r-lg);
  transform-origin: center center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.stack-achievement {
  background: linear-gradient(135deg, #e3b943 0%, #f1daa0 45%, #e1b744 100%);
  color: #422006;
}
.stack-target {
  background: #164b3a;
  color: #fff8e8;
}
.card-stack[data-active="achievement"] .stack-achievement,
.card-stack[data-active="target"] .stack-target {
  z-index: 3;
  transform: translate3d(0, 0, 0) rotate(0);
  box-shadow: 0 14px 30px -14px rgba(24, 40, 27, 0.42), 0 3px 7px rgba(24, 40, 27, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.card-stack[data-active="achievement"] .stack-target,
.card-stack[data-active="target"] .stack-achievement {
  z-index: 1;
  transform: translate3d(0, var(--stack-peek), -24px) scale(0.985) rotate(-0.5deg);
  box-shadow: 0 10px 18px -10px rgba(24, 40, 27, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.stack-face-body {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stack-face-body[aria-hidden="true"] { visibility: hidden; }
.card-stack.is-swapping .stack-face-body[aria-hidden="true"] { visibility: visible; }
.stack-face-body[aria-hidden="true"] * { animation-play-state: paused; }
.card-stack .achievement-card {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}
.card-stack .achievement-card::before { animation: none; }
.card-stack .ach-title:focus,
.card-stack #monthlyTargetTitle:focus { outline-offset: 4px; }
.stack-peek-button {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  min-height: var(--stack-peek);
  width: 100%;
  padding: 9px 18px;
  border: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.stack-peek-button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.stack-peek-action { display: inline-flex; flex-shrink: 0; align-items: center; gap: 5px; font-size: 0.75rem; font-weight: 500; }
.stack-peek-action svg { width: 14px; height: 14px; flex-shrink: 0; }
.stack-target .stack-peek-button { color: #fff0bc; }
.stack-peek-button:hover { background: rgba(255, 255, 255, 0.08); }
.stack-peek-button:focus-visible { outline: 2px solid currentColor; outline-offset: -5px; }
.card-stack .monthly-target-card {
  position: relative;
  flex: 0 0 auto;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 18px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}
.stack-ornament { position: absolute; top: -22px; left: -22px; width: 90px; height: 90px; color: #d9b868; opacity: 0.25; pointer-events: none; }
.stack-ornament.is-right { left: auto; right: -22px; transform: scaleX(-1); }
.card-stack .monthly-target-header { position: relative; justify-content: center; flex-wrap: nowrap; gap: 8px; margin-bottom: 12px; }
.card-stack .monthly-target-header h2 { color: #fff1c8; font-size: 1.1rem; text-align: center; }
.stack-month-picker { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 32px; width: 32px; height: 32px; color: #f0d58c; cursor: pointer; }
.stack-month-picker > svg { width: 18px; height: 18px; }
.card-stack .stack-month-picker input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; padding: 0; border: 0; opacity: 0; cursor: pointer; }
.stack-month-picker input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; cursor: pointer; }
.stack-month-picker:focus-within { outline: 2px solid #f0d58c; outline-offset: 2px; border-radius: 6px; }
.card-stack .monthly-target-goals { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.card-stack .monthly-goal { display: grid; grid-template-columns: 26px minmax(0, 1fr); align-items: start; gap: 10px; }
.stack-goal-icon { width: 24px; height: 24px; margin-top: 4px; color: #edcf7a; }
.stack-goal-body { min-width: 0; }
.stack-goal-top { line-height: 1.2; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-stack .monthly-goal-label { color: #fff1c8; font-size: 0.8rem; font-weight: 600; }
.stack-goal-percent { color: #f5df9a; font-size: 0.74rem; }
.card-stack .monthly-goal-count { margin: 2px 0 6px; color: #fff8e8; font-size: 1.15rem; line-height: 1.2; }
.card-stack .monthly-goal-count span { color: #e7eddf; font-size: 0.82rem; }
.card-stack .monthly-goal-track { height: 5px; background: rgba(222, 237, 219, 0.25); }
.card-stack .monthly-goal-fill,
.card-stack .monthly-goal.is-complete .monthly-goal-fill { background: linear-gradient(90deg, #ffe8a2, #e9bb42); }
.stack-goal-remaining { margin: 3px 0 0; color: #e2e9db; font-size: 0.68rem; line-height: 1.3; }
.card-stack .monthly-target-status { margin-top: 8px; color: #e3eadc; font-size: 0.7rem; line-height: 1.4; text-align: center; }
.card-stack .monthly-target-status.is-error { color: #ffe0d4; }
.card-stack .monthly-target-empty,
.card-stack .monthly-goal-unset { color: #e3eadc; }
.card-stack .monthly-target-note { display: none; }
.stack-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.card-stack.is-swapping .stack-card { pointer-events: none; will-change: transform; }
.card-stack[data-swap="target"] .stack-target,
.card-stack[data-swap="achievement"] .stack-achievement { animation: hkStackForward 0.64s cubic-bezier(0.22, 0.7, 0.25, 1) both; }
.card-stack[data-swap="target"] .stack-achievement,
.card-stack[data-swap="achievement"] .stack-target { animation: hkStackBackward 0.64s cubic-bezier(0.22, 0.7, 0.25, 1) both; }
/* 2O.2 V2: three rear-card nudges in4seconds; paused while hovered/focused. */
@media (prefers-reduced-motion: no-preference) {
  .student-dashboard-page .card-stack.is-hint-paused { --hf-stack-hint-play: paused; }
  .student-dashboard-page .card-stack.is-hinting:not(.is-single):not(.is-swapping)[data-active="achievement"] .stack-target,
  .student-dashboard-page .card-stack.is-hinting:not(.is-single):not(.is-swapping)[data-active="target"] .stack-achievement {
    animation: hfStackRearHint 4s ease-in-out 1;
    animation-play-state: var(--hf-stack-hint-play, running);
  }
}
@keyframes hfStackRearHint {
  0%, 24%, 38%, 62%, 76%, 100% { transform: translate3d(0, var(--stack-peek), -24px) scale(.985) rotate(-.5deg); }
  6%, 44%, 82% { transform: translate3d(1.5px, var(--stack-peek), -24px) scale(.985) rotate(.1deg); }
  12%, 50%, 88% { transform: translate3d(-1.5px, var(--stack-peek), -24px) scale(.985) rotate(-1deg); }
  18%, 56%, 94% { transform: translate3d(.7px, var(--stack-peek), -24px) scale(.985) rotate(-.2deg); }
}
@keyframes hkStackForward {
  0% { z-index: 1; transform: translate3d(0, var(--stack-peek), -24px) scale(0.985) rotate(-0.5deg); }
  42% { z-index: 1; transform: translate3d(8px, 54px, 35px) scale(1.005) rotate(2deg); }
  50% { z-index: 4; }
  100% { z-index: 4; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
}
@keyframes hkStackBackward {
  0% { z-index: 3; transform: translate3d(0, 0, 0) scale(1) rotate(0); }
  40% { z-index: 3; transform: translate3d(-8px, -8px, 45px) scale(1.005) rotate(-2deg); }
  51% { z-index: 1; }
  100% { z-index: 1; transform: translate3d(0, var(--stack-peek), -24px) scale(0.985) rotate(-0.5deg); }
}
.card-stack.is-single { padding-bottom: 0; }
.card-stack.is-single .stack-target { transform: none; }
@media (hover: hover) and (pointer: fine) {
  .card-stack:not(.is-swapping):not(.is-single):hover .stack-card:has(.stack-face-body[aria-hidden="false"]) { transform: translate3d(0, -2px, 10px) rotateX(0.6deg); }
}
@media (max-width: 720px) {
  .card-stack .monthly-target-card { padding: 14px 18px; }
  .card-stack .monthly-target-header h2 { font-size: 1rem; }
  .card-stack .monthly-target-header { margin-bottom: 10px; }
  .card-stack .monthly-target-goals { gap: 10px; }
  .stack-peek-button { padding: 8px 14px; font-size: 0.76rem; }
  .stack-peek-action { font-size: 0.7rem; }
}
@media (max-width: 360px) {
  .stack-peek-button { gap: 6px; padding-left: 11px; padding-right: 11px; font-size: 0.71rem; }
  .stack-peek-action { font-size: 0.66rem; gap: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  .card-stack .stack-card,
  .card-stack .achievement-card *,
  .card-stack .monthly-goal-fill { animation: none !important; transition: none !important; }
  .card-stack:not(.is-swapping):hover .stack-card:has(.stack-face-body[aria-hidden="false"]) { transform: none; }
}

/* Input siswa — scoped agar halaman guru tetap menggunakan desain semula. */
.student-input-page .fab-main, .teacher-detail-page .fab-main {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: auto; min-width: 104px; padding: 0 18px; border-radius: 28px;
}
.student-input-page .fab-main.open, .teacher-detail-page .fab-main.open { transform: none; }
.student-input-page .fab-main > svg, .teacher-detail-page .fab-main > svg { transition: transform .2s ease; flex-shrink: 0; }
.student-input-page .fab-main.open > svg, .teacher-detail-page .fab-main.open > svg { transform: rotate(45deg); }
.input-fab-label { font-size: .87rem; font-weight: 700; line-height: 1.3; }
.student-input-page .fab-action, .teacher-detail-page .fab-action { display: flex; align-items: center; gap: 12px; text-align: left; min-height: 64px; width: 268px; white-space: normal; }
.input-action-copy { display: flex; flex-direction: column; gap: 4px; }
.input-action-copy strong { font-size: .87rem; }
.input-action-copy small { font-size: .7rem; color: var(--text-muted); font-weight: 400; }
.student-input-page .fab-action-icon, .teacher-detail-page .fab-action-icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; background: var(--cream, #f8f6ed); }
.student-input-sheet { bottom: 0; transform: translateY(110%); visibility: hidden; transition: transform .3s cubic-bezier(.22,.7,.25,1), visibility .3s; height: 90vh; height: 90dvh; z-index: 10002; }
.student-input-sheet.show { transform: translateY(0); visibility: visible; }
.student-input-page #bsMurojaahBackdrop, .student-input-page #bsHafalanBackdrop { z-index: 10001; }
.student-input-sheet .hk-bs-header { align-items: flex-start; gap: 12px; }
.input-sheet-help { font-size: .78rem; line-height: 1.6; color: var(--text-muted); margin: 5px 0 0; }
.student-input-sheet .hk-bs-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.input-fields { margin: 0; padding: 0; border: 0; min-width: 0; }
.input-fields:disabled { opacity: .65; }
.student-input-sheet .hk-bs-footer { padding-bottom: max(16px, env(safe-area-inset-bottom)); }
.input-selection { margin: 0 0 8px; font-size: .78rem; font-weight: 600; color: var(--primary); }
.input-error { margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; color: #9b2922; background: #fff0ee; font-size: .8rem; line-height: 1.6; }
.input-error[hidden] { display: none; }
.input-range { margin: 8px 0 0; color: var(--text-muted); font-size: .75rem; line-height: 1.6; }
.input-empty { grid-column: 1 / -1; margin: 0; padding: 20px 10px; color: var(--text-muted); text-align: center; font-size: .82rem; line-height: 1.6; }
.student-input-sheet .form-label-block { margin-top: 0; }
.student-input-sheet .hk-surat-card { min-width: 0; gap: 10px; font: inherit; border: 1.5px solid var(--sage); border-radius: 12px; }
.student-input-sheet#bsMurojaah .hk-surat-card { flex-wrap: wrap; padding: 0 !important; gap: 0; cursor: default; }
.student-input-sheet#bsMurojaah .hk-surat-card.selected { border-color: var(--primary); background: #f5f8f0 !important; }
.input-surat-pick { border: 0; background: transparent; display: flex; align-items: center; gap: 12px; padding: 13px 14px; width: 100%; text-align: left; color: inherit; font: inherit; cursor: pointer; border-radius: 10px; min-height: 60px; }
.input-check { display: grid; place-items: center; width: 22px; height: 22px; flex-shrink: 0; border: 1.5px solid var(--sage); border-radius: 7px; color: transparent; background: white; }
.input-check svg { width: 16px; height: 16px; }
.selected .input-check { color: white; background: var(--primary); border-color: var(--primary); }
.student-input-sheet#bsMurojaah .hk-status-inline-wrap { width: 100%; margin: 0; padding: 0 14px 12px 48px; box-sizing: border-box; }
.student-input-sheet .hk-status-inline-wrap label { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: .75rem; }
.student-input-sheet .hk-status-inline-wrap select { flex: 1; min-width: 0; min-height: 44px; }
.input-hafalan-pick { cursor: pointer; }
.input-hafalan-pick:hover { border-color: var(--primary); }
.input-surat-arrow { color: var(--primary); font-size: 1.4rem; }
.student-input-sheet button:focus-visible, .student-input-page .fab-container button:focus-visible, .teacher-detail-page .fab-container button:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.student-input-sheet select:focus-visible { outline: 2px solid var(--primary) !important; outline-offset: 2px; }
.student-input-sheet [aria-invalid="true"] { border-color: #b72e27 !important; }
.student-input-sheet .hk-bs-close, .student-input-sheet .btn-back-step { min-height: 44px; }
.student-input-sheet .hk-bs-footer button { min-height: 48px; }
.student-input-sheet button:disabled { opacity: .55; cursor: default; }
@media (min-width: 721px) {
 .student-input-sheet { max-width: 660px; margin: 0 auto; }
}
@media (max-width: 720px) {
 .student-input-page .fab-main, .teacher-detail-page .fab-main { min-width: 100px; }
 .student-input-sheet .hk-surat-grid { grid-template-columns: minmax(0, 1fr); }
 .student-input-sheet .form-group input, .student-input-sheet .form-group select, .student-input-sheet .form-group textarea { font-size: 16px !important; }
 .student-input-sheet .hk-status-inline-wrap select { font-size: 16px !important; }
}
@media (prefers-reduced-motion: reduce) {
 .student-input-sheet, .student-input-page .fab-main, .teacher-detail-page .fab-main, .student-input-page .fab-main > svg, .teacher-detail-page .fab-main > svg { transition: none; }
}

/* Menu Hafalan siswa — scope tab, tidak mengubah dashboard dan halaman guru. */
#hafalanTab .hafalan-page-heading { margin-bottom: 18px; }
#hafalanTab .hafalan-page-heading h2 { margin: 0 0 5px; color: var(--primary); font-size: 1.5rem; font-weight: 800; }
#hafalanTab .hafalan-page-heading p { margin: 0; font-size: .88rem; color: var(--text-muted); line-height: 1.6; }
#hafalanTab .hafalan-latest { padding: 20px; margin-bottom: 20px; background: #fff; border: 1px solid var(--sage); border-radius: var(--r-lg, 20px); box-shadow: 0 3px 12px rgba(26,77,58,.03); }
#hafalanTab .hafalan-latest-top { display: flex; align-items: flex-start; gap: 13px; }
#hafalanTab .hafalan-latest-icon { flex-shrink: 0; width: 29px; height: 29px; margin-top: 2px; color: var(--primary); }
#hafalanTab .hafalan-latest-copy { min-width: 0; flex: 1; }
#hafalanTab .hafalan-latest-label { margin: 0 0 5px; color: var(--text-muted); font-size: .8rem; }
#hafalanTab #hafalanLatestTitle { margin: 0; font-size: 1.08rem; font-weight: 800; line-height: 1.5; color: var(--primary); overflow-wrap: anywhere; }
#hafalanTab #hafalanLatestMeta { margin: 4px 0 0; font-size: .78rem; line-height: 1.6; color: var(--text-muted); }
#hafalanTab .hafalan-approved { display: inline-flex; align-items: center; gap: 5px; color: var(--primary); padding: 5px 9px; background: #edf5e7; border-radius: 8px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
#hafalanTab .hafalan-approved[hidden], #hafalanTab [hidden] { display: none !important; }
#hafalanTab .hafalan-approved svg { width: 14px; height: 14px; }
#hafalanTab #hafalanAddButton { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 46px; margin-top: 16px; font-size: .88rem; }
#hafalanTab #hafalanAddButton svg { width: 18px; height: 18px; }
#hafalanTab .progress-card { margin-bottom: 0; }
#hafalanTab .hafalan-history-heading { margin-top: 24px; gap: 10px; flex-wrap: wrap; }
#hafalanTab .hafalan-search-box { position: relative; margin: 14px 0 12px; }
#hafalanTab .hafalan-search-box > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px; color: var(--text-muted); pointer-events: none; }
#hafalanTab #hafalanSearch { box-sizing: border-box; width: 100%; min-height: 46px; border: 1px solid var(--sage); background: white; border-radius: 12px; padding: 11px 14px 11px 42px; color: var(--text); font: inherit; font-size: .88rem; }
#hafalanTab .hafalan-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-width: 520px; }
#hafalanTab .hafalan-filter { min-width: 0; min-height: 42px; border: 1px solid var(--sage); border-radius: 10px; padding: 8px 5px; background: transparent; color: var(--text-muted); font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
#hafalanTab .hafalan-filter.is-active { background: var(--primary); color: white; border-color: var(--primary); }
#hafalanTab #hafalanResultsStatus { margin: 11px 0; color: var(--text-muted); font-size: .74rem; line-height: 1.5; }
#hafalanTab .history-item { padding: 16px; }
#hafalanTab .history-title { overflow-wrap: anywhere; }
#hafalanTab .history-date { flex-shrink: 0; }
#hafalanTab .history-badges { display: flex; flex-wrap: wrap; gap: 6px; }
#hafalanTab .history-badges .badge { white-space: normal; line-height: 1.5; }
#hafalanTab .hafalan-status-unknown { background: #f1f1ec; color: var(--text-muted); }
#hafalanTab #btnToggleHafalan { min-height: 44px; }
#hafalanTab button:focus-visible, #hafalanTab input:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.hafalan-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
 #hafalanTab .hafalan-latest { padding: 16px; }
 #hafalanTab .hafalan-latest-top { flex-wrap: wrap; gap: 10px; }
 #hafalanTab .hafalan-approved { margin-left: 39px; }
 #hafalanTab .hafalan-latest-copy { flex-basis: calc(100% - 39px); }
 #hafalanTab #hafalanSearch { font-size: 16px; }
 #hafalanTab .history-item-header { flex-direction: column; align-items: flex-start; gap: 5px; }
 #hafalanTab .history-item { padding: 14px; }
}
@media (max-width: 360px) {
 #hafalanTab .hafalan-filters { gap: 5px; }
 #hafalanTab .hafalan-filter { font-size: .72rem; }
}

/* Profil siswa dan dialog, scope terpisah dari halaman guru. */
.student-profile-dropdown { min-width: 190px; }
.student-profile-dropdown .profile-menu-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 11px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-size: .85rem; text-align: left; cursor: pointer; }
.student-profile-dropdown .profile-menu-item svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--primary); }
.student-profile-dropdown .profile-menu-item:hover { background: #f0f5eb; }
.student-profile-open .fab-container { display: none; }
.student-profile-view { max-width: 700px; margin: 0 auto; padding-bottom: 16px; }
.student-profile-view [hidden] { display: none !important; }
.student-profile-view h2 { font-size: 1.5rem; font-weight: 800; color: var(--primary); margin: 0 0 18px; }
.student-profile-view h3 { font-size: 1rem; font-weight: 700; margin: 0 0 9px; color: var(--heading, var(--text)); }
.profile-back-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin: 0 0 10px; padding: 0 5px; border: 0; background: transparent; color: var(--primary); font: inherit; font-size: .85rem; cursor: pointer; }
.profile-back-button svg { width: 19px; height: 19px; }
.student-profile-card { padding: 20px; background: white; border: 1px solid var(--sage); border-radius: var(--r-lg,20px); margin-bottom: 16px; }
.student-profile-view .profile-identity { display: flex; gap: 17px; align-items: center; }
.profile-identity > div { min-width: 0; }
.student-profile-view .hf-profile-avatar { width: 80px; height: 80px; flex: 0 0 80px; }
.profile-identity .hf-profile-name { overflow-wrap: anywhere; margin-bottom: 5px; font-size: 1.15rem; line-height: 1.4; }
.profile-identity .hf-profile-username { margin: 0 0 8px; color: var(--text-muted); font-size: .83rem; overflow-wrap: anywhere; }
.profile-role-label { display: inline-block; padding: 3px 10px; border-radius: 16px; background: #eef4e8; color: var(--primary); font-size: .75rem; }
.profile-account-info { margin: 0 0 10px; }
.profile-account-info > div { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid #edf0e7; font-size: .85rem; line-height: 1.5; }
.profile-account-info dt { color: var(--text-muted); }
.profile-account-info dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.profile-muted { margin: 5px 0 10px; color: var(--text-muted); font-size: .78rem; line-height: 1.6; }
.profile-status { color: var(--text-muted); font-size: .8rem; line-height: 1.6; margin: 10px 0; }
.profile-status:empty { display: none; }
.profile-badge-previews { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.profile-badge-preview { flex: 1 1 80px; min-width: 0; max-width: 33%; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: .75rem; color: var(--primary); line-height: 1.5; overflow-wrap: anywhere; }
.profile-badge-emoji { font-size: 1.6rem; line-height: 1.4; flex-shrink: 0; }
.profile-setting-row { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; border: 0; border-top: 1px solid var(--sage); background: transparent; padding: 13px 0 0; color: var(--primary); font: inherit; font-size: .87rem; font-weight: 600; cursor: pointer; }
.profile-setting-row svg { width: 18px; height: 18px; }
.profile-text-button { border: 0; padding: 10px 4px; background: transparent; color: var(--primary); font: inherit; font-size: .8rem; text-decoration: underline; cursor: pointer; min-height: 44px; }
.profile-badge-count { color: var(--primary); font-size: .9rem; font-weight: 700; margin: 15px 0; }
.profile-badge-options { display: grid; gap: 10px; margin-top: 14px; }
.profile-badge-option { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 78px; padding: 14px; border: 1px solid var(--sage); border-radius: 13px; background: white; color: var(--text); text-align: left; font: inherit; cursor: pointer; }
.profile-badge-option.is-selected { background: #eef5e8; border-color: var(--primary); }
.profile-badge-option-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.profile-badge-option-copy strong { font-size: .88rem; overflow-wrap: anywhere; }
.profile-badge-option-copy small { font-size: .73rem; color: var(--text-muted); line-height: 1.5; }
.profile-badge-mark { width: 24px; height: 24px; border: 1px solid var(--sage); border-radius: 50%; color: var(--primary); display: grid; place-items: center; flex-shrink: 0; }
.profile-badge-mark svg { width: 18px; height: 18px; }
.is-selected .profile-badge-mark { background: var(--primary); border-color: var(--primary); color: white; }
.profile-badge-option:disabled { opacity: .55; cursor: default; }
.profile-badge-save-area { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); background: var(--cream, #f7f4e9); padding: 14px 0 2px; margin-top: 15px; text-align: center; border-top: 1px solid var(--sage); }
.profile-badge-save-area > .btn-primary { width: 100%; min-height: 46px; }
.student-profile-view button:disabled, .student-password-dialog button:disabled { opacity: .55; cursor: default; }
.student-profile-view button:focus-visible, .student-profile-dropdown button:focus-visible, .student-password-dialog :is(button,input):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.student-password-dialog { box-sizing: border-box; width: min(460px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; margin: auto; padding: 24px; border: 1px solid var(--sage); border-radius: 20px; color: var(--text); background: white; box-shadow: 0 18px 60px rgba(20,50,30,.2); }
.student-password-dialog::backdrop { background: rgba(20,40,30,.45); }
.student-password-dialog h2 { color: var(--primary); font-size: 1.25rem; margin: 0 0 8px; }
.profile-password-fields { border: 0; padding: 0; margin: 14px 0; min-width: 0; }
.profile-password-fields > label { display: block; margin: 12px 0 7px; font-size: .85rem; }
.profile-password-fields > input { box-sizing: border-box; width: 100%; min-height: 45px; padding: 10px 12px; border: 1px solid var(--sage); border-radius: 9px; font: inherit; font-size: 16px; background: white; color: var(--text); }
.profile-password-fields .profile-show-password { display: flex; gap: 9px; align-items: center; min-height: 44px; }
.profile-password-error { color: #a42b23; font-size: .8rem; line-height: 1.6; }
.profile-password-error:empty { display: none; }
.profile-password-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.profile-password-actions button { min-height: 44px; }
@media (max-width: 720px) {
 .student-profile-card { padding: 16px; }
 .student-profile-view .hf-profile-avatar { width: 68px; height: 68px; flex-basis: 68px; }
 .profile-identity .hf-profile-name { font-size: 1rem; }
 .student-profile-view .profile-identity { gap: 13px; }
 .profile-badge-preview { font-size: .7rem; }
}

/* Menu Muroja'ah siswa: satu sumber data, scope terpisah dari menu lain. */
#murojaahTab [hidden] { display: none !important; }
#murojaahTab .mur-page-heading { margin-bottom: 18px; }
#murojaahTab .mur-page-heading h2 { margin: 0 0 5px; color: var(--primary); font-weight: 800; font-size: 1.5rem; }
#murojaahTab .mur-page-heading p { margin: 0; color: var(--text-muted); font-size: .88rem; line-height: 1.6; }
#murojaahTab .mur-peta-help { color: var(--text-muted); font-size: .74rem; line-height: 1.6; margin: 10px 0; }
#murojaahTab .mur-peta-help summary { cursor: pointer; color: var(--primary); min-height: 32px; }
#murojaahTab .mur-peta-help p { margin: 2px 0 10px; }
#murojaahTab .mur-peta-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
#murojaahTab #petaLoadStatus, #murojaahTab #petaResultsStatus { color: var(--text-muted); font-size: .74rem; line-height: 1.6; margin: 8px 0; }
#murojaahTab #petaLoadStatus:empty { display: none; }
#murojaahTab #petaRetry { background: transparent; border: 0; color: var(--primary); font: inherit; font-size: .78rem; text-decoration: underline; min-height: 44px; cursor: pointer; }
#murojaahTab .chips { flex-wrap: wrap; gap: 7px; }
#murojaahTab .chip { min-height: 40px; }
#murojaahTab .peta-card .search-box { max-width: none; }
#murojaahTab #petaSearch { box-sizing: border-box; width: 100%; min-height: 44px; }
#murojaahTab .legend { display: flex; flex-wrap: wrap; gap: 8px 14px; line-height: 1.5; }
#murojaahTab .peta-table { min-width: 640px; }
#murojaahTab .mur-peta-toggle { border: 0; background: transparent; color: inherit; font: inherit; padding: 5px 0; min-height: 44px; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
#murojaahTab .mur-peta-toggle > svg { width: 15px; height: 15px; flex-shrink: 0; color: var(--text-muted); }
#murojaahTab .mur-peta-toggle[aria-expanded="true"] > svg { transform: rotate(180deg); }
#murojaahTab .surat-cell { flex-wrap: wrap; gap: 4px 9px; }
#murojaahTab .surat-cell-name { overflow-wrap: anywhere; }
#murojaahTab .mur-peta-status { display: inline-block; max-width: 100%; box-sizing: border-box; padding: 4px 8px; border-radius: 8px; font-size: .72rem; font-weight: 600; line-height: 1.5; white-space: normal; }
#murojaahTab .mur-peta-status.is-lancar { background: #e5f1e4; color: #075C42; }
#murojaahTab .mur-peta-status.is-cukup { background: #eef4df; color: #075C42; }
#murojaahTab .mur-peta-status.is-kurang { background: #fff4d5; color: #805d09; }
#murojaahTab .mur-peta-status.is-belum_lancar { background: #fae9e6; color: #943d32; }
#murojaahTab .mur-peta-status:is(.is-belum,.is-bulan_lalu,.is-unknown) { background: #f0f1eb; color: #5D7064; }
#murojaahTab .mur-peta-grade { display: block; margin-top: 4px; color: var(--text-muted); font-size: .68rem; line-height: 1.5; }
#murojaahTab .riwayat-detail-item .badge { white-space: normal; text-align: right; line-height: 1.5; }
#murojaahTab .mur-history-heading { margin-top: 24px; flex-wrap: wrap; gap: 8px; }
#murojaahTab .mur-history-controls { display: grid; gap: 10px; margin: 14px 0 11px; }
#murojaahTab .mur-history-search { position: relative; }
#murojaahTab .mur-history-search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
#murojaahTab #murojaahHistorySearch, #murojaahTab #murojaahHistoryGrade { box-sizing: border-box; width: 100%; min-height: 45px; padding: 11px 13px; border: 1px solid var(--sage); border-radius: 11px; background: white; color: var(--text); font: inherit; font-size: .85rem; }
#murojaahTab #murojaahHistorySearch { padding-left: 40px; }
#murojaahTab #murojaahHistoryResults { margin: 10px 0; color: var(--text-muted); font-size: .74rem; line-height: 1.5; }
#murojaahTab .history-item { padding: 16px; }
#murojaahTab .history-title { overflow-wrap: anywhere; }
#murojaahTab .history-date { flex-shrink: 0; }
#murojaahTab .mur-history-meta { margin: 5px 0 8px; font-size: .78rem; line-height: 1.5; color: var(--text-muted); }
#murojaahTab .history-badges .badge { white-space: normal; line-height: 1.5; }
#murojaahTab #btnToggleMurojaah { min-height: 44px; }
#murojaahTab .mur-encouragement { text-align: center; color: var(--text-muted); font-size: .8rem; margin: 22px 0 8px; line-height: 1.6; }
#murojaahTab :is(button,input,select):focus-visible, #murojaahTab summary:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.mur-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#murojaahTab .mur-compact-list { display: none; }
#murojaahTab .mur-mobile-count { display: none; }
@media (min-width: 721px) {
 #murojaahTab .mur-history-controls { grid-template-columns: minmax(0,1fr) minmax(200px,260px); }
}
@media (max-width: 720px) {
 #murojaahTab :is(#petaSearch,#murojaahHistorySearch,#murojaahHistoryGrade) { font-size: 16px; }
 /* Tabel asli tetap utuh untuk desktop, bukan lagi dipaksa menjadi grid. */
 #murojaahTab .mur-peta-desktop { display: none; }
 #murojaahTab .mur-compact-list { display: block; list-style: none; margin: 10px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
 #murojaahTab .mur-compact-item { display: block; list-style: none; margin: 0; padding: 0; border: 0; border-top: 1px solid var(--sage); border-radius: 0; background: transparent; box-shadow: none; }
 #murojaahTab .mur-compact-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; box-sizing: border-box; width: 100%; min-height: 84px; margin: 0; padding: 11px 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--text); text-align: left; font: inherit; line-height: 1.4; cursor: pointer; }
 #murojaahTab .mur-compact-copy { display: flex; flex-direction: column; gap: 3px; flex: 1 1 0; min-width: 0; }
 #murojaahTab .mur-compact-name { display: block; font-size: .94rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
 #murojaahTab .mur-compact-meta { display: block; font-size: .78rem; line-height: 1.4; color: var(--text-muted); }
 #murojaahTab .mur-compact-date { display: block; font-size: .76rem; line-height: 1.4; color: var(--text-muted); }
 #murojaahTab .mur-compact-state { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex: 0 1 auto; max-width: 40%; min-width: 0; }
 #murojaahTab .mur-compact-state .mur-peta-status { font-size: .72rem; padding: 4px 8px; text-align: center; line-height: 1.4; }
 #murojaahTab .mur-compact-state > svg { width: 11px; height: 11px; flex-shrink: 0; color: var(--text-muted); }
 #murojaahTab .mur-compact-toggle[aria-expanded="true"] .mur-compact-state > svg { transform: rotate(180deg); }
 #murojaahTab .mur-compact-detail { padding: 10px 11px 14px; margin: 0 0 10px; background: #f6f8f1; border: 1px solid var(--sage); border-radius: 10px; }
 #murojaahTab .mur-compact-detail-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-muted); font-size: .74rem; }
 #murojaahTab .mur-compact-detail-heading [lang="ar"] { font-family: 'Traditional Arabic', 'Amiri', serif; font-size: 1.15rem; }
 #murojaahTab .mur-compact-detail-grade { margin: 6px 0 10px; color: var(--text-muted); font-size: .76rem; line-height: 1.5; }
 #murojaahTab .mur-compact-detail .riwayat-detail-item { padding: 9px; gap: 10px; }
 #murojaahTab .mur-compact-detail .riwayat-detail-left { min-width: 0; }
 #murojaahTab .mur-compact-empty { list-style: none; margin: 0; padding: 16px 0; color: var(--text-muted); font-size: .8rem; line-height: 1.6; text-align: center; }
 #murojaahTab .peta-card { padding: 16px 14px 8px; }
 #murojaahTab .peta-card-header { margin-bottom: 12px; gap: 8px; }
 #murojaahTab .mur-mobile-count { display: inline-block; flex: 0 0 auto; padding: 3px 7px; margin-top: 2px; border-radius: 10px; background: #eef3e7; color: var(--primary); font-size: .68rem; line-height: 1.5; white-space: nowrap; }
 #murojaahTab .peta-card .legend { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 10px; margin: 9px 0 10px; }
 #murojaahTab .peta-card .legend-item { gap: 6px; font-size: .74rem; min-width: 0; line-height: 1.4; }
 #murojaahTab .peta-card .legend-dot { width: 8px; height: 8px; flex-shrink: 0; }
 #murojaahTab .peta-card .legend-item:nth-child(5) { display: none; }
 #murojaahTab #petaResultsStatus { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; margin: 0; padding: 0; }
 #murojaahTab .mur-peta-help { margin: 6px 0 0; padding-top: 7px; border-top: 1px solid var(--sage); }
 #murojaahTab .mur-peta-help summary { min-height: 32px; font-size: .72rem; }
 #murojaahTab .history-item-header { flex-direction: column; align-items: flex-start; gap: 5px; }
 #murojaahTab .history-item { padding: 14px; }
 body:has(#murojaahTab:not([hidden])) .fab-main { min-width: 96px; height: 46px; padding: 0 14px; }
 body:has(#murojaahTab:not([hidden])) .fab-main .input-fab-label { font-size: .82rem; }
}

/* Dashboard guru — semua perubahan dibatasi body guru agar tampilan siswa tetap. */
.teacher-dashboard-page [hidden] { display: none !important; }
.teacher-dashboard-page .teacher-dashboard-top { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; margin-bottom: 18px; }
.teacher-dashboard-page .greeting { min-width: 0; margin: 0; }
.teacher-dashboard-page .greeting h1 { font-size: 1.5rem; line-height: 1.45; }
.teacher-dashboard-page .greeting p { font-size: .85rem; line-height: 1.6; margin-top: 5px; }
.teacher-dashboard-page .teacher-text-button { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; padding: 8px 5px; color: var(--primary); background: transparent; border: 0; font: inherit; font-size: .78rem; cursor: pointer; text-decoration: underline; }
.teacher-dashboard-page .teacher-stats-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.teacher-dashboard-page .teacher-stat { margin: 0; padding: 15px; min-width: 0; min-height: 0; border: 1px solid var(--sage); border-radius: 16px; background: white; box-shadow: none; animation: none; text-align: left; color: var(--text); font-family: inherit; }
.teacher-dashboard-page .teacher-stat .stat-card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 10px; }
.teacher-dashboard-page .teacher-stat .stat-card-header > svg { width: 21px; height: 21px; color: var(--primary); flex-shrink: 0; }
.teacher-dashboard-page .teacher-stat .stat-card-label { font-size: .8rem; line-height: 1.4; }
.teacher-dashboard-page .teacher-stat .stat-card-value { display: block; margin: 0 0 4px; font-size: 1.8rem; line-height: 1.2; font-weight: 800; color: var(--primary); }
.teacher-dashboard-page .teacher-stat .stat-card-trend { display: block; font-size: .75rem; margin: 0; line-height: 1.5; color: var(--text-muted); }
.teacher-dashboard-page .teacher-pending-stat { cursor: pointer; }
.teacher-dashboard-page .teacher-total-records { margin: 11px 0 18px; color: var(--text-muted); font-size: .78rem; }
.teacher-dashboard-page .teacher-total-records strong { color: var(--primary); }
.teacher-dashboard-page .teacher-review-panel { background: white; border: 1px solid var(--sage); border-radius: 16px; padding: 17px; margin-bottom: 16px; }
.teacher-dashboard-page .teacher-review-panel h2 { color: var(--heading, var(--text)); font-size: 1.05rem; margin: 0 0 7px; }
.teacher-dashboard-page .teacher-review-message { margin: 7px 0 11px; font-size: .78rem; line-height: 1.6; color: var(--text-muted); }
.teacher-dashboard-page .teacher-review-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sage); text-decoration: none; color: var(--text); }
.teacher-dashboard-page .teacher-review-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.teacher-dashboard-page .teacher-review-copy strong { font-size: .86rem; line-height: 1.4; overflow-wrap: anywhere; }
.teacher-dashboard-page .teacher-review-copy > span { color: var(--text-muted); font-size: .76rem; }
.teacher-dashboard-page .teacher-review-row > svg { width: 17px; height: 17px; flex-shrink: 0; color: var(--primary); }
.teacher-dashboard-page .teacher-review-more { display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 12px 0 0; border: 0; border-top: 1px solid var(--sage); background: transparent; color: var(--primary); font: inherit; font-size: .78rem; font-weight: 600; text-align: left; cursor: pointer; }
.teacher-dashboard-page .teacher-review-more svg { width: 19px; height: 19px; flex-shrink: 0; }
.teacher-dashboard-page .quick-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.teacher-dashboard-page .quick-action-btn { min-width: 0; min-height: 58px; padding: 12px 11px; border-radius: 13px; gap: 9px; align-items: center; }
/* Fixed icon canvas: the SVG never uses the browser's intrinsic 300x150 size. */
.teacher-dashboard-page .quick-action-btn .quick-action-icon { width: 32px; height: 32px; flex: 0 0 32px; min-width: 32px; aspect-ratio: 1; border-radius: 10px; display: inline-grid; place-items: center; color: var(--primary); }
.teacher-dashboard-page .quick-action-icon > svg { display: block; width: 20px; height: 20px; flex: none; }
.teacher-dashboard-page .quick-action-text { overflow-wrap: anywhere; }
.teacher-dashboard-page .quick-action-text strong { margin-bottom: 0; }
.teacher-dashboard-page .quick-action-text strong { font-size: .83rem; line-height: 1.4; }
.teacher-dashboard-page .quick-action-text > span { display: none; }
.teacher-dashboard-page .teacher-list-tools { margin: 16px 0 12px; }
.teacher-dashboard-page .teacher-search-wrap { position: relative; }
.teacher-dashboard-page .teacher-search-wrap > svg { position: absolute; width: 18px; height: 18px; left: 13px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; }
.teacher-dashboard-page #teacherStudentSearch { box-sizing: border-box; width: 100%; min-height: 46px; padding: 11px 14px 11px 41px; border: 1px solid var(--sage); border-radius: 11px; background: white; color: var(--text); font: inherit; font-size: .85rem; }
.teacher-dashboard-page .teacher-filter-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-top: 10px; }
.teacher-dashboard-page .teacher-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.teacher-dashboard-page .teacher-filter { border: 1px solid var(--sage); border-radius: 10px; background: transparent; color: var(--text-muted); min-height: 44px; padding: 8px 12px; font: inherit; font-size: .78rem; font-weight: 600; cursor: pointer; }
.teacher-dashboard-page .teacher-filter.is-active { color: white; border-color: var(--primary); background: var(--primary); }
.teacher-dashboard-page #teacherStudentResults { margin: 9px 0 13px; color: var(--text-muted); font-size: .75rem; line-height: 1.5; }
.teacher-dashboard-page .teacher-load-error, .teacher-dashboard-page .teacher-no-results { padding: 14px; margin: 12px 0; border-radius: 11px; background: #f7f5e9; color: var(--text-muted); font-size: .8rem; line-height: 1.6; }
.teacher-dashboard-page .siswa-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.teacher-dashboard-page .teacher-student-card { position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0; padding: 15px; border: 1px solid var(--sage); border-radius: 15px; background: white; text-decoration: none; color: var(--text); box-shadow: none; }
.teacher-dashboard-page .teacher-avatar { width: 44px; height: 44px; flex: 0 0 44px; display: inline-grid; place-items: center; border-radius: 50%; background: #e6efdf; color: var(--primary); font-size: .8rem; font-weight: 700; }
.teacher-dashboard-page .teacher-student-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.teacher-dashboard-page .teacher-student-name { font-size: .9rem; line-height: 1.4; font-weight: 700; overflow-wrap: anywhere; }
.teacher-dashboard-page .teacher-student-username { color: var(--text-muted); font-size: .75rem; line-height: 1.4; overflow-wrap: anywhere; }
.teacher-dashboard-page .teacher-online-status { display: grid; grid-template-columns: 8px minmax(0,1fr); align-items: start; gap: 6px; min-width: 0; color: var(--text-muted); font-size: .75rem; line-height: 1.5; }
/* Override the legacy !important dimensions locally; keep every other page intact. */
.teacher-dashboard-page .teacher-online-status .hk-online-dot { display: block; position: static; top: auto; box-sizing: border-box; width: 8px !important; height: 8px !important; min-width: 8px; max-width: 8px; min-height: 8px; max-height: 8px; aspect-ratio: 1; margin: calc((1.5em - 8px) / 2) 0 0 !important; padding: 0; border: 0; border-radius: 50%; transform: none; animation: none; box-shadow: none; }
.teacher-dashboard-page .teacher-online-status > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.teacher-dashboard-page .teacher-online-status.is-online-text { color: var(--primary); }
.teacher-dashboard-page .teacher-student-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 5px; padding-top: 8px; border-top: 1px solid #edf0e6; color: var(--text-muted); font-size: .75rem; line-height: 1.5; }
.teacher-dashboard-page .teacher-pending-badge { display: inline-block; padding: 2px 7px; border-radius: 8px; background: #fff0cf; color: #865810; font-size: .75rem; font-weight: 600; }
.teacher-dashboard-page .teacher-status-unknown { font-size: .75rem; color: #8a6a2e; line-height: 1.5; }
.teacher-dashboard-page .teacher-student-arrow { width: 15px; height: 15px; flex: 0 0 15px; align-self: center; color: var(--primary); }
.teacher-dashboard-page button:disabled { opacity: .55; cursor: default; }
.teacher-dashboard-page :is(button,a,input):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.teacher-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 720px) {
 .teacher-dashboard-page .quick-action-btn .quick-action-icon { width: 28px; height: 28px; min-width: 28px; flex-basis: 28px; border-radius: 9px; }
 .teacher-dashboard-page .quick-action-icon > svg { width: 18px; height: 18px; }
 .teacher-dashboard-page .teacher-dashboard-top { gap: 9px; }
 .teacher-dashboard-page .greeting h1 { font-size: 1.28rem; }
 .teacher-dashboard-page .greeting p { font-size: .78rem; }
 .teacher-dashboard-page .teacher-stats-grid { gap: 10px; }
 .teacher-dashboard-page .teacher-stat { padding: 13px; }
 .teacher-dashboard-page .teacher-stat .stat-card-header > svg { width: 18px; height: 18px; }
 .teacher-dashboard-page .teacher-stat .stat-card-label { font-size: .76rem; }
 .teacher-dashboard-page .siswa-grid { grid-template-columns: minmax(0,1fr); }
 .teacher-dashboard-page #teacherStudentSearch { font-size: 16px; }
 .teacher-dashboard-page .section-header { gap: 10px; flex-wrap: wrap; align-items: flex-start; }
 .teacher-dashboard-page .section-header .btn-add { min-height: 44px; }
}
@media (min-width: 1100px) { .teacher-dashboard-page .siswa-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }

/* Detail guru: scoped to avoid changing the student and teacher dashboard. */
.teacher-detail-page [hidden] { display: none !important; }
.teacher-detail-page .detail-state { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 16px; margin:14px 0; border:1px solid #d7e1d2; border-radius:14px; background:#f0f4eb; color:var(--primary); font-size:.85rem; }
.teacher-detail-page .detail-state button,.teacher-detail-page #detailOpenPending { border:0; background:transparent; color:var(--primary); font:inherit; font-weight:700; cursor:pointer; min-height:44px; padding:8px; white-space:nowrap; }
.teacher-detail-page .pending-header { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.teacher-detail-page #detailOpenPending { margin-left:auto; }
.teacher-detail-page .detail-review-panel { background:#fff; border:1px solid #e1e7dc; border-radius:20px; padding:22px; margin-top:22px; scroll-margin-top:110px; }
.teacher-detail-page .detail-review-panel .riwayat-section-title { margin:0; }
.teacher-detail-page .detail-review-intro,.teacher-detail-page .detail-review-count,.teacher-detail-page .detail-review-footnote { color:var(--text-muted); font-size:.82rem; line-height:1.6; margin:8px 0 16px; }
.teacher-detail-page .detail-review-footnote { font-size:.75rem; margin-bottom:0; }
.teacher-detail-page .detail-review-tools { display:grid; grid-template-columns:minmax(0,1fr) minmax(150px,.45fr); gap:12px; }
.teacher-detail-page .detail-review-tools label { font-size:.75rem; font-weight:600; color:var(--text-muted); min-width:0; }
.teacher-detail-page .detail-review-tools input,.teacher-detail-page .detail-review-tools select { box-sizing:border-box; display:block; width:100%; min-height:44px; border:1px solid #d7dfd2; border-radius:10px; background:#fafbf8; padding:10px 12px; margin-top:5px; font:inherit; font-size:.875rem; color:var(--text); }
.teacher-detail-page .detail-review-filters { display:flex; gap:6px; flex-wrap:wrap; margin-top:14px; }
.teacher-detail-page .detail-review-filters button { border:1px solid #d7dfd2; background:#fff; color:var(--primary); border-radius:999px; min-height:44px; padding:8px 13px; font:inherit; font-size:.8rem; font-weight:600; cursor:pointer; }
.teacher-detail-page .detail-review-filters button.active { background:var(--primary); border-color:var(--primary); color:#fff; }
.teacher-detail-page .detail-review-item { box-shadow:none; border:1px solid #e0e6db; padding:16px; margin:0; }
.teacher-detail-page .detail-review-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.teacher-detail-page .detail-review-heading h4 { font-size:1rem; line-height:1.5; margin:0; overflow-wrap:anywhere; color:var(--primary); }
.teacher-detail-page .detail-review-heading h4 span { font-weight:500; font-size:.88rem; }
.teacher-detail-page .detail-review-heading p { font-size:.78rem; color:var(--text-muted); margin:4px 0 10px; }
.teacher-detail-page .detail-review-note { font-size:.82rem; line-height:1.6; margin:10px 0 0; overflow-wrap:anywhere; }
.teacher-detail-page .detail-review-item .history-actions { display:flex; gap:8px; padding-top:12px; margin-top:12px; border-top:1px solid #eef0e9; }
.teacher-detail-page .detail-review-item .history-actions button { min-height:44px; font-size:.82rem; flex:1; }
.teacher-detail-page .detail-more { position:relative; flex:0 0 auto; }
.teacher-detail-page .detail-more summary { display:flex; align-items:center; justify-content:center; width:44px; height:44px; border-radius:10px; cursor:pointer; color:var(--text-muted); list-style:none; }
.teacher-detail-page .detail-more summary::-webkit-details-marker { display:none; }
.teacher-detail-page .detail-more[open] summary { background:#f3f5ef; }
.teacher-detail-page .detail-more button { position:absolute; right:0; top:44px; z-index:3; white-space:nowrap; padding:12px 16px; min-height:44px; border:1px solid #eed6d0; border-radius:10px; background:#fff; color:#b2382d; box-shadow:0 8px 22px #143b2620; font:inherit; font-size:.8rem; cursor:pointer; }
.teacher-detail-page .detail-count-note { margin:12px 0 22px; font-size:.78rem; color:var(--text-muted); line-height:1.7; }
.teacher-detail-page .detail-count-note summary { cursor:pointer; padding:10px 0; }
.teacher-detail-page button:disabled { opacity:.55; cursor:wait; }
.teacher-detail-page :is(button,input,select,summary):focus-visible { outline:3px solid #72a98b; outline-offset:3px; }
.teacher-detail-page .detail-peta-mobile { display:none; }
@media(max-width:600px) {
 .teacher-detail-page .siswa-info-card { padding:16px; gap:12px; flex-wrap:wrap; }
 .teacher-detail-page .siswa-info-text { flex:1; min-width:0; }
 .teacher-detail-page .siswa-info-text h1 { font-size:1.1rem; overflow-wrap:anywhere; }
 .teacher-detail-page .siswa-actions { flex-basis:100%; display:flex; justify-content:flex-end; gap:8px; }
 .teacher-detail-page .detail-stats-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
 .teacher-detail-page .detail-stats-grid .stat-card { padding:16px; min-width:0; }
 .teacher-detail-page .detail-stats-grid .stat-card:last-child { grid-column:1/-1; }
 .teacher-detail-page .detail-review-panel { padding:16px; border-radius:16px; }
 .teacher-detail-page .detail-review-tools { grid-template-columns:minmax(0,1fr); gap:10px; }
 .teacher-detail-page .detail-review-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
 .teacher-detail-page .detail-review-item { padding:14px; }
 .teacher-detail-page .detail-review-heading h4 span { display:block; }
 .teacher-detail-page .detail-state { align-items:flex-start; }
 .teacher-detail-page .detail-peta-desktop { display:none; }
 .teacher-detail-page .detail-peta-mobile { display:block; }
 .teacher-detail-page .detail-peta-row { border-bottom:1px solid #e4e9df; }
 .teacher-detail-page .detail-peta-row:last-child { border-bottom:0; }
 .teacher-detail-page .detail-peta-row>button { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; border:0; background:transparent; padding:14px 0; text-align:left; font:inherit; color:var(--primary); cursor:pointer; }
 .teacher-detail-page .detail-peta-row>button>span:first-child { min-width:0; }
 .teacher-detail-page .detail-peta-row strong { display:block; font-size:.95rem; overflow-wrap:anywhere; }
 .teacher-detail-page .detail-peta-row small { display:block; color:var(--text-muted); font-size:.75rem; line-height:1.6; }
 .teacher-detail-page .detail-peta-row .badge { flex:0 0 auto; max-width:42%; white-space:normal; font-size: .75rem; }
 .teacher-detail-page .detail-peta-row ul { margin:0 0 12px; padding:12px 12px 12px 26px; background:#f5f7f1; border-radius:10px; font-size:.75rem; color:var(--text-muted); line-height:1.8; }
 .teacher-detail-page .detail-peta-row li strong { display:inline; font-size:inherit; }
}

/* Hafaluma identity: retain the existing page layouts and approved avatars. */
.brand-page { --text-muted:#5d7064; --heading:var(--primary); --primary:#075c42; --primary-dark:#064632; --primary-light:#28765a; }
.brand-page .hf-brand { display:inline-flex; align-items:center; gap:10px; text-decoration:none; color:inherit; flex-shrink:0; }
.brand-page .hf-brand__symbol { width:42px; height:42px; flex-shrink:0; perspective:650px; display:block; }
.brand-page .hf-brand__emblem { display:block; width:100%; height:100%; object-fit:contain; transform:rotateX(var(--hf-rx,0deg)) rotateY(var(--hf-ry,0deg)) translateY(var(--hf-y,0px)) scale(var(--hf-scale,1)); transition:transform 280ms cubic-bezier(.22,1,.36,1); }
.brand-page .hf-brand__word { display:block; width:144px; height:auto; }
.brand-page .hf-brand:focus-visible { outline:3px solid #3a9675; outline-offset:5px; border-radius:5px; }
.brand-page .login-brand { animation:none; }
.brand-page .login-brand h1 { background:none; -webkit-text-fill-color:currentColor; margin:0; line-height:1; }
.brand-page .brand-identity { display:flex; flex-direction:column; align-items:flex-start; gap:4px; position:relative; z-index:1; }
.brand-page .login-wordmark { width:180px; max-width:100%; height:auto; display:block; }
.brand-page .login-brand .hf-brand__symbol { width:84px; height:84px; margin-bottom:20px; position:relative; z-index:1; }
.brand-page .login-brand .hf-brand__emblem { border-radius:20px; filter:drop-shadow(0 8px 16px #0002); }
.brand-page .brand-tagline { font-size:.875rem; font-weight:400; line-height:1.4; color:#faf7ee; opacity:.9; margin:0; position:relative; z-index:1; }
.brand-page .brand-desc { max-width:320px; font-size:.95rem; line-height:1.6; margin:22px 0 32px; }
.brand-page .report-brand-mark { width:64px; height:64px; border-radius:0; box-shadow:none; object-fit:contain; }
.brand-page .report-brand-name { display:block; font-size:13px; letter-spacing:.03em; color:#075c42; margin-bottom:4px; }
@media(max-width:720px) {
 .brand-page .topbar .hf-brand__word { display:none; }
 .brand-page .topbar .hf-brand__symbol { width:36px; height:36px; }
 .brand-page .login-wordmark { width:160px; }
 .brand-page .login-brand .hf-brand__symbol { width:64px; height:64px; margin-bottom:20px; }
 .brand-page .brand-tagline { font-size:.875rem; }
 .brand-page .brand-desc { margin:20px 0 24px; font-size:.9rem; }
}
@media(prefers-reduced-motion:reduce) {
 .brand-page .hf-brand__emblem { transform:none!important; transition:none!important; animation:none!important; filter:none!important; }
}
@media print { .brand-page .hf-brand__emblem { transform:none!important; filter:none!important; } }

/* Greeting hand: native color emoji, as requested from the portfolio reference. */
.brand-page .student-heading .greet-name-group { display:inline-flex; align-items:center; max-width:100%; vertical-align:baseline; font:inherit; color:inherit; }
.brand-page .student-heading #greetName { min-width:0; overflow-wrap:anywhere; color:inherit; }
.brand-page .greet-wave { display:inline-block; width:1.12em; height:1.12em; flex-shrink:0; margin-left:.16em; vertical-align:-.14em; color:inherit; }
.brand-page .greet-wave__hand { display:block; width:100%; height:100%; font-family:"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif; font-size:1em; font-weight:400; font-style:normal; line-height:1.12; transform-origin:70% 75%; animation:hf-greeting-wave 1.4s ease-in-out 2; }
@keyframes hf-greeting-wave {
  0%,100% { transform:rotate(0deg); }
  15% { transform:rotate(14deg); }
  30% { transform:rotate(-8deg); }
  45% { transform:rotate(12deg); }
  60% { transform:rotate(-5deg); }
  75% { transform:rotate(0deg); }
}
@media(prefers-reduced-motion:reduce) {
 .brand-page .greet-wave__hand { animation:none; transform:none; }
}

/* Hafaluma learning: shared baseline and precise-range selection. */
body[data-hf-onboarding] > :not(#hf-startup-state):not(.hf-learning-shell):not(script):not(style){display:none!important}
#hf-startup-state{min-height:75vh;display:grid;align-content:center;gap:16px;max-width:560px;margin:auto;padding:24px;color:var(--primary)}
body:not([data-hf-onboarding]) #hf-startup-state{display:none}
.hf-learning-shell{position:fixed;inset:0;z-index:12000;background:rgba(12,40,30,.42);display:grid;place-items:center;padding:24px;color:var(--text);overscroll-behavior:contain}
.hf-learning-panel{display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(100dvh - 48px);background:var(--bg,#faf7ee);border-radius:24px;overflow:hidden;box-shadow:0 20px 70px #102d3433}
.hf-learning-head{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 24px;border-bottom:1px solid var(--sage,#d8e3cf)}
.hf-learning-brand{font-size:12px;color:var(--primary);margin:0 0 4px}.hf-learning-head h2{font-size:22px;color:var(--primary);margin:0}
.hf-learning-form{min-height:0;display:flex;flex-direction:column;overflow:hidden;margin:0}
.hf-learning-body{overflow:auto;padding:20px 24px;min-height:0;overscroll-behavior:contain}.hf-learning-body h3{font-size:16px;color:var(--primary);margin:20px 0 12px}
.hf-learning-help{font-size:13px;line-height:1.65;color:var(--text-muted);margin:12px 0}.hf-learning-notice{background:#fff0cb;border-radius:12px;padding:12px;font-size:13px;color:#614a14}
.hf-learning-state,.hf-step-caption{color:var(--primary);font-weight:700;margin:0 0 16px}
.hf-learning-actions{background:var(--bg,#faf7ee);border-top:1px solid var(--sage,#d8e3cf);display:flex;gap:10px;flex-wrap:wrap;padding:16px 24px max(16px,env(safe-area-inset-bottom));flex-shrink:0}
.hf-learning-shell button{font-family:inherit;cursor:pointer;line-height:1.4}.hf-learning-shell button:disabled{cursor:wait;opacity:.6}
.hf-primary,.hf-secondary{min-height:44px;padding:11px 16px;border-radius:12px;font-weight:700;border:1px solid var(--primary);font-size:14px;background:var(--primary);color:#fff}
.hf-secondary{background:transparent;color:var(--primary);border-color:var(--sage,#d8e3cf)}
.hf-learning-shell :focus-visible{outline:3px solid #cba34e;outline-offset:3px}
.hf-icon-button{width:44px;height:44px;aspect-ratio:1;flex:0 0 44px;border:0;background:#e7efe2;color:var(--primary);border-radius:50%;display:grid;place-items:center;padding:0}
.hf-icon-button svg{display:block;width:20px;height:20px}.hf-juz-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.hf-juz-grid button{min-height:54px;background:#fff;border:1px solid var(--sage,#d8e3cf);border-radius:12px;font-size:14px;color:var(--primary);font-weight:700}
.hf-start-choices{display:grid;gap:12px;margin:24px 0}.hf-surah-list{display:grid;gap:10px}
.hf-surah-list>button{display:flex;flex-direction:column;align-items:flex-start;gap:6px;background:#fff;border:1px solid var(--sage,#d8e3cf);border-radius:12px;min-height:64px;padding:14px;color:var(--primary);text-align:left}
.hf-surah-list small,.hf-range-list small,.hf-review-item>small{font-size:12px;display:block;color:var(--text-muted)}
.hf-surah-list [aria-pressed=true],.hf-grade-grid [aria-pressed=true]{background:#e2eddc;border-color:var(--primary)}
.hf-range-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:24px 0}.hf-range-fields label{display:grid;gap:8px;font-size:14px}.hf-range-fields input{min-width:0;width:100%;height:48px;padding:10px;border:1px solid var(--sage,#d8e3cf);border-radius:10px;font:inherit}
.hf-range-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}.hf-range-list li{background:#fff;border:1px solid var(--sage,#d8e3cf);border-radius:12px;padding:14px;display:flex;justify-content:space-between;align-items:center;gap:12px}.hf-range-list strong{display:block;color:var(--primary);margin-bottom:5px}.hf-range-list button{background:transparent;border:0;color:#a63e33;min-height:40px;padding:8px}
.hf-confirm{display:flex;align-items:flex-start;gap:10px;font-size:14px;line-height:1.6;margin-top:20px}.hf-confirm input{width:20px;height:20px;flex:0 0 20px;accent-color:var(--primary)}
.hf-learning-error{color:#a63e33;margin:0;padding:0 24px;font-size:13px;line-height:1.6;max-height:100px;overflow:auto;flex-shrink:0}.hf-learning-error:not(:empty){padding-bottom:12px}
.hf-review-item{background:#fff;border:1px solid var(--sage,#d8e3cf);padding:14px;border-radius:12px;margin-bottom:14px}.hf-review-item>strong{color:var(--primary);font-size:15px}
.hf-grade-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:12px}.hf-grade-grid button{border:1px solid var(--sage,#d8e3cf);border-radius:9px;background:#faf7ee;min-height:44px;font-size:12px;color:var(--primary);padding:8px}

/* Entry discard confirmation: compact on phone and desktop, above the existing form. */
.hf-discard-overlay{position:fixed;inset:0;z-index:1;display:grid;place-items:center;padding:max(20px,env(safe-area-inset-top)) max(20px,env(safe-area-inset-right)) max(20px,env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));background:rgba(12,40,30,.48);overscroll-behavior:contain}
.hf-discard-card{width:min(360px,100%);max-height:calc(100dvh - 40px);overflow:auto;padding:24px;border:1px solid var(--sage,#d8e3cf);border-radius:20px;background:var(--bg,#faf7ee);color:var(--text);box-shadow:0 20px 60px #102d3440;overflow-wrap:anywhere}
.hf-discard-card h3{margin:0 0 10px;font-size:20px;line-height:1.35;color:var(--primary)}
.hf-discard-card p{margin:0;font-size:14px;line-height:1.65;color:var(--text-muted)}
.hf-discard-actions{display:grid;gap:10px;margin-top:22px}
.hf-discard-actions button{width:100%;min-height:48px;white-space:normal}
.hf-discard-actions .hf-discard-button{color:#a63e33;border-color:#d9b9b3;background:transparent}

.hf-student-settings{position:relative}.hf-student-settings>summary{list-style:none;cursor:pointer;min-height:44px;padding:10px 14px;border:1px solid var(--sage,#d8e3cf);border-radius:12px;color:var(--primary);font-size:14px;font-weight:700}.hf-student-settings>summary::-webkit-details-marker{display:none}
.hf-settings-menu{position:absolute;right:0;top:calc(100% + 8px);width:210px;max-width:80vw;padding:8px;border:1px solid var(--sage,#d8e3cf);border-radius:14px;background:#fff;box-shadow:0 10px 30px #183d3022;z-index:70;display:grid;gap:4px}
.hf-settings-menu .btn-manage-btn{width:100%;height:auto;min-height:44px;display:flex;align-items:center;justify-content:flex-start;gap:10px;padding:10px;background:#fff;border:0;border-radius:9px;font-size:13px;color:var(--primary)}.hf-settings-menu svg{width:20px;height:20px;flex:0 0 20px}
@media(max-width:600px){.hf-learning-shell{padding:0;background:#faf7ee}.hf-learning-panel{width:100%;height:100dvh;max-height:100dvh;border-radius:0;box-shadow:none}.hf-learning-head{padding:16px}.hf-learning-head h2{font-size:20px}.hf-learning-body{padding:18px 16px}.hf-learning-actions{padding:12px 16px max(12px,env(safe-area-inset-bottom))}.hf-learning-actions button{flex:1 1 140px}.hf-juz-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}}
@media(prefers-reduced-motion:reduce){.hf-learning-shell *{scroll-behavior:auto!important}}

.teacher-detail-page .siswa-info-card{overflow:visible;flex-wrap:wrap}
.teacher-detail-page .siswa-info-text{min-width:0;flex:1}
.teacher-detail-page .siswa-info-text h1{overflow-wrap:anywhere}
.teacher-detail-page .siswa-actions{position:static;flex-shrink:0;align-self:flex-start}

/* Hafaluma 2C — compact learning categories; inherited brand, no new icon font. */
.hf-plan{margin:0 0 22px;color:var(--primary,#075c42)}
.hf-plan-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.hf-plan-heading h3{margin:0;font-size:18px}.hf-plan-heading button{background:transparent;color:inherit;border:0;min-height:44px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.hf-plan-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.hf-plan-card{background:#fff;border:1px solid #d7e2d1;border-radius:18px;padding:18px;display:flex;flex-direction:column;min-width:0}
.hf-plan-card.hf-plan-sabqi{background:#edf3e7}.hf-plan-card .hf-plan-kicker{font-size:12px;font-weight:800;letter-spacing:.04em;margin:0 0 4px;color:#075c42}
.hf-plan-card h3{font-size:16px;line-height:1.4;margin:0 0 10px;color:#075c42}.hf-plan-card ul{list-style:none;padding:0;margin:0 0 12px;display:grid;gap:8px}
.hf-plan-card li{display:flex;justify-content:space-between;gap:10px;align-items:baseline;font-size:13px;line-height:1.6}.hf-plan-card li strong{overflow-wrap:anywhere}.hf-plan-card li span{color:var(--text-muted);font-size:12px;flex-shrink:0}
.hf-plan-card>button{margin-top:auto;min-height:44px;border:0;border-radius:10px;background:#075c42;color:#faf7ee;font:inherit;font-size:13px;font-weight:700;cursor:pointer;padding:10px 14px}
.hf-plan-card>button:disabled{background:#e1e7dc;color:var(--text-muted);cursor:default}
.hf-plan-coverage{margin:0 0 14px}.hf-plan-coverage>div:first-child{display:flex;flex-wrap:wrap;justify-content:flex-start;gap:4px 10px;font-size:12px;line-height:1.5;color:var(--text-muted)}.hf-plan-coverage strong{color:#075c42}
.hf-plan-track{height:6px;margin-top:7px;border-radius:6px;background:#d7e2d1;overflow:hidden}.hf-plan-track span{display:block;height:100%;background:#075c42;border-radius:inherit}
.hf-plan-help{font-size:12px;line-height:1.7;color:var(--text-muted);margin-top:10px}.hf-plan-help summary{cursor:pointer;min-height:32px}.hf-plan-help p{margin:4px 0}
.hf-plan-notice{padding:16px;border:1px solid #d7e2d1;border-radius:14px;background:#edf3e7;font-size:14px;line-height:1.7;display:grid;gap:10px}.hf-plan-notice h3,.hf-plan-notice p{margin:0}.hf-plan-notice small{color:var(--text-muted)}.hf-plan-notice button{justify-self:start}
.hf-focus-preview{font-size:14px;padding:12px;background:#edf3e7;border-radius:10px;line-height:1.7}
.hf-category-label{font-size:12px;color:#075c42;background:#edf3e7;border-radius:6px;padding:4px 8px;display:inline-flex;align-items:center;line-height:1.4}
.hf-plan button:focus-visible{outline:3px solid #c9ab58;outline-offset:3px}
@media(max-width:600px){.hf-plan-grid{grid-template-columns:1fr;gap:10px}.hf-plan-card{padding:15px;border-radius:15px}.hf-plan-card h3{font-size:15px}.hf-plan-heading h3{font-size:17px}}

/* Hafaluma 2E — shared daily recommendation and teacher calendar. */
.hf-plan-tools{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.hf-plan-tools button{font-size:12px;min-height:44px}
.hf-recommend-heading{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:2px 0 12px;font-size:13px}.hf-recommend-heading span{font-size:12px;background:#edf3e7;padding:4px 7px;border-radius:6px;white-space:nowrap;color:#075c42}
.hf-plan-card>button.hf-plan-manual{background:transparent;color:#075c42;font-size:12px;text-decoration:underline;margin-top:8px;min-height:44px}.hf-plan-card>button.hf-plan-manual:disabled{color:#6F8176;text-decoration:none}
.hf-plan-warning{font-size:12px;line-height:1.6;background:#fbf0d4;color:#73531a;padding:10px 12px;border-radius:9px;margin:0 0 12px}
.hf-weekday-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 20px}.hf-weekday-grid button{min-height:44px;border:1px solid #c9d6be;border-radius:9px;background:#fff;color:#075c42;font:inherit;font-size:13px;cursor:pointer}.hf-weekday-grid button[aria-pressed="true"]{background:#075c42;color:#faf7ee;border-color:#075c42}
.hf-schedule-cap{display:grid;gap:7px;font-size:14px;color:#075c42}.hf-schedule-cap small{font-size:12px;color:var(--text-muted)}.hf-schedule-cap input{width:100%;min-width:0;min-height:48px;border:1px solid #c9d6be;border-radius:10px;padding:10px 12px;font:inherit;background:#fff;color:#075c42}
.hf-focus-preview p{margin:4px 0}.hf-weekday-grid button:focus-visible{outline:3px solid #c9ab58;outline-offset:2px}
@media(max-width:600px){.hf-plan-heading{align-items:center}.hf-plan-tools{gap:6px}.hf-plan-tools button{padding:6px}.hf-recommend-heading{font-size:12px}.hf-weekday-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}

/* Hafaluma 2G — approved category bands and accessible choice dialog. */
.hf-grade{display:inline-flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px 7px;padding:5px 8px;border:1px solid transparent;border-radius:7px;font-size:12px;font-weight:700;line-height:1.45;max-width:100%;vertical-align:middle;white-space:normal;text-align:center}
.hf-grade>small{font:inherit;font-size:1em;font-weight:500;white-space:nowrap;opacity:.95}
.hf-grade-rasib{color:#8d3434;background:#fbecec;border-color:#ebcccc}
.hf-grade-maqbul{color:#795014;background:#fbf1db;border-color:#ead8b3}
.hf-grade-jayyid{color:#075C42;background:#edf2e3;border-color:#d4dfc4}
.hf-grade-jayyid-jiddan{color:#075C42;background:#e7f3ed;border-color:#c6dfd1}
.hf-grade-mumtaz{color:#075c42;background:#e0eee7;border-color:#b4d2c1}
.hf-grade-mumtaz-murtafi{color:#594212;background:#f5eac7;border-color:#d7bd72}
.hf-grade-unknown{color:#5D7064;background:#f0f2ed;border-color:#dce1d7}
.hf-grade-select{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:46px;width:100%;padding:11px 13px;border:1px solid #c9d6be;border-radius:10px;background:#fff;color:#075c42;font:inherit;font-size:13px;text-align:left;cursor:pointer}
.hf-grade-select svg{width:18px;height:18px;flex-shrink:0}.hf-grade-select:disabled{opacity:.6;cursor:default}
.hf-grade-select[aria-invalid=true]{border-color:#b34242}
.hf-grade-dialog{position:fixed;inset:0;margin:auto;padding:20px;width:min(430px,calc(100vw - 28px));max-height:calc(100vh - 40px);max-height:calc(100dvh - 40px);overflow:auto;overscroll-behavior:contain;border:1px solid #d4dfcb;border-radius:20px;background:#faf7ee;color:#075c42;box-shadow:0 24px 70px #123a2c33;font-family:'Inter',system-ui,sans-serif;box-sizing:border-box}
.hf-grade-dialog::backdrop{background:#102e2459}.hf-grade-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:10px}.hf-grade-dialog-head h3{font:700 17px/1.4 'Inter',system-ui,sans-serif;margin:0}
.hf-grade-close{width:40px;height:40px;min-width:40px;aspect-ratio:1;flex-shrink:0;border:1px solid #d4dfcb;border-radius:50%;padding:0;display:grid;place-items:center;color:#075c42;background:transparent;cursor:pointer}.hf-grade-close svg{width:19px;height:19px}
.hf-grade-note{font-size:12px;line-height:1.6;color:var(--text-muted);margin:10px 0 16px}.hf-grade-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.hf-grade-choices>button{min-height:62px;padding:10px 8px;border:1px solid #d4dfcb;border-radius:10px;background:#fff;color:#075c42;font:600 12px/1.5 'Inter',system-ui,sans-serif;cursor:pointer}.hf-grade-choices>button[aria-pressed=true]{border:2px solid #075c42;padding:9px 7px;background:#edf3e7}
.hf-grade-choices .hf-grade{display:flex;flex-direction:column;background:transparent;border:0;padding:0;font-size:12px}.hf-grade-choices .hf-grade>small{font-size:12px}
.hf-grade-select:focus-visible,.hf-grade-close:focus-visible,.hf-grade-choices>button:focus-visible{outline:3px solid #c9ab58;outline-offset:3px}
.hf-grade-legend{margin:10px 0 14px;border-bottom:1px solid #e0e6da;padding-bottom:10px;color:var(--text-muted);font-size:12px}.hf-grade-legend summary{cursor:pointer;min-height:44px;line-height:1.5;padding:11px 0;color:#075c42;font-weight:600}.hf-grade-legend [data-grade-legend]{display:flex;flex-wrap:wrap;gap:6px;margin:5px 0 10px}.hf-grade-legend p{font-size:12px;line-height:1.6;margin:0}
@media(max-width:380px){.hf-grade{font-size:12px;padding:4px 6px;gap:2px 5px}.hf-grade-dialog{padding:16px}.hf-grade-dialog-head h3{font-size:16px}}
@media print{.hf-grade-dialog,.hf-grade-select{display:none!important}}

/* Compact 2G presentation; calendar, ownership and recommendation logic unchanged. */
.hf-plan{margin-bottom:18px}.hf-plan-heading{margin-bottom:10px;gap:8px}.hf-plan-heading h3{font-size:16px;line-height:1.4}.hf-plan-tools{gap:4px}.hf-plan-tools button{padding:8px;font-size:12px}
.hf-plan-grid{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr);gap:12px;align-items:start}
.hf-plan-card{padding:16px;border-radius:14px;gap:0;box-shadow:none}.hf-plan-card h3{font-size:16px;margin:0;line-height:1.4}.hf-plan-card .hf-plan-kicker{font-size:12px;letter-spacing:0;font-weight:500;color:var(--text-muted);margin:3px 0 0}
.hf-plan-card-head{display:flex;align-items:start;justify-content:space-between;gap:8px;margin-bottom:12px}.hf-plan-volume{background:#edf3e7;border-radius:6px;color:#075c42;padding:4px 7px;font-size:12px;line-height:1.5;white-space:nowrap;flex-shrink:0}
.hf-plan-card ul{display:block;margin:0 0 12px}.hf-plan-card li{display:flex;align-items:start;gap:8px;padding:8px 0;border-bottom:1px solid #edf0e7;line-height:1.5;font-size:13px}.hf-plan-card li:last-child{border-bottom:0}.hf-plan-card li strong{font-weight:600;min-width:0}.hf-plan-card li span{font-size:12px;color:var(--text-muted);max-width:47%;text-align:right;flex-shrink:0}
.hf-plan-more{font-size:12px;color:#075c42;margin:-4px 0 12px}.hf-plan-more summary{min-height:44px;line-height:1.5;cursor:pointer;padding:8px 0}.hf-plan-more ul{margin-bottom:0}
.hf-plan-coverage{padding-top:10px;margin:0 0 12px;border-top:1px solid #e4e9df}.hf-plan-coverage>div:first-child{font-size:13px;gap:4px 10px}.hf-plan-coverage small{display:block;font-size:12px;color:var(--text-muted);margin-top:5px}.hf-plan-track{height:5px;margin-top:6px}.hf-plan-track span{transition:width .35s ease}
.hf-plan-card>button{min-height:44px;border-radius:9px;font-size:13px;padding:10px 12px;flex-shrink:0}.hf-plan-card>button.hf-plan-manual{min-height:44px;margin-top:4px;padding:8px;text-decoration:none;background:transparent;font-size:12px}
.hf-plan-card.hf-plan-sabqi{background:#f0f4ea}.hf-plan-sabqi .hf-learning-help{font-size:12px}.hf-plan-sabqi>button{border:1px solid #bdceaf;background:transparent;color:#075c42}
.hf-plan-advice{margin:0 0 12px;padding:9px 11px;border-radius:8px;border:1px solid #eadbb9;background:#fbf3df;font-size:12px;line-height:1.6;color:#73531a}.hf-plan-advice summary{cursor:pointer;font-weight:700;min-height:44px;line-height:1.5;display:flex;align-items:center}.hf-plan-advice p{margin:5px 0}.hf-plan-help{font-size:12px;margin:8px 0 0;line-height:1.65}.hf-plan-help summary{min-height:44px;display:flex;align-items:center;cursor:pointer}.hf-plan-notice{padding:13px;font-size:13px;line-height:1.6;border-radius:12px;gap:8px}
#petaChips .chip{border-radius:8px;min-height:40px;flex-shrink:0}
.hf-dialog-close{width:40px;height:40px;min-width:40px;aspect-ratio:1;flex-shrink:0;padding:0;display:grid;place-items:center}
@media(max-width:600px){.hf-plan-grid{grid-template-columns:minmax(0,1fr);gap:10px}.hf-plan-card{padding:14px;border-radius:13px}.hf-plan-heading h3{font-size:16px}.hf-plan-card h3{font-size:15px}.hf-plan-card li{font-size:12px}.hf-plan-card li span{font-size:12px}.hf-plan-coverage>div:first-child{font-size:12px}.hf-plan-card-head{margin-bottom:8px}.hf-plan-tools button{padding:7px;min-height:44px}.hf-plan-sabqi{margin-top:0}}
@media(prefers-reduced-motion:reduce){.hf-plan-track span{transition:none}}

.hf-grade-grid button>.hf-grade{background:transparent;border:0;padding:0;display:flex;flex-direction:column;gap:2px}.hf-grade-grid button{min-height:56px;padding:8px}.hf-peta-grade{display:flex;flex-direction:column;align-items:end;gap:4px;max-width:45%;min-width:0;flex-shrink:0}.mur-compact-status{max-width:45%;min-width:0}.mur-compact-name{min-width:0}.mur-peta-grade{display:block;font-size:12px;color:var(--text-muted);margin-top:4px}

#murojaahTab .mur-compact-state>.hf-peta-grade{max-width:none;flex-shrink:1;align-items:center}#murojaahTab .mur-compact-state{max-width:43%} [hidden].hk-status-select,[hidden].status-editor{display:none!important}

/* Hafaluma 2X — compact progress; shared student/teacher presentation. */
#hafalanTab .progress-card.hf-memorization{margin-bottom:16px}
.progress-card.hf-memorization{padding:20px;border-color:#bdd2bc;border-radius:16px;background:linear-gradient(145deg,#f0f5e9,#fff 65%);box-shadow:0 5px 18px #174a2e08;animation:none}
.hf-memorization .progress-card-header{margin-bottom:10px;gap:8px}.hf-memorization .progress-card-header h3{font-size:17px;color:#075c42;margin-bottom:5px}.hf-memorization .progress-card-header p{font-size:12px;line-height:1.6;color:var(--text-muted)}
.hf-progress-content{display:block}.hf-progress-overview{display:flex;align-items:baseline;justify-content:flex-start;flex-wrap:wrap;gap:4px 12px;margin-bottom:10px}.hf-progress-overview>strong{font-size:36px;letter-spacing:-.03em;line-height:1.15;color:#075c42;white-space:nowrap}.hf-progress-overview>strong>span{font-size:19px;font-weight:600;margin-left:2px}.hf-progress-overview>p{font-size:13px;line-height:1.5;color:var(--text-muted);text-align:left;max-width:100%;margin:0}
.hf-progress-track{height:5px;background:#dfe8d7;border-radius:8px;overflow:hidden}.hf-progress-track>span{display:block;height:100%;background:#075c42;border-radius:inherit}.hf-progress-overall{height:9px}
.hf-progress-counts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;max-width:520px;gap:12px;padding:12px 0;margin:0;border-bottom:1px solid #dce6d5;font-size:12px;line-height:1.45;color:var(--text-muted)}.hf-progress-counts>span{display:flex;flex-direction:column;align-items:flex-start;min-width:0;gap:3px}.hf-progress-counts strong{font-size:20px;line-height:1.2;font-weight:750;color:#075c42;font-variant-numeric:tabular-nums}.hf-progress-pending{margin:0 0 12px;padding:10px 12px;border-radius:9px;background:#f6edd5;color:#6c501d;font-size:13px;line-height:1.6}

.hf-progress-active>h4{margin:12px 0 2px;font-size:13px;color:#075c42;font-weight:700}.hf-juz-row{padding:10px 0;border-bottom:1px solid #e6ece1}.hf-juz-row:last-child{border-bottom:0}.hf-juz-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:6px;font-size:14px;line-height:1.4;color:#075c42}.hf-juz-heading>strong{font-weight:700}.hf-juz-heading>span{font-weight:600}.hf-juz-row>p{font-size:12px;color:var(--text-muted);margin:5px 0 0;line-height:1.6}.hf-juz-row>p>span{white-space:normal}
.hf-progress-message,.hf-progress-state{font-size:13px;line-height:1.6;color:var(--text-muted);margin:14px 0}.hf-progress-more,.hf-progress-method{font-size:12px;color:#075c42}.hf-progress-more>summary,.hf-progress-method>summary{cursor:pointer;min-height:44px;line-height:1.5;padding:13px 0;font-weight:600}.hf-progress-method{border-top:1px solid #dce6d5;margin-top:7px}.hf-progress-method>summary{color:var(--text-muted);font-weight:500;font-size:12px}.hf-progress-method p{margin:0 0 8px;font-size:12px;line-height:1.7;color:var(--text-muted)}
.hf-progress-retry{min-height:44px;padding:10px 16px;border:1px solid #bdceaf;border-radius:9px;background:#fff;color:#075c42;font:inherit;font-weight:600;font-size:13px;line-height:1.5;cursor:pointer}
.hafalan-latest-open{width:100%;box-sizing:border-box;display:flex;align-items:start;gap:12px;padding:0;border:0;background:transparent;color:inherit;text-align:left;font:inherit;cursor:pointer;border-radius:8px}.hafalan-latest-open:disabled{opacity:1;cursor:default}.hafalan-latest-open:not(:disabled):hover #hafalanLatestTitle{text-decoration:underline;text-underline-offset:3px}.hafalan-latest-open>.hafalan-latest-icon{flex-shrink:0}.hafalan-latest-copy{display:block;min-width:0;flex:1}.hafalan-latest-label,#hafalanLatestTitle,#hafalanLatestMeta{display:block}#hafalanLatestTitle{font-size:17px;line-height:1.5;color:#075c42;font-weight:700;margin:3px 0}#hafalanLatestMeta{font-size:12px;line-height:1.6;color:var(--text-muted)}.hafalan-latest-open .hafalan-approved{flex-shrink:0;font-size:12px}
.hafalan-latest-open:focus-visible,.hf-progress-retry:focus-visible,.hf-memorization summary:focus-visible{outline:3px solid #c9ab58;outline-offset:4px}
@media(max-width:600px){.progress-card.hf-memorization{padding:16px;border-radius:14px}.hf-memorization .progress-card-header h3{font-size:16px}.hf-progress-overview>strong{font-size:32px}.hf-progress-overview>p{font-size:13px}.hf-progress-counts{gap:8px}#hafalanTab .hafalan-latest-open{gap:9px;flex-wrap:nowrap}#hafalanTab .hafalan-latest-open .hafalan-approved{display:none}#hafalanLatestTitle{font-size:16px}#hafalanLatestMeta{font-size:12px}.hf-memorization .juz-progress-list{display:block}}
@media(prefers-reduced-motion:reduce){.hf-memorization *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* Hafaluma 2X — full-page profile within siswa.html; no extra public page. */
.student-profile-open>.tabbar{display:none!important}
body.dashboard-page.student-profile-open{padding-bottom:env(safe-area-inset-bottom)!important}
.student-profile-open>main.container{padding-bottom:calc(20px + env(safe-area-inset-bottom))}
.student-profile-view{width:100%;max-width:760px;box-sizing:border-box}
.student-profile-view .profile-overview-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:14px;align-items:start}
.profile-overview-layout>h2,.profile-overview-layout>.profile-identity,.profile-overview-layout>.profile-status,.profile-overview-layout>.profile-text-button,.profile-overview-layout>.profile-contact-card{grid-column:1/-1}
.student-profile-view .profile-overview-layout>h2{margin:0 0 2px}
.student-profile-view .profile-overview-layout>.student-profile-card{margin:0}
.student-profile-view .profile-overview-layout>.profile-identity{padding:4px 0 10px;background:transparent;border:0;border-radius:0}
.student-profile-view .profile-overview-layout>.profile-status{margin:0}
.student-profile-view .profile-overview-layout>.profile-status:empty{display:none}
.student-profile-view .profile-contact-card{background:#eef3e8}
.student-profile-view .profile-contact-card .profile-muted{margin:4px 0 10px}
.student-profile-view .profile-contact-card #studentProfileContactNote{margin:8px 0 0}
@media(max-width:600px){.student-profile-view .profile-overview-layout{grid-template-columns:minmax(0,1fr);gap:12px}.student-profile-view h2{font-size:22px}.student-profile-view .profile-identity .hf-profile-name{font-size:17px}.student-profile-view .profile-overview-layout .profile-account-info>div{font-size:14px}.student-profile-view .profile-muted{font-size:13px}.student-profile-view .profile-setting-row{font-size:14px}}

.student-profile-view .student-profile-card{padding:17px;border-radius:15px;margin-bottom:13px}
.student-profile-view .profile-identity{gap:14px;align-items:center}.student-profile-view .hf-profile-avatar{display:grid;place-items:center;width:80px!important;height:80px!important;min-width:80px!important;max-width:80px!important;min-height:80px!important;max-height:80px!important;aspect-ratio:1;flex:0 0 80px!important;align-self:center;box-sizing:border-box;border-radius:50%!important;overflow:hidden;padding:0;line-height:0}
.student-profile-view .hf-profile-avatar>svg{display:block;max-width:100%;max-height:100%}.student-profile-view .profile-identity>div{min-width:0;flex:1}
.student-profile-view .profile-account-info>div{padding:10px 0;font-size:13px;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:12px}.student-profile-view .profile-account-info dd{font-weight:500;overflow-wrap:anywhere}
.profile-contact-button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 13px;border:1px solid #bdceaf;border-radius:9px;background:#edf3e7;color:#075c42;font-size:13px;font-weight:700;text-decoration:none;line-height:1.5}.profile-contact-button svg{width:19px;height:19px;flex-shrink:0}.profile-contact-button:focus-visible{outline:3px solid #c9ab58;outline-offset:3px}#studentProfileContactNote{margin-top:9px;font-size:12px}
.student-profile-view .profile-badge-previews{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:13px 0}.student-profile-view .profile-badge-preview{max-width:none;width:auto;min-width:0;font-size:12px;gap:6px}.student-profile-view .profile-badge-previews>.profile-muted{grid-column:1/-1}
.student-profile-view .profile-badge-section-title{font-size:13px;font-weight:700;margin:15px 0 8px}.student-profile-view .profile-badge-options{gap:8px;margin-top:0}.student-profile-view .profile-badge-option{padding:12px;min-height:72px;border-radius:11px;gap:11px}.student-profile-view .profile-badge-option-copy strong{font-size:13px}.student-profile-view .profile-badge-option-copy small{font-size:12px}
.student-profile-view .profile-badge-mark{width:24px;height:24px;min-width:24px;min-height:24px;aspect-ratio:1;flex:0 0 24px;border-radius:50%;box-sizing:border-box;padding:0}
.student-profile-view .profile-badge-save-area{position:static;bottom:auto;z-index:auto;transform:none;background:transparent;margin:14px 0 0;padding:14px 0 0;border-top:1px solid #dce6d5;text-align:center}.student-profile-view .profile-badge-save-area>.btn-primary{min-height:46px}.student-profile-view .profile-badge-save-area>.profile-muted{font-size:12px}
.profile-badge-locked{margin-top:16px;border-top:1px solid #dce6d5;padding-top:4px}.profile-badge-locked>summary{min-height:44px;padding:12px 0;line-height:1.5;font-size:13px;font-weight:600;color:#075c42;cursor:pointer}.profile-badge-locked .profile-badge-option:disabled{opacity:.8;cursor:default}.profile-badge-locked .profile-badge-option-copy small{color:var(--text-muted)}
.student-profile-view #studentBadgeCount{font-size:13px;margin:12px 0}.student-profile-view #studentBadgeList{min-width:0}.student-profile-view button:focus-visible,.student-profile-view summary:focus-visible{outline:3px solid #c9ab58;outline-offset:3px}
@media(max-width:380px){.student-profile-view .hf-profile-avatar{width:64px!important;height:64px!important;min-width:64px!important;max-width:64px!important;min-height:64px!important;max-height:64px!important;flex-basis:64px!important}.student-profile-view .profile-identity{gap:11px}.student-profile-view .student-profile-card{padding:14px}.student-profile-view .profile-account-info>div{font-size:12px}.student-profile-view .profile-badge-option{padding:10px;gap:9px}}

/* Hafaluma 2J — one password control and a consistent, normal-flow footer. */
.input-password .hf-pw-managed::-ms-reveal{display:none}
.input-password .hf-pw-managed{padding-right:52px}
.input-password .btn-toggle-pw{width:44px;height:44px;right:3px;min-width:44px;min-height:44px;border-radius:9px;box-sizing:border-box}
.input-password .btn-toggle-pw svg{width:20px;height:20px;display:block}
.input-password .btn-toggle-pw[hidden],.input-password .btn-toggle-pw [hidden]{display:none!important}
.input-password .btn-toggle-pw:focus-visible{outline:3px solid #c9ab58;outline-offset:1px}
.hf-site-footer{position:static;inset:auto;clear:both;box-sizing:border-box;width:100%;margin:24px 0 0;padding:16px 0;border-top:1px solid #dce4d5;text-align:center;background:transparent;box-shadow:none;color:#5D7064;font-size:12px}
.hf-site-footer .ultra-links{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:0 5px;margin:0 0 4px;line-height:1.5}
.hf-site-footer .ultra-links a{display:inline-flex;align-items:center;justify-content:center;min-height:40px;padding:6px 8px;color:#4F6358;font-size:12px;font-weight:600;text-decoration:none;line-height:1.5}
.hf-site-footer .ultra-links a:hover{text-decoration:underline;text-underline-offset:3px;color:#075c42}
.hf-site-footer .ultra-links a:focus-visible{outline:3px solid #c9ab58;outline-offset:1px;border-radius:5px}
.hf-site-footer .sep{color:#6F8176;line-height:1;margin:0 2px;font-size:11px;user-select:none}
.hf-site-footer .ultra-copy{font-size:12px;line-height:1.7;color:#5D7064;margin:0;overflow-wrap:anywhere;text-wrap:balance}
body.hf-footer-layout{display:flex;flex-direction:column;min-height:100vh;min-height:100dvh}
.hf-footer-layout>header{flex-shrink:0}.hf-footer-layout>main.container{flex:1 0 auto;display:flex;flex-direction:column;width:100%;min-width:0}
.hf-footer-layout>main.container>.hf-site-footer{margin-top:auto}
@media(max-width:600px){.hf-site-footer{padding:14px 0;margin-top:20px}.hf-site-footer .ultra-links a{min-height:44px}.hf-site-footer .ultra-copy{font-size:12px}}
@media print{.hf-site-footer{display:none!important}}

/* Hafaluma 2L — detail guru mengikuti susunan siswa; aturan dibatasi halaman ini. */
.teacher-detail-page .topbar .logo{min-width:0;gap:10px}
.teacher-detail-page .topbar .logo-text{font-size:1rem;white-space:nowrap}
.teacher-detail-page .btn-back{width:44px;height:44px;min-width:44px;flex:0 0 44px;display:inline-grid;place-items:center;border-radius:10px}
.teacher-detail-page .btn-back svg{width:20px;height:20px}
.teacher-detail-page .siswa-info-card{display:grid;grid-template-columns:52px minmax(0,1fr) auto;gap:10px 14px;padding:18px;margin-bottom:14px;border:1px solid var(--sage);border-radius:16px;box-shadow:none;align-items:start}
.teacher-detail-page #siswaAvatar{width:52px;height:52px;min-width:52px;max-width:52px;min-height:52px;max-height:52px;aspect-ratio:1;flex:none;box-sizing:border-box;border-radius:50%;display:grid;place-items:center;overflow:hidden;margin:0;background:#e6efdf}
.teacher-detail-page #siswaAvatar svg{display:block;width:100%;height:100%}
.teacher-detail-page .siswa-info-text{min-width:0}
.teacher-detail-page .siswa-info-text h1{display:block;margin:0;font-size:1.15rem;line-height:1.4;color:var(--primary);overflow-wrap:anywhere}
.teacher-detail-page #siswaGender{display:none}
.teacher-detail-page .siswa-info-username{margin:3px 0;color:var(--text-muted);font-size:.78rem;line-height:1.45;overflow-wrap:anywhere}
.teacher-detail-page .detail-presence{display:grid;grid-template-columns:8px minmax(0,1fr);gap:6px;align-items:start;font-size:.74rem;line-height:1.5}
.teacher-detail-page .detail-presence #siswaOnlineText{display:block;margin:0;font-size:inherit;line-height:inherit;font-weight:500;overflow-wrap:anywhere}
.teacher-detail-page .detail-presence #siswaOnlineDot{display:block;position:static;top:auto;box-sizing:border-box;width:8px!important;height:8px!important;min-width:8px;max-width:8px;min-height:8px;max-height:8px;margin:calc((1.5em - 8px)/2) 0 0!important;border:0;padding:0;border-radius:50%;transform:none;animation:none;box-shadow:none}
.teacher-detail-page .siswa-actions{grid-column:3;grid-row:1;display:block;align-self:start;margin:0;position:static}
.teacher-detail-page .hf-student-settings>summary{display:flex;align-items:center;justify-content:center;gap:7px;box-sizing:border-box;min-width:44px;min-height:44px;padding:10px;font-size:.78rem;line-height:1.4;background:transparent}
.teacher-detail-page .hf-student-settings>summary>svg{width:20px;height:20px;flex:0 0 20px}
.teacher-detail-page .hf-settings-menu{width:240px;max-width:calc(100vw - 40px);max-height:min(70dvh,440px);overflow-y:auto;overscroll-behavior:contain;z-index:90}
.teacher-detail-page .hf-settings-menu button{font:inherit;font-size:.8rem;white-space:normal;text-align:left}



.teacher-detail-page #pendingBox{padding:9px 12px;margin:0 0 12px;border-radius:12px;box-shadow:none}
.teacher-detail-page #pendingBox .pending-header{display:flex;align-items:center;gap:8px;flex-wrap:nowrap}
.teacher-detail-page #pendingBox .pending-icon{display:none}
.teacher-detail-page #pendingCount{min-width:0;flex:1;font-size:.8rem;line-height:1.45;overflow-wrap:anywhere}
.teacher-detail-page #detailOpenPending{margin:0;min-height:36px;padding:6px 12px;border-radius:9px;background:var(--primary);color:#fff;font-size:.76rem;white-space:nowrap}
.teacher-detail-page .detail-month-row{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px;padding:0;margin:0 0 16px;border:0;border-radius:0;background:transparent}
.teacher-detail-page .detail-month-row .month-selector-label{margin:0;text-transform:none;letter-spacing:normal;font-size:.78rem;color:var(--text);line-height:1.5}
.teacher-detail-page #detailMonthSelect{min-width:0;max-width:100%;min-height:40px;padding:7px 30px 7px 10px;border:1px solid var(--sage);border-radius:9px;background:var(--bg);color:var(--primary);font:inherit;font-size:.78rem}
.teacher-detail-page .detail-target-dialog{position:fixed;inset:0;margin:auto;height:fit-content;box-sizing:border-box;width:calc(100% - 32px);max-width:540px;max-height:calc(100dvh - 32px);padding:0;border:1px solid var(--sage);border-radius:18px;background:var(--bg);color:var(--text);overflow:hidden;box-shadow:0 18px 60px #143b2633}
.teacher-detail-page .detail-target-dialog::backdrop{background:#143b2666;backdrop-filter:blur(3px)}
.teacher-detail-page .detail-target-dialog[open]{display:flex;flex-direction:column}
.teacher-detail-page .detail-target-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:18px;border-bottom:1px solid var(--sage);flex:0 0 auto}
.teacher-detail-page .detail-target-head h2{font-size:1.12rem;margin:0;color:var(--primary);line-height:1.4}
.teacher-detail-page .detail-target-head p{font-size:.78rem;margin:4px 0 0;color:var(--text-muted);overflow-wrap:anywhere}
.teacher-detail-page .detail-dialog-close{display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;aspect-ratio:1;border:1px solid var(--sage);border-radius:50%;background:transparent;color:var(--primary);cursor:pointer}
.teacher-detail-page .detail-dialog-close svg{width:19px;height:19px}
.teacher-detail-page .detail-target-content{padding:18px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.teacher-detail-page .detail-target-period{display:grid;gap:7px;font-size:.8rem;font-weight:600}
.teacher-detail-page .detail-target-period input{width:100%;min-width:0;min-height:44px;border:1px solid var(--sage);border-radius:10px;padding:9px 12px;background:#fff;color:var(--primary);font:inherit;box-sizing:border-box}
.teacher-detail-page .detail-target-help,.teacher-detail-page #detailTargetDialogStatus{font-size:.78rem;line-height:1.6;margin:12px 0}
.teacher-detail-page .detail-target-help{color:var(--text-muted)}
.teacher-detail-page .detail-target-dialog .monthly-target-fields{grid-template-columns:minmax(0,1fr);gap:14px}
.teacher-detail-page .detail-target-dialog .monthly-target-actions{display:flex;flex-wrap:wrap;gap:9px}
.teacher-detail-page .detail-target-dialog .monthly-target-actions button{flex:1 1 180px;min-height:44px;font-size:.8rem;white-space:normal}
.teacher-detail-page .detail-target-dialog .monthly-target-fields input{box-sizing:border-box;display:block;width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--bg-soft);color:var(--text);font:inherit;font-size:16px;line-height:1.5}
.teacher-detail-page .detail-target-dialog #monthlyTargetDelete{background:transparent;color:var(--danger);border:1px solid #e3ccc6}
.teacher-detail-page .detail-target-confirm{margin-top:14px;padding:12px;border:1px solid #e3ccc6;border-radius:12px;background:#fff6f2;font-size:.8rem;line-height:1.6}
.teacher-detail-page .detail-target-confirm>div{display:flex;gap:9px;margin-top:10px}
.teacher-detail-page .detail-target-confirm button{flex:1;min-height:44px;font-size:.8rem}
.teacher-detail-page #detailTargetDeleteYes{background:var(--danger)}
.teacher-detail-page #detailTargetDiscard{width:100%;min-height:44px;margin-top:12px;color:var(--danger);font-size:.8rem}
@media(max-width:600px){
 .teacher-detail-page .topbar .logo-text{font-size:.88rem}
 .teacher-detail-page .topbar .hf-brand{display:none}
 .teacher-detail-page .topbar-user .user-info{display:none}
 .teacher-detail-page .siswa-info-card{grid-template-columns:46px minmax(0,1fr) 44px;padding:14px;gap:8px 10px}
 .teacher-detail-page #siswaAvatar{width:46px;height:46px;min-width:46px;max-width:46px;min-height:46px;max-height:46px}
 .teacher-detail-page .siswa-info-text h1{font-size:1.03rem}
 .teacher-detail-page .siswa-actions{flex-basis:auto;grid-column:3;grid-row:1}
 .teacher-detail-page .hf-student-settings>summary>span{display:none}
 .teacher-detail-page .hf-student-settings>summary{width:44px;height:44px;padding:10px}
 
 
 .teacher-detail-page #detailMonthSelect{font-size:16px;max-width:100%;flex:0 1 auto}
 .teacher-detail-page .detail-target-dialog{width:calc(100% - 20px);max-height:calc(100dvh - 20px)}
}

/* 2M — one native-style setoran panel, scoped to the shared component. */
.hf-hafalan-entry .hf-setoran-field{display:grid;gap:8px;margin:16px 0;font-size:14px;color:var(--primary);font-weight:600}
.hf-hafalan-entry .hf-setoran-field small{color:var(--text-muted);font-size:12px;font-weight:400}
.hf-hafalan-entry .hf-setoran-field select,.hf-hafalan-entry .hf-setoran-field textarea{box-sizing:border-box;width:100%;min-width:0;min-height:46px;padding:11px 12px;border:1px solid var(--sage);border-radius:10px;background:#fff;color:var(--text);font:inherit;font-size:16px;line-height:1.5}
.hf-hafalan-entry .hf-setoran-field textarea{resize:vertical;min-height:84px}
.hf-hafalan-entry .hf-range-fields input{background:#fff;color:var(--text);font-size:16px}
.hf-hafalan-entry .hf-setoran-summary{padding:12px 14px;border:1px solid var(--sage);border-radius:12px;background:#e8f0e0;color:var(--primary);font-size:13px;line-height:1.7;overflow-wrap:anywhere;margin:18px 0 10px}
.hf-hafalan-entry .hf-learning-actions{flex-wrap:wrap}
.hf-hafalan-entry .hf-learning-actions button{cursor:pointer}
.hf-hafalan-entry .hf-learning-actions button:disabled{opacity:.55;cursor:default}
.hf-hafalan-entry .hf-surah-list>button{font:inherit}

/* Hafaluma 2N — same badge component on student and teacher detail. */
.hf-badge-art{display:block;width:80px;height:80px;flex:0 0 auto;object-fit:contain;aspect-ratio:1;filter:drop-shadow(0 3px 3px #164f3610)}
.hf-badge-showcase{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;max-width:430px;margin:4px auto 18px}
.hf-badge-feature{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;text-align:center}
.hf-badge-feature .hf-badge-art{width:72px;height:72px}
.hf-badge-feature>span{font-size:12px;line-height:1.45;font-weight:700;color:var(--primary);overflow-wrap:anywhere}
.hf-badge-empty{margin:10px 0;line-height:1.6;font-size:13px;color:var(--text-muted)}
.hf-badge-next{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;font-size:12px;width:100%;border-top:1px solid var(--sage);padding-top:12px}
.hf-badge-next>div:first-child{display:flex;flex-wrap:wrap;gap:4px 7px;min-width:0}.hf-badge-next>div:first-child>span{color:var(--text-muted)}.hf-badge-next strong{font-size:12px;color:var(--primary)}
.hf-badge-next>small{font-size:12px;line-height:1.5;color:var(--text-muted);text-align:right}.hf-badge-next>.hf-badge-meter{grid-column:1/-1}
.hf-badge-meter{height:5px;width:100%;border-radius:5px;background:#dce7d8;overflow:hidden}.hf-badge-meter>span{display:block;height:100%;border-radius:inherit;background:var(--primary);transition:width .45s ease}
.hf-badge-collection{display:block;min-width:0}.hf-badge-section>h3{font-size:14px;color:var(--primary);margin:4px 0 12px}.hf-badge-section>h3>span,.hf-badge-locked>summary>span{font-size:12px;font-weight:500;color:var(--text-muted);margin-left:5px}
.hf-badge-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;align-items:start}
.hf-badge-card{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;padding:12px 9px;border:1px solid #dde7d8;border-radius:14px;background:#fff;text-align:center}
.hf-badge-card.is-earned{background:#f3f7ed}.hf-badge-card.is-locked{background:#fbfbf7}.hf-badge-card.is-locked>.hf-badge-art{filter:saturate(.35);opacity:.7}
.hf-badge-card>h3{font-size:12px;line-height:1.4;margin:0;color:var(--primary);overflow-wrap:anywhere}.hf-badge-card>p{font-size:12px;line-height:1.5;margin:0;color:var(--text-muted)}
.hf-badge-state{font-size:12px;font-weight:700;color:var(--primary);line-height:1.5}.hf-badge-rule{width:100%;font-size:12px;line-height:1.5}.hf-badge-rule>summary{min-height:44px;padding:12px 0;cursor:pointer;color:var(--primary)}.hf-badge-rule p{font-size:12px;text-align:left;margin:4px 0;color:var(--text-muted)}
.hf-badge-locked{margin-top:18px}.hf-badge-locked>summary{padding:12px 0;min-height:44px;font-size:14px;font-weight:700;color:var(--primary);cursor:pointer}.hf-badge-rules{margin-top:16px;border-top:1px solid var(--sage);font-size:12px;color:var(--text-muted);line-height:1.6}.hf-badge-rules>summary{min-height:44px;padding:12px 0;cursor:pointer;color:var(--primary)}.hf-badge-rules p{font-size:12px;line-height:1.65;margin:0 0 10px}
#modalBadge .hf-badge-close{width:44px;height:44px;min-width:44px;min-height:44px;max-width:44px;max-height:44px;flex:0 0 44px;padding:11px;border-radius:50%;display:grid;place-items:center;aspect-ratio:1}#modalBadge .hf-badge-close svg{width:20px;height:20px;display:block}
.profile-badge-preview .hf-badge-art{width:44px;height:44px}.student-profile-view .profile-badge-option .hf-badge-art{width:60px;height:60px}.toast-badge>.hf-badge-art{width:48px;height:48px}
@media(max-width:600px){.hf-badge-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hf-badge-showcase{gap:8px;max-width:340px}.hf-badge-feature .hf-badge-art{width:64px;height:64px}.hf-badge-feature>span{font-size:12px}.hf-badge-next{gap:6px;font-size:12px}.hf-badge-next strong{font-size:12px}.hf-badge-next>small{font-size:12px}.hf-badge-card>.hf-badge-art{width:78px;height:78px}}
@media(prefers-reduced-motion:reduce){.hf-badge-meter>span{transition:none}}

/* 2P — teacher target batch. Existing student/detail layouts stay scoped. */
.teacher-dashboard-page .quick-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.bulk-target-dialog{box-sizing:border-box;width:min(620px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid var(--sage);border-radius:20px;background:var(--bg-soft);color:var(--text);box-shadow:0 20px 65px #0f38283d;font-family:inherit;overflow:hidden}
.bulk-target-dialog::backdrop{background:#0f382866;backdrop-filter:blur(3px)}
.bulk-target-dialog [hidden]{display:none!important}
.bulk-target-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--sage);background:var(--bg-soft)}
.bulk-target-head h2{font-size:18px;line-height:1.4;color:var(--primary);margin:0;font-weight:700;min-width:0}
.bulk-target-head>button{display:inline-grid;place-items:center;box-sizing:border-box;width:44px;height:44px;min-width:44px;flex:0 0 44px;aspect-ratio:1;border:1px solid var(--sage);border-radius:50%;padding:0;background:transparent;color:var(--primary);cursor:pointer}
.bulk-target-head>button>svg{display:block;width:20px;height:20px;flex:none}
.bulk-target-scroll{box-sizing:border-box;padding:16px 18px 20px;max-height:calc(100dvh - 108px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.bulk-target-status{font-size:13px;line-height:1.6;color:var(--text-muted);margin:0 0 14px;overflow-wrap:anywhere}
.bulk-target-status:empty{display:none}.bulk-target-status.is-error{color:#a13f37}
.bulk-target-dialog fieldset{border:0;min-width:0;margin:0;padding:0}
.bulk-target-field{display:grid;gap:7px;min-width:0;margin:0 0 12px;font-size:13px;font-weight:600;line-height:1.5;color:var(--primary)}
.bulk-target-field>input{box-sizing:border-box;display:block;width:100%;min-width:0;min-height:46px;padding:10px 12px;border:1px solid var(--sage);border-radius:10px;background:white;color:var(--text);font:inherit;font-size:16px;line-height:1.4}
.bulk-target-field>input[aria-invalid=true]{border-color:#a13f37}
.bulk-target-goals{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.bulk-target-help{font-size:12px;font-weight:400;line-height:1.6;color:var(--text-muted);margin:0 0 12px;overflow-wrap:anywhere}
.bulk-target-section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:20px 0 10px}
.bulk-target-section-head>h3{font-size:15px;line-height:1.4;color:var(--primary);margin:0}
.bulk-target-section-head>span{font-size:12px;font-weight:600;color:var(--primary);white-space:nowrap}
.bulk-target-selection-tools{display:flex;flex-wrap:wrap;gap:8px;margin:-3px 0 4px}
.bulk-target-selection-tools>button{min-height:44px;padding:8px 10px;border:1px solid var(--sage);border-radius:9px;background:transparent;color:var(--primary);font:inherit;font-size:12px;font-weight:600;cursor:pointer}
.bulk-target-students{max-height:210px;overflow-y:auto;overscroll-behavior:contain;border:1px solid var(--sage);border-radius:12px;background:white;margin:0 0 16px}
.bulk-target-students:empty{display:none}
.bulk-target-students>label{box-sizing:border-box;display:grid;grid-template-columns:18px minmax(0,1fr);gap:12px;align-items:center;min-height:60px;padding:10px 12px;border-bottom:1px solid var(--border);margin:0;cursor:pointer}
.bulk-target-students>label:last-child{border:0}
.bulk-target-students>label>span{min-width:0}
.bulk-target-students strong,.bulk-target-review-row strong{display:block;font-size:13px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.bulk-target-students small,.bulk-target-review-row small{display:block;font-size:12px;line-height:1.5;font-weight:400;color:var(--text-muted);overflow-wrap:anywhere}
.bulk-target-students>.bulk-target-help{padding:12px;margin:0}
.bulk-target-dialog input[type=checkbox],.bulk-target-dialog input[type=radio]{box-sizing:border-box;width:18px;height:18px;min-height:18px;flex:0 0 18px;padding:0;margin:0;accent-color:var(--primary)}
.bulk-target-dialog .bulk-target-mode{margin:18px 0 6px}
.bulk-target-mode>legend{font-size:14px;font-weight:600;margin:0 0 6px;color:var(--primary)}
.bulk-target-mode>label{display:flex;align-items:center;gap:10px;min-height:44px;margin:0;padding:4px 0;font-size:13px;line-height:1.5;font-weight:500;cursor:pointer}
.bulk-target-dialog .btn-primary,.bulk-target-dialog .btn-secondary{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;min-height:46px;padding:11px 14px;border-radius:11px;font:inherit;font-size:14px;line-height:1.5;font-weight:600;cursor:pointer}
.bulk-target-dialog .btn-primary{background:var(--primary);border:1px solid var(--primary);color:white}
.bulk-target-dialog .btn-secondary{background:transparent;border:1px solid var(--sage);color:var(--primary)}
.bulk-target-dialog button:disabled{opacity:.5;cursor:default}
.bulk-target-dialog :focus-visible{outline:2px solid var(--primary-light);outline-offset:3px}
.bulk-target-dialog h2:focus{outline:none}
.bulk-target-month{margin:0 0 4px;color:var(--primary);font-size:17px;font-weight:700;line-height:1.5}
.bulk-target-count{font-size:13px;line-height:1.5;font-weight:600;margin:16px 0 10px;color:var(--primary)}
.bulk-target-review-rows{display:grid;gap:8px;margin:0 0 14px}
.bulk-target-review-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px 12px;border:1px solid var(--sage);border-radius:12px;padding:12px;background:white;min-width:0}
.bulk-target-row-state{font-size:12px;font-weight:600;line-height:1.5;border-radius:7px;background:var(--primary-soft);color:var(--primary);padding:4px 7px;white-space:nowrap}
.bulk-target-row-state.is-keep{color:var(--text-muted);background:#f0f2e9}
.bulk-target-review-row>p{grid-column:1/-1;font-size:12px;line-height:1.6;margin:0;color:var(--text-secondary);overflow-wrap:anywhere}
.bulk-target-review-row>p>span{display:block;color:var(--text-muted)}
.bulk-target-review-row>p>strong{font-size:12px;color:var(--primary)}
.bulk-target-summary{font-size:13px;font-weight:600;line-height:1.6;color:var(--primary);margin:14px 0 6px}
.bulk-target-actions{display:grid;gap:8px;margin-top:14px}
.bulk-target-discard{margin-top:16px;padding:12px;border:1px solid var(--sage);border-radius:12px;background:var(--primary-softer)}
.bulk-target-discard>p{font-size:12px;line-height:1.6;color:var(--text);margin:0}
@media(max-width:600px){.teacher-dashboard-page .quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.teacher-dashboard-page #teacherBulkTargetOpen{grid-column:1/-1}.bulk-target-head{padding:12px 14px}.bulk-target-scroll{padding:14px;max-height:calc(100dvh - 100px)}.bulk-target-head h2{font-size:17px}.bulk-target-goals{gap:10px}.bulk-target-review-row{gap:8px}.bulk-target-review-row>div{min-width:0}}

/* 2Q — fourth teacher action and compact read-only PDF preparation. */
.teacher-dashboard-page .quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.teacher-dashboard-page #teacherBulkTargetOpen{grid-column:auto}
.report-batch-rows{display:grid;gap:8px;margin:0 0 14px}
.report-batch-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;padding:12px;border:1px solid var(--sage);border-radius:12px;background:white;min-width:0}
.report-batch-row strong{display:block;font-size:13px;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
.report-batch-row small{display:block;font-size:12px;line-height:1.6;color:var(--text-muted);overflow-wrap:anywhere;margin-top:3px}
.report-batch-state{font-size:12px;color:var(--text-muted);line-height:1.5;white-space:nowrap;padding:3px 6px;align-self:start}
.report-batch-state.is-ready{border-radius:6px;background:var(--primary-soft);color:var(--primary);font-weight:600}
.report-batch-state.is-error{color:#a13f37;background:#fbecec;border-radius:6px;font-weight:600}
.report-batch-row-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;grid-column:1/-1}
.report-batch-row-actions:empty{display:none}
.report-batch-row-actions>a,.report-batch-row-actions>button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:7px 10px;border:1px solid var(--sage);border-radius:8px;background:transparent;color:var(--primary);font:inherit;font-size:12px;font-weight:600;line-height:1.5;text-decoration:none;cursor:pointer;box-sizing:border-box}
.report-batch-dialog #batchReportDownload{text-decoration:none}
@media(min-width:900px){.teacher-dashboard-page .quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Hafaluma 2S — restrained UI polish; no changes to card order or learning logic. */
.login-page.brand-page .login-container{width:100%;min-width:0}
.login-page.brand-page .login-form-panel{min-width:0}
.login-page.brand-page .login-header h2{line-height:1.35;letter-spacing:-.02em}
.login-page.brand-page .login-header p{line-height:1.6}
.login-page.brand-page .form-group label{font-size:14px;line-height:1.5;font-weight:600}
.login-page.brand-page .form-group input{min-height:48px;font-size:16px;line-height:1.5;transition:border-color .15s ease,box-shadow .15s ease}
.login-page.brand-page #loginBtn{min-height:48px;line-height:1.5}
.login-page.brand-page .login-error{line-height:1.6;overflow-wrap:anywhere}
.brand-page :where(button,a,input,select,textarea,summary):focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.brand-page :where(button,a,summary){touch-action:manipulation}
.brand-page .hf-ui-icon{flex-shrink:0;vertical-align:middle}
@media screen and (max-width:720px){
 .brand-page :is(input,select,textarea):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]){font-size:16px}
 .login-page.brand-page{padding:16px}
 .login-page.brand-page .login-brand{padding:28px 24px 24px}
 .login-page.brand-page .login-form-panel{padding:28px 24px}
 .login-page.brand-page .login-header{margin-bottom:24px}
}
@media screen and (max-width:360px){
 .login-page.brand-page{padding:12px}
 .login-page.brand-page .login-brand,.login-page.brand-page .login-form-panel{padding:24px 20px}
}
@media(prefers-reduced-motion:reduce){
 .login-page.brand-page .login-form-panel{animation:none}
 .login-page.brand-page .form-group input{transition:none}
}

/* Hafaluma 2U — compact baseline verification, shared by student and teacher detail. */
.hf-identity-line{display:flex;align-items:center;gap:0;min-width:0;max-width:100%}
.hf-identity-line>.user-name,.hf-identity-line>#siswaNama{min-width:0;flex:0 1 auto}
.student-profile-details>.hf-identity-line{justify-content:flex-end}
.teacher-detail-page .siswa-info-text>h1.hf-identity-line{display:flex;align-items:center}
.hf-verification-slot{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;flex:0 0 44px;vertical-align:middle}
.hf-verification-button{box-sizing:border-box;display:inline-grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;padding:0;border:0;border-radius:10px;background:transparent;color:var(--primary);cursor:pointer;font:inherit;flex:0 0 44px;touch-action:manipulation}
.hf-verification-button:hover{background:#e8f0e0}.hf-verification-button:focus-visible{outline:2px solid #075c42;outline-offset:2px}
.hf-verification-icon{display:block;width:20px;height:20px;flex:none}
.hf-verification-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
.hf-verification-popover{position:fixed;z-index:13000;box-sizing:border-box;max-width:calc(100vw - 24px);max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;margin:0;padding:14px;border:1px solid #c9d6be;border-radius:15px;background:#fff;color:var(--hf-ink, #075C42);box-shadow:0 10px 36px #173d3029;font:14px/1.6 'Inter',system-ui,-apple-system,'Segoe UI',sans-serif}
.hf-verification-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 6px}
.hf-verification-head h2{margin:0;min-width:0;font-size:15px;font-weight:700;line-height:1.45;color:#075c42;overflow-wrap:anywhere}
.hf-verification-close{box-sizing:border-box;display:grid;place-items:center;width:44px;height:44px;min-width:44px;min-height:44px;flex:0 0 44px;margin:-6px -6px -6px 0;padding:0;border:0;border-radius:10px;background:transparent;color:#075c42;cursor:pointer}
.hf-verification-close svg{display:block;width:18px;height:18px}
.hf-verification-popover p{font-size:13px;line-height:1.65;color:#5d7064;margin:0 0 14px;overflow-wrap:anywhere}
.hf-verification-primary,.hf-verification-refresh{box-sizing:border-box;display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;padding:10px 12px;border-radius:10px;border:1px solid #075c42;background:#075c42;color:#fff;font:600 13px/1.5 'Inter',system-ui,sans-serif;white-space:normal;cursor:pointer;text-align:center}
.hf-verification-refresh{margin-top:6px;background:transparent;border-color:transparent;color:#075c42}
.hf-verification-popover button:disabled{opacity:.6;cursor:default}
.hf-verification-popover :focus-visible{outline:2px solid #075c42;outline-offset:2px}
.hf-verification-popover [hidden]{display:none!important}
@media print{.hf-verification-popover,.hf-verification-slot{display:none!important}}
/* Hafaluma 3C — shared school workspace, scoped to the existing teacher page. */
#hfSchoolAdmin[hidden],#hfTeacherMain[hidden],#hfAdminPanel[hidden],#hfAdminContent[hidden],#hfAdminNotice[hidden],#hfAdminEntry[hidden],#hfSchoolSwitch[hidden],.hf-admin-shell [hidden]{display:none!important}
.hf-admin-shell{--admin-ink:var(--primary,#075d49);--admin-muted:var(--text-light,#708276);--admin-line:var(--sage,#cfdbc6);--admin-paper:var(--cream,#f7f5e9);box-sizing:border-box;width:min(1440px,100%);margin:0 auto;display:grid;grid-template-columns:210px minmax(0,1fr);gap:0;flex:1;color:var(--admin-ink);font-size:14px;line-height:1.55;min-height:calc(100dvh - 190px)}
:is(.hf-admin-shell,.hf-platform-shell) *{box-sizing:border-box}:is(.hf-admin-shell,.hf-platform-shell) h1,:is(.hf-admin-shell,.hf-platform-shell) h2,:is(.hf-admin-shell,.hf-platform-shell) h3,:is(.hf-admin-shell,.hf-platform-shell) p{margin:0}:is(.hf-admin-shell,.hf-platform-shell) h1{font-size:26px;line-height:1.3;font-weight:750;letter-spacing:-.03em}:is(.hf-admin-shell,.hf-platform-shell) h2{font-size:18px;line-height:1.4;letter-spacing:-.02em}:is(.hf-admin-shell,.hf-platform-shell) h3{font-size:17px;line-height:1.4}:is(.hf-admin-shell,.hf-platform-shell) button,:is(.hf-admin-shell,.hf-platform-shell) input,:is(.hf-admin-shell,.hf-platform-shell) select{font:inherit}:is(.hf-admin-shell,.hf-platform-shell) .hf-ui-icon{width:20px;height:20px;flex:0 0 20px}:is(.hf-admin-shell,.hf-platform-shell) button:disabled{opacity:.5;cursor:not-allowed}:is(.hf-admin-shell,.hf-platform-shell) :focus-visible,.hf-school-switch select:focus-visible{outline:2px solid var(--admin-ink,#075d49);outline-offset:3px}
.hf-admin-sidebar{padding:25px 18px 24px 12px;border-right:1px solid var(--admin-line);display:flex;flex-direction:column;gap:16px;align-self:stretch}.hf-admin-eyebrow{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--admin-muted);padding:0 10px}.hf-admin-sidebar nav{display:grid;gap:5px}.hf-admin-sidebar nav button{display:flex;align-items:center;justify-content:flex-start;gap:12px;min-height:46px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:var(--admin-ink);font-weight:600;text-align:left;cursor:pointer}.hf-admin-sidebar nav button[aria-current=page]{background:var(--primary-soft,#e5efdf);font-weight:750}.hf-admin-sidebar nav button:hover{background:var(--primary-softer,#edf3e6)}.hf-admin-switch{margin-top:auto;text-align:left;border:0;border-top:1px solid var(--admin-line);background:transparent;color:var(--admin-ink);padding:18px 10px 8px;min-height:44px;cursor:pointer;font-size:12px}
.hf-admin-workspace{padding:22px 28px 32px;min-width:0}.hf-admin-context{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:0 0 24px;min-height:44px}.hf-admin-context>span{font-weight:700;font-size:14px;overflow-wrap:anywhere}.hf-admin-context>label{display:flex;gap:9px;align-items:center;color:var(--admin-muted);font-size:12px;flex-shrink:0}.hf-admin-context select{max-width:240px;min-height:42px;padding:8px 30px 8px 12px;border:1px solid var(--admin-line);border-radius:9px;background:var(--admin-paper);color:var(--admin-ink);font-size:13px}.hf-admin-page-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:20px}.hf-admin-page-head p{font-size:13px;color:var(--admin-muted);margin-top:5px}.hf-admin-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px}.hf-admin-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:44px;padding:9px 13px;border:1px solid var(--admin-line);border-radius:9px;background:transparent;color:var(--admin-ink);font-size:12px;font-weight:650;line-height:1.5;text-decoration:none;cursor:pointer;white-space:normal}.hf-admin-button:hover{background:var(--primary-softer,#edf3e6)}.hf-admin-button.is-primary{background:var(--admin-ink);border-color:var(--admin-ink);color:#fff}.hf-admin-button.is-primary:hover{filter:brightness(1.08)}.hf-admin-button .hf-ui-icon{width:18px;height:18px;flex-basis:18px}
.hf-admin-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:20px}.hf-admin-stats>button{display:flex;align-items:center;gap:14px;min-height:86px;border:1px solid var(--admin-line);border-radius:12px;background:#fff;color:var(--admin-ink);padding:14px;text-align:left;cursor:pointer}.hf-admin-stats .hf-ui-icon{width:28px;height:28px;flex-basis:28px}.hf-admin-stats strong{font-size:25px;line-height:1.2;display:block}.hf-admin-stats small{display:block;font-size:12px;color:var(--admin-muted);margin-top:3px}.hf-admin-card{padding:18px;border:1px solid var(--admin-line);border-radius:14px;background:#fff;margin-bottom:18px;min-width:0}.hf-admin-card>header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}.hf-admin-card>p+p{margin-top:8px}.hf-admin-list-row{display:flex;align-items:center;gap:12px;padding:12px 0;min-width:0;border-top:1px solid #e5eade}.hf-admin-list-row:first-child{border-top:0}.hf-admin-list-row>div{min-width:0;flex:1}.hf-admin-list-row strong{display:block;font-size:14px;font-weight:700;overflow-wrap:anywhere}.hf-admin-list-row small{display:block;font-size:12px;color:var(--admin-muted);margin-top:2px;overflow-wrap:anywhere}.hf-admin-row-icon{width:36px;height:36px;border-radius:9px;background:var(--primary-softer,#edf3e6);display:grid;place-items:center;flex:0 0 36px}.hf-admin-count{font-size:12px;color:var(--admin-muted);white-space:nowrap}.hf-admin-list-row>.hf-admin-button{flex:0 0 auto;padding:8px 10px}.hf-admin-avatar{display:inline-grid;place-items:center;width:44px!important;height:44px!important;min-width:44px;aspect-ratio:1;flex:0 0 44px;border-radius:50%;overflow:hidden;background:var(--primary-soft,#e5efdf)}.hf-admin-avatar svg{max-width:36px;max-height:36px}.hf-admin-number{font-size:11px;display:block;margin-top:3px;color:var(--admin-muted)}.hf-admin-callout{padding:14px 16px;border:1px solid var(--admin-line);border-radius:12px;background:var(--primary-softer,#edf3e6);margin-bottom:18px}.hf-admin-callout strong{font-size:14px}.hf-admin-callout p{font-size:12px;color:var(--admin-muted);margin:4px 0 8px}
.hf-admin-help{font-size:12px;color:var(--admin-muted);line-height:1.65;margin:10px 0!important}.hf-admin-empty{padding:24px 6px;color:var(--admin-muted);font-size:13px}.hf-admin-tools{margin-bottom:12px}.hf-admin-search{display:flex;align-items:center;gap:10px;min-height:46px;border:1px solid var(--admin-line);background:#fff;border-radius:10px;padding:0 12px}.hf-admin-search input{border:0!important;box-shadow:none!important;background:transparent!important;padding:11px 0!important;min-width:0;width:100%;color:var(--admin-ink);font-size:13px;border-radius:0!important}.hf-admin-filter-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.hf-admin-field{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:12px;font-weight:650;color:var(--admin-ink);margin-bottom:12px}.hf-admin-field small{font-size:11px;font-weight:400;color:var(--admin-muted)}.hf-admin-field input,.hf-admin-field select{height:44px;min-height:44px;border:1px solid var(--admin-line);border-radius:9px;padding:9px 11px;background:#fff;color:var(--admin-ink);font-size:13px;min-width:0;width:100%}.hf-admin-pagination{display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px;margin:14px 0}.hf-admin-pagination span{white-space:nowrap}.hf-admin-notice{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;background:var(--primary-softer,#edf3e6);border:1px solid var(--admin-line);border-radius:10px;font-size:12px;margin-bottom:18px;overflow-wrap:anywhere}.hf-admin-notice.is-error,.hf-admin-status.is-error{color:#9b2e2e}.hf-admin-status{font-size:13px;line-height:1.65;margin:14px 0;overflow-wrap:anywhere}.hf-admin-status:empty{display:none}
.hf-admin-panel{max-width:800px;margin:0 auto;padding:0 2px 20px}.hf-admin-panel>header{display:flex;align-items:center;gap:10px;margin-bottom:20px}.hf-admin-panel>header h2{font-size:22px;line-height:1.3}.hf-admin-icon-button{width:44px;height:44px;min-width:44px;aspect-ratio:1;display:inline-grid;place-items:center;border:1px solid var(--admin-line);border-radius:10px;background:transparent;color:var(--admin-ink);padding:0;cursor:pointer}.hf-admin-icon-button svg{width:22px;height:22px}.hf-admin-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 14px}.hf-admin-linked{display:flex;align-items:center;gap:10px;padding:12px 14px;border-radius:10px;background:var(--primary-soft,#e5efdf);font-size:12px;margin:0 0 12px}.hf-admin-linked small,.hf-admin-linked strong{display:block}.hf-admin-linked small{font-size:11px;color:var(--admin-muted);margin-bottom:2px}.hf-admin-form-actions{display:flex;gap:10px;margin:18px 0 0}.hf-admin-form-actions .is-primary{min-width:180px}.hf-admin-details{margin:12px 0}.hf-admin-details summary{font-size:12px;min-height:40px;cursor:pointer}.hf-admin-details .hf-admin-field{margin-top:8px}.hf-admin-secondary-actions{display:flex;gap:10px;flex-wrap:wrap;padding-top:18px;border-top:1px solid var(--admin-line);margin-top:22px}.hf-admin-choice-grid{display:grid;gap:12px;margin-top:20px}.hf-admin-choice-grid button{justify-content:flex-start;text-align:left;padding:16px;gap:14px}.hf-admin-choice-grid strong,.hf-admin-choice-grid small{display:block}.hf-admin-choice-grid strong{font-size:14px}.hf-admin-choice-grid small{font-size:12px;color:var(--admin-muted);font-weight:400}.hf-admin-choice-grid .hf-ui-icon{width:26px;height:26px;flex-basis:26px}.hf-admin-file{margin:16px 0 8px;padding:22px 16px;display:flex;flex-direction:column;align-items:center;gap:7px;background:#fff;border:1px dashed var(--admin-line);border-radius:12px;text-align:center}.hf-admin-file span{font-size:12px;color:var(--admin-muted)}.hf-admin-file input{max-width:100%;font-size:12px;margin-top:8px}.hf-admin-check{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.6;margin:10px 0}.hf-admin-check input,.hf-admin-review-row>input{width:18px!important;height:18px!important;min-width:18px;min-height:18px;padding:0!important;margin:2px 0 0;accent-color:var(--admin-ink);flex:0 0 18px}.hf-admin-teacher-options{border:1px solid var(--admin-line);border-radius:10px;padding:10px 14px;margin:14px 0}.hf-admin-teacher-options legend{font-size:12px;font-weight:650;padding:0 4px}.hf-admin-review-counts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:14px 0}.hf-admin-review-counts span{font-size:11px;padding:10px;border:1px solid var(--admin-line);border-radius:9px;background:#fff}.hf-admin-review-counts strong{display:block;font-size:20px;line-height:1.3}.hf-admin-review-list{margin:14px 0;border:1px solid var(--admin-line);border-radius:12px;overflow:hidden;background:#fff}.hf-admin-review-row{display:flex;gap:12px;padding:13px;border-top:1px solid #e5eade;align-items:flex-start}.hf-admin-review-row:first-child{border-top:0}.hf-admin-review-row>span{min-width:0;flex:1}.hf-admin-review-row strong{display:block;font-size:13px;overflow-wrap:anywhere}.hf-admin-review-row small{display:block;font-size:11px;color:var(--admin-muted);line-height:1.65;overflow-wrap:anywhere}.hf-admin-review-row.is-error{background:#fff7f3}.hf-admin-review-row.is-error small{color:#983d31}.hf-admin-review-row details{font-size:11px;margin-top:6px}.hf-admin-review-row summary{cursor:pointer;min-height:28px}.hf-admin-sticky-actions{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:12px 0;position:sticky;bottom:0;background:var(--admin-paper);border-top:1px solid var(--admin-line);z-index:2}.hf-admin-sticky-actions p{font-size:12px;margin-right:auto}.hf-admin-success{text-align:center;margin:20px 0}.hf-admin-success>span{display:inline-grid;place-items:center;width:56px;height:56px;border-radius:14px;background:var(--primary-soft,#e5efdf);margin-bottom:12px}.hf-admin-success h3{font-size:20px;margin-bottom:6px}.hf-admin-success p{font-size:13px;color:var(--admin-muted)}.hf-admin-result-accounts{margin:16px 0;border:1px solid var(--admin-line);border-radius:10px;background:#fff}.hf-admin-result-accounts article{padding:12px;border-top:1px solid #e5eade}.hf-admin-result-accounts article:first-child{border-top:0}.hf-admin-result-accounts strong,.hf-admin-result-accounts span{display:block;font-size:12px}.hf-admin-result-accounts span{font-size:11px;color:var(--admin-muted)}.hf-admin-result-accounts+.hf-admin-button{margin-right:8px}.hf-admin-more-links{display:grid;gap:8px}.hf-admin-more-links button{justify-content:flex-start;gap:12px}.hf-admin-mobile-nav{display:none}
.hf-school-switch{padding:8px 12px 12px}.hf-school-switch label{font-size:11px;display:block;margin-bottom:6px;color:var(--text-light)}.hf-school-switch select{width:100%;min-height:42px;border:1px solid var(--sage);border-radius:9px;background:var(--cream);font:inherit;font-size:12px;color:var(--primary);padding:8px}
body.hf-admin-mode #tabbar,body.hf-admin-mode #backToTop{display:none!important}body.hf-admin-mode .topbar{position:relative}body.hf-admin-mode .container{min-width:0}:is(.hf-admin-shell,.hf-platform-shell) select{appearance:auto;-webkit-appearance:auto;background-image:none}
@media(min-width:1100px){.hf-admin-workspace{padding:24px 32px 40px}.hf-admin-card{padding:18px 20px}.hf-admin-stats>button{min-height:90px}}
@media(max-width:900px){.hf-admin-shell{grid-template-columns:170px minmax(0,1fr)}.hf-admin-sidebar{padding-left:8px;padding-right:10px}.hf-admin-workspace{padding:18px}.hf-admin-stats{gap:8px}.hf-admin-stats>button{gap:8px;padding:12px}.hf-admin-stats .hf-ui-icon{width:22px;height:22px;flex-basis:22px}.hf-admin-page-head{align-items:flex-start;flex-direction:column;gap:12px}.hf-admin-page-head .hf-admin-actions{width:100%}}
@media(max-width:640px){.hf-admin-shell{display:block;min-height:calc(100dvh - 120px);padding-bottom:calc(76px + env(safe-area-inset-bottom,0px));width:100%}.hf-admin-sidebar{display:none}.hf-admin-workspace{padding:12px 16px 22px}.hf-admin-context{margin-bottom:20px;align-items:center;gap:10px;flex-wrap:wrap}.hf-admin-context>span{font-size:12px;max-width:55%}.hf-admin-context>label{font-size:0;gap:0;min-width:0}.hf-admin-context select{font-size:12px;max-width:155px;min-height:40px}:is(.hf-admin-shell,.hf-platform-shell) h1{font-size:24px}:is(.hf-admin-shell,.hf-platform-shell) h2{font-size:17px}.hf-admin-page-head{gap:12px;margin-bottom:16px}.hf-admin-page-head p{font-size:12px}.hf-admin-page-head .hf-admin-actions{gap:8px}.hf-admin-page-head .hf-admin-actions>*{flex:1}.hf-admin-button{padding:9px 11px;font-size:12px}.hf-admin-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-bottom:16px}.hf-admin-stats>button{padding:12px;min-height:76px;gap:12px}.hf-admin-stats strong{font-size:25px}.hf-admin-stats small{font-size:11px}.hf-admin-stats .hf-ui-icon{width:25px;height:25px;flex-basis:25px}.hf-admin-card{padding:13px 14px;border-radius:12px;margin-bottom:14px}.hf-admin-card>header{gap:8px;margin-bottom:8px}.hf-admin-card>header .hf-admin-button{font-size:11px;padding:7px 9px}.hf-admin-list-row{gap:9px;padding:12px 0}.hf-admin-list-row strong{font-size:13px}.hf-admin-list-row small{font-size:11px}.hf-admin-count{font-size:11px}.hf-admin-row-icon{display:none}.hf-admin-student-row .hf-admin-avatar{width:40px!important;height:40px!important;min-width:40px;flex-basis:40px}.hf-admin-student-row>.hf-admin-button{padding:8px 4px;border:0;min-width:32px}.hf-admin-number{font-size:10px}.hf-admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:0 9px}.hf-admin-filter-grid>.hf-admin-field:last-child{grid-column:1/-1;flex-direction:row;align-items:center;gap:10px;margin-bottom:0}.hf-admin-filter-grid>.hf-admin-field:last-child select{width:auto;flex:1}.hf-admin-form-grid{grid-template-columns:1fr}.hf-admin-field{margin-bottom:13px}.hf-admin-field input,.hf-admin-field select{font-size:16px}.hf-admin-filter-grid .hf-admin-field select{font-size:12px}.hf-admin-help{font-size:12px}.hf-admin-panel{padding:0}.hf-admin-panel>header{margin-bottom:16px;gap:8px}.hf-admin-panel>header h2{font-size:21px}.hf-admin-form-actions .is-primary{width:100%}.hf-admin-review-counts{grid-template-columns:repeat(2,minmax(0,1fr))}.hf-admin-sticky-actions{bottom:0;display:grid;grid-template-columns:1fr 1fr;padding:12px 0 calc(12px + env(safe-area-inset-bottom,0px))}.hf-admin-sticky-actions p{grid-column:1/-1;margin:0}.hf-admin-sticky-actions button{min-width:0}.hf-admin-mobile-nav{position:fixed;bottom:0;left:0;right:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--admin-paper);border-top:1px solid var(--admin-line);padding:6px 10px calc(6px + env(safe-area-inset-bottom,0px));z-index:90}.hf-admin-mobile-nav button{min-width:0;min-height:56px;padding:6px 2px;border:0;border-radius:10px;background:transparent;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;color:var(--admin-muted);font-size:10px;line-height:1.2;font-weight:600}.hf-admin-mobile-nav button[aria-current=page]{color:var(--admin-ink);background:var(--primary-soft,#e5efdf)}.hf-admin-mobile-nav .hf-ui-icon{width:23px;height:23px;flex-basis:23px}.hf-admin-shell.has-panel .hf-admin-mobile-nav{display:none}body.hf-admin-form-open .hf-admin-shell{padding-bottom:0}body.hf-admin-mode .hf-site-footer{margin-bottom:calc(76px + env(safe-area-inset-bottom,0px))}body.hf-admin-form-open .hf-site-footer{display:none}.hf-admin-result-accounts+.hf-admin-button{margin:0 0 10px;width:100%}}
@media(prefers-reduced-motion:reduce){:is(.hf-admin-shell,.hf-platform-shell) *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

.profile-dropdown-menu .dropdown-item .hf-ui-icon{width:18px;height:18px;min-width:18px;flex:0 0 18px}.dropdown-item[hidden]{display:none!important}#hfAdminEntry,#hfOwnerEntry,#hfAccessEntry,#hfSecurityEntry{gap:9px}

.hf-admin-file{position:relative}.hf-admin-file input[type=file]{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.hf-admin-file:focus-within{outline:2px solid var(--admin-ink);outline-offset:3px}
@media(max-width:640px){.hf-admin-context select{width:180px;max-width:200px}.hf-admin-context>span{flex:1;min-width:0}}
/* 3D — compact selection, accessible assignment board, and account identity. */
.hf-admin-bulkbar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:12px 0;padding:12px;background:var(--primary-soft,#e5efdf);border-radius:10px}.hf-admin-bulkbar>span{font-weight:700;margin-right:auto}.hf-admin-bulkbar .hf-admin-button{background:var(--admin-paper);font-size:12px}:is(.hf-admin-shell,.hf-platform-shell) input[type=checkbox].hf-admin-roster-check,.hf-admin-board-member>input{width:20px;height:20px;min-width:20px;flex:0 0 20px;accent-color:var(--admin-ink);cursor:pointer}.hf-admin-list-row>.hf-admin-roster-check{margin:0 4px 0 0}.hf-admin-list-row:has(>.hf-admin-roster-check:checked){background:var(--primary-softer,#edf3e6)}
.hf-admin-board-toolbar{display:grid;grid-template-columns:auto minmax(170px,1fr) minmax(140px,200px);align-items:end;gap:12px;margin:14px 0}.hf-admin-board-toolbar .hf-admin-field{margin:0}.hf-admin-segment{display:flex;gap:3px;padding:4px;border:1px solid var(--admin-line);border-radius:10px}.hf-admin-segment button{min-height:42px;padding:8px 14px;border:0;background:transparent;color:var(--admin-ink);border-radius:7px;cursor:pointer}.hf-admin-segment button[aria-pressed=true]{background:var(--admin-ink);color:white}.hf-admin-board{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(280px,100%),1fr));align-items:start;gap:16px}.hf-admin-board-card{min-width:0;padding:16px;border:1px solid var(--admin-line);border-radius:14px;background:#fff;box-shadow:0 2px 5px #123d2510;transition:background .15s,border-color .15s}.hf-admin-board-card>header{display:flex;gap:8px;align-items:center;justify-content:space-between;margin-bottom:8px}.hf-admin-board-card h2{font-size:17px}.hf-admin-board-card small{color:var(--admin-muted);font-size:12px}.hf-admin-board-card>.hf-admin-button{width:100%;margin-top:12px}.hf-admin-board-members{margin-top:10px}.hf-admin-board-members details summary{padding:12px 0;cursor:pointer;font-weight:600;font-size:12px}.hf-admin-board-member{display:flex;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #e7ece2;min-height:58px}.hf-admin-member-copy{flex:1;min-width:0;display:grid;gap:2px}.hf-admin-member-copy strong{font-size:13px;line-height:1.4;overflow-wrap:anywhere}.hf-admin-member-copy small{font-size:11px}.hf-admin-drag-handle{touch-action:none;user-select:none;flex:0 0 44px;width:44px;height:44px;border:0;background:transparent;border-radius:8px;color:var(--admin-muted);display:grid;place-items:center;cursor:grab}.hf-admin-drag-handle:active{cursor:grabbing}.hf-admin-drag-handle:hover{background:var(--primary-soft)}.hf-admin-board-card.is-drop-target{background:#edf5e7;border:2px solid var(--admin-ink);padding:15px;box-shadow:0 0 0 3px #075d4925}.hf-admin-drag-ghost{position:fixed;pointer-events:none;z-index:20000;background:#075d49;color:white;padding:10px 16px;border-radius:10px;box-shadow:0 8px 24px #153b2550;font-size:14px;font-weight:700}.hf-admin-class-mapping{margin:20px 0;padding:16px;border:1px solid var(--admin-line);border-radius:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 14px}.hf-admin-class-mapping legend{font-weight:700;padding:0 6px}.hf-admin-class-mapping>p{grid-column:1/-1;margin-bottom:8px}.hf-admin-class-mapping .hf-admin-field{min-width:0;overflow-wrap:anywhere}.hf-admin-class-mapping select{width:100%}
.hf-username-dialog{--admin-ink:var(--primary,#075d49);--admin-line:var(--sage,#cfdbc6);--admin-paper:var(--cream,#f7f5e9);width:min(440px,calc(100% - 32px));max-height:calc(100dvh - 40px);overflow:auto;border:1px solid var(--admin-line);border-radius:20px;padding:24px;background:var(--admin-paper);color:var(--admin-ink);box-shadow:0 16px 64px #123d2530;font:inherit}.hf-username-dialog::backdrop{background:#163f3270;backdrop-filter:blur(4px)}.hf-username-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.hf-username-dialog h2{margin:0;font-size:23px}.hf-username-dialog p,.hf-username-dialog small{font-size:13px;line-height:1.6}.hf-username-dialog .hf-admin-field{margin:16px 0 6px}.hf-username-dialog form>button{width:100%;margin-top:12px}.hf-username-dialog #hfUsernameStatus{min-height:1.6em;overflow-wrap:anywhere}.hf-username-dialog input{font-size:16px}
@media(max-width:640px){.hf-admin-board-toolbar{grid-template-columns:minmax(0,1fr) minmax(110px,140px);gap:10px}.hf-admin-board-toolbar>.hf-admin-segment{grid-column:1/-1;justify-self:start}.hf-admin-board-toolbar .hf-admin-field{font-size:11px}.hf-admin-board-toolbar select{font-size:12px;min-height:44px}.hf-admin-board-toolbar .hf-admin-search input{font-size:13px}.hf-admin-board{grid-template-columns:1fr;gap:12px}.hf-admin-board-card{padding:14px}.hf-admin-bulkbar{gap:7px;padding:10px}.hf-admin-bulkbar>span{flex-basis:100%;font-size:12px}.hf-admin-bulkbar .hf-admin-button{flex:1;min-width:100px;font-size:11px}.hf-admin-student-row .hf-admin-avatar{display:none!important}.hf-admin-class-mapping{grid-template-columns:1fr;padding:12px}.hf-username-dialog{padding:20px}}

/* Hafaluma 3E.1 — Owner uses the existing admin component family. */
.hf-platform-shell {
  --admin-ink:var(--primary,#075C42);
  --admin-muted:var(--text-light,#5d7064);
  --admin-line:var(--sage,#cfdbc6);
  --admin-paper:var(--cream,#f7f5e9);
  box-sizing:border-box;
  width:min(1440px,100%);
  margin:0 auto;
  display:grid;
  grid-template-columns:210px minmax(0,1fr);
  gap:0;
  flex:1;
  min-height:calc(100dvh - 190px);
  color:var(--admin-ink);
  font-size:14px;
  line-height:1.55;
}
.hf-platform-shell[hidden],.hf-platform-shell [hidden] {display:none!important}
.hf-platform-shell * {box-sizing:border-box}
.hf-platform-mode .tabbar,.hf-platform-mode #backToTop {display:none!important}
.hf-platform-mode .topbar {position:relative;z-index:40}
.hf-platform-sidebar {
  padding:25px 18px 24px 12px;
  border-right:1px solid var(--admin-line);
  display:flex;
  flex-direction:column;
  gap:16px;
  align-self:stretch;
}
.hf-platform-sidebar nav {display:grid;gap:5px}
.hf-platform-sidebar nav button {
  display:flex;align-items:center;justify-content:flex-start;gap:12px;
  min-height:46px;padding:10px 12px;border:0;border-radius:10px;
  background:transparent;color:var(--admin-ink);font-weight:600;text-align:left;cursor:pointer;
}
.hf-platform-sidebar nav button[aria-current=page] {background:var(--primary-soft,#e5efdf);font-weight:750}
.hf-platform-sidebar nav button:hover {background:var(--primary-softer,#edf3e6)}
.hf-platform-workspace {padding:22px 28px 32px;min-width:0}
.hf-platform-workspace>* {min-width:0}
.hf-platform-shell .hf-admin-page-head h1 {font-size:26px;line-height:1.3;margin:0}
.hf-platform-shell p {line-height:1.6}
.hf-platform-shell small {display:block;color:var(--admin-muted);line-height:1.5}
.hf-platform-summary {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 20px}
.hf-platform-summary>div {
  background:#fff;border:1px solid var(--admin-line);border-radius:14px;
  padding:16px 18px;display:flex;flex-direction:column;gap:5px;min-width:0;
}
.hf-platform-summary strong {font-size:25px;line-height:1.2}
.hf-platform-summary span {font-size:12px;color:var(--admin-muted);overflow-wrap:anywhere}
.hf-platform-tools {display:grid;grid-template-columns:minmax(0,2fr) minmax(150px,1fr);gap:14px;margin:0 0 18px}
.hf-platform-tools:has([name=access_school]) {grid-template-columns:repeat(4,minmax(0,1fr))}
.hf-platform-tools label {min-width:0;margin:0!important}
.hf-platform-school-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:stretch}
.hf-platform-shell .hf-platform-school {margin:0;display:flex;flex-direction:column;gap:12px}
.hf-platform-school>header {align-items:flex-start;gap:10px;margin:0;flex-wrap:wrap}
.hf-platform-school h2 {font-size:18px;line-height:1.4;overflow-wrap:anywhere;margin:0;flex:1;min-width:120px}
.hf-platform-school>p {margin:0}
.hf-platform-school .hf-admin-help {margin:0!important}
.hf-platform-school .hf-admin-actions {gap:8px;margin-top:auto;padding-top:4px}
.hf-platform-school .hf-admin-actions button {min-height:44px}
.hf-platform-pill {
  display:inline-flex;align-items:center;white-space:nowrap;font-size:12px;font-weight:650;
  padding:4px 9px;border-radius:8px;background:#eef0e9;color:#4F6358;line-height:1.4;
}
.hf-platform-pill.is-active {background:#e1efdb;color:#075C42}
.hf-platform-pill.is-suspended,.hf-platform-pill.is-frozen {background:#fff0cc;color:#785318}
.hf-platform-pill.is-trash,.hf-platform-pill.is-purged {background:#f9e9e6;color:#923d37}
.hf-platform-audit {margin-top:20px}
.hf-platform-audit summary {cursor:pointer;font-weight:650;min-height:44px;display:flex;align-items:center;gap:8px}
.hf-platform-audit summary::before {content:"";width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);margin:0 4px}
.hf-platform-audit[open] summary::before {transform:rotate(45deg)}
.hf-platform-audit ol {padding-left:20px;margin:12px 0 0}
.hf-platform-audit li {padding:8px 0}
.hf-platform-audit li span {display:block;font-size:12px;color:var(--admin-muted);overflow-wrap:anywhere}
.hf-platform-context {display:flex;align-items:center;gap:12px;margin-bottom:20px;flex-wrap:wrap}
.hf-platform-entry-choices {display:grid;gap:12px;margin-top:20px}
.hf-platform-entry {
  display:grid;text-align:left;gap:6px;background:#fff;border:1px solid var(--admin-line);
  border-radius:14px;padding:18px;color:inherit;cursor:pointer;
}
.hf-platform-entry strong {font-size:16px}
.hf-platform-entry span {font-size:14px;color:var(--admin-muted);line-height:1.6}
.hf-platform-entry:hover {border-color:var(--admin-ink);background:var(--primary-softer,#edf3e6)}
.hf-platform-danger {border:1px solid #eac7be;background:#fff9f7;border-radius:14px;padding:18px;margin-top:24px;color:#803d31}
.hf-platform-danger h3 {color:inherit;margin:0 0 10px}
.hf-platform-danger .hf-admin-button.is-danger {background:#a43e35;color:#fff;border-color:#a43e35}
.hf-platform-field-wide {grid-column:1/-1;min-width:0}
#hfPlatformPanelBody h3 {margin:0 0 16px}
.hf-platform-rule {border:0;border-top:1px solid var(--admin-line);margin:24px 0}
.hf-platform-admin-row {display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 0;border-bottom:1px solid var(--admin-line)}
.hf-platform-admin-row:last-child {border:0}
.hf-platform-admin-row>div {min-width:0;overflow-wrap:anywhere}
.hf-platform-admin-row .hf-admin-button {min-height:44px}
.hf-platform-account-row {display:grid;grid-template-columns:20px minmax(0,1fr) auto;gap:12px;align-items:center;padding:16px 0;border-bottom:1px solid var(--admin-line)}
.hf-platform-account-row:last-child {border:0}
.hf-platform-account-row>input {width:20px;height:20px;accent-color:var(--admin-ink);margin:0}
.hf-platform-account-row strong {font-size:14px;overflow-wrap:anywhere}
.hf-platform-account-row small {font-size:12px;overflow-wrap:anywhere}
.hf-platform-account-row .hf-platform-pill {margin-top:5px}
.hf-platform-row-actions {display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.hf-platform-row-actions button {min-height:44px}
.hf-platform-backups {margin-top:24px}
.hf-platform-backups>article {display:flex;justify-content:space-between;align-items:center;gap:14px;padding:16px 0;border-bottom:1px solid var(--admin-line)}
.hf-platform-backups button {min-height:44px}
.hf-platform-backups>article>div {min-width:0}
.hf-platform-backups strong {overflow-wrap:anywhere}
.hf-platform-steps {display:flex;gap:8px;flex-wrap:wrap;margin-bottom:20px;font-size:12px}
.hf-platform-steps span {padding:6px 10px;background:#e9eddf;border-radius:8px;color:var(--admin-muted)}
.hf-platform-steps .is-current {background:#d8e8ce;color:#075C42;font-weight:700}
.hf-platform-backup-ready {display:flex;align-items:center;gap:15px;background:#e9f0df;padding:18px;border-radius:14px;margin-bottom:16px}
.hf-platform-backup-ready svg {width:30px;height:30px;flex-shrink:0}
.hf-platform-backup-ready p {margin:4px 0 0}
.hf-platform-restore-accounts {max-height:300px;overflow:auto;margin:18px 0}
.hf-platform-restore-accounts article {padding:12px 0;border-bottom:1px solid var(--admin-line)}
.hf-platform-warning {background:#fff1d2;color:#79551f;padding:14px 16px;border-radius:12px;font-size:14px;line-height:1.6}
.hf-platform-security {text-align:center;max-width:640px;margin:20px auto;padding:28px}
.hf-platform-security-mark {width:56px;height:56px;border-radius:16px;background:var(--primary-soft,#e5efdf);margin:0 auto 18px;display:grid;place-items:center}
.hf-platform-security-mark svg {width:28px;height:28px}
.hf-platform-security h2 {font-size:22px;line-height:1.4;margin:0 0 10px}
.hf-platform-security p {margin:0 0 16px}
.hf-platform-security .hf-admin-button {margin:6px 4px}
.hf-platform-secret {font:600 16px/1.8 ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:1px;overflow-wrap:anywhere;user-select:all;padding:18px;background:#e9f0df;border-radius:14px;margin:16px 0}
.hf-platform-recovery {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:20px 0}
.hf-platform-recovery code {padding:12px 8px;background:#e9f0df;border-radius:8px;text-align:center;font-size:13px;overflow-wrap:anywhere;user-select:all}
.hf-platform-instructions {padding-left:23px;line-height:1.7}
.hf-platform-instructions li {margin-bottom:10px}
.hf-platform-shell #hfPlatformPanel {max-width:800px}
.hf-platform-shell .hf-admin-field {margin-bottom:16px}
.hf-platform-shell input[type=file] {max-width:100%;font-size:14px}
.hf-platform-shell button:disabled {opacity:.5;cursor:not-allowed}
.hf-platform-shell :focus-visible {outline:2px solid var(--admin-ink);outline-offset:3px}
.hf-platform-shell .hf-admin-check {align-items:flex-start;margin:16px 0}
.hf-platform-shell .hf-admin-check input {flex:0 0 20px;width:20px;height:20px;margin-top:2px}
.hf-platform-shell .hf-admin-button.is-primary {background:var(--admin-ink);color:#fff}
#hfPlatformPanelBody form>p {margin:0 0 18px}
#hfPlatformPanelBody form>.hf-platform-steps {margin-bottom:20px}
.hf-platform-shell.has-panel .hf-platform-sidebar {display:none}
.hf-platform-shell.has-panel {grid-template-columns:minmax(0,1fr);width:min(900px,100%)}
.hf-platform-shell.has-panel .hf-platform-workspace {padding-top:18px}
.hf-platform-shell.has-panel #hfPlatformPanel>header {position:sticky;top:0;background:var(--admin-paper);z-index:2;padding:12px 0;margin:0 0 20px}
.hf-platform-mode>.hf-site-footer {margin-top:auto}
.hf-owner-readonly #guruFabContainer,.hf-owner-readonly #detailSettings button:not(#raportBtn),.hf-owner-readonly #pendingBox,.hf-owner-readonly #teacherSetoran,.hf-owner-readonly #detailTargetOpen {display:none!important}
.hf-owner-readonly-banner {margin:16px 0;padding:12px 16px;border:1px solid var(--admin-line,#d7e0cc);border-radius:12px;background:#edf2e4;font-size:13px;line-height:1.6}
.hf-owner-readonly [data-plan-focus],.hf-owner-readonly [data-plan-schedule],.hf-owner-readonly [data-plan-record],.hf-owner-readonly [data-plan-recommend] {display:none!important}
@media(min-width:1100px) {
  .hf-platform-workspace {padding:24px 32px 40px}
  .hf-platform-shell.has-panel .hf-platform-workspace {padding:18px 28px 32px}
}
@media(max-width:1000px) {
  .hf-platform-school-grid {grid-template-columns:1fr}
  .hf-platform-admin-row {align-items:flex-start;flex-direction:column}
}
@media(max-width:900px) {
  .hf-platform-shell {grid-template-columns:170px minmax(0,1fr)}
  .hf-platform-sidebar {padding-left:8px;padding-right:10px}
  .hf-platform-workspace {padding:18px}
  .hf-platform-shell .hf-admin-page-head {align-items:flex-start;flex-direction:column;gap:12px}
  .hf-platform-tools:has([name=access_school]) {grid-template-columns:1fr 1fr}
  .hf-platform-tools [name=access_school] {min-width:0}
}
@media(max-width:640px) {
  .hf-platform-shell {display:block;width:100%;min-height:calc(100dvh - 120px);padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  .hf-platform-sidebar {display:none}
  .hf-platform-workspace {padding:12px 16px 22px}
  .hf-platform-shell .hf-admin-page-head {gap:12px;margin-bottom:16px}
  .hf-platform-shell .hf-admin-page-head h1 {font-size:24px}
  .hf-platform-shell .hf-admin-page-head p {font-size:13px}
  .hf-platform-shell .hf-admin-page-head .hf-admin-actions {width:100%}
  .hf-platform-shell .hf-admin-page-head .hf-admin-actions>* {flex:1}
  .hf-platform-summary {gap:8px;margin-bottom:16px}
  .hf-platform-summary>div {padding:12px 10px;border-radius:12px}
  .hf-platform-summary strong {font-size:24px}
  .hf-platform-summary span {font-size:12px;line-height:1.4}
  .hf-platform-tools,.hf-platform-tools:has([name=access_school]) {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}
  .hf-platform-tools:has([name=access_school])>label:first-child {grid-column:1/-1}
  .hf-platform-school-grid {gap:14px}
  .hf-platform-shell .hf-platform-school {padding:16px;border-radius:14px}
  .hf-platform-school h2 {font-size:17px}
  .hf-platform-school .hf-admin-actions>* {flex:1}
  .hf-platform-account-row {grid-template-columns:20px minmax(0,1fr);gap:10px;padding:14px 0}
  .hf-platform-row-actions {grid-column:2;justify-content:flex-start}
  .hf-platform-row-actions button {flex:1}
  .hf-platform-backups>article {align-items:flex-start;flex-direction:column;gap:10px}
  .hf-platform-backups>article>.hf-admin-actions {width:100%}
  .hf-platform-backups>article>.hf-admin-actions>* {flex:1}
  .hf-platform-security {padding:22px 16px!important;margin:16px auto}
  .hf-platform-security h2 {font-size:20px}
  .hf-platform-security p {font-size:14px}
  .hf-platform-shell #hfPlatformPanel {padding:0}
  .hf-platform-shell .hf-admin-form-grid {grid-template-columns:1fr}
  .hf-platform-shell .hf-admin-field input,.hf-platform-shell .hf-admin-field select {font-size:16px}
  .hf-platform-shell .hf-admin-check {font-size:13px}
  .hf-platform-shell .hf-admin-help {font-size:12px}
  .hf-platform-shell .hf-admin-form-actions>.hf-admin-button {width:100%;min-height:48px;font-size:14px}
  .hf-platform-shell .hf-admin-panel>header h2 {font-size:21px;overflow-wrap:anywhere;min-width:0}
  .hf-platform-danger {padding:16px}
  .hf-platform-recovery {gap:8px}
  .hf-platform-recovery code {font-size:12px}
  #hfPlatformBulk {display:flex;align-items:center;gap:8px}
  #hfPlatformBulk .hf-admin-button {flex:1 1 auto;min-width:100px}
  .hf-platform-mobile-nav {grid-template-columns:repeat(3,minmax(0,1fr))}
  .hf-platform-mobile-nav button {font-size:11px}
  .hf-platform-shell.has-panel {padding-bottom:0}
  .hf-platform-shell.has-panel .hf-platform-workspace {padding:0 16px 22px}
  .hf-platform-shell.has-panel .hf-platform-mobile-nav {display:none}
  .hf-platform-mode>.hf-site-footer {margin-bottom:calc(76px + env(safe-area-inset-bottom,0px))}
  body.hf-platform-mode:has(#hfPlatform.has-panel)>.hf-site-footer {display:none}
}
@media(prefers-reduced-motion:reduce) {
  .hf-platform-shell * {scroll-behavior:auto!important;animation:none!important;transition:none!important}
}


/* 3E.2 — restrained review list and progress within the existing owner panel. */
.hf-cleanup-list{border:1px solid var(--border,#cad8c1);border-radius:14px;max-height:360px;overflow:auto;margin:16px 0;background:var(--white,#fff)}
.hf-cleanup-list article{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border,#cad8c1)}
.hf-cleanup-list article:last-child{border-bottom:0}.hf-cleanup-list strong,.hf-cleanup-list small{display:block;overflow-wrap:anywhere}.hf-cleanup-list small,.hf-cleanup-list article>span{color:var(--text-muted,#708477);font-size:.8rem}.hf-cleanup-list article>span{flex-shrink:0;text-align:right}
.hf-cleanup-progress progress{width:100%;height:12px;accent-color:var(--primary,#075d49);margin:12px 0 24px}.hf-cleanup-progress button{margin-bottom:8px}
#hfCleanupFinal{margin-top:20px}#hfCleanupFinal:empty{display:none}
@media(max-width:600px){.hf-cleanup-list{max-height:280px}.hf-cleanup-list article{align-items:flex-start;flex-direction:column;gap:4px}.hf-cleanup-list article>span{text-align:left}.hf-cleanup-list small{font-size:.78rem}}

/* 3E.3: scoped management, compact responsive recovery lists. */
.hf-management-context{padding:18px 20px;margin:0 0 20px;border:1px solid var(--border,#cddcc7);border-radius:18px;background:var(--surface-soft,#edf3e6);color:var(--primary,#075d49)}
.hf-management-context h3,.hf-management-context p{margin:0 0 8px}.hf-management-context p:last-child{margin-bottom:0}
.hf-management-list{display:grid;gap:10px;margin:18px 0}.hf-management-list article{display:flex;align-items:center;gap:12px;padding:14px 16px;border:1px solid #d6dfd0;border-radius:14px;background:#fff;min-width:0}.hf-management-list article>div{flex:1;min-width:0}.hf-management-list strong,.hf-management-list small{display:block;overflow-wrap:anywhere}.hf-management-list small{margin-top:4px;color:#5D7064}.hf-management-list p{margin:6px 0;font-size:.9rem}
.hf-management-action-grid{display:flex;flex-wrap:wrap;gap:10px;margin:16px 0}.hf-management-block{display:block;margin-top:7px;padding-left:10px;border-left:3px solid #d5b765;font-size:.82rem;line-height:1.45}.hf-management-block small{display:block;font-size:.78rem}.hf-management-block strong{font-weight:600}.hf-management-error{color:#a12f2f}.hf-management-progress{padding:24px 0}.hf-management-progress p{max-width:48ch;color:#5D7064}
.hf-platform-account-row>div{min-width:0}.hf-platform-row-actions{flex-wrap:wrap;justify-content:flex-end}.hf-platform-tools .hf-admin-field{min-width:0}.hf-platform-backups article>div{min-width:0;overflow-wrap:anywhere}
.hf-platform-pill.is-archived{background:#eef0ec;color:#4F6358}.hf-platform-pill.is-service{background:#fff1cd;color:#6c5017}
@media(max-width:600px){.hf-management-context{padding:14px;margin-bottom:14px}.hf-management-list article{padding:12px;align-items:flex-start}.hf-management-list .hf-admin-button{padding:9px 10px;min-height:40px;font-size:.8rem}.hf-platform-account-row{grid-template-columns:22px minmax(0,1fr)}.hf-platform-account-row .hf-platform-row-actions{grid-column:2;justify-content:flex-start;gap:6px}.hf-platform-account-row .hf-platform-row-actions .hf-admin-button{font-size:.8rem;min-height:38px;padding:8px 10px}.hf-platform-tools{grid-template-columns:repeat(2,minmax(0,1fr))}.hf-management-action-grid .hf-admin-button{flex:1 1 135px}.hf-platform-page-head .hf-admin-actions{gap:8px}}
.hf-management-primary-actions{display:flex;align-items:flex-start;gap:8px}.hf-management-menu{position:relative;min-width:92px}.hf-management-menu>summary{list-style:none;cursor:pointer;border:1px solid #ccd9c5;border-radius:11px;padding:12px 16px;min-height:44px;background:#fffef8;text-align:center;color:#075C42;font-size:.9rem;font-weight:600}.hf-management-menu>summary::-webkit-details-marker{display:none}.hf-management-menu>summary::after{content:'⌄';display:inline-block;margin-left:9px}.hf-management-menu[open]>summary{background:#e8f0df}.hf-management-menu>div{display:grid;gap:7px;padding-top:8px;min-width:170px}.hf-management-menu>div>.hf-admin-button{justify-content:flex-start;white-space:normal;text-align:left}.hf-platform-row-actions .hf-management-menu>div{position:absolute;right:0;z-index:10;min-width:180px;padding:9px;border:1px solid #ccd9c5;border-radius:12px;background:#fffdf6;box-shadow:0 10px 24px #173c2a24}.hf-platform-account-row:has(.hf-management-menu[open]){position:relative;z-index:11}
@media(max-width:600px){.hf-management-primary-actions{width:100%}.hf-management-primary-actions>.hf-admin-button{flex:1}.hf-platform-tools .hf-admin-field:has([name=account_search]){grid-column:1/-1}.hf-platform-row-actions .hf-management-menu>div{position:static;min-width:0;box-shadow:none}.hf-platform-row-actions .hf-management-menu{width:100%}.hf-platform-row-actions .hf-management-menu>summary{text-align:left;padding:8px 12px;min-height:38px}.hf-platform-row-actions .hf-management-menu>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.hf-platform-tools:has([name=account_search]) .hf-admin-field:has([name=account_search]){grid-row:1;grid-column:1/-1}.hf-platform-tools:has([name=account_search]) .hf-admin-field:has([name=account_kind]){grid-row:2;grid-column:1}.hf-platform-tools:has([name=account_search]) .hf-admin-field:has([name=account_filter]){grid-row:2;grid-column:2}.hf-platform-tools:has([name=access_school]) .hf-admin-field:has([name=access_school]){grid-row:1;grid-column:1/-1}.hf-platform-tools:has([name=access_school]) .hf-admin-field:has([name=account_search]){grid-row:2}.hf-platform-tools:has([name=access_school]) .hf-admin-field:has([name=account_kind]),.hf-platform-tools:has([name=access_school]) .hf-admin-field:has([name=account_filter]){grid-row:3}}
.hf-management-list [hidden]{display:none!important}.hf-recovery-selected{flex:0 0 20px;width:20px;height:20px;accent-color:#075d49}

/* Hafaluma 3E.4 — one management workspace and school identity. */
#hfManagementWorkspace{--admin-ink:#075c42;--admin-muted:#66796f;--admin-line:#dce5d5;display:grid;grid-template-columns:234px minmax(0,1fr);width:100%;max-width:1600px;margin:0 auto;align-items:start;flex:1;min-height:calc(100dvh - 86px);background:#f7f5ea}
#hfManagementWorkspace[hidden]{display:none!important}.hf-workspace-sidebar{position:sticky;top:0;align-self:start;min-height:calc(100dvh - 86px);padding:26px 16px;border-right:1px solid #dce5d5;background:#f7f5ea}.hf-workspace-nav-head{display:flex;align-items:center;justify-content:space-between;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:#6F8176;font-weight:700;padding:0 12px 20px}.hf-workspace-nav-head>button{display:none}#hfWorkspaceNav{display:grid;gap:5px}#hfWorkspaceNav button,#hfWorkspaceSwitch button{display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:12px;border:0;border-radius:10px;background:transparent;color:#075C42;text-align:left;font:600 14px/1.4 'Inter',sans-serif;cursor:pointer}#hfWorkspaceNav button:hover,#hfWorkspaceSwitch button:hover{background:#edf1e5}#hfWorkspaceNav button[aria-current=page]{background:#e5efdc;color:#075c42;font-weight:750}#hfManagementWorkspace svg,#hfWorkspaceHeaderTools svg,#hfPersonalAccountEntry svg{width:21px;height:21px;flex:0 0 21px}#hfWorkspaceSwitch{border-top:1px solid #dce5d5;margin-top:24px;padding-top:15px}.hf-workspace-main{min-width:0}.hf-workspace-toolbar{display:flex;align-items:center;gap:14px;min-height:62px;padding:16px 30px 0;color:#4F6358;font-size:13px;font-weight:650}#hfWorkspaceMenu{display:none}#hfWorkspaceBody>main{display:block!important;max-width:none!important;width:100%;min-height:0;margin:0;padding:0;border:0;background:transparent}#hfWorkspaceBody>main[hidden]{display:none!important}#hfWorkspaceBody>main>aside,#hfWorkspaceBody .hf-admin-mobile-nav{display:none!important}#hfWorkspaceBody .hf-admin-workspace,#hfWorkspaceBody .hf-platform-workspace{min-width:0;width:100%;padding:18px 30px 40px;max-width:1180px;margin:0 auto}#hfWorkspaceBody .hf-admin-context{justify-content:flex-end;min-height:34px;margin:0 0 16px;padding:0;background:transparent;border:0}#hfAdminSchoolName{display:none}#hfWorkspaceBody .hf-admin-context label{display:flex;align-items:center;gap:8px;font-size:12px}#hfWorkspaceBody .hf-admin-context select{min-height:38px;padding:8px 30px 8px 10px;font-size:12px}body.hf-management-workspace .topbar{position:relative;flex:0 0 auto}body.hf-management-workspace .topbar-inner{max-width:1600px;padding:16px 28px;min-height:82px}body.hf-management-workspace .hf-brand__word{max-width:155px}body.hf-management-workspace .hf-brand__symbol{max-width:40px}body.hf-management-workspace>.tabbar{display:none!important}body.hf-management-workspace .hf-site-footer{margin-top:0;padding:18px 20px}body.hf-personal-menu #profileDropdownMenu :is(#hfOwnerEntry,#hfAccessEntry,#hfSecurityEntry,#hfAdminEntry,#hfChangeUsername,#btnChangePassword){display:none!important}#hfPersonalAccountEntry{gap:12px}#hfWorkspaceHeaderTools{display:flex;align-items:center;gap:10px}#hfWorkspaceHeaderTools .hf-school-switch{width:205px;max-width:22vw;padding:0}#hfWorkspaceHeaderTools .hf-school-switch label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}#hfWorkspaceHeaderTools select{font-size:12px;min-height:38px;padding:7px 10px;max-width:100%;background:#fff}#hfWorkspaceAdminOpen{min-height:38px;font-size:12px;padding:8px 12px}
#hfManagementWorkspace .hf-admin-page-head{align-items:flex-start;gap:18px;margin:4px 0 24px}#hfManagementWorkspace h1{font-size:27px;letter-spacing:-.04em;line-height:1.25;margin:0 0 7px}#hfManagementWorkspace .hf-admin-page-head p{font-size:13px;line-height:1.6;margin:0;color:#5D7064}#hfManagementWorkspace .hf-admin-page-head .hf-admin-eyebrow{display:none}#hfManagementWorkspace .hf-admin-card{border:1px solid #dce5d5;border-radius:14px;padding:20px;background:#fff;box-shadow:none;margin-bottom:20px}#hfManagementWorkspace h2{font-size:18px;line-height:1.4;letter-spacing:-.02em}#hfManagementWorkspace .hf-admin-button{min-height:40px;border-radius:9px;padding:9px 13px;font-size:13px;gap:8px;font-weight:600;line-height:1.45}#hfManagementWorkspace .hf-admin-button.is-primary{background:#075c42;color:#fff;border-color:#075c42}#hfManagementWorkspace .hf-admin-field{font-size:12px;line-height:1.5;margin-bottom:14px}#hfManagementWorkspace .hf-admin-field :is(input,select){min-height:42px;padding:10px 12px;border-radius:9px;font-size:13px;line-height:1.4;background-color:#fff;border:1px solid #d0ddc9}#hfManagementWorkspace .hf-admin-help{font-size:12px;line-height:1.6;color:#5D7064}#hfManagementWorkspace .hf-admin-list-row{padding:14px 2px;gap:12px;min-height:72px}#hfManagementWorkspace .hf-admin-list-row strong{font-size:14px;line-height:1.5}#hfManagementWorkspace .hf-admin-list-row small{font-size:12px;line-height:1.6}#hfManagementWorkspace .hf-admin-roster-check{width:18px;height:18px;min-width:18px;min-height:18px;flex:0 0 18px}#hfManagementWorkspace .hf-admin-avatar{width:36px;height:36px;min-width:36px;flex:0 0 36px;aspect-ratio:1;border-radius:50%}#hfManagementWorkspace .hf-admin-list-row>div{min-width:0}#hfManagementWorkspace .hf-admin-tools,#hfManagementWorkspace .hf-platform-tools{gap:12px}#hfManagementWorkspace .hf-admin-filter-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}#hfManagementWorkspace .hf-platform-tools{display:grid;grid-template-columns:1fr 1.5fr 1fr}#hfManagementWorkspace .hf-platform-tools:has([name=access_school]){grid-template-columns:repeat(2,minmax(0,1fr))}#hfManagementWorkspace .hf-management-context{display:none}#hfManagementWorkspace .hf-admin-bulkbar{border:0;border-radius:9px;min-height:0;background:transparent;padding:0 0 12px;gap:8px;font-size:12px}#hfManagementWorkspace .hf-admin-bulkbar.is-selected{padding:12px;background:#e8f0df}.hf-admin-bulkbar:empty{display:none!important}#hfManagementWorkspace .hf-platform-account-row{padding:14px 0;min-height:78px;gap:12px;align-items:center}#hfManagementWorkspace .hf-platform-account-row strong{font-size:14px}#hfManagementWorkspace .hf-platform-account-row small{font-size:12px}#hfManagementWorkspace .hf-platform-account-row>input{width:18px;height:18px;min-width:18px;min-height:18px;flex:0 0 18px}#hfManagementWorkspace .hf-platform-pill{font-size:11px;line-height:1.5;padding:3px 8px;border-radius:6px;margin:4px 0 0}#hfManagementWorkspace .hf-platform-account-row>div:nth-child(2){flex:1;min-width:0}#hfManagementWorkspace .hf-management-menu>summary{display:grid;place-items:center;width:38px;height:38px;min-width:38px;padding:8px;border:1px solid #dce5d5;border-radius:9px;list-style:none;cursor:pointer;color:#075c42;background:#fff}#hfManagementWorkspace .hf-management-menu>summary::-webkit-details-marker{display:none}#hfManagementWorkspace .hf-management-menu>summary:after{display:none}#hfManagementWorkspace .hf-management-menu>div{border:1px solid #dce5d5;border-radius:10px;min-width:200px;max-width:calc(100vw - 38px);box-shadow:0 12px 35px #123c2524;padding:6px;background:#fff;z-index:40}#hfManagementWorkspace .hf-management-menu>div .hf-admin-button{display:flex;justify-content:flex-start;width:100%;border:0;background:transparent;text-align:left;border-radius:6px}#hfManagementWorkspace .hf-management-menu>div .hf-admin-button:hover{background:#eff4e8}#hfManagementWorkspace .hf-admin-panel{max-width:800px}#hfManagementWorkspace .hf-admin-panel>header{padding-bottom:18px;border-bottom:1px solid #dce5d5;margin-bottom:22px}#hfManagementWorkspace .hf-admin-panel>header h2{font-size:20px}#hfManagementWorkspace .hf-admin-form-actions{flex-wrap:wrap}#hfManagementWorkspace :is(button,a,input,select,summary):focus-visible{outline:3px solid #b4cda4;outline-offset:3px}.hf-school-identity-card{display:flex;align-items:center;gap:20px;padding:22px;border:1px solid #dce5d5;background:#fff;border-radius:14px;margin-bottom:20px}.hf-school-identity-card p,.hf-school-upload p{font-size:13px;color:#5D7064;line-height:1.6;margin:6px 0 14px}.hf-school-identity-card small{display:block;font-size:11px;color:#5D7064;margin-top:10px}.hf-school-logo-preview{display:grid;place-items:center;width:96px;height:96px;min-width:96px;border:1px solid #dce5d5;border-radius:16px;background:#f9faf5;overflow:hidden}.hf-school-logo-preview img{max-width:100%;max-height:100%;width:100%;height:100%;object-fit:contain}.hf-school-setting-section{border:1px solid #dce5d5;background:#fff;padding:20px;border-radius:14px;margin-bottom:18px}.hf-school-setting-section>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.hf-school-setting-section dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hf-school-setting-section dl>div{min-width:0}.hf-school-setting-section dt{font-size:12px;color:#5D7064;margin-bottom:5px}.hf-school-setting-section dd{font-size:14px;margin:0;overflow-wrap:anywhere;color:#075C42}.hf-school-setting-section .hf-admin-help{margin:18px 0 0}.hf-school-brand{gap:12px!important;min-width:0}.hf-school-brand-logo{width:48px!important;height:48px!important;object-fit:contain;flex:0 0 48px}.hf-school-brand-copy{display:flex;flex-direction:column;gap:5px;min-width:0}.hf-school-brand-copy strong{font:700 18px/1.3 'Inter',sans-serif;max-width:320px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#075c42}.hf-school-brand-copy small{display:flex;align-items:center;gap:4px;font-size:10px;font-weight:500;line-height:1.2;color:#5D7064}.hf-school-brand-copy small img{width:12px;height:12px;object-fit:contain}.hf-school-brand-context{display:block;font-size:10px;color:#6F8176;margin-top:5px;max-width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hf-school-support-empty{font-size:12px;color:#5D7064}
@media(max-width:900px){#hfManagementWorkspace{grid-template-columns:200px minmax(0,1fr)}.hf-workspace-sidebar{padding:22px 10px}#hfWorkspaceBody .hf-admin-workspace,#hfWorkspaceBody .hf-platform-workspace{padding:16px 20px 32px}.hf-workspace-toolbar{padding:14px 20px 0}.hf-school-brand-copy strong{max-width:190px;font-size:16px}#hfManagementWorkspace .hf-admin-page-head{flex-wrap:wrap}#hfWorkspaceHeaderTools .hf-school-switch{width:150px}#hfWorkspaceAdminOpen{max-width:130px}}
@media(max-width:680px){#hfManagementWorkspace{display:block;min-height:calc(100dvh - 76px)}.hf-workspace-sidebar{display:none;position:fixed;inset:0 auto 0 0;z-index:1001;width:min(290px,85vw);height:100dvh;overflow:auto;box-shadow:0 0 0 100vmax #17392a66;background:#f7f5ea;padding:24px 16px}.nav-open .hf-workspace-sidebar{display:block}.hf-workspace-nav-head>button{display:grid;place-items:center;width:36px;height:36px;border:1px solid #dce5d5;border-radius:8px;background:#fff;color:#075c42}.hf-workspace-toolbar{min-height:54px;padding:12px 16px 0;gap:12px}#hfWorkspaceMenu{display:flex;align-items:center;gap:7px;border:1px solid #dce5d5;border-radius:8px;background:#fff;color:#075c42;padding:8px;font:600 12px 'Inter',sans-serif}#hfWorkspaceContext{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#hfWorkspaceBody .hf-admin-workspace,#hfWorkspaceBody .hf-platform-workspace{padding:18px 16px 28px}body.hf-management-workspace .topbar-inner{padding:12px 16px;min-height:76px;gap:12px}body.hf-management-workspace .topbar .user-name{font-size:12px;max-width:110px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}body.hf-management-workspace .topbar .user-role{font-size:9px}body.hf-management-workspace .hf-brand__word{max-width:94px}body.hf-management-workspace .hf-brand__symbol{width:28px;min-width:28px}.hf-school-brand-logo{width:36px!important;height:36px!important;flex-basis:36px}.hf-school-brand{gap:8px!important}.hf-school-brand-copy strong{font-size:13px;max-width:135px}.hf-school-brand-copy small{font-size:9px}.hf-school-brand-context{max-width:135px;font-size:9px}#hfWorkspaceHeaderTools{position:static}#hfWorkspaceHeaderTools .hf-school-switch{width:110px;max-width:26vw}#hfWorkspaceHeaderTools select{font-size:10px;padding:5px;min-height:34px}#hfWorkspaceAdminOpen{font-size:10px;padding:6px;max-width:100px}#hfManagementWorkspace h1{font-size:23px}#hfManagementWorkspace .hf-admin-page-head{gap:14px;margin-bottom:20px}#hfManagementWorkspace .hf-admin-page-head .hf-admin-actions{width:100%;flex-wrap:wrap}#hfManagementWorkspace .hf-admin-button{font-size:12px;min-height:40px;padding:9px 11px}#hfManagementWorkspace .hf-admin-card{padding:14px;border-radius:12px}#hfManagementWorkspace .hf-admin-student-row{display:grid;grid-template-columns:18px 32px minmax(0,1fr) 36px;gap:8px}#hfManagementWorkspace .hf-admin-student-row>input{grid-column:1}#hfManagementWorkspace .hf-admin-student-row .hf-admin-avatar{grid-column:2;width:32px;height:32px;min-width:32px}#hfManagementWorkspace .hf-admin-student-row .hf-admin-student-copy{grid-column:3}#hfManagementWorkspace .hf-admin-student-row>.hf-admin-button{grid-column:4;padding:7px;min-width:36px}#hfManagementWorkspace .hf-admin-list-row strong{font-size:13px}#hfManagementWorkspace .hf-admin-list-row small{font-size:11px}#hfManagementWorkspace .hf-admin-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#hfManagementWorkspace .hf-platform-tools,#hfManagementWorkspace .hf-platform-tools:has([name=access_school]){grid-template-columns:repeat(2,minmax(0,1fr))}#hfManagementWorkspace .hf-platform-tools .hf-admin-field:has([name=account_search]){grid-column:1/-1;grid-row:1}#hfManagementWorkspace .hf-platform-account-row{gap:10px}#hfManagementWorkspace .hf-platform-account-row strong{font-size:13px}#hfManagementWorkspace .hf-platform-account-row small{font-size:11px}#hfManagementWorkspace .hf-admin-form-grid{grid-template-columns:1fr}.hf-school-identity-card{padding:16px;gap:14px;align-items:flex-start}.hf-school-logo-preview{width:64px;height:64px;min-width:64px;border-radius:12px}.hf-school-setting-section{padding:16px}.hf-school-setting-section dl{grid-template-columns:1fr;gap:15px}.hf-school-setting-section dd{font-size:13px}.hf-school-identity-card h2{font-size:16px!important}.hf-school-identity-card p{font-size:12px}.hf-school-identity-card .hf-admin-actions{flex-wrap:wrap}#hfManagementWorkspace .hf-admin-panel>header h2{font-size:18px}#hfManagementWorkspace .hf-admin-pagination{font-size:11px;gap:8px;flex-wrap:wrap}}
@media(prefers-reduced-motion:reduce){#hfManagementWorkspace *{scroll-behavior:auto;animation:none;transition:none}}
.hf-school-list-identity{display:flex;gap:12px;align-items:center;min-width:0}.hf-school-list-identity>img{width:40px;height:40px;object-fit:contain;flex:0 0 40px}.hf-school-list-identity h2{overflow-wrap:anywhere}#hfManagementWorkspace .hf-school-list-identity>svg{width:36px;height:36px;flex-basis:36px;padding:6px;background:#eaf1e2;border-radius:10px}body.hf-management-workspace:has(.hf-workspace-toolbar) #hfWorkspaceHeaderTools .hf-school-switch{max-width:220px}@media(max-width:680px){body.hf-management-workspace #hfWorkspaceHeaderTools .hf-school-switch{max-width:110px}body.hf-management-workspace .topbar-inner{flex-wrap:wrap}body.hf-management-workspace #hfWorkspaceHeaderTools:has(.hf-school-switch:not([hidden])){order:3;width:100%;justify-content:flex-end}body.hf-management-workspace .topbar-user{flex-wrap:wrap;justify-content:flex-end;gap:6px}.hf-school-list-identity h2{font-size:16px!important}}

/* Hafaluma 3E.5 — scoped shared role UI; existing learning/brand tokens retained. */
.hf-avatar-anchor{position:relative;display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;overflow:visible;isolation:isolate;vertical-align:middle}
.hf-role-avatar{display:inline-flex;width:44px;height:44px;flex:0 0 auto;aspect-ratio:1;border-radius:50%;align-items:center;justify-content:center;overflow:hidden;background:#e6efdf;color:var(--primary,#075c46)}
.hf-role-avatar>svg{display:block;width:100%;height:100%}.hf-avatar-seal{position:absolute!important;inset-block-start:-4px;inset-inline-end:-5px;z-index:2;line-height:1}
.hf-avatar-seal .hf-verification-button{width:27px!important;height:27px!important;min-width:27px!important;min-height:27px!important;padding:1px!important;aspect-ratio:1;background:var(--bg,#f7f5e9);border-radius:50%;box-shadow:0 1px 3px #133e2326}
.hf-avatar-seal .hf-verification-button>svg{width:23px;height:23px}.hf-header-avatar .student-profile-button{padding:2px;gap:4px}.hf-header-avatar>.hf-avatar-seal{inset-inline-end:16px}
.student-dashboard-page .student-profile-details{display:none}.student-dashboard-page .topbar-inner{gap:12px}.student-dashboard-page .topbar .logo{min-width:0;flex:1}.student-dashboard-page .student-profile-area{flex:0 0 auto;gap:10px}
.hf-header-badges{background:none;border:0;padding:4px 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:76px;min-height:48px;max-width:136px;color:var(--primary,#075c46);cursor:pointer}
.hf-header-badge-art{display:flex;gap:2px;justify-content:center}.hf-header-badge-art .hf-badge-art{width:36px;height:36px;margin:0;object-fit:contain;filter:drop-shadow(0 1px 1px #1c3e1820)}
.hf-header-badge-line{display:block;height:3px;width:100%;max-width:112px;background:#d8e4cf;border-radius:4px;overflow:hidden;position:relative}.hf-header-badge-line>span{display:block;height:100%;background:#267a59;position:relative;border-radius:inherit}.hf-header-badge-line>span:after{content:'';position:absolute;inset:0;background:linear-gradient(90deg,transparent,#fff8,transparent);animation:hf-badge-light 2.8s ease-in-out 3}
.hf-header-badge-empty{font-size:11px;line-height:1.15;white-space:nowrap}.student-dashboard-page #badgeHighlight{display:none!important}
@keyframes hf-badge-light{from{transform:translateX(-110%)}to{transform:translateX(110%)}}
.profile-overview-layout{max-width:850px;margin-inline:auto;gap:16px}.student-profile-card{min-width:0}.profile-identity{gap:18px}.profile-identity>.hf-avatar-anchor>.hk-profile-avatar{width:76px;height:76px;aspect-ratio:1;border-radius:50%;overflow:hidden}
.profile-account-info>div{padding:12px 0;align-items:start;gap:12px}.profile-account-info dt{font-size:13px}.profile-account-info dd{font-size:14px;overflow-wrap:anywhere}.profile-back-button{border:0;background:none;min-height:44px;padding:8px 0;gap:9px;font-weight:600;border-radius:4px;box-shadow:none}.profile-back-button .hf-ui-icon{width:22px;height:22px}
.hf-detail-profile{padding-block:8px 24px}.hf-detail-profile[hidden]{display:none!important}.hf-detail-profile>.profile-back-button{margin-bottom:16px}.hf-detail-profile .profile-overview-layout{display:grid}
.hf-account-only #hfWorkspaceSidebar,.hf-account-only .hf-workspace-toolbar,.hf-mfa-gate #hfWorkspaceSidebar{display:none!important}.hf-account-only #hfManagementWorkspace,.hf-mfa-gate #hfManagementWorkspace{display:block!important}.hf-account-only .hf-workspace-main,.hf-mfa-gate .hf-workspace-main{width:100%;max-width:960px;margin-inline:auto;padding:24px}.hf-account-only #hfPlatform,.hf-mfa-gate #hfPlatform{max-width:100%;padding:0}
.hf-account-only #hfWorkspaceHeaderTools,.hf-mfa-gate #hfWorkspaceHeaderTools{display:none!important}.hf-account-only .hf-workspace-nav-head{display:none}.hf-account-back{margin-bottom:12px}.hf-security-placeholder{min-height:50vh;display:grid;align-content:center;justify-items:center;text-align:center;gap:16px;max-width:550px;margin:auto;padding:28px 16px}.hf-security-placeholder .hf-ui-icon{width:48px;height:48px;color:#6F8176}.hf-security-placeholder h1,.hf-security-placeholder p{margin:0}.hf-security-placeholder p{color:#6F8176;line-height:1.6}
.hf-role-greeting{margin:0 0 24px}.hf-role-greeting h2{font-size:clamp(21px,3vw,28px);margin:0 0 8px;color:var(--primary,#075c46)}.hf-role-greeting p{margin:0;color:#6F8176;line-height:1.5}
.hf-username-dialog{position:fixed!important;inset:0!important;margin:auto!important;width:min(440px,calc(100vw - 32px))!important;max-height:calc(100dvh - 48px)!important;height:fit-content!important;overflow-y:auto!important;box-sizing:border-box;padding:24px;border:1px solid #cbdac2;border-radius:20px;background:var(--bg,#f7f5e9);color:#075C42}.hf-username-dialog::backdrop{background:#123e3070;backdrop-filter:blur(3px)}.hf-username-dialog form{display:grid;gap:16px}.hf-username-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px}.hf-username-dialog h2{margin:0;font-size:22px}.hf-username-dialog .hf-admin-field{gap:8px}
.hf-teacher-review-banner{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:12px;margin:12px auto 24px;padding:16px 20px;background:#e7efdf;border-radius:16px;max-width:1200px}.hf-teacher-review-banner strong,.hf-teacher-review-banner small{display:block}.hf-teacher-review-banner small{margin-top:4px;color:#5D7064}.hf-teacher-review-mode #backupBtn,.hf-teacher-review-mode #guruAddSiswaBtn,.hf-teacher-review-mode #addSiswaBtn,.hf-teacher-review-mode [data-bulk-target]{display:none!important}
.hf-owner-split-summary{display:grid;gap:12px}.hf-owner-split-summary li{margin-bottom:6px}.hf-owner-split-credentials{padding:16px;border:1px solid #c3d4ba;background:#eef3e8;border-radius:12px;overflow-wrap:anywhere}.hf-owner-split-credentials code{font-size:15px;user-select:all}.hf-owner-split-credentials article+article{border-top:1px solid #ccd9c3;margin-top:12px;padding-top:12px}
@media(max-width:600px){.student-dashboard-page .topbar-inner{padding:12px 16px;gap:8px}.student-dashboard-page .topbar .logo{max-width:calc(100% - 160px)}.student-dashboard-page .hf-school-brand-copy strong{font-size:14px;line-height:1.2;max-width:128px;overflow-wrap:anywhere}.student-dashboard-page .hf-school-brand-logo{width:34px;height:34px}.student-dashboard-page .hf-school-brand-copy small{font-size:9px}.student-dashboard-page .student-profile-area{gap:7px}.hf-header-badges{min-width:74px;max-width:94px}.hf-header-badge-art .hf-badge-art{width:29px;height:29px}.hf-header-badge-line{width:86px}.hf-header-avatar .student-profile-button>.hf-ui-icon{display:none}.hf-header-avatar>.hf-avatar-seal{inset-inline-end:-5px}.hf-header-avatar .user-gender-icon{width:38px;height:38px}.student-dashboard-page .hf-brand__word{display:none}.student-dashboard-page .hf-school-brand-context{font-size:12px;max-width:110px}.profile-account-info>div{grid-template-columns:minmax(0,1fr) minmax(0,1.2fr)}.profile-identity{padding:18px;gap:16px}.hf-account-only .hf-workspace-main,.hf-mfa-gate .hf-workspace-main{padding:20px 16px}.hf-management-workspace .hf-workspace-toolbar{padding:0 0 16px;gap:12px;align-items:center}.hf-workspace-toolbar #hfWorkspaceContext{font-size:13px;line-height:1.4;min-width:0;overflow-wrap:anywhere}.hf-management-workspace .hf-workspace-sidebar{max-width:min(300px,85vw)}.hf-management-workspace .topbar .hf-school-brand-context{display:none}.hf-username-dialog{padding:20px}.hf-role-avatar{width:40px;height:40px}#hfStaffAvatar{margin-inline-end:6px}}
@media(prefers-reduced-motion:reduce){.hf-header-badge-line>span:after{animation:none}.hf-avatar-seal *{transition:none!important}}
.hf-owner-split-dialog{position:fixed;inset:0;margin:auto;width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 48px);height:fit-content;overflow:auto;box-sizing:border-box;padding:24px;border:1px solid #cbdac2;border-radius:20px;background:#f7f5e9;color:#075C42}.hf-owner-split-dialog::backdrop{background:#123e3070;backdrop-filter:blur(3px)}.hf-owner-split-dialog>header{display:flex;align-items:center;justify-content:space-between;gap:12px}.hf-owner-split-dialog h2{font-size:23px;margin:0}.hf-owner-split-dialog form{display:grid;gap:16px}.hf-owner-split-dialog>header button{display:grid;place-items:center;border:0;background:transparent;width:44px;height:44px;flex-shrink:0;color:inherit;border-radius:50%}.hf-owner-split-dialog p{line-height:1.55}.hf-owner-split-dialog #hfSplitStatus{color:#a84632}#hfStaffAvatar~.profile-trigger-info .user-gender-icon{display:none}.hf-teacher-review-mode #teacherBulkTargetOpen{display:none!important}
@media(max-width:680px){#hfManagementWorkspace .hf-admin-student-row>.hf-avatar-anchor{grid-column:2;width:32px}#hfManagementWorkspace .hf-admin-student-row>.hf-avatar-anchor>.hf-role-avatar{width:32px;height:32px}.hf-admin-list-row:has([data-pick-teacher]){display:flex;flex-wrap:wrap;gap:12px}.hf-admin-list-row:has([data-pick-teacher])>div:first-of-type{flex:1;min-width:100px}.hf-admin-list-row:has([data-pick-teacher])>.hf-admin-button{flex:1 1 auto}.hf-admin-list-row:has([data-pick-teacher])>.hf-role-avatar{width:36px;height:36px}.hf-management-workspace .topbar-user{flex-wrap:nowrap!important}.hf-management-workspace .topbar-inner{flex-wrap:nowrap!important}body.hf-management-workspace #hfWorkspaceHeaderTools:has(.hf-school-switch:not([hidden])){width:auto!important;order:initial!important}#hfWorkspaceHeaderTools .hf-school-switch{width:100px!important;max-width:26vw!important}.hf-management-workspace .hf-school-brand-copy strong{max-width:110px!important}}
.hf-account-only #hfWorkspaceBody .hf-platform-workspace{padding:12px 0}.hf-account-only .hf-admin-eyebrow{display:none}
.hf-neutral-avatar{display:inline-flex;width:38px;height:38px;aspect-ratio:1;flex:0 0 auto;border-radius:50%;overflow:hidden}.hf-neutral-avatar svg{width:100%;height:100%}.profile-identity{display:flex!important;align-items:center!important;justify-content:flex-start!important}.profile-identity h2,.profile-identity h3{margin:0 0 6px}.profile-identity p{margin:0 0 6px}.profile-identity>.hf-role-avatar{width:64px;height:64px}.hf-username-dialog p,.hf-username-dialog label{margin:0}.hf-username-dialog .hf-admin-field{gap:8px}.hf-username-dialog #hfUsernameStatus:empty{display:none}
.topbar #profileTrigger:has(#hfStaffAvatar) .user-gender-icon{display:none!important}.topbar #hfStaffAvatar{width:44px;height:44px;flex:0 0 44px}.topbar #profileTrigger{gap:10px}.topbar #hfStaffAvatar svg{width:100%;height:100%}
.teacher-detail-page.student-profile-open main>.siswa-info-card,.teacher-detail-page.student-profile-open main>.month-selector-wrap,.teacher-detail-page.student-profile-open #pendingBox,.teacher-detail-page.student-profile-open #detailInfoState{display:none!important}.teacher-detail-page.student-profile-open .hf-detail-profile{max-width:700px;width:100%;margin:0 auto}.hf-detail-profile .profile-account-info dd{margin:0}
.hf-student-card-link{display:flex;align-items:flex-start;gap:12px;flex:1;min-width:0;color:inherit;text-decoration:none}.hf-student-card-link:focus-visible{outline:2px solid #075c42;outline-offset:4px;border-radius:4px}.teacher-student-card>.hf-avatar-anchor{align-self:flex-start}.hf-teacher-review-banner .hf-admin-details{flex-basis:100%;width:100%}.hf-teacher-review-banner .hf-admin-details>summary{cursor:pointer;font-weight:600;min-height:40px;display:flex;align-items:center}
.student-profile-open .fab-container{display:none!important}.teacher-detail-page.student-profile-open .hf-site-footer{order:initial}.teacher-detail-page.student-profile-open .hf-detail-profile~footer{margin-top:24px}
.student-profile-view .hf-profile-avatar{--hf-avatar-size:80px}.student-profile-view .hf-profile-name{overflow-wrap:anywhere}.student-profile-view .hf-profile-username{color:var(--text-muted);overflow-wrap:anywhere}@media(max-width:380px){.student-profile-view .hf-profile-avatar{--hf-avatar-size:64px}}
.hf-owner-split-dialog,.hf-detail-profile,.hf-teacher-review-banner{--admin-ink:var(--primary,#075c42);--admin-line:var(--sage,#cfdbc6);--admin-paper:#fff;--admin-muted:#66796f}.hf-owner-split-dialog>header .hf-ui-icon{width:22px;height:22px}.hf-owner-split-dialog .hf-admin-field input,.hf-owner-split-dialog .hf-admin-field select{font-size:16px}
/* 3E.6 — compact shared header; the profile owns the verification seal. */
.topbar #profileTrigger:has(#hfStaffAvatar){width:44px;height:44px;min-width:44px;min-height:44px;padding:0!important;gap:0!important;border:0;background:transparent!important;box-shadow:none;border-radius:50%}
.topbar #profileTrigger:has(#hfStaffAvatar)>.user-info,.topbar #profileTrigger:has(#hfStaffAvatar)>.chevron-dropdown{display:none!important}
.topbar #hfStaffAvatar{margin:0!important;width:44px;height:44px;flex-basis:44px}
.hf-account-menu-identity{font-size:14px;font-weight:650;line-height:1.5;color:var(--primary,#075c42);padding:12px 16px;border-bottom:1px solid #dce5d5;overflow-wrap:anywhere}
.hf-header-avatar .student-profile-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:0!important;gap:0;border:0;background:transparent!important;box-shadow:none;border-radius:50%}
.hf-header-avatar .student-profile-button>.hf-ui-icon{display:none!important}.hf-header-avatar .user-gender-icon{width:44px!important;height:44px!important;flex:0 0 44px}
.hf-avatar-anchor{--seal-hit:28px;--seal-art:16px;--seal-overlap:-8px}
.hf-avatar-anchor:has(>.hf-profile-avatar){--seal-hit:34px;--seal-art:24px;--seal-overlap:-7px}
.hf-avatar-anchor:has(>#siswaAvatar){--seal-hit:34px;--seal-art:24px;--seal-overlap:-7px}
.hf-header-avatar{--seal-hit:30px;--seal-art:18px;--seal-overlap:-9px}
.hf-avatar-anchor>.hf-avatar-seal,.hf-header-avatar>.hf-avatar-seal{inset-block-start:var(--seal-overlap);inset-inline-end:var(--seal-overlap)}
.hf-avatar-seal .hf-verification-button{display:grid!important;place-items:center!important;width:var(--seal-hit)!important;height:var(--seal-hit)!important;min-width:var(--seal-hit)!important;min-height:var(--seal-hit)!important;padding:0!important;border:0;background:transparent!important;box-shadow:none!important;border-radius:50%}
.hf-avatar-seal .hf-verification-button>svg{width:var(--seal-art)!important;height:var(--seal-art)!important;flex:0 0 auto;filter:drop-shadow(0 1px 1px #123e2526)}
.hf-avatar-seal .hf-verification-button:focus-visible{outline:2px solid var(--primary,#075c42);outline-offset:1px}
.hf-initial-password-help{font-size:13px;color:var(--text-muted,#66796f);line-height:1.55;margin:8px 0 0}
.hf-owner-access-history>summary{font-size:14px;font-weight:600;cursor:pointer;min-height:44px;display:flex;align-items:center}
.hf-mobile-tabbar{display:none!important}.hf-mobile-more:not([open]){display:none}
.hf-mobile-more{position:fixed;inset:auto 0 0;margin:0 auto;width:min(100%,520px);max-width:100%;max-height:80dvh;box-sizing:border-box;overflow-y:auto;overscroll-behavior:contain;padding:12px 20px calc(20px + env(safe-area-inset-bottom));border:1px solid #dce5d5;border-bottom:0;border-radius:24px 24px 0 0;background:#f7f5ea;color:var(--primary,#075c42);box-shadow:0 -12px 48px #123e2526}
.hf-mobile-more::backdrop{background:#153e315c;backdrop-filter:blur(3px)}
.hf-mobile-more>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 12px}.hf-mobile-more h2{font-size:21px;line-height:1.4;margin:0}.hf-mobile-more [data-more-close]{display:grid;place-items:center;min-width:44px;width:44px;height:44px;border:0;background:none;color:inherit;border-radius:50%}.hf-mobile-more svg{width:23px;height:23px;flex:0 0 23px}
#hfMobileMoreLinks{display:grid;gap:2px}#hfMobileMoreLinks>button{display:flex;gap:14px;align-items:center;width:100%;min-height:52px;padding:12px 10px;border:0;border-radius:10px;background:transparent;text-align:start;color:#075C42;font:600 14px/1.5 'Inter',sans-serif;cursor:pointer}
#hfMobileMoreLinks>button:hover,#hfMobileMoreLinks>button[aria-current=page]{background:#e5efdc}
#hfMobileContext:empty{display:none}#hfMobileContext{display:grid;gap:14px;padding:4px 0 16px;border-bottom:1px solid #dce5d5;margin-bottom:12px}#hfMobileContext label{display:grid;gap:7px;font:600 13px/1.5 'Inter',sans-serif;color:#5D7064}#hfMobileContext select{width:100%;min-height:44px;border:1px solid #cfdbc6;border-radius:10px;background:#fff;color:#075C42;font:400 16px/1.5 'Inter',sans-serif;padding:10px 32px 10px 12px}#hfMobileContext .hf-school-switch{width:100%!important;max-width:none!important;padding:0!important}#hfMobileContext .hf-school-switch label{position:static;width:auto;height:auto;clip:auto;overflow:visible}
@media(max-width:680px){
 .teacher-dashboard-page>.tabbar:not(.hf-mobile-tabbar){display:none!important}
 body.teacher-dashboard-page>.hf-mobile-tabbar,body.hf-management-workspace>.hf-mobile-tabbar{display:block!important;z-index:900}
 .hf-mobile-tabbar .tabbar-inner{width:100%;padding:0 12px!important;height:64px;gap:0;overflow:visible}
 .hf-mobile-tabbar .tabbar-btn{display:flex!important;flex:1 1 0;max-width:140px;min-width:0;min-height:56px;gap:4px;padding:8px 2px;font-size:11px;line-height:1.25;white-space:nowrap;color:#6F8176;background:none;border:0;box-shadow:none}
 .hf-mobile-tabbar .tabbar-btn.active{color:var(--primary,#075c42)}.hf-mobile-tabbar .tab-icon,.hf-mobile-tabbar svg{width:23px;height:23px;display:block}.hf-mobile-tabbar .tabbar-btn.active::after{display:none}.hf-mobile-tabbar .tabbar-btn.active::before{top:0;width:22px}
 #hfManagementWorkspace .hf-workspace-toolbar,#hfManagementWorkspace .hf-workspace-sidebar{display:none!important}
 #hfWorkspaceHeaderTools{display:none!important}
 body.hf-management-workspace #hfManagementWorkspace{min-height:calc(100dvh - 154px)}
 #hfWorkspaceBody .hf-admin-workspace,#hfWorkspaceBody .hf-platform-workspace{padding:20px 16px 32px}
 #hfWorkspaceBody .hf-admin-context{display:none!important}
 body.teacher-dashboard-page{padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
 body.teacher-dashboard-page .topbar-inner,body.student-dashboard-page .topbar-inner{padding:12px 16px!important;gap:12px;min-height:72px;flex-wrap:nowrap!important}
 body.teacher-dashboard-page .topbar-user{flex:0 0 44px;gap:0!important}
 body.teacher-dashboard-page .topbar .logo{flex:1 1 0;min-width:0}
 body.teacher-dashboard-page .hf-school-brand-copy strong{font-size:14px!important;line-height:1.3;max-width:calc(100vw - 138px)!important}
 .student-dashboard-page .topbar .logo{max-width:none!important;flex:1 1 0}.student-dashboard-page .student-profile-area{gap:10px}
 .student-dashboard-page .hf-header-badges{min-width:64px;max-width:68px;min-height:44px;padding:4px 0;gap:2px}
 .student-dashboard-page .hf-header-badge-art{gap:1px}.student-dashboard-page .hf-header-badge-art .hf-badge-art{width:21px;height:21px}
 .student-dashboard-page .hf-header-badge-line{height:2px;width:62px;max-width:100%}
 .student-dashboard-page .hf-school-brand-copy strong{max-width:100%;font-size:13px;white-space:nowrap}
 .student-dashboard-page .hf-school-brand-context{max-width:100%;font-size:10px}
 .hf-account-only .hf-workspace-main,.hf-mfa-gate .hf-workspace-main{padding:20px 16px}
 .hf-mobile-more:focus{outline:none}.hf-mobile-more :is(button,select):focus-visible{outline:2px solid #075c42;outline-offset:2px}
}
@media(prefers-reduced-motion:no-preference){.hf-mobile-more[open]{animation:hf-more-open .2s ease-out}@keyframes hf-more-open{from{transform:translateY(18px);opacity:.7}to{transform:translateY(0);opacity:1}}}
@media(max-width:680px){
 .topbar .logo:has(.hf-school-brand-context){display:flex;align-items:center;gap:10px;min-width:0}
 .topbar .logo:has(.hf-school-brand-context) .hf-brand{flex:0 0 auto}
 .topbar .logo:has(.hf-school-brand-context) .hf-brand__word{display:none!important}
 .topbar .logo:has(.hf-school-brand-context) .hf-brand__symbol{width:34px;min-width:34px;height:34px}
 .topbar .logo:has(.hf-school-brand-context) .hf-brand__emblem{width:34px;height:34px}
 body .topbar .logo .hf-school-brand-context{display:block!important;flex:1;min-width:0;max-width:none;margin:0;font-size:14px;line-height:1.35;font-weight:650;color:var(--primary,#075c42);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
/* Prevent the legacy 44 px flex basis from stretching the seal across the avatar. */
.hf-avatar-anchor>.hf-avatar-seal{width:var(--seal-hit)!important;height:var(--seal-hit)!important;min-width:var(--seal-hit)!important;min-height:var(--seal-hit)!important;flex:0 0 var(--seal-hit)!important}
.hf-avatar-anchor>.hf-avatar-seal .hf-verification-button{flex:0 0 var(--seal-hit)!important;max-width:var(--seal-hit)!important;max-height:var(--seal-hit)!important}
.hf-header-avatar .user-gender-icon .hf-avatar{--hf-avatar-size:44px!important}
.teacher-detail-page .topbar .user-name{display:none!important}

/* 3E.9 — bounded school identity; owner console keeps its full official lockup. */
body .topbar .logo.hf-header-school{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%}
body .topbar .logo.hf-header-school .hf-brand.hf-school-brand{flex:1 1 0;max-width:100%;min-width:0}
body .topbar .hf-header-school .hf-school-brand-copy{flex:1 1 0;min-width:0;overflow:hidden}
body .topbar .hf-header-school .hf-school-name-viewport{display:block!important;min-width:0;max-width:100%!important;overflow:hidden;white-space:nowrap;text-overflow:clip!important;line-height:1.5;overflow-wrap:normal}
body .topbar .hf-school-name-text{display:block;width:max-content;max-width:none;white-space:nowrap;transform:translateX(0)}
body .topbar .hf-school-name-viewport:focus-visible{outline:2px solid #075c42;outline-offset:2px}
body .topbar .hf-school-name-manual{overflow-x:auto!important;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x}
body .topbar .hf-school-name-manual::-webkit-scrollbar{display:none}
body .topbar .logo.hf-header-platform .hf-brand{display:inline-flex;align-items:center;gap:10px;min-width:0}
body .topbar .logo.hf-header-platform .hf-brand__word{display:block!important;width:144px;max-width:none;height:auto}
@media(max-width:680px){
 body .topbar .logo.hf-header-school{flex:1 1 0;max-width:100%!important}
 body .topbar .hf-header-school .hf-school-brand-logo{width:34px!important;height:34px!important;flex:0 0 34px!important}
 body .topbar .hf-header-school .hf-school-brand-copy strong{font-size:13px!important;max-width:100%!important}
 body .topbar .hf-header-school .hf-school-brand-context{flex:1 1 0!important;max-width:100%!important;font-size:13px!important}
 body .topbar .logo.hf-header-platform .hf-brand__symbol{width:30px!important;height:30px!important;min-width:30px;flex:0 0 30px}
 body .topbar .logo.hf-header-platform .hf-brand__emblem{width:30px!important;height:30px!important}
 body .topbar .logo.hf-header-platform .hf-brand__word{width:122px!important;max-width:122px!important;flex:0 0 122px}
 body .topbar .logo.hf-header-platform{min-width:162px;flex:1 1 0}
 body.teacher-dashboard-page .topbar-user:has(.hf-staff-header-name){flex:0 1 auto;max-width:44%}
 body.hf-platform-mode .topbar-user:has(.hf-staff-header-name){max-width:40%}
 body.hf-platform-mode .hf-staff-header-name{max-width:110px}
}
@media(prefers-reduced-motion:reduce){body .topbar .hf-school-name-text{transform:none!important}}

.hf-owner-header-caption{display:none}
@media(max-width:680px){
 body .topbar-inner:has(.hf-header-platform){display:grid;grid-template-columns:minmax(0,1fr) 44px;column-gap:12px;row-gap:5px;align-items:center}
 body .topbar-inner:has(.hf-header-platform)>.logo{grid-column:1;grid-row:1}
 body .topbar-inner:has(.hf-header-platform)>.topbar-user{grid-column:2;grid-row:1;min-width:44px;width:44px;max-width:44px!important}
 body .topbar-inner:has(.hf-header-platform) #profileTrigger{width:44px;min-width:44px;padding:0!important;gap:0!important}
 body .topbar-inner:has(.hf-header-platform) .hf-staff-header-name{display:none!important}
 body .topbar-inner:has(.hf-header-platform) .hf-owner-header-caption{display:block;grid-column:1/-1;grid-row:2;color:var(--text-muted,#66796f);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
}

/* 3E.7 — the same spacing, account identity and controls across school roles. */
.student-dashboard-page .topbar-inner{display:grid!important;grid-template-columns:minmax(0,auto) minmax(72px,1fr) 44px;align-items:center;gap:clamp(8px,2vw,24px)}
.student-dashboard-page .topbar .logo{min-width:0;max-width:100%!important;display:flex;align-items:center;gap:8px}
.student-dashboard-page .student-profile-area{display:contents!important}.student-dashboard-page .hf-header-badges{justify-self:center;min-width:0;max-width:100%;width:max-content;padding:4px 0}
.student-dashboard-page .hf-header-avatar{justify-self:end;grid-column:3;width:44px;min-width:44px}
.student-dashboard-page .hf-school-brand-context,.student-dashboard-page .hf-school-brand-copy strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:clamp(70px,27vw,260px)!important;overflow-wrap:normal!important}
.student-dashboard-page .hf-brand.hf-school-brand{min-width:0}.hf-staff-header-name{display:block;max-width:clamp(100px,24vw,320px);min-width:0;overflow:hidden;white-space:nowrap;font-weight:600;font-size:1rem;line-height:1.4;color:var(--primary,#075c46)}
.topbar #profileTrigger:has(#hfStaffAvatar){width:auto!important;max-width:100%;height:auto;min-height:44px;gap:10px!important;display:flex;align-items:center;border-radius:12px;padding:2px!important}
.topbar #hfStaffAvatar{order:2;flex:0 0 44px}.hf-staff-header-name{order:1}.hf-owner-identity #hfStaffAvatar{outline:1px solid #c9ab58;outline-offset:3px}
.hf-owner-identity .hf-staff-header-name:after{content:'Pengelola Hafaluma';display:block;font-size:.75rem;font-weight:500;color:var(--text-muted,#66796f)}
.teacher-detail-page .profile-dropdown{position:relative}.teacher-detail-page #profileDropdownMenu{position:absolute;right:0;top:calc(100% + 10px);min-width:220px;z-index:90;background:#fff;border:1px solid #dce5d5;border-radius:16px;padding:8px;box-shadow:0 12px 32px #123e2522}
.teacher-detail-page #profileDropdownMenu .dropdown-item{display:flex;width:100%;min-height:44px;align-items:center;padding:10px 12px;border:0;background:transparent;text-align:left;font:inherit;color:var(--primary,#075c46);text-decoration:none;border-radius:9px}
.teacher-detail-page #profileDropdownMenu .danger{color:#a63232}.teacher-detail-page .siswa-info-card .hf-avatar-anchor{display:inline-flex;align-items:center;justify-content:center;width:80px;height:80px;flex:0 0 80px;position:relative;overflow:visible}
.teacher-detail-page .siswa-info-card #siswaAvatar{width:80px!important;height:80px!important;min-width:80px!important;aspect-ratio:1;border-radius:50%;flex:0 0 80px}.hf-avatar-anchor{isolation:isolate}.hf-avatar-seal{transform:none!important;overflow:visible!important}
.hf-memorization .progress-card-header{margin:0 0 12px!important;display:block!important}.hf-memorization .progress-card-header h3{margin:0 0 3px!important;font-size:1.0625rem}.hf-memorization .progress-card-header p{margin:0!important}
.hf-memorization .hf-progress-overview{display:flex!important;align-items:baseline;justify-content:flex-start!important;gap:8px;margin:0 0 8px!important}.hf-progress-overview>strong{font-size:1.75rem!important;line-height:1.2}.hf-progress-overview>p{margin:0!important;font-size:.875rem}
.hf-memorization .hf-progress-counts{display:flex!important;justify-content:flex-start!important;flex-wrap:wrap;gap:8px 20px;max-width:none!important;padding:12px 0!important;margin:0!important}.hf-progress-counts>span{display:flex!important;align-items:baseline;gap:5px;font-size:.875rem}.hf-progress-counts>span strong{display:inline!important;font-size:1rem!important}
.hf-memorization .hf-juz-heading{display:flex;justify-content:space-between;gap:8px}.hf-memorization .hf-juz-row p{margin:5px 0 0!important;font-size:.8125rem;line-height:1.5}.hf-memorization .hf-progress-active>h4{margin-top:12px}.hf-progress-content{min-width:0}
.hf-category-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hf-category-grid>button,.hf-plan-card{min-width:0;display:flex;flex-direction:column;align-items:stretch;gap:8px;padding:16px;border:1px solid #ccdcca;border-radius:14px;line-height:1.5;text-align:left}.hf-category-grid>button strong{font-size:1rem}.hf-category-grid>button small{font-size:.875rem}.hf-category-grid>button{min-height:120px}
.hf-plan-grid{align-items:stretch}.hf-plan-card>button{margin-top:auto;min-height:44px}.hf-plan-card h4,.hf-plan-card p{margin:0}.hf-learning-dialog input,.hf-learning-dialog select{font-size:1rem!important}.hf-review-item{display:flex;flex-direction:column;gap:6px}.hf-review-item select{width:100%}
.hf-verification-page #hfWorkspaceSidebar,.hf-verification-page .hf-workspace-toolbar,.hf-verification-page #hfWorkspaceHeaderTools,.hf-verification-page .tabbar,.hf-verification-page .hf-site-footer,.hf-verification-page #hfPlatformNav,.hf-verification-page #hfPlatformMobileNav{display:none!important}
.hf-verification-page #hfManagementWorkspace{display:block!important}.hf-verification-page .hf-workspace-main{width:min(100%,560px);margin:auto;padding:24px 16px!important}.hf-verification-page #hfPlatformPanel{margin:0}.hf-verification-page #hfPlatformPanelBody form{max-width:100%}.hf-verification-card{text-align:center;padding:24px 12px}.hf-verification-card>svg{width:40px;height:40px;margin-bottom:12px}.hf-verification-card h1{font-size:1.5rem}.hf-verification-card p{line-height:1.65}.hf-verification-card button{margin:8px}
.hf-workflow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:20px}.hf-workflow-head h1{margin:0 0 6px;font-size:1.75rem}.hf-workflow-head p{margin:0;color:var(--text-muted,#66796f);line-height:1.6}
.hf-workflow-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}.hf-workflow-tabs button[aria-current]{background:#e5efdd;font-weight:700}.hf-workflow-form{display:grid;gap:16px;max-width:720px}.hf-workflow-form fieldset{border:1px solid #dce5d5;border-radius:12px;padding:14px;min-width:0}.hf-workflow-form legend{padding:0 5px;font-weight:600}.hf-workflow-form label{display:flex;flex-direction:column;gap:8px;font-size:.875rem;line-height:1.6}.hf-workflow-form input:not([type=checkbox]),.hf-workflow-form select{width:100%;min-height:46px;border:1px solid #ccd8c4;border-radius:10px;padding:10px 12px;font:inherit;background:#fff;color:#075C42;box-sizing:border-box}.hf-workflow-form input[type=checkbox]{width:18px;height:18px;flex:0 0 18px}.hf-workflow-check{flex-direction:row!important;align-items:flex-start}.hf-workflow-result{padding:16px;border:1px solid #dce5d5;border-radius:12px;background:#fff;line-height:1.65;margin:14px 0}.hf-workflow-results{display:grid;gap:10px;margin:16px 0}.hf-workflow-results article{border:1px solid #dce5d5;border-radius:12px;padding:14px;background:#fff;min-width:0;overflow-wrap:anywhere}.hf-workflow-results h3,.hf-workflow-results p{margin:0 0 6px}.hf-workflow-status{line-height:1.65;white-space:pre-line;overflow-wrap:anywhere;outline:none}.hf-workflow-status.is-error{color:#a63232}.hf-workflow-progress{width:100%;accent-color:#075c46}.hf-workflow-tools{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.hf-workflow-tools>button{min-height:44px}
.hf-admin-list-row>div{min-width:0}.hf-admin-list-row strong{line-height:1.5;overflow-wrap:anywhere}.hf-admin-list-row small{font-size:.8125rem;line-height:1.6}.hf-admin-page-head .hf-admin-actions{flex-wrap:wrap}.hf-admin-bulkbar{gap:8px;flex-wrap:wrap}.hf-admin-bulkbar button{white-space:normal}.hf-workflow-empty{padding:24px 12px;text-align:center;color:var(--text-muted,#66796f)}
@media(max-width:680px){.hf-staff-header-name{max-width:clamp(78px,31vw,170px);font-size:.875rem}.topbar-user{min-width:0}.teacher-detail-page .logo-text{display:none}.hf-category-grid{grid-template-columns:minmax(0,1fr)}.hf-category-grid>button{min-height:0}.hf-workflow-head h1{font-size:1.4rem}.hf-workflow-tools{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.hf-workflow-tools button{padding:10px 12px}.hf-admin-list-row{gap:10px!important}.hf-admin-list-row .hf-admin-actions{width:100%}.hf-verification-page .hf-workspace-main{padding-top:12px!important}}
@media(max-width:380px){.student-dashboard-page .hf-school-brand-context,.student-dashboard-page .hf-school-brand-copy strong{max-width:90px!important}.student-dashboard-page .hf-header-badge-art .hf-badge-art{width:20px!important;height:20px!important}.student-dashboard-page .hf-header-badge-line{max-width:64px}.hf-progress-counts{column-gap:12px!important}}
@media(prefers-reduced-motion:reduce){.hf-header-badge-line>span:after{animation:none!important}}

@media(max-width:680px){body.teacher-dashboard-page .topbar-user{flex:0 1 auto!important;max-width:66%;min-width:44px}body.teacher-dashboard-page .topbar .logo{flex:1 1 auto;max-width:40%}.teacher-dashboard-page .hf-school-brand-context,.teacher-dashboard-page .hf-school-brand-copy strong{max-width:100%!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.teacher-dashboard-page .hf-school-brand-copy{min-width:0}.hf-mobile-tabbar .tabbar-inner{justify-content:space-around}.hf-mobile-tabbar .tabbar-btn{max-width:none}}
/* The detail page inherits student dashboard classes but its topbar belongs to the actor. */
.teacher-detail-page .topbar-inner{display:flex!important;justify-content:space-between;align-items:center;gap:12px!important}.teacher-detail-page .topbar .logo{flex:1 1 auto;max-width:none!important;min-width:0}.teacher-detail-page .topbar-user{flex:0 1 auto;max-width:58%;min-width:44px}.teacher-detail-page .logo-text{display:none}
.teacher-detail-page .siswa-info-card{grid-template-columns:64px minmax(0,1fr) 44px!important;gap:14px!important;align-items:center!important}.teacher-detail-page .siswa-info-card>.hf-avatar-anchor{width:64px!important;height:64px!important;min-width:64px;flex:0 0 64px}.teacher-detail-page .siswa-info-card #siswaAvatar{--hf-avatar-size:64px!important;width:64px!important;height:64px!important;min-width:64px!important;max-width:64px!important;min-height:64px!important;max-height:64px!important;aspect-ratio:1;flex:0 0 64px}.teacher-detail-page .siswa-info-text{min-width:0}.teacher-detail-page .siswa-info-text h1{overflow-wrap:anywhere;line-height:1.4}.teacher-detail-page .siswa-info-card>.hf-avatar-anchor{--seal-art:20px;--seal-hit:30px;--seal-overlap:-7px}
@media(max-width:680px){.teacher-detail-page .siswa-info-card{grid-template-columns:48px minmax(0,1fr) 44px!important;gap:12px!important}.teacher-detail-page .siswa-info-card>.hf-avatar-anchor{width:48px!important;height:48px!important;min-width:48px!important;flex-basis:48px!important}.teacher-detail-page .siswa-info-card #siswaAvatar{--hf-avatar-size:48px!important;width:48px!important;height:48px!important;min-width:48px!important;max-width:48px!important;min-height:48px!important;max-height:48px!important;flex-basis:48px!important}.teacher-detail-page .siswa-info-card>.hf-avatar-anchor{--seal-art:18px;--seal-hit:28px;--seal-overlap:-7px}.teacher-detail-page .hf-staff-header-name{max-width:clamp(70px,29vw,150px)}.hf-memorization .hf-progress-counts>span{flex-direction:row!important}}

.hf-workflow-form>*{margin:0!important}.hf-owner-identity .hf-staff-header-name{white-space:normal;overflow-wrap:anywhere;max-width:clamp(110px,35vw,320px)}.hf-memorization .hf-progress-counts>span{flex-direction:row!important}

/* 3E.8: role-aware access state, review context and compact responsive rosters. */
.hf-review-context{padding:12px 20px;max-width:1160px;width:calc(100% - 32px);box-sizing:border-box;margin:12px auto 0;border-left:3px solid #b9a258;background:#edf1e4;border-radius:8px;line-height:1.55;color:#075C42}.hf-review-context nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:12px}.hf-review-context a{color:#075c42;text-underline-offset:3px}.hf-review-actor{font-size:12px;margin-bottom:3px}.hf-review-context p{font-weight:700;font-size:14px;margin:4px 0 8px;overflow-wrap:break-word}.hf-review-actions{display:flex;gap:16px;flex-wrap:wrap;font-size:12px}.hf-review-actions a{padding:5px 0;min-height:24px}.hf-teacher-review-banner{display:none!important}
.hf-profile-learning{margin-top:16px}.hf-profile-field[hidden]{display:none!important}.hf-profile-visibility-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.hf-profile-visibility-grid fieldset{min-width:0;border:1px solid #d2dfc9;border-radius:12px;padding:16px}.hf-profile-visibility-grid legend{font-weight:700;padding:0 6px}.hf-profile-visibility-grid label{display:flex;align-items:flex-start;gap:10px;margin:12px 0;font-size:14px;line-height:1.5}.hf-profile-visibility-grid input{width:18px;height:18px;flex:0 0 18px;accent-color:#075c42}.hf-profile-preference-actions{display:flex;gap:10px;flex-wrap:wrap}
.hf-admin-list-row:has(>[data-pick-teacher]){display:grid;grid-template-columns:24px 44px minmax(0,1fr) auto auto;gap:12px;align-items:center}.hf-admin-list-row:has(>[data-pick-teacher])>div{min-width:0}.hf-admin-list-row:has(>[data-pick-teacher]) strong{overflow-wrap:break-word;word-break:normal}.hf-admin-list-row:has(>[data-pick-teacher]) small{word-break:normal;overflow-wrap:break-word}.hf-admin-list-row .hf-management-menu summary{min-height:40px;min-width:40px;display:flex;align-items:center;justify-content:center}
.hf-admin-bulkbar .hf-admin-button:disabled{opacity:.45;cursor:default}.hf-admin-bulkbar[data-empty=true]{background:transparent;padding-left:0;padding-right:0}.hf-admin-bulkbar[data-empty=true]>button:not([data-pick-visible]){display:none}
@media(max-width:640px){.hf-review-context{width:calc(100% - 32px);margin-top:10px;padding:10px 12px}.hf-review-context p{font-size:13px}.hf-admin-list-row:has(>[data-pick-teacher]){grid-template-columns:22px 38px minmax(0,1fr) 40px;gap:10px;padding:14px 0}.hf-admin-list-row:has(>[data-pick-teacher])>.hf-role-avatar{width:38px;height:38px;min-width:38px}.hf-admin-list-row:has(>[data-pick-teacher])>input{grid-column:1;grid-row:1}.hf-admin-list-row:has(>[data-pick-teacher])>.hf-role-avatar{grid-column:2;grid-row:1}.hf-admin-list-row:has(>[data-pick-teacher])>div{grid-column:3;grid-row:1;min-width:0}.hf-admin-list-row:has(>[data-pick-teacher])>a{grid-column:2/4;grid-row:2;justify-self:start;font-size:12px;min-height:40px;padding:8px 12px}.hf-admin-list-row:has(>[data-pick-teacher])>details{grid-column:4;grid-row:1;align-self:start}.hf-admin-page-head .hf-admin-actions{display:flex;flex-wrap:wrap}.hf-admin-page-head .hf-admin-actions>*{flex:0 1 auto;min-height:44px}.hf-admin-page-head .hf-admin-actions>.is-primary{flex-basis:100%}.hf-profile-visibility-grid{grid-template-columns:1fr}.hf-admin-bulkbar:not([data-empty=true])>.hf-admin-button{flex:1 1 calc(50% - 8px);min-width:0}.hf-admin-bulkbar .hf-admin-button{min-height:44px}.hf-admin-list-row>div strong{overflow-wrap:break-word}.hf-review-context+.hf-owner-readonly-banner{display:none}}

.hf-admin-bulkbar[data-empty=true]>span{display:none}.hf-teacher-data-menu{min-width:120px}.hf-teacher-data-menu summary{min-height:44px;box-sizing:border-box;padding:10px 14px;cursor:pointer;border:1px solid #cbd8c2;border-radius:10px}.hf-review-profile{width:100%}.hf-review-profile>summary{cursor:pointer;padding:5px 0}.hf-review-profile .student-profile-card{margin:12px 0;text-decoration:none;font-size:14px}.hf-admin-help>summary{padding:8px 0;cursor:pointer}.hf-profile-field[hidden]{display:none!important}
@media(max-width:640px){.hf-admin-page-head .hf-admin-actions:has(.hf-teacher-data-menu)>.is-primary{flex:1 1 auto}.hf-teacher-data-menu{min-width:100px}.hf-teacher-data-menu summary{font-size:12px}.hf-review-actions{gap:8px}}



.hf-teacher-data-menu>summary{display:flex;align-items:center;justify-content:center;gap:8px;width:auto!important;min-width:120px;height:auto!important}.hf-teacher-data-menu>summary>span{white-space:nowrap}.hf-teacher-data-menu>summary>svg{flex:0 0 16px}
/* Keep the named data menu out of the flex sizing of its open popover. */
body.hf-management-workspace .hf-admin-page-head details.hf-teacher-data-menu{position:relative;flex:0 0 128px;width:128px;min-width:128px}
body.hf-management-workspace .hf-admin-page-head details.hf-teacher-data-menu>summary{display:flex!important;flex-direction:row;align-items:center;justify-content:center;gap:8px;min-width:0;width:100%!important;height:44px!important;min-height:44px;padding:8px;box-sizing:border-box}
body.hf-management-workspace .hf-admin-page-head details.hf-teacher-data-menu>div{position:absolute!important;inset:auto 0 auto auto;top:calc(100% + 6px);width:200px!important;max-width:calc(100vw - 32px);z-index:1200}
body:has(#hfReviewContext) .hf-owner-readonly-banner{display:none!important}

/* Persistent actor/context strip; the large brand header scrolls away. */
body .topbar:has(+ #hfReviewContext){position:relative!important}
#hfReviewContext{position:sticky;top:0;z-index:920;flex:0 0 auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 16px;width:100%;max-width:none;margin:0;border:0;border-bottom:1px solid #d0ddc8;border-radius:0;padding:10px max(16px,calc((100vw - 1160px)/2));background:#edf1e4;box-shadow:0 3px 12px #153e310a}
#hfReviewContext .hf-review-actor{margin:0;grid-column:1;grid-row:1}
#hfReviewContext nav{grid-column:2;grid-row:1;justify-content:flex-end}
#hfReviewContext p{grid-column:1;grid-row:2;margin:0;font-size:13px;min-width:0}
#hfReviewContext .hf-review-actions{grid-column:2;grid-row:2;align-items:center;justify-content:flex-end;gap:12px}
#hfReviewContext .hf-review-profile{position:relative;width:auto}
#hfReviewContext .hf-review-profile>section{position:absolute;right:0;top:100%;width:min(400px,calc(100vw - 32px));max-height:65dvh;overflow:auto;background:#fff;border:1px solid #d0ddc8;border-radius:12px;padding:16px;box-shadow:0 10px 24px #153e3120;z-index:2}
@media(max-width:680px){#hfReviewContext{padding:9px 16px;gap:2px 10px}#hfReviewContext .hf-review-actor{grid-column:1/-1;font-size:11px}#hfReviewContext nav{grid-column:1;grid-row:2;justify-content:flex-start;font-size:11px}#hfReviewContext p{grid-row:3;font-size:12px}#hfReviewContext .hf-review-actions{grid-row:2/4;grid-column:2;max-width:116px;font-size:11px;gap:3px}#hfReviewContext .hf-review-actions>a{line-height:1.5;text-align:right}#hfReviewContext .hf-review-profile>summary{font-size:11px;min-height:28px}#hfReviewContext .hf-review-profile>section{right:0}}
.hf-management-welcome{max-width:580px;margin:20px auto;text-align:center;line-height:1.7}.hf-management-welcome h1{font-size:clamp(22px,5vw,29px)}

@media(max-width:680px){
 body .topbar-inner:has(.hf-header-school)>.topbar-user:has(.hf-staff-header-name){flex:0 0 clamp(104px,38vw,156px)!important;width:clamp(104px,38vw,156px);max-width:44%;min-width:0}
 body .topbar-inner:has(.hf-header-school) #profileTrigger{width:100%;min-width:0;max-width:100%;justify-content:flex-end}
 body .topbar-inner:has(.hf-header-school) .hf-staff-header-name{flex:1 1 0;min-width:0;max-width:100%;font-size:12px}
 body .topbar-inner:has(.hf-header-school) .hf-staff-header-name:after{display:none}
 #hfReviewContext p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.5}
}

#hfTeacherMain.hf-review-needs-verification>:not(#hfTeacherReviewVerification){display:none!important}

body.hf-access-checking>:not(#hfAccessGate),body.hf-access-blocked>:not(#hfAccessGate){display:none!important}
body:is(.hf-access-checking,.hf-access-blocked){display:block!important;min-height:100dvh;overflow:auto;background:var(--cream,#faf7ee)!important;color:var(--primary,#075c42)}
#hfAccessGate[hidden]{display:none!important}#hfAccessGate{min-height:100dvh;display:grid;place-items:center;padding:32px 20px;box-sizing:border-box}
.hf-access-message{max-width:520px;text-align:center;margin:auto}.hf-access-message h1{font-size:clamp(23px,5vw,32px);line-height:1.4;margin:18px 0 12px;color:var(--primary,#075c42)}.hf-access-message p{font-size:15px;line-height:1.85;color:var(--muted,#6c8175);margin:8px 0}.hf-access-mark svg{width:42px;height:42px;opacity:.7}.hf-access-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:12px;margin-top:24px}.hf-access-actions>*{font:inherit;min-height:44px;padding:12px 20px;border:1px solid #cad8c1;border-radius:12px;background:transparent;color:#075c42;text-decoration:none;cursor:pointer}.hf-access-actions .hf-access-contact{background:#075c42;color:#fff;border-color:#075c42}

body.hf-protected-page:is(.hf-access-checking,.hf-access-blocked)>#hfAccessGate:not([hidden]){display:grid!important}
.hf-access-message h1:focus{outline:none}

/* The identity and context share one sticky surface. The profile menu sits above its second row. */
body .topbar:has(> #hfReviewContext) {
  position: sticky !important;
  top: 0;
  z-index: 92;
  height: auto;
  overflow: visible;
  background: var(--cream, #faf7ee);
  box-shadow: 0 4px 16px #174a3510;
}
.topbar:has(> #hfReviewContext) .topbar-inner { position: relative; z-index: 2; overflow: visible; }
.topbar > #hfReviewContext {
  position: relative;
  z-index: 1;
  background: linear-gradient(100deg, #e5eee1, #f4f5ea);
  border-block: 1px solid #cfdcca;
  box-shadow: none;
}
#hfReviewContext .hf-review-actor strong { color: #075C42; }
.topbar #profileDropdownMenu { max-height: min(65dvh, 28rem); overflow-y: auto; }
#hfManagementWorkspace .hf-admin-list-row:has([data-pick-teacher]) > details {
  position: relative; min-width: 0; justify-self: end;
}
#hfManagementWorkspace .hf-admin-list-row:has([data-pick-teacher]) > details[open] > div {
  position: absolute !important;
  inset: calc(100% + 4px) 0 auto auto;
  width: min(200px, calc(100vw - 40px)) !important;
  min-width: 0;
  box-sizing: border-box;
}
#hfManagementWorkspace .hf-admin-list-row:has([data-pick-teacher]) > details.hf-open-up > div {
  inset: auto 0 calc(100% + 4px) auto;
}
body.hf-verify-only :is(.topbar,.hf-site-footer,.tabbar,.hf-workspace-toolbar,
  #hfWorkspaceSidebar,#hfMobileNav,#hfSchoolAdmin,#hfTeacherMain,.hf-platform-sidebar,
  #hfPlatformMobileNav,#backToTop) { display: none !important; }

/* Pemulihan akun Hafaluma */
.hf-recovery-link{display:block;margin:.75rem auto;padding:.55rem .8rem;border:0;background:transparent;color:#075c42;font:inherit;font-weight:650;cursor:pointer}
dialog.hf-recovery{box-sizing:border-box;width:min(32rem,calc(100% - 1.5rem));max-height:84dvh;margin:auto;padding:1.3rem;border:1px solid #d6e0d2;border-radius:1rem;background:#fffdf7;color:var(--hf-ink, #075C42);overflow:auto}
.hf-recovery::backdrop{background:rgb(18 43 34 / .48)}
.hf-recovery h2,.hf-recovery h3{margin:0;color:#075c42}
.hf-recovery header,.hf-recovery-actions{display:flex;align-items:center;justify-content:space-between;gap:.6rem;flex-wrap:wrap}
.hf-recovery form,.hf-recovery section,.hf-recovery label{display:grid;gap:.6rem}
.hf-recovery form,.hf-recovery section,.hf-recovery details,.hf-recovery [role=status]:not(:empty){margin-top:1rem}
.hf-recovery input{width:100%;box-sizing:border-box;padding:.7rem;border:1px solid #a6bbac;border-radius:.5rem;font:inherit}
.hf-recovery button,.hf-recovery a{min-height:44px}
.hf-recovery p{margin:.5rem 0;overflow-wrap:anywhere}
.hf-recovery article{padding:.8rem 0;border-bottom:1px solid #d6e0d2}
.hf-recovery code{font-size:1rem;overflow-wrap:anywhere;user-select:all}
.hf-recovery [role=status]{color:#4F6358}
.hf-recovery details summary{cursor:pointer;color:#075c42}

.hf-recovery form [hidden]{display:none!important}
.hf-recovery form [role=status]{margin:0;font-size:.92rem}
.hf-recovery form [role=status]:empty{margin:0;height:0}
.hf-recovery form [data-state=warning]{color:#87401d}
.hf-recovery form [data-state=match]{color:#075C42}
.hf-recovery form .btn-primary:disabled{opacity:.52;cursor:default}

/* Direktori bimbingan pengajar */
.teacher-list-tools [hidden] { display:none !important; }
.teacher-roster-modes { display:flex; gap:3px; margin-bottom:12px; padding:4px; border-radius:12px; background:#e9efe4; }
.teacher-roster-modes button { flex:1; min-width:0; min-height:44px; color:#075C42; background:transparent; border:0; border-radius:9px; font:inherit; cursor:pointer; }
.teacher-roster-modes button[aria-pressed="true"] { color:#fff; background:#0c5942; font-weight:650; }
.teacher-roster-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:10px; }
.teacher-roster-card { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:14px 16px; border:1px solid #cbd9ca; border-radius:14px; background:white; color:#075C42; text-align:start; font:inherit; cursor:pointer; }
.teacher-roster-card strong,.teacher-roster-card small { display:block; overflow-wrap:anywhere; }
.teacher-roster-card small,.teacher-student-placement { color:#5D7064; font-size:.84em; }
.teacher-roster-card small { margin-top:4px; }
.teacher-roster-heading { margin-bottom:12px; }
.teacher-roster-heading h3 { margin:4px 0; overflow-wrap:anywhere; }
.teacher-roster-heading button { min-height:44px; }
