/* SMA48 Nexus — design system: modern, premium, minimal, 8px grid */

:root {
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;
  --white: #ffffff;

  --brand-700: #4338ca;
  --brand-600: #4f46e5;
  --brand-500: #6366f1;
  --brand-100: #e0e7ff;
  --brand-50: #eef2ff;
  --brand-25: #f7f8ff;
  --brand-300: #a5b4fc;

  --success-600: #16a34a;
  --success-100: #dcfce7;
  --warning-600: #d97706;
  --warning-100: #fef3c7;
  --danger-600: #dc2626;
  --danger-100: #fee2e2;
  --info-600: #0284c7;
  --info-100: #e0f2fe;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.055);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.085);
  --shadow-lg: 0 24px 56px rgba(15, 23, 42, 0.14);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-8: 48px;

  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink-900);
  background: #f6f8fc;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* School QR attendance */
.eyebrow { display:block; color:var(--brand-600); font-size:.68rem; font-weight:800; letter-spacing:.12em; margin-bottom:4px; }
.school-attendance-header { align-items:center; }
.scanner-clock { font-variant-numeric:tabular-nums; font-size:1.8rem; font-weight:800; color:var(--brand-700); background:var(--brand-50); padding:10px 16px; border-radius:var(--radius-md); }
.school-attendance-grid { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(280px,.7fr); gap:var(--space-5); align-items:start; }
.scanner-card { padding:var(--space-5); }
.scanner-card-head,.card-title { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.live-dot { color:var(--success-600); font-size:.72rem; font-weight:800; letter-spacing:.08em; }
.direction-switch { display:grid; grid-template-columns:1fr 1fr; gap:var(--space-2); margin:var(--space-4) 0; }
.direction-btn { border:1px solid var(--ink-200); background:var(--ink-50); color:var(--ink-700); padding:13px; border-radius:var(--radius-md); font-weight:800; cursor:pointer; }
.direction-btn.is-active { background:var(--brand-600); color:white; border-color:var(--brand-600); box-shadow:var(--shadow-sm); }
.scan-result { min-height:90px; display:flex; align-items:center; gap:12px; padding:16px; border-radius:var(--radius-md); margin-bottom:var(--space-4); background:var(--ink-50); border:1px solid var(--ink-200); }
.scan-result > span { color:var(--ink-500); font-size:.88rem; }.scan-result strong { font-size:1.04rem; }.scan-result-icon { font-size:2rem; }.scan-result.is-success { background:var(--success-100); border-color:#86efac; color:#166534; }.scan-result.is-error { background:var(--danger-100); border-color:#fca5a5; color:#991b1b; }
.camera-frame { aspect-ratio:16/9; max-height:390px; background:#0f172a; border-radius:var(--radius-lg); overflow:hidden; position:relative; display:grid; place-items:center; }
#qr-video { width:100%; height:100%; object-fit:cover; }.camera-placeholder { color:#cbd5e1; text-align:center; padding:20px; }.camera-guide { position:absolute; inset:18%; border:2px solid rgba(255,255,255,.8); border-radius:16px; box-shadow:0 0 0 999px rgba(15,23,42,.26); pointer-events:none; }.scanner-actions { display:flex; gap:var(--space-2); margin:var(--space-4) 0; }.manual-scan-form { border-top:1px solid var(--ink-200); padding-top:var(--space-4); }.manual-scan-form label,.device-card label { display:block; font-size:.78rem; font-weight:700; color:var(--ink-700); margin-bottom:5px; }.manual-row { display:flex; gap:var(--space-2); }.manual-row input { flex:1; }.manual-scan-form small,.device-card small,.session-row small { display:block; color:var(--ink-500); font-size:.76rem; margin-top:6px; }
.school-attendance-side { display:grid; gap:var(--space-5); }.session-row { display:flex; align-items:center; gap:8px; padding:14px 0; border-bottom:1px solid var(--ink-100); }.session-row:last-child { border-bottom:0; }.session-row > div { flex:1; }.session-row strong { display:block; }.device-card { display:grid; gap:8px; }.btn-full { width:100%; margin-top:4px; }.recent-scan-card { margin-top:var(--space-5); }.inline-filter { display:flex; align-items:end; gap:8px; }.inline-filter label { font-size:.78rem; font-weight:700; }.inline-filter input { min-height:40px; }.badge { display:inline-block; padding:3px 8px; border-radius:999px; background:var(--ink-100); color:var(--ink-700); font-size:.72rem; font-weight:700; }.badge-success { background:var(--success-100); color:#166534; }.badge-warning { background:var(--warning-100); color:#92400e; }
@media (max-width: 800px) { .school-attendance-grid { grid-template-columns:1fr; }.school-attendance-header { align-items:flex-start; }.scanner-clock { font-size:1.2rem; }.inline-filter { width:100%; }.inline-filter input { flex:1; } }
.photo-scan-label { cursor:pointer; }
.camera-selector { display:grid; gap:5px; margin:0 0 var(--space-4); padding:12px; background:var(--brand-50); border:1px solid var(--brand-100); border-radius:var(--radius-md); }.camera-selector label { font-size:.78rem; font-weight:800; color:var(--brand-700); }.camera-selector select { width:100%; }.camera-selector small { color:var(--ink-500); font-size:.76rem; }
.migration-summary { display:flex; justify-content:space-between; align-items:center; gap:var(--space-4); }.migration-summary strong { display:block; font-size:1.35rem; }.migration-summary code { background:var(--ink-100); padding:2px 5px; border-radius:4px; }

.skip-link {
  position: fixed; left: var(--space-4); top: -64px; z-index: 200;
  padding: 10px 16px; border-radius: var(--radius-sm); background: var(--ink-900);
  color: white; font-weight: 700; box-shadow: var(--shadow-lg); transition: top .15s ease;
}
.skip-link:focus { top: var(--space-4); }

a { color: var(--brand-600); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--brand-500);
  outline-offset: 2px;
}

h1, h2, h3, h4 { margin: 0 0 var(--space-2); font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 var(--space-3); color: var(--ink-700); }

.muted { color: var(--ink-500); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

/* Layout shell */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 280px;
  flex-shrink: 0;
  background:
    radial-gradient(circle at 0 0, rgba(99, 102, 241, .09), transparent 240px),
    var(--white);
  border-right: 1px solid var(--ink-200);
  padding: var(--space-5) var(--space-4) var(--space-6);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-2) var(--space-5);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink-900);
  border-bottom: 1px solid rgba(226, 232, 240, .8);
}
.brand:hover { text-decoration: none; }
.brand .mark {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 800; font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}
.brand small { display: block; font-weight: 500; color: var(--ink-500); font-size: 0.7rem; }

.nav-group { margin-bottom: var(--space-5); }
.nav-group-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-500); font-weight: 800; padding: 0 var(--space-3); margin-bottom: var(--space-2);
}
.nav-link {
  display: flex; align-items: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: 10px;
  color: var(--ink-700);
  font-size: 0.9rem; font-weight: 500;
  margin-bottom: 3px; border: 1px solid transparent;
  transition: background .14s ease, color .14s ease, transform .14s ease, border-color .14s ease;
}
.nav-link:hover { background: rgba(241, 245, 249, .9); color: var(--ink-900); text-decoration: none; transform: translateX(2px); }
.nav-link.active {
  background: linear-gradient(135deg, var(--brand-50), #f5f3ff);
  color: var(--brand-700); font-weight: 750; border-color: rgba(165, 180, 252, .38);
  box-shadow: inset 3px 0 0 var(--brand-600);
}

.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-4) var(--space-6);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ink-200);
  position: sticky; top: 0; z-index: 20; min-height: 72px;
}
.topbar .who { display: flex; align-items: center; gap: var(--space-3); }
.topbar-context { display: flex; flex-direction: column; min-width: 0; }
.topbar-context-label { font-size: .78rem; font-weight: 800; color: var(--ink-900); letter-spacing: .01em; }
.topbar-context-date { font-size: .72rem; color: var(--ink-500); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem;
  object-fit: cover;
}

/* Profil Saya */
.profile-hero { display: flex; align-items: center; gap: var(--space-5); flex-wrap: wrap; }
.profile-hero-avatar-wrap { position: relative; flex-shrink: 0; }
.profile-hero-avatar {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  display: flex; align-items: center; justify-content: center; font-size: 2.2rem; font-weight: 700;
}
.profile-hero-avatar-fallback { background: var(--brand-100); color: var(--brand-700); }
.profile-hero-avatar-edit {
  position: absolute; bottom: 0; right: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-600); color: white; display: flex; align-items: center; justify-content: center;
  cursor: pointer; border: 2px solid var(--white); transition: background .12s ease;
}
.profile-hero-avatar-edit:hover { background: var(--brand-700); }
.profile-hero-info { flex: 1; min-width: 200px; }
.profile-hero-remove {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.76rem; font-weight: 600;
  color: var(--danger-600); background: none; border: none; cursor: pointer; padding: 0; font-family: inherit;
}
.profile-hero-remove:hover { text-decoration: underline; }
.profile-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) 0; }
.profile-row-icon {
  flex-shrink: 0; width: 32px; height: 32px; border-radius: var(--radius-sm);
  background: var(--ink-50); color: var(--ink-500);
  display: flex; align-items: center; justify-content: center;
}
.profile-row-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); font-weight: 700; }
.profile-row-value { font-size: 0.92rem; color: var(--ink-900); font-weight: 600; }

/* Profil guru — an operational dossier instead of a stack of generic cards. */
.staff-profile-page { display: grid; gap: var(--space-5); }
.staff-profile-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  padding: 28px 30px; border: 1px solid rgba(165, 180, 252, .48); border-radius: 20px;
  background:
    radial-gradient(circle at 94% 10%, rgba(99, 102, 241, .14), transparent 210px),
    linear-gradient(135deg, var(--white), var(--brand-25));
  box-shadow: 0 16px 42px rgba(79, 70, 229, .08);
}
.staff-profile-hero::after {
  content: ''; position: absolute; right: -34px; bottom: -74px; width: 210px; height: 210px;
  border: 34px solid rgba(99, 102, 241, .055); border-radius: 50%; pointer-events: none;
}
.staff-profile-person { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--space-5); min-width: 0; }
.staff-profile-avatar-wrap { position: relative; flex: 0 0 auto; }
.staff-profile-avatar {
  width: 82px; height: 82px; display: flex; align-items: center; justify-content: center;
  border: 4px solid var(--white); border-radius: 22px; object-fit: cover;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
}
.staff-profile-avatar-fallback {
  color: var(--brand-700); background: linear-gradient(145deg, var(--brand-100), #f5f3ff);
  font-size: 1.65rem; font-weight: 800; letter-spacing: -.04em;
}
.staff-profile-status-dot {
  position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px;
  border: 4px solid var(--white); border-radius: 50%; background: var(--ink-300);
}
.staff-profile-status-dot.is-active { background: var(--success-600); }
.staff-profile-identity { min-width: 0; }
.staff-profile-eyebrow {
  display: block; margin-bottom: 4px; color: var(--brand-600);
  font-size: .68rem; font-weight: 850; letter-spacing: .11em;
}
.staff-profile-identity h1 { margin-bottom: 5px; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.18; }
.staff-profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-500); font-size: .79rem; }
.staff-profile-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.staff-profile-meta > span + span:not(.staff-profile-account-status)::before { content: '•'; margin-right: 3px; color: var(--ink-300); }
.staff-profile-account-status {
  padding: 3px 9px; border-radius: 999px; color: var(--ink-500); background: var(--ink-100);
  font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
}
.staff-profile-account-status.is-active { color: var(--success-600); background: var(--success-100); }
.staff-profile-roles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.staff-profile-roles span {
  padding: 4px 10px; border: 1px solid rgba(165, 180, 252, .35); border-radius: 999px;
  color: var(--brand-700); background: rgba(238, 242, 255, .82); font-size: .66rem; font-weight: 800; letter-spacing: .03em;
}
.staff-profile-actions { position: relative; z-index: 1; display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }

.staff-profile-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.staff-profile-kpi {
  min-width: 0; min-height: 128px; display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  background: var(--white); box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.staff-profile-kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--ink-300); }
.staff-profile-kpi-icon {
  flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; color: var(--ink-500); background: var(--ink-100);
}
.staff-profile-kpi.is-brand::before { background: var(--brand-500); }
.staff-profile-kpi.is-brand .staff-profile-kpi-icon { color: var(--brand-700); background: var(--brand-100); }
.staff-profile-kpi.is-info::before { background: var(--info-600); }
.staff-profile-kpi.is-info .staff-profile-kpi-icon { color: var(--info-600); background: var(--info-100); }
.staff-profile-kpi.is-green::before { background: var(--success-600); }
.staff-profile-kpi.is-green .staff-profile-kpi-icon { color: var(--success-600); background: var(--success-100); }
.staff-profile-kpi.is-amber::before { background: var(--warning-600); }
.staff-profile-kpi.is-amber .staff-profile-kpi-icon { color: var(--warning-600); background: var(--warning-100); }
.staff-profile-kpi-copy { flex: 1; min-width: 0; }
.staff-profile-kpi-copy > span { display: block; color: var(--ink-500); font-size: .67rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.staff-profile-kpi-copy > strong { display: block; margin: 2px 0 1px; color: var(--ink-900); font-size: 1.55rem; line-height: 1.2; letter-spacing: -.03em; }
.staff-profile-kpi-copy > strong small { font-size: .72rem; letter-spacing: 0; }
.staff-profile-kpi-copy p { margin: 0; color: var(--ink-500); font-size: .7rem; line-height: 1.35; }
.staff-profile-progress { height: 4px; margin-top: 9px; overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.staff-profile-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), #8b5cf6); }

.staff-profile-primary-grid { display: grid; grid-template-columns: minmax(365px, .86fr) minmax(0, 1.14fr); gap: var(--space-5); align-items: stretch; }
.staff-profile-secondary-grid, .staff-profile-bottom-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }
.staff-profile-panel {
  min-width: 0; padding: var(--space-5); border: 1px solid var(--ink-200); border-radius: 18px;
  background: var(--white); box-shadow: var(--shadow-sm);
}
.staff-profile-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.staff-profile-section-head > div > span {
  display: block; margin-bottom: 2px; color: var(--brand-600); font-size: .65rem; font-weight: 850; letter-spacing: .1em;
}
.staff-profile-section-head h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.015em; }
.staff-profile-head-count, .staff-profile-semester, .staff-profile-readonly {
  flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; color: var(--ink-500); background: var(--ink-100);
  font-size: .67rem; font-weight: 750;
}
.staff-profile-id-panel { display: flex; flex-direction: column; }
.staff-profile-card-preview {
  flex: 1; min-width: 0; overflow-x: auto; display: flex; align-items: center; justify-content: center;
  padding: 18px; border: 1px solid var(--ink-200); border-radius: 14px;
  background: radial-gradient(circle at 50% 0, var(--brand-50), var(--ink-50) 68%);
}
.staff-profile-card-preview .idcard { flex: 0 0 auto; box-shadow: 0 14px 30px rgba(15, 23, 42, .12); }
.staff-profile-panel-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: var(--space-3) 0 0; color: var(--ink-500); font-size: .7rem; }
.staff-profile-panel-note svg { color: var(--success-600); }

.staff-profile-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; border: 1px solid var(--ink-200); border-radius: 14px; overflow: hidden; }
.staff-profile-info-grid > div { min-width: 0; padding: 13px 15px; border-bottom: 1px solid var(--ink-100); }
.staff-profile-info-grid > div:nth-child(odd) { border-right: 1px solid var(--ink-100); }
.staff-profile-info-grid > div:nth-last-child(-n+2) { border-bottom: 0; }
.staff-profile-info-grid > div.is-wide { grid-column: 1 / -1; border-right: 0; }
.staff-profile-info-grid > div.is-wide:nth-last-child(2) { border-bottom: 1px solid var(--ink-100); }
.staff-profile-info-grid dt { margin-bottom: 3px; color: var(--ink-500); font-size: .67rem; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }
.staff-profile-info-grid dd { margin: 0; color: var(--ink-900); font-size: .84rem; font-weight: 650; overflow-wrap: anywhere; }
.staff-profile-missing { color: var(--ink-300); font-weight: 550; font-style: italic; }

.staff-profile-subjects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.staff-profile-subject {
  display: flex; align-items: center; gap: var(--space-3); padding: 12px;
  border: 1px solid var(--ink-200); border-radius: 12px; background: var(--ink-50);
}
.staff-profile-subject > span { flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--brand-700); background: var(--brand-100); }
.staff-profile-subject strong, .staff-profile-subject small { display: block; }
.staff-profile-subject strong { color: var(--ink-900); font-size: .82rem; }
.staff-profile-subject small { margin-top: 1px; color: var(--ink-500); font-size: .68rem; }
.staff-profile-subsection-title { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-4) 0 var(--space-3); color: var(--ink-500); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.staff-profile-subsection-title i { flex: 1; height: 1px; background: var(--ink-100); }
.staff-profile-homerooms { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.staff-profile-homerooms > div { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--ink-200); border-radius: 9px; }
.staff-profile-homerooms span { color: var(--ink-500); font-size: .68rem; }
.staff-profile-homerooms strong { color: var(--ink-900); font-size: .76rem; }

.staff-profile-contributions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; }
.staff-profile-contributions > div { min-width: 0; padding: 15px; text-align: center; border-right: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); }
.staff-profile-contributions > div:nth-child(3n) { border-right: 0; }
.staff-profile-contributions > div:nth-last-child(-n+3) { border-bottom: 0; }
.staff-profile-contributions span, .staff-profile-contributions strong { display: block; }
.staff-profile-contributions span { min-height: 30px; color: var(--ink-500); font-size: .68rem; line-height: 1.3; }
.staff-profile-contributions strong { margin-top: 3px; color: var(--ink-900); font-size: 1.35rem; }

.staff-profile-empty { min-height: 118px; display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-5); border: 1px dashed var(--ink-300); border-radius: 14px; color: var(--ink-300); background: var(--ink-50); }
.staff-profile-empty.is-compact { min-height: 92px; }
.staff-profile-empty.is-warning { color: var(--warning-600); border-color: #fde68a; background: #fffbeb; }
.staff-profile-empty > div { display: flex; flex-direction: column; }
.staff-profile-empty strong { color: var(--ink-700); font-size: .84rem; }
.staff-profile-empty span { margin-top: 2px; color: var(--ink-500); font-size: .74rem; }

.staff-profile-schedule { display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)); gap: var(--space-3); }
.staff-profile-day { min-width: 0; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; background: var(--ink-50); }
.staff-profile-day-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 10px 12px; color: var(--white); background: linear-gradient(135deg, var(--brand-600), #6d5df4); }
.staff-profile-day-head strong { font-size: .79rem; }
.staff-profile-day-head span { color: rgba(255,255,255,.78); font-size: .65rem; }
.staff-profile-day-slots { display: grid; gap: 1px; background: var(--ink-100); }
.staff-profile-slot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 9px; padding: 11px 12px; background: var(--white); }
.staff-profile-slot time { grid-row: span 2; padding: 3px 7px; align-self: start; border-radius: 7px; color: var(--brand-700); background: var(--brand-50); font-size: .64rem; font-weight: 800; }
.staff-profile-slot strong { min-width: 0; color: var(--ink-900); font-size: .76rem; overflow-wrap: anywhere; }
.staff-profile-slot > span { color: var(--ink-500); font-size: .68rem; }

.staff-profile-table { border: 1px solid var(--ink-200); border-radius: 14px; }
.staff-profile-table table { margin: 0; }
.staff-profile-table th { background: var(--ink-50); font-size: .67rem; }
.staff-profile-table td { padding-top: 13px; padding-bottom: 13px; }
.staff-profile-table-number { display: inline-flex; min-width: 32px; height: 26px; align-items: center; justify-content: center; border-radius: 8px; color: var(--brand-700); background: var(--brand-50); font-size: .76rem; font-weight: 800; }

.staff-profile-history { display: grid; gap: var(--space-2); }
.staff-profile-history details { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 12px; background: var(--white); }
.staff-profile-history summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 12px 14px; cursor: pointer; background: var(--ink-50); }
.staff-profile-history summary::-webkit-details-marker { display: none; }
.staff-profile-history summary > div { display: flex; flex-direction: column; }
.staff-profile-history summary strong { font-size: .8rem; }
.staff-profile-history summary span { color: var(--ink-500); font-size: .67rem; }
.staff-profile-history summary svg { color: var(--ink-500); transition: transform .15s ease; }
.staff-profile-history details[open] summary svg { transform: rotate(180deg); }
.staff-profile-history-rows { display: grid; }
.staff-profile-history-rows > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 14px; border-top: 1px solid var(--ink-100); }
.staff-profile-history-rows > div > span:first-child { display: flex; flex-direction: column; min-width: 0; }
.staff-profile-history-rows strong { color: var(--ink-900); font-size: .76rem; }
.staff-profile-history-rows small { color: var(--ink-500); font-size: .68rem; }
.staff-profile-proctoring { max-height: 320px; overflow-y: auto; display: grid; gap: var(--space-2); }
.staff-profile-proctoring > div { display: flex; align-items: center; gap: var(--space-3); padding: 11px 12px; border: 1px solid var(--ink-200); border-radius: 11px; background: var(--ink-50); }
.staff-profile-proctoring > div > span { flex: 0 0 34px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--success-600); background: var(--success-100); }
.staff-profile-proctoring strong, .staff-profile-proctoring small { display: block; }
.staff-profile-proctoring strong { color: var(--ink-900); font-size: .77rem; }
.staff-profile-proctoring small { margin-top: 2px; color: var(--ink-500); font-size: .66rem; }

@media (max-width: 1150px) {
  .staff-profile-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-profile-primary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .staff-profile-hero { align-items: flex-start; flex-direction: column; padding: var(--space-5); }
  .staff-profile-actions { width: 100%; justify-content: flex-start; }
  .staff-profile-secondary-grid, .staff-profile-bottom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .staff-profile-page { gap: var(--space-4); }
  .staff-profile-hero { padding: var(--space-4); border-radius: var(--radius-lg); }
  .staff-profile-person { align-items: flex-start; gap: var(--space-3); }
  .staff-profile-avatar { width: 58px; height: 58px; border-radius: 16px; }
  .staff-profile-status-dot { width: 15px; height: 15px; border-width: 3px; }
  .staff-profile-identity h1 { font-size: 1.18rem; }
  .staff-profile-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
  .staff-profile-kpis { grid-template-columns: 1fr; gap: var(--space-2); }
  .staff-profile-kpi { min-height: 106px; }
  .staff-profile-panel { padding: var(--space-4); border-radius: var(--radius-lg); }
  .staff-profile-info-grid { grid-template-columns: 1fr; }
  .staff-profile-info-grid > div, .staff-profile-info-grid > div:nth-child(odd), .staff-profile-info-grid > div:nth-last-child(-n+2) { border-right: 0; border-bottom: 1px solid var(--ink-100); }
  .staff-profile-info-grid > div:last-child { border-bottom: 0; }
  .staff-profile-info-grid > div.is-wide { grid-column: auto; }
  .staff-profile-subjects { grid-template-columns: 1fr; }
  .staff-profile-contributions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-profile-contributions > div:nth-child(3n) { border-right: 1px solid var(--ink-100); }
  .staff-profile-contributions > div:nth-child(2n) { border-right: 0; }
  .staff-profile-contributions > div:nth-last-child(-n+3) { border-bottom: 1px solid var(--ink-100); }
  .staff-profile-contributions > div:nth-last-child(-n+2) { border-bottom: 0; }
  .staff-profile-section-head { flex-wrap: wrap; }
}

@media print {
  .staff-profile-actions { display: none !important; }
  .staff-profile-page {
    gap: 4mm; color: #0f172a;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .staff-profile-hero {
    padding: 5mm; border-radius: 4mm; box-shadow: none; break-inside: avoid;
    background: linear-gradient(135deg, #fff, #f7f8ff);
  }
  .staff-profile-hero::after { display: none; }
  .staff-profile-avatar { width: 18mm; height: 18mm; border-radius: 4mm; box-shadow: none; }
  .staff-profile-identity h1 { font-size: 16pt; }
  .staff-profile-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2mm; break-inside: avoid; }
  .staff-profile-kpi { min-height: 25mm; padding: 3mm; gap: 2mm; border-radius: 3mm; box-shadow: none; }
  .staff-profile-kpi-icon { flex-basis: 8mm; width: 8mm; height: 8mm; border-radius: 2mm; }
  .staff-profile-kpi-copy > span { font-size: 6.5pt; }
  .staff-profile-kpi-copy > strong { font-size: 14pt; }
  .staff-profile-kpi-copy p { font-size: 6.5pt; }
  .staff-profile-primary-grid { grid-template-columns: 92mm minmax(0, 1fr); gap: 4mm; align-items: stretch; }
  .staff-profile-secondary-grid, .staff-profile-bottom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .staff-profile-panel { padding: 4mm; border-radius: 4mm; box-shadow: none; }
  .staff-profile-primary-grid, .staff-profile-secondary-grid { break-inside: avoid; }
  .staff-profile-section-head { margin-bottom: 3mm; }
  .staff-profile-section-head h2 { font-size: 11pt; }
  .staff-profile-card-preview { padding: 2.5mm; border-radius: 3mm; overflow: visible; }
  .staff-profile-card-preview .idcard { box-shadow: none; }
  .staff-profile-info-grid > div { padding: 2.5mm 3mm; }
  .staff-profile-info-grid dt, .staff-profile-info-grid dd { font-size: 7pt; }
  .staff-profile-subject { padding: 2.5mm; }
  .staff-profile-contributions > div { padding: 3mm; }
  .staff-profile-contributions span { min-height: 6mm; font-size: 6.5pt; }
  .staff-profile-contributions strong { font-size: 12pt; }
  .staff-profile-schedule { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2mm; }
  .staff-profile-day, .staff-profile-history details, .staff-profile-proctoring > div { break-inside: avoid; }
  .staff-profile-table { overflow: visible; }
  .staff-profile-table thead { display: table-header-group; }
  .staff-profile-table tr { break-inside: avoid; }
  .staff-profile-empty { min-height: 22mm; padding: 4mm; }
}

/* Profil siswa — academic overview, family context and longitudinal results. */
.student-profile-page { display: grid; gap: var(--space-5); }
.student-profile-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  padding: 28px 30px; border: 1px solid rgba(125, 211, 252, .55); border-radius: 20px;
  background: radial-gradient(circle at 94% 8%, rgba(14, 165, 233, .14), transparent 220px), linear-gradient(135deg, var(--white), #f4f9ff);
  box-shadow: 0 16px 42px rgba(2, 132, 199, .08);
}
.student-profile-hero::after { content: ''; position: absolute; right: -30px; bottom: -78px; width: 210px; height: 210px; border: 34px solid rgba(14, 165, 233, .05); border-radius: 50%; pointer-events: none; }
.student-profile-person { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--space-5); min-width: 0; }
.student-profile-avatar-wrap { position: relative; flex: 0 0 auto; }
.student-profile-avatar {
  width: 82px; height: 82px; display: flex; align-items: center; justify-content: center; object-fit: cover;
  border: 4px solid var(--white); border-radius: 22px; box-shadow: 0 12px 26px rgba(15, 23, 42, .14);
}
.student-profile-avatar-fallback { color: var(--info-600); background: linear-gradient(145deg, var(--info-100), #eef2ff); font-size: 1.65rem; font-weight: 800; letter-spacing: -.04em; }
.student-profile-status-dot { position: absolute; right: -2px; bottom: -2px; width: 18px; height: 18px; border: 4px solid var(--white); border-radius: 50%; background: var(--ink-300); }
.student-profile-status-dot.is-active { background: var(--success-600); }
.student-profile-identity { min-width: 0; }
.student-profile-eyebrow { display: block; margin-bottom: 4px; color: var(--info-600); font-size: .68rem; font-weight: 850; letter-spacing: .11em; }
.student-profile-identity h1 { margin-bottom: 5px; font-size: clamp(1.4rem, 2vw, 1.9rem); line-height: 1.18; }
.student-profile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--ink-500); font-size: .79rem; }
.student-profile-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.student-profile-meta > span + span::before { content: '•'; margin-right: 3px; color: var(--ink-300); }
.student-profile-statuses { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.student-profile-completeness { padding: 4px 9px; border-radius: 999px; color: var(--info-600); background: var(--info-100); font-size: .66rem; font-weight: 800; }
.student-profile-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }

.student-profile-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.student-profile-kpi {
  position: relative; overflow: hidden; min-width: 0; min-height: 124px; display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm);
}
.student-profile-kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--ink-300); }
.student-profile-kpi-icon { flex: 0 0 40px; width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--ink-500); background: var(--ink-100); }
.student-profile-kpi > div:nth-child(2) { min-width: 0; }
.student-profile-kpi > div:nth-child(2) > span { display: block; color: var(--ink-500); font-size: .67rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.student-profile-kpi > div:nth-child(2) > strong { display: block; margin: 2px 0 1px; color: var(--ink-900); font-size: 1.55rem; line-height: 1.2; letter-spacing: -.03em; }
.student-profile-kpi > div:nth-child(2) > p { margin: 0; color: var(--ink-500); font-size: .7rem; line-height: 1.35; }
.student-profile-kpi.is-brand::before { background: var(--brand-500); }
.student-profile-kpi.is-brand .student-profile-kpi-icon { color: var(--brand-700); background: var(--brand-100); }
.student-profile-kpi.is-info::before { background: var(--info-600); }
.student-profile-kpi.is-info .student-profile-kpi-icon { color: var(--info-600); background: var(--info-100); }
.student-profile-kpi.is-green::before { background: var(--success-600); }
.student-profile-kpi.is-green .student-profile-kpi-icon { color: var(--success-600); background: var(--success-100); }
.student-profile-kpi.is-danger::before { background: var(--danger-600); }
.student-profile-kpi.is-danger .student-profile-kpi-icon { color: var(--danger-600); background: var(--danger-100); }
.student-profile-kpi-progress { position: absolute; left: var(--space-4); right: var(--space-4); bottom: 13px; height: 4px; overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.student-profile-kpi-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--success-600), #4ade80); }

.student-profile-primary-grid { display: grid; grid-template-columns: minmax(365px, .86fr) minmax(0, 1.14fr); gap: var(--space-5); align-items: stretch; }
.student-profile-secondary-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); align-items: stretch; }
.student-profile-panel { min-width: 0; padding: var(--space-5); border: 1px solid var(--ink-200); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-sm); }
.student-profile-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.student-profile-section-head > div > span { display: block; margin-bottom: 2px; color: var(--info-600); font-size: .65rem; font-weight: 850; letter-spacing: .1em; }
.student-profile-section-head h2 { margin: 0; font-size: 1.08rem; letter-spacing: -.015em; }
.student-profile-head-pill { flex: 0 0 auto; padding: 5px 10px; border-radius: 999px; color: var(--ink-500); background: var(--ink-100); font-size: .67rem; font-weight: 750; }
.student-profile-id-panel { display: flex; flex-direction: column; }
.student-profile-card-preview { flex: 1; min-width: 0; overflow-x: auto; display: flex; align-items: center; justify-content: center; padding: 18px; border: 1px solid var(--ink-200); border-radius: 14px; background: radial-gradient(circle at 50% 0, var(--info-100), var(--ink-50) 68%); }
.student-profile-card-preview .idcard { flex: 0 0 auto; box-shadow: 0 14px 30px rgba(15, 23, 42, .12); }
.student-profile-panel-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: var(--space-3) 0 0; color: var(--ink-500); font-size: .7rem; }
.student-profile-panel-note svg { color: var(--success-600); }
.student-profile-completeness-bar { height: 5px; margin: -5px 0 var(--space-4); overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.student-profile-completeness-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--info-600), var(--brand-500)); }
.student-profile-info-grid, .student-profile-family-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; }
.student-profile-info-grid > div, .student-profile-family-grid > div { min-width: 0; padding: 13px 15px; border-right: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); }
.student-profile-info-grid > div:nth-child(2n), .student-profile-family-grid > div:nth-child(2n) { border-right: 0; }
.student-profile-info-grid > div.is-wide, .student-profile-family-grid > div.is-wide { grid-column: 1 / -1; border-right: 0; }
.student-profile-info-grid > div:last-child, .student-profile-family-grid > div:last-child { border-bottom: 0; }
.student-profile-info-grid dt, .student-profile-family-grid dt { margin-bottom: 3px; color: var(--ink-500); font-size: .67rem; font-weight: 750; text-transform: uppercase; letter-spacing: .035em; }
.student-profile-info-grid dd, .student-profile-family-grid dd { margin: 0; color: var(--ink-900); font-size: .84rem; font-weight: 650; overflow-wrap: anywhere; }
.student-profile-missing { color: var(--ink-300); font-weight: 550; font-style: italic; }

.student-profile-current-class { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); padding: 14px; border: 1px solid rgba(125, 211, 252, .6); border-radius: 14px; background: linear-gradient(135deg, var(--info-100), var(--white)); }
.student-profile-current-class-icon { flex: 0 0 42px; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--info-600); background: var(--white); }
.student-profile-current-class > div:last-child { display: flex; flex-direction: column; min-width: 0; }
.student-profile-current-class span { color: var(--ink-500); font-size: .65rem; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.student-profile-current-class strong { color: var(--ink-900); font-size: 1rem; }
.student-profile-current-class small { margin-top: 1px; color: var(--ink-500); font-size: .69rem; }
.student-profile-attendance { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: var(--space-3); overflow: hidden; border: 1px solid var(--ink-200); border-radius: 12px; }
.student-profile-attendance > div { padding: 11px 8px; text-align: center; border-right: 1px solid var(--ink-100); }
.student-profile-attendance > div:last-child { border-right: 0; }
.student-profile-attendance strong, .student-profile-attendance span { display: block; }
.student-profile-attendance strong { color: var(--ink-900); font-size: 1rem; }
.student-profile-attendance span { color: var(--ink-500); font-size: .64rem; text-transform: uppercase; }
.student-profile-attendance .is-present strong { color: var(--success-600); }
.student-profile-attendance .is-sick strong { color: var(--info-600); }
.student-profile-attendance .is-permit strong { color: var(--warning-600); }
.student-profile-attendance .is-absent strong { color: var(--danger-600); }
.student-profile-placement-list { display: grid; gap: var(--space-2); }
.student-profile-placement-list > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 10px 12px; border: 1px solid var(--ink-200); border-radius: 10px; }
.student-profile-placement-list > div > span:first-child { display: flex; flex-direction: column; }
.student-profile-placement-list strong { color: var(--ink-900); font-size: .77rem; }
.student-profile-placement-list small { color: var(--ink-500); font-size: .68rem; }

.student-profile-subsection-title { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-4) 0 var(--space-3); color: var(--ink-500); font-size: .67rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.student-profile-subsection-title i { flex: 1; height: 1px; background: var(--ink-100); }
.student-profile-guardians { display: grid; gap: var(--space-2); }
.student-profile-guardians > div { display: grid; grid-template-columns: 34px minmax(0, 1fr) 20px; align-items: center; gap: var(--space-3); padding: 11px 12px; border: 1px solid var(--ink-200); border-radius: 11px; background: var(--ink-50); }
.student-profile-guardians > div > span { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--info-600); background: var(--info-100); }
.student-profile-guardians strong, .student-profile-guardians small { display: block; }
.student-profile-guardians strong { color: var(--ink-900); font-size: .77rem; }
.student-profile-guardians small { margin-top: 1px; color: var(--ink-500); font-size: .66rem; overflow-wrap: anywhere; }
.student-profile-guardians > div > i { color: var(--success-600); }
.student-profile-head-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: var(--space-2); }
.student-profile-guardians > div:has(form) { grid-template-columns: 34px minmax(0, 1fr) auto; }
.student-profile-guardians strong em { display: inline-flex; margin-left: 5px; padding: 2px 6px; border-radius: 999px; color: var(--info-600); background: var(--info-100); font-size: .58rem; font-style: normal; font-weight: 800; text-transform: uppercase; letter-spacing: .035em; vertical-align: 1px; }
.student-profile-guardians form { margin: 0; }
.student-profile-guardians form .btn { width: 30px; height: 30px; min-height: 30px; padding: 0; }
.student-profile-choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.student-profile-choices > span { display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px; border: 1px solid rgba(165, 180, 252, .45); border-radius: 10px; color: var(--brand-700); background: var(--brand-50); font-size: .73rem; font-weight: 750; }
.student-profile-choices small { color: var(--ink-500); font-size: .63rem; font-weight: 600; }

.student-profile-subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.student-profile-subject { min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); padding: 13px; border: 1px solid var(--ink-200); border-radius: 13px; background: var(--white); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.student-profile-subject:hover { transform: translateY(-2px); border-color: var(--brand-300); box-shadow: var(--shadow-sm); }
.student-profile-subject-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--brand-700); background: var(--brand-100); }
.student-profile-subject-copy { min-width: 0; }
.student-profile-subject-copy strong, .student-profile-subject-copy span, .student-profile-subject-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-profile-subject-copy strong { color: var(--ink-900); font-size: .8rem; }
.student-profile-subject-copy span { color: var(--ink-700); font-size: .69rem; }
.student-profile-subject-copy small { margin-top: 2px; color: var(--ink-500); font-size: .63rem; }
.student-profile-kkm { min-width: 42px; padding: 5px 7px; border-radius: 9px; text-align: center; background: var(--ink-50); }
.student-profile-kkm span, .student-profile-kkm strong { display: block; }
.student-profile-kkm span { color: var(--ink-500); font-size: .55rem; font-weight: 800; }
.student-profile-kkm strong { color: var(--ink-900); font-size: .78rem; }

.student-profile-grades { min-width: 0; }
.student-profile-grade-periods { display: grid; gap: var(--space-3); }
.student-profile-grade-periods details { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 13px; }
.student-profile-grade-periods summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 13px 15px; cursor: pointer; background: var(--ink-50); }
.student-profile-grade-periods summary::-webkit-details-marker { display: none; }
.student-profile-grade-periods summary > div { display: flex; flex-direction: column; }
.student-profile-grade-periods summary strong { color: var(--ink-900); font-size: .83rem; }
.student-profile-grade-periods summary span { color: var(--ink-500); font-size: .68rem; }
.student-profile-grade-periods summary svg { color: var(--ink-500); transition: transform .15s ease; }
.student-profile-grade-periods details[open] summary svg { transform: rotate(180deg); }
.student-profile-grade-content { display: grid; gap: var(--space-3); padding: var(--space-3); background: var(--ink-50); border-top: 1px solid var(--ink-200); }
.student-profile-grade-subject { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 11px; background: var(--white); }
.student-profile-grade-subject-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 10px 12px; border-bottom: 1px solid var(--ink-100); }
.student-profile-grade-subject-head strong { color: var(--ink-900); font-size: .78rem; }
.student-profile-grade-subject-head span { color: var(--ink-500); font-size: .66rem; }
.student-profile-grade-table { border: 0; border-radius: 0; }
.student-profile-grade-table table { margin: 0; }
.student-profile-grade-table th { background: var(--white); font-size: .64rem; }
.student-profile-grade-table td { padding-top: 10px; padding-bottom: 10px; font-size: .74rem; }
.student-profile-score { display: inline-flex; min-width: 45px; justify-content: center; padding: 4px 8px; border-radius: 8px; color: var(--ink-500); background: var(--ink-100); font-weight: 850; }
.student-profile-score.is-passed { color: var(--success-600); background: var(--success-100); }
.student-profile-score.is-low { color: var(--danger-600); background: var(--danger-100); }

.student-profile-empty { min-height: 118px; display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-5); border: 1px dashed var(--ink-300); border-radius: 14px; color: var(--ink-300); background: var(--ink-50); }
.student-profile-empty.is-compact { min-height: 90px; }
.student-profile-empty.is-warning { color: var(--warning-600); border-color: #fde68a; background: #fffbeb; }
.student-profile-empty > div { display: flex; flex-direction: column; }
.student-profile-empty strong { color: var(--ink-700); font-size: .84rem; }
.student-profile-empty span { margin-top: 2px; color: var(--ink-500); font-size: .74rem; }

@media (max-width: 1150px) {
  .student-profile-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-profile-primary-grid { grid-template-columns: 1fr; }
  .student-profile-subjects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .student-profile-hero { align-items: flex-start; flex-direction: column; padding: var(--space-5); }
  .student-profile-actions { width: 100%; justify-content: flex-start; }
  .student-profile-secondary-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .student-profile-page { gap: var(--space-4); }
  .student-profile-hero { padding: var(--space-4); border-radius: var(--radius-lg); }
  .student-profile-person { align-items: flex-start; gap: var(--space-3); }
  .student-profile-avatar { width: 58px; height: 58px; border-radius: 16px; }
  .student-profile-status-dot { width: 15px; height: 15px; border-width: 3px; }
  .student-profile-identity h1 { font-size: 1.18rem; }
  .student-profile-actions .btn { flex: 1; padding-left: 10px; padding-right: 10px; }
  .student-profile-kpis { grid-template-columns: 1fr; gap: var(--space-2); }
  .student-profile-kpi { min-height: 106px; }
  .student-profile-panel { padding: var(--space-4); border-radius: var(--radius-lg); }
  .student-profile-info-grid, .student-profile-family-grid { grid-template-columns: 1fr; }
  .student-profile-info-grid > div, .student-profile-family-grid > div { border-right: 0; }
  .student-profile-info-grid > div.is-wide, .student-profile-family-grid > div.is-wide { grid-column: auto; }
  .student-profile-subjects { grid-template-columns: 1fr; }
  .student-profile-section-head { flex-wrap: wrap; }
}

@media print {
  .student-profile-actions { display: none !important; }
  .student-profile-page { gap: 4mm; color: #0f172a; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .student-profile-hero { padding: 5mm; border-radius: 4mm; box-shadow: none; break-inside: avoid; background: linear-gradient(135deg, #fff, #f4f9ff); }
  .student-profile-hero::after { display: none; }
  .student-profile-avatar { width: 18mm; height: 18mm; border-radius: 4mm; box-shadow: none; }
  .student-profile-identity h1 { font-size: 16pt; }
  .student-profile-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2mm; break-inside: avoid; }
  .student-profile-kpi { min-height: 25mm; padding: 3mm; gap: 2mm; border-radius: 3mm; box-shadow: none; }
  .student-profile-kpi-icon { flex-basis: 8mm; width: 8mm; height: 8mm; border-radius: 2mm; }
  .student-profile-kpi > div:nth-child(2) > span, .student-profile-kpi > div:nth-child(2) > p { font-size: 6.5pt; }
  .student-profile-kpi > div:nth-child(2) > strong { font-size: 14pt; }
  .student-profile-primary-grid { grid-template-columns: 92mm minmax(0, 1fr); gap: 4mm; }
  .student-profile-secondary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4mm; }
  .student-profile-panel { padding: 4mm; border-radius: 4mm; box-shadow: none; }
  .student-profile-primary-grid, .student-profile-secondary-grid { break-inside: avoid; }
  .student-profile-section-head { margin-bottom: 3mm; }
  .student-profile-section-head h2 { font-size: 11pt; }
  .student-profile-card-preview { padding: 2.5mm; overflow: visible; }
  .student-profile-card-preview .idcard { box-shadow: none; }
  .student-profile-info-grid > div, .student-profile-family-grid > div { padding: 2.5mm 3mm; }
  .student-profile-info-grid dt, .student-profile-info-grid dd, .student-profile-family-grid dt, .student-profile-family-grid dd { font-size: 7pt; }
  .student-profile-subjects { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2mm; }
  .student-profile-subject { padding: 2.5mm; break-inside: avoid; }
  .student-profile-grade-periods details, .student-profile-grade-subject, .student-profile-placement-list > div { break-inside: avoid; }
  .student-profile-grade-table { overflow: visible; }
  .student-profile-grade-table thead { display: table-header-group; }
  .student-profile-grade-table tr { break-inside: avoid; }
  .student-profile-empty { min-height: 22mm; padding: 4mm; }
}

/* Guardian account workflow */
.guardian-link-modal { max-width: 700px; padding: 0; overflow: hidden; }
.guardian-link-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: start; gap: var(--space-3); padding: var(--space-5); border-bottom: 1px solid var(--ink-200); background: linear-gradient(135deg, var(--brand-50), var(--white)); }
.guardian-link-head-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: var(--brand-700); background: var(--brand-100); }
.guardian-link-head span { display: block; color: var(--brand-700); font-size: .62rem; font-weight: 850; letter-spacing: .1em; }
.guardian-link-head h3 { margin: 1px 0 2px; font-size: 1.08rem; }
.guardian-link-head p { margin: 0; color: var(--ink-500); font-size: .76rem; }
.guardian-link-body { display: grid; gap: var(--space-4); padding: var(--space-5); }
.guardian-link-mode { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.guardian-link-mode label { position: relative; cursor: pointer; }
.guardian-link-mode input { position: absolute; opacity: 0; pointer-events: none; }
.guardian-link-mode label > span { min-height: 86px; display: grid; grid-template-columns: 28px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: var(--space-2); align-content: center; padding: 13px; border: 1px solid var(--ink-200); border-radius: 13px; color: var(--ink-500); background: var(--white); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.guardian-link-mode label > span svg { grid-row: 1 / 3; align-self: center; }
.guardian-link-mode label > span strong { color: var(--ink-900); font-size: .79rem; }
.guardian-link-mode label > span small { font-size: .66rem; line-height: 1.35; }
.guardian-link-mode input:checked + span { color: var(--brand-700); border-color: var(--brand-300); background: var(--brand-50); box-shadow: 0 0 0 2px rgba(99, 102, 241, .08); }
.guardian-link-mode input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.guardian-link-mode input:disabled + span { opacity: .5; cursor: not-allowed; }
.guardian-link-new-fields { padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: 13px; background: var(--ink-50); }
.guardian-link-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); border-top: 1px solid var(--ink-200); background: var(--ink-50); }
.guardian-link-footer > span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-500); font-size: .68rem; }
.guardian-link-footer > span svg { color: var(--success-600); }
.guardian-link-footer > div { display: flex; gap: var(--space-2); }

/* Student directory — compact operational view for large rosters. */
.student-roster-page { display: grid; gap: var(--space-5); }
.student-roster-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: 30px 36px; border: 1px solid rgba(165, 180, 252, .5); border-radius: 20px; background: linear-gradient(135deg, var(--white), var(--brand-25)); box-shadow: var(--shadow-sm); }
.student-roster-hero::after { content: ''; position: absolute; width: 210px; height: 210px; right: -80px; top: -115px; border-radius: 50%; background: radial-gradient(circle, rgba(99, 102, 241, .12), rgba(99, 102, 241, 0) 70%); pointer-events: none; }
.student-roster-hero > div { position: relative; z-index: 1; }
.student-roster-eyebrow { display: block; margin-bottom: 3px; color: var(--brand-700); font-size: .66rem; font-weight: 850; letter-spacing: .11em; }
.student-roster-hero h1 { margin: 0 0 3px; font-size: 1.7rem; }
.student-roster-hero p { margin: 0; color: var(--ink-500); font-size: .83rem; }
.student-roster-hero-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.student-roster-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.student-roster-kpi { position: relative; min-width: 0; display: flex; align-items: center; gap: var(--space-3); min-height: 104px; padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.student-roster-kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: var(--radius-lg) 0 0 var(--radius-lg); background: var(--ink-300); }
.student-roster-kpi > span { flex: 0 0 38px; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; color: var(--ink-500); background: var(--ink-100); }
.student-roster-kpi div { min-width: 0; }
.student-roster-kpi small, .student-roster-kpi strong, .student-roster-kpi p { display: block; }
.student-roster-kpi small { color: var(--ink-500); font-size: .63rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.student-roster-kpi strong { margin: 1px 0; color: var(--ink-900); font-size: 1.35rem; line-height: 1.2; }
.student-roster-kpi p { margin: 0; color: var(--ink-500); font-size: .67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-roster-kpi.is-brand::before { background: var(--brand-500); }
.student-roster-kpi.is-brand > span { color: var(--brand-700); background: var(--brand-100); }
.student-roster-kpi.is-success::before { background: var(--success-600); }
.student-roster-kpi.is-success > span { color: var(--success-600); background: var(--success-100); }
.student-roster-kpi.is-info::before { background: var(--info-600); }
.student-roster-kpi.is-info > span { color: var(--info-600); background: var(--info-100); }
.student-roster-kpi.is-warning::before { background: var(--warning-600); }
.student-roster-kpi.is-warning > span { color: var(--warning-600); background: var(--warning-100); }
.student-roster-kpi.is-danger::before { background: var(--danger-600); }
.student-roster-kpi.is-danger > span { color: var(--danger-600); background: var(--danger-100); }
.student-roster-filter, .student-roster-results { min-width: 0; padding: var(--space-5); border: 1px solid var(--ink-200); border-radius: 18px; background: var(--white); box-shadow: var(--shadow-sm); }
.student-roster-status-tabs { display: flex; align-items: center; gap: var(--space-1); margin-bottom: var(--space-4); padding-bottom: var(--space-3); overflow-x: auto; border-bottom: 1px solid var(--ink-100); }
.student-roster-status-tabs a { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 9px; color: var(--ink-500); font-size: .75rem; font-weight: 750; }
.student-roster-status-tabs a:hover { color: var(--ink-900); background: var(--ink-50); text-decoration: none; }
.student-roster-status-tabs a span { min-width: 22px; padding: 2px 6px; border-radius: 999px; text-align: center; background: var(--ink-100); font-size: .62rem; }
.student-roster-status-tabs a.is-active { color: var(--brand-700); background: var(--brand-100); }
.student-roster-status-tabs a.is-active span { color: var(--brand-700); background: var(--white); }
.student-roster-filter-form { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(150px, .28fr) minmax(165px, .32fr) auto auto; align-items: end; gap: var(--space-3); }
.student-roster-search { position: relative; }
.student-roster-search > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-300); pointer-events: none; }
.student-roster-search input { width: 100%; padding-left: 40px; }
.student-roster-select label { display: block; margin-bottom: 5px; color: var(--ink-500); font-size: .65rem; font-weight: 750; }
.student-roster-select select { width: 100%; }
.student-roster-results { padding: 0; overflow: visible; }
.student-roster-results-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); padding: var(--space-5); }
.student-roster-results-head span { display: block; color: var(--info-600); font-size: .64rem; font-weight: 850; letter-spacing: .1em; }
.student-roster-results-head h2 { margin: 1px 0 0; font-size: 1.06rem; }
.student-roster-results-head p { margin: 0; color: var(--ink-500); font-size: .68rem; }
.student-roster-table-wrap { overflow: visible; border: 0; border-top: 1px solid var(--ink-200); border-radius: 0; }
.student-roster-table { margin: 0; }
.student-roster-table th { padding: 11px 16px; background: var(--ink-50); font-size: .64rem; letter-spacing: .065em; }
.student-roster-table td { padding: 12px 16px; vertical-align: middle; font-size: .76rem; }
.student-roster-table tbody tr:hover { background: #fbfcff; }
.student-roster-person { min-width: 200px; display: flex; align-items: center; gap: var(--space-3); color: inherit; }
.student-roster-person:hover { text-decoration: none; }
.student-roster-person > img, .student-roster-person > span { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; object-fit: cover; }
.student-roster-person > span { display: inline-flex; align-items: center; justify-content: center; color: var(--brand-700); background: var(--brand-100); font-size: .7rem; font-weight: 850; }
.student-roster-person div, .student-roster-cell-stack, .student-roster-status { display: flex; flex-direction: column; min-width: 0; }
.student-roster-person strong { color: var(--ink-900); font-size: .78rem; }
.student-roster-person small, .student-roster-cell-stack small, .student-roster-status small { margin-top: 2px; color: var(--ink-500); font-size: .63rem; }
.student-roster-cell-stack strong { color: var(--ink-700); font-size: .73rem; }
.student-roster-class-badge { display: inline-flex; padding: 5px 9px; border-radius: 8px; color: var(--info-600); background: var(--info-100); font-size: .69rem; font-weight: 800; }
.student-roster-muted { color: var(--ink-300); font-size: .68rem; font-style: italic; }
.student-roster-guardian { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 8px; font-size: .67rem; font-weight: 750; }
.student-roster-guardian:hover { text-decoration: none; }
.student-roster-guardian.is-linked { color: var(--success-600); background: var(--success-100); }
.student-roster-guardian.is-unlinked { color: var(--warning-600); background: var(--warning-100); }
.student-roster-status { align-items: flex-start; gap: 1px; }
.student-roster-status small.is-danger { color: var(--danger-600); font-weight: 750; }
.student-roster-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); }
.student-roster-action-menu { position: relative; }
.student-roster-action-menu > summary { list-style: none; cursor: pointer; }
.student-roster-action-menu > summary::-webkit-details-marker { display: none; }
.student-roster-action-menu > div { position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: 190px; overflow: hidden; padding: 5px; border: 1px solid var(--ink-200); border-radius: 11px; background: var(--white); box-shadow: var(--shadow-md); }
.student-roster-action-menu a, .student-roster-action-menu button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 0; border-radius: 7px; text-align: left; color: var(--ink-700); background: transparent; font: inherit; font-size: .7rem; cursor: pointer; }
.student-roster-action-menu a:hover, .student-roster-action-menu button:hover { color: var(--ink-900); background: var(--ink-50); text-decoration: none; }
.student-roster-action-menu button.is-danger { color: var(--danger-600); }
.student-roster-action-menu form { margin: 0; }
.student-roster-empty { min-height: 250px; display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-6); color: var(--ink-300); border-top: 1px solid var(--ink-200); }
.student-roster-empty div { display: flex; flex-direction: column; }
.student-roster-empty strong { color: var(--ink-700); font-size: .86rem; }
.student-roster-empty span { color: var(--ink-500); font-size: .73rem; }
.student-roster-results > .pagination { padding: var(--space-4) var(--space-5); margin: 0; border-top: 1px solid var(--ink-100); }
.student-roster-edit-modal { padding: var(--space-5); }
.student-roster-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--ink-200); }
.student-roster-modal-head span { display: block; color: var(--brand-700); font-size: .62rem; font-weight: 850; letter-spacing: .1em; }
.student-roster-modal-head h3 { margin: 1px 0 2px; }
.student-roster-modal-head p { margin: 0; color: var(--ink-500); font-size: .72rem; }
.student-roster-modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-5); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Guru & staf directory additions — shares the roster language, adds workload detail. */
.staff-directory-hero { background: linear-gradient(135deg, var(--white), #f2f8ff); }
.staff-directory-filter-form { grid-template-columns: minmax(300px, 1fr) minmax(175px, .28fr) auto auto; }
.staff-directory-filter-form .student-roster-search input { padding-left: 13px; }
.staff-directory-table th:first-child { min-width: 245px; }
.staff-directory-table th:nth-child(4) { min-width: 180px; }
.staff-directory-code { display: inline-flex; min-width: 36px; justify-content: center; padding: 5px 8px; border-radius: 8px; color: var(--brand-700); background: var(--brand-100); font-size: .68rem; font-weight: 850; }
.staff-directory-roles, .staff-directory-subjects { display: flex; flex-wrap: wrap; gap: 5px; }
.staff-directory-roles span { display: inline-flex; padding: 4px 7px; border-radius: 7px; color: var(--info-600); background: var(--info-100); font-size: .6rem; font-weight: 800; line-height: 1.25; }
.staff-directory-subjects span { display: inline-flex; padding: 4px 7px; border: 1px solid var(--ink-200); border-radius: 7px; color: var(--ink-700); background: var(--ink-50); font-size: .64rem; font-weight: 650; }
.staff-directory-attention { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 8px; color: var(--warning-600); background: var(--warning-100); font-size: .64rem; font-weight: 750; white-space: nowrap; }
.staff-directory-class-count { min-width: 52px; display: inline-flex; align-items: baseline; justify-content: center; gap: 4px; padding: 6px 9px; border-radius: 9px; color: var(--success-600); background: var(--success-100); }
.staff-directory-class-count strong { font-size: .82rem; }
.staff-directory-class-count small { font-size: .59rem; font-weight: 750; text-transform: uppercase; }
.staff-directory-edit-modal { max-width: 680px; }
.staff-directory-edit-modal select[multiple] { min-height: 170px; padding: 6px; }
.staff-directory-edit-modal select[multiple] option { padding: 7px 9px; border-radius: 6px; }
.staff-directory-edit-modal select[multiple] option:checked { color: var(--brand-700); background: var(--brand-100) linear-gradient(0deg, var(--brand-100), var(--brand-100)); }

@media (max-width: 1100px) {
  .student-roster-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-roster-filter-form { grid-template-columns: minmax(240px, 1fr) repeat(2, minmax(150px, .45fr)); }
  .student-roster-filter-form > .btn { grid-row: 2; }
  .staff-directory-filter-form { grid-template-columns: minmax(260px, 1fr) minmax(175px, .35fr) auto auto; }
  .staff-directory-filter-form > .btn { grid-row: auto; }
}
@media (max-width: 760px) {
  .student-roster-page { gap: var(--space-4); }
  .student-roster-hero { align-items: flex-start; flex-direction: column; padding: var(--space-5); }
  .student-roster-hero-actions { width: 100%; justify-content: flex-start; }
  .student-roster-filter, .student-roster-results-head { padding: var(--space-4); }
  .student-roster-filter-form { grid-template-columns: 1fr; }
  .student-roster-filter-form > .btn { grid-row: auto; }
  .student-roster-results-head { align-items: flex-start; flex-direction: column; }
  .guardian-link-mode { grid-template-columns: 1fr; }
  .guardian-link-footer { align-items: stretch; flex-direction: column; }
  .guardian-link-footer > div { justify-content: flex-end; }
  .staff-directory-filter-form { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .student-roster-kpis { grid-template-columns: 1fr; gap: var(--space-2); }
  .student-roster-kpi { min-height: 92px; }
  .student-roster-hero-actions .btn { flex: 1; }
  .guardian-link-head { grid-template-columns: 40px minmax(0, 1fr) auto; padding: var(--space-4); }
  .guardian-link-head-icon { width: 40px; height: 40px; }
  .guardian-link-body { padding: var(--space-4); }
}

/* Notification bell + dropdown */
.notif-dropdown { position: relative; }
.notif-dropdown > summary { list-style: none; }
.notif-dropdown > summary::-webkit-details-marker { display: none; }
.notif-bell {
  position: relative; cursor: pointer; font-size: 1.2rem; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.notif-bell:hover { background: var(--ink-100); }
.notif-badge {
  position: absolute; top: 2px; right: 2px; background: var(--danger-600); color: white;
  font-size: 0.62rem; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 3px;
}
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 420px; overflow-y: auto;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); z-index: 50;
}
.notif-panel-header { padding: var(--space-3) var(--space-4); font-weight: 700; border-bottom: 1px solid var(--ink-100); }
.notif-item { display: block; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--ink-100); color: inherit; }
.notif-item:hover { background: var(--ink-50); text-decoration: none; }
.notif-item.unread { background: var(--brand-50); }
.notif-item.unread .notif-title { font-weight: 700; }
.notif-title { font-size: 0.85rem; }
.notif-body { font-size: 0.78rem; color: var(--ink-500); margin-top: 2px; }
.notif-time { font-size: 0.7rem; color: var(--ink-500); margin-top: 4px; }
.notif-empty { padding: var(--space-5) var(--space-4); text-align: center; color: var(--ink-500); font-size: 0.85rem; }
.notif-viewall { display: block; text-align: center; padding: var(--space-3); font-size: 0.82rem; font-weight: 600; border-top: 1px solid var(--ink-100); }

/* Account dropdown (name + avatar in topbar) */
.user-dropdown { position: relative; }
.user-dropdown > summary { list-style: none; }
.user-dropdown > summary::-webkit-details-marker { display: none; }
.user-summary {
  cursor: pointer; display: flex; align-items: center; gap: var(--space-3);
  padding: 4px 8px 4px 12px; border-radius: var(--radius-md);
}
.user-summary:hover { background: var(--ink-100); }
.user-summary-copy { text-align: right; min-width: 0; max-width: 290px; }
.user-summary-name { font-weight: 750; font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-summary-role { color: var(--ink-500); font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 220px;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg); z-index: 50; overflow: hidden; padding: 6px;
}
.user-panel-item {
  display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 0.88rem; font-weight: 600; color: var(--ink-700); background: none; border: none; cursor: pointer; font-family: inherit;
}
.user-panel-item:hover { background: var(--ink-100); text-decoration: none; }
.user-panel-logout { color: var(--danger-600); }
.user-panel-logout:hover { background: var(--danger-100); }

.content {
  padding: clamp(20px, 2.35vw, 40px);
  max-width: 1680px; width: 100%; margin: 0 auto;
  background:
    radial-gradient(circle at 94% 0, rgba(99, 102, 241, .055), transparent 330px),
    transparent;
}

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4);
  margin-bottom: var(--space-5); flex-wrap: wrap;
  position: relative; overflow: hidden; isolation: isolate;
  padding: clamp(20px, 2.4vw, 32px);
  border: 1px solid rgba(199, 210, 254, .7); border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,242,255,.88));
  box-shadow: 0 10px 30px rgba(79, 70, 229, .065);
}
.page-header::after {
  content: ''; position: absolute; z-index: -1; width: 220px; height: 220px;
  right: -76px; top: -118px; border-radius: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.2), rgba(99,102,241,0) 70%);
}
.page-header h1 { font-size: clamp(1.55rem, 2.2vw, 2rem); line-height: 1.2; margin-bottom: 7px; }
.page-header p { max-width: 82ch; margin-bottom: 0; line-height: 1.55; }
.page-header > .btn, .page-header > div:last-child:not(:first-child) { position: relative; z-index: 1; }
/* The title block (always the first child — h1/status-badge/subtitle) is a
   flex item whose default min-width:auto refused to shrink below its content's
   natural width, which is what was actually forcing the whole page wider than
   the viewport on mobile (the button group's own overflow was already handled
   by flex-wrap above — this was the other half of the bug). */
.page-header > div:first-child { min-width: 0; overflow-wrap: break-word; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--ink-200);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
}
.card-title { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.card-title h3 { margin: 0; }

.grid { display: grid; gap: var(--space-4); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
}

.stat-card {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, var(--white), #fbfcff); border: 1px solid var(--ink-200); border-radius: 16px;
  padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-sm);
}
.stat-card::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(var(--brand-500), var(--brand-300)); }
.stat-card .value { font-size: 1.8rem; font-weight: 800; color: var(--ink-900); }
.stat-card .label { color: var(--ink-500); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .delta { font-size: 0.8rem; margin-top: var(--space-1); }

/* Icon-badged variant — additive, opt-in per card so the many other pages already
   using plain .stat-card (exam player, reports, homeroom, parent, etc.) are unaffected. */
.stat-card-icon { display: flex; align-items: center; gap: var(--space-3); }
.stat-card-icon-badge {
  flex-shrink: 0; width: 46px; height: 46px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.stat-card-icon-badge-brand { background: var(--brand-100); color: var(--brand-700); }
.stat-card-icon-badge-green { background: var(--success-100); color: var(--success-600); }
.stat-card-icon-badge-amber { background: var(--warning-100); color: var(--warning-600); }
.stat-card-icon-badge-info { background: var(--info-100); color: var(--info-600); }

/* Dashboard "hari ini" hero — highlights the current-day schedule card */
.today-hero { border-color: var(--brand-300, var(--brand-200)); box-shadow: 0 0 0 2px var(--brand-100), var(--shadow-sm); }

/* Dashboard workspace -------------------------------------------------------
   Dashboard-only primitives keep the information density high without
   changing generic cards used across the rest of the application. */
.dashboard-shell { display: grid; gap: 22px; }
.dashboard-shell > * { min-width: 0; }
.dashboard-hero {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  min-height: 194px; padding: clamp(25px, 3vw, 40px);
  border: 1px solid rgba(199, 210, 254, .9); border-radius: 24px;
  background:
    radial-gradient(circle at 88% 12%, rgba(99,102,241,.22), transparent 27%),
    linear-gradient(135deg, rgba(255,255,255,.99), rgba(238,242,255,.93));
  box-shadow: 0 16px 42px rgba(79,70,229,.09);
}
.dashboard-hero::after {
  content: ''; position: absolute; z-index: -1; width: 270px; height: 270px;
  right: -120px; bottom: -180px; border-radius: 50%;
  border: 42px solid rgba(255,255,255,.42);
}
.dashboard-hero-copy { min-width: 0; max-width: 900px; }
.dashboard-eyebrow, .dashboard-section-kicker {
  display: block; color: var(--brand-600); font-size: .72rem; line-height: 1.2;
  font-weight: 800; letter-spacing: .13em; text-transform: uppercase;
}
.dashboard-hero h1 { margin: 7px 0 8px; font-size: clamp(1.7rem, 3vw, 2.5rem); line-height: 1.12; letter-spacing: -.035em; }
.dashboard-hero-copy > p { max-width: 760px; margin: 0; color: var(--ink-600); font-size: .98rem; line-height: 1.6; }
.dashboard-context { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 19px; }
.dashboard-context span {
  display: inline-flex; align-items: center; gap: 6px; min-width: 0; padding: 7px 10px;
  border: 1px solid rgba(199,210,254,.85); border-radius: 999px;
  background: rgba(255,255,255,.78); color: var(--ink-600); font-size: .76rem; font-weight: 650;
}
.dashboard-context svg { flex: 0 0 auto; color: var(--brand-600); }
.dashboard-hero-actions { position: relative; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; flex: 0 0 auto; }
.dashboard-card {
  min-width: 0; margin: 0; padding: clamp(20px, 2vw, 28px);
  border: 1px solid var(--ink-200); border-radius: 20px; background: var(--white);
  box-shadow: 0 9px 27px rgba(15,23,42,.045);
}
.dashboard-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dashboard-section-heading.compact { align-items: center; }
.dashboard-section-heading h2 { margin: 5px 0 0; font-size: 1.18rem; line-height: 1.25; letter-spacing: -.015em; }
.dashboard-section-heading p { margin: 6px 0 0; color: var(--ink-500); font-size: .84rem; line-height: 1.5; }
.dashboard-count-badge, .dashboard-score {
  flex: 0 0 auto; padding: 7px 11px; border-radius: 999px;
  background: var(--ink-100); color: var(--ink-600); font-size: .75rem; font-weight: 750;
}
.dashboard-score.is-good { background: var(--success-100); color: var(--success-600); }
.dashboard-score.is-warning { background: var(--warning-100); color: var(--warning-600); }
.dashboard-text-link { flex: 0 0 auto; color: var(--brand-600); font-size: .79rem; font-weight: 700; }
.dashboard-text-link:hover { color: var(--brand-700); }

.dashboard-action-center { border-color: #fed7aa; background: linear-gradient(145deg, #fff, #fffcf7); }
.dashboard-action-list { display: grid; gap: 9px; }
.dashboard-action {
  display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 13px;
  padding: 13px 14px; border: 1px solid var(--ink-200); border-radius: 14px; background: rgba(255,255,255,.94);
}
.dashboard-action-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; }
.dashboard-action-warning .dashboard-action-icon { background: var(--warning-100); color: var(--warning-600); }
.dashboard-action-danger .dashboard-action-icon { background: var(--danger-100); color: var(--danger-600); }
.dashboard-action-info .dashboard-action-icon { background: var(--info-100); color: var(--info-600); }
.dashboard-action-copy { min-width: 0; }
.dashboard-action-copy h3 { margin: 0; font-size: .9rem; }
.dashboard-action-copy p { margin: 3px 0 0; color: var(--ink-500); font-size: .78rem; line-height: 1.4; }
.dashboard-clear-state {
  display: flex; align-items: center; gap: 13px; padding: 16px 19px; border: 1px solid #bbf7d0;
  border-radius: 16px; background: linear-gradient(135deg,#f0fdf4,#ecfdf5); color: var(--success-600);
}
.dashboard-clear-state div { display: grid; gap: 2px; }
.dashboard-clear-state strong { color: #166534; font-size: .88rem; }
.dashboard-clear-state span { color: #4d7c5d; font-size: .76rem; }

.dashboard-metrics { display: grid; gap: 14px; }
.dashboard-metrics-four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-metric {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 14px;
  min-width: 0; padding: 18px; border: 1px solid var(--ink-200); border-radius: 17px;
  background: linear-gradient(145deg,#fff,#fbfcff); box-shadow: 0 6px 19px rgba(15,23,42,.04);
}
.dashboard-metric::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: currentColor; opacity: .72; }
.dashboard-metric-icon { display: grid; place-items: center; flex: 0 0 46px; height: 46px; border-radius: 13px; background: currentColor; }
.dashboard-metric-icon svg { color: white; }
.dashboard-metric > div { display: grid; min-width: 0; }
.dashboard-metric > div > span { color: var(--ink-500); font-size: .69rem; font-weight: 750; letter-spacing: .045em; text-transform: uppercase; }
.dashboard-metric strong { margin-top: 2px; color: var(--ink-900); font-size: 1.62rem; line-height: 1.12; letter-spacing: -.03em; }
.dashboard-metric strong em { margin-left: 3px; color: var(--ink-400); font-size: .83rem; font-style: normal; font-weight: 700; }
.dashboard-metric small { margin-top: 3px; overflow: hidden; color: var(--ink-500); font-size: .71rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-metric.metric-brand { color: var(--brand-600); }
.dashboard-metric.metric-info { color: var(--info-600); }
.dashboard-metric.metric-success { color: var(--success-600); }
.dashboard-metric.metric-warning { color: var(--warning-600); }
.dashboard-metric.metric-danger { color: var(--danger-600); }
.dashboard-metric-link { padding-right: 30px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.dashboard-metric-link::before { content: '↗'; position: absolute; top: 10px; right: 13px; color: var(--ink-400); font-size: .8rem; }
.dashboard-metric-link:hover { border-color: var(--brand-300); box-shadow: var(--shadow-md); text-decoration: none; transform: translateY(-2px); }
.dashboard-metric-link:hover::before { color: var(--brand-600); }

.dashboard-student-overview { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); gap: 22px; }
.dashboard-student-overview > .dashboard-metrics { grid-column: 1 / -1; grid-row: 1; }
.dashboard-student-overview > .dashboard-student-schedule { grid-column: 1; grid-row: 2; }
.dashboard-student-overview > .dashboard-student-focus { grid-column: 2; grid-row: 2; }

.dashboard-grid { display: grid; gap: 22px; }
.dashboard-grid-equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-grid-focus { grid-template-columns: minmax(0, 1.45fr) minmax(320px, .75fr); }
.dashboard-empty { display: flex; min-height: 165px; flex-direction: column; align-items: center; justify-content: center; gap: 7px; color: var(--ink-400); text-align: center; }
.dashboard-empty.small { min-height: 105px; }
.dashboard-empty strong { color: var(--ink-700); font-size: .89rem; }
.dashboard-empty span { max-width: 390px; color: var(--ink-500); font-size: .78rem; }
.dashboard-empty .btn { margin-top: 5px; }

.dashboard-ratio-summary { display: flex; align-items: center; justify-content: center; gap: clamp(27px, 6vw, 70px); min-height: 185px; }
.dashboard-ring {
  --progress: 0; display: grid; place-items: center; align-content: center; flex: 0 0 126px; height: 126px;
  border-radius: 50%; background: radial-gradient(circle at center,#fff 57%,transparent 59%), conic-gradient(var(--brand-500) calc(var(--progress) * 1%), var(--ink-100) 0);
}
.dashboard-ring strong { color: var(--ink-900); font-size: 1.55rem; line-height: 1; }
.dashboard-ring span { margin-top: 4px; color: var(--ink-500); font-size: .7rem; }
.dashboard-ratio-list { display: grid; min-width: 210px; }
.dashboard-ratio-list > div { display: flex; justify-content: space-between; gap: 24px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); }
.dashboard-ratio-list span { color: var(--ink-500); font-size: .79rem; }
.dashboard-ratio-list strong { color: var(--ink-900); font-size: .9rem; }

.dashboard-progress-list { display: grid; gap: 22px; padding: 13px 0 7px; }
.dashboard-progress-row { display: grid; grid-template-columns: 110px minmax(90px,1fr) 43px; align-items: center; gap: 13px; }
.dashboard-progress-row > div:first-child { display: grid; gap: 2px; }
.dashboard-progress-row strong { font-size: .82rem; }
.dashboard-progress-row div > span { color: var(--ink-500); font-size: .67rem; }
.dashboard-progress-row > b { color: var(--ink-600); font-size: .75rem; text-align: right; }
.dashboard-progress { display: block; overflow: hidden; height: 7px; border-radius: 99px; background: var(--ink-100); }
.dashboard-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--brand-500),#818cf8); }

.dashboard-workload-list { display: grid; gap: 13px; }
.dashboard-workload-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 11px; }
.dashboard-avatar-mini { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-100); color: var(--brand-700); font-size: .72rem; font-weight: 800; }
.dashboard-workload-row > div { display: grid; min-width: 0; gap: 6px; }
.dashboard-workload-row strong { overflow: hidden; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-workload-row > b { color: var(--ink-600); font-size: .72rem; }
.dashboard-quick-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.dashboard-quick-grid > a { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 13px; border: 1px solid var(--ink-200); border-radius: 13px; color: var(--ink-800); background: #fbfcff; }
.dashboard-quick-grid > a:hover { border-color: var(--brand-300); background: var(--brand-50); text-decoration: none; transform: translateY(-1px); }
.dashboard-quick-grid > a > span { display: grid; place-items: center; flex: 0 0 36px; height: 36px; border-radius: 10px; background: var(--brand-100); color: var(--brand-600); }
.dashboard-quick-grid div { display: grid; min-width: 0; }
.dashboard-quick-grid strong { font-size: .78rem; }
.dashboard-quick-grid small { overflow: hidden; color: var(--ink-500); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }

.dashboard-timeline { position: relative; display: grid; }
.dashboard-timeline::before { content: ''; position: absolute; top: 20px; bottom: 20px; left: 82px; width: 2px; background: var(--ink-100); }
.dashboard-timeline-item { position: relative; display: grid; grid-template-columns: 65px 16px minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 67px; padding: 7px 0; }
.dashboard-time { display: grid; color: var(--ink-500); text-align: right; }
.dashboard-time strong { color: var(--ink-800); font-size: .81rem; }
.dashboard-time span { font-size: .66rem; }
.dashboard-timeline-dot { z-index: 1; display: block; width: 12px; height: 12px; margin: auto; border: 3px solid white; border-radius: 50%; background: var(--ink-300); box-shadow: 0 0 0 2px var(--ink-200); }
.dashboard-timeline-copy { display: grid; min-width: 0; }
.dashboard-timeline-copy strong { overflow: hidden; font-size: .84rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-timeline-copy span { color: var(--ink-500); font-size: .7rem; }
.dashboard-state-pill { justify-self: end; padding: 5px 8px; border-radius: 999px; background: var(--ink-100); color: var(--ink-500); font-size: .65rem; font-weight: 700; white-space: nowrap; }
.dashboard-timeline-item.is-live .dashboard-timeline-dot { background: var(--success-500); box-shadow: 0 0 0 3px var(--success-100); }
.dashboard-timeline-item.is-live .dashboard-state-pill { background: var(--success-100); color: var(--success-600); }
.dashboard-timeline-item.is-upcoming .dashboard-timeline-dot { background: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.dashboard-timeline-item.is-upcoming .dashboard-state-pill { background: var(--brand-100); color: var(--brand-700); }
.dashboard-timeline-item.is-done { opacity: .67; }

.dashboard-priority-card, .dashboard-student-focus { background: linear-gradient(150deg,#fff,#fbfcff); }
.dashboard-priority-row { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--ink-100); color: var(--ink-800); }
.dashboard-priority-row:hover { color: var(--brand-700); text-decoration: none; }
.dashboard-priority-row > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--ink-100); color: var(--ink-600); }
.dashboard-priority-row.has-alert > span { background: var(--warning-100); color: var(--warning-600); }
.dashboard-priority-row div { display: grid; min-width: 0; }
.dashboard-priority-row strong { font-size: .8rem; }
.dashboard-priority-row small { color: var(--ink-500); font-size: .69rem; }
.dashboard-priority-row > b { color: var(--ink-400); }
.dashboard-inline-success { display: flex; align-items: center; gap: 8px; margin-top: 15px; padding: 11px; border-radius: 11px; background: var(--success-100); color: var(--success-600); font-size: .75rem; font-weight: 700; }

.dashboard-deadline-grid, .dashboard-class-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 11px; }
.dashboard-deadline-card { display: grid; gap: 4px; min-width: 0; padding: 14px; border: 1px solid var(--ink-200); border-radius: 13px; background: #fbfcff; color: var(--ink-800); }
.dashboard-deadline-card:hover { border-color: var(--brand-300); background: var(--brand-50); text-decoration: none; }
.dashboard-deadline-card > span { color: var(--brand-600); font-size: .67rem; font-weight: 700; }
.dashboard-deadline-card strong { overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-deadline-card small { color: var(--ink-500); font-size: .67rem; }
.dashboard-class-card { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; min-width: 0; padding: 13px; border: 1px solid var(--ink-200); border-radius: 13px; color: var(--ink-800); background: #fff; }
.dashboard-class-card:hover { border-color: var(--brand-300); background: var(--brand-50); text-decoration: none; transform: translateY(-1px); }
.dashboard-class-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-100); color: var(--brand-600); }
.dashboard-class-card div { display: grid; min-width: 0; }
.dashboard-class-card strong { overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-class-card div > span { color: var(--ink-500); font-size: .68rem; }
.dashboard-class-card > b { color: var(--ink-400); }
.dashboard-guidance-banner { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: center; gap: 15px; padding: 18px 20px; border: 1px solid #bae6fd; border-radius: 17px; background: linear-gradient(135deg,#f0f9ff,#eff6ff); }
.dashboard-guidance-banner > span { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 13px; background: #dbeafe; color: #2563eb; }
.dashboard-guidance-banner strong { font-size: .88rem; }
.dashboard-guidance-banner p { margin: 3px 0 0; color: var(--ink-500); font-size: .73rem; }

.dashboard-subsection-label { margin: 14px 0 3px; color: var(--brand-600); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dashboard-subsection-label.is-danger { color: var(--danger-600); }
.dashboard-task-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--ink-100); color: var(--ink-800); }
.dashboard-task-row:hover { color: var(--brand-700); text-decoration: none; }
.dashboard-task-row > div { display: grid; min-width: 0; }
.dashboard-task-row strong { overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-task-row span { color: var(--ink-500); font-size: .67rem; }
.dashboard-task-row b { flex: 0 0 auto; padding: 5px 7px; border-radius: 7px; background: var(--brand-50); color: var(--brand-600); font-size: .64rem; }
.dashboard-task-row.is-overdue b { background: var(--danger-100); color: var(--danger-600); }
.dashboard-quiz-list, .dashboard-grade-list { display: grid; }
.dashboard-quiz-list > a { display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--ink-100); color: var(--ink-800); }
.dashboard-quiz-list > a:hover { color: var(--brand-700); text-decoration: none; }
.dashboard-quiz-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--info-100); color: var(--info-600); }
.dashboard-quiz-list div { display: grid; min-width: 0; }
.dashboard-quiz-list strong { overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-quiz-list small { color: var(--ink-500); font-size: .67rem; }
.dashboard-quiz-list > a > span:last-child { color: var(--ink-500); font-size: .66rem; white-space: nowrap; }
.dashboard-grade-list > div { display: grid; grid-template-columns: 56px minmax(0,1fr); align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); }
.dashboard-grade-mark { display: grid; place-items: center; min-height: 34px; padding: 4px 7px; border-radius: 9px; background: var(--brand-100); color: var(--brand-700); font-size: .72rem; font-weight: 800; }
.dashboard-grade-list div > div { display: grid; min-width: 0; }
.dashboard-grade-list strong { overflow: hidden; font-size: .79rem; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-grade-list small { color: var(--ink-500); font-size: .67rem; }
.dashboard-grade-list .dashboard-grade-date { color: var(--ink-400); }

.dashboard-guidance-home { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: center; gap: 22px; min-height: 190px; background: linear-gradient(135deg,#fff,#f5f7ff); }
.dashboard-guidance-illustration { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 21px; background: var(--brand-100); color: var(--brand-600); }
.dashboard-guidance-home h2 { margin: 5px 0; font-size: 1.25rem; }
.dashboard-guidance-home p { margin: 0; color: var(--ink-500); font-size: .82rem; }

.dashboard-announcement-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 11px; }
.dashboard-announcement-card { display: grid; grid-template-columns: 38px minmax(0,1fr); gap: 11px; padding: 14px; border: 1px solid var(--ink-200); border-radius: 14px; background: #fbfcff; }
.dashboard-announcement-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--brand-100); color: var(--brand-600); }
.dashboard-announcement-card > div { min-width: 0; }
.dashboard-announcement-card strong { display: block; font-size: .82rem; }
.dashboard-announcement-card p { display: -webkit-box; overflow: hidden; margin: 5px 0; color: var(--ink-600); font-size: .73rem; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dashboard-announcement-card small { display: block; color: var(--ink-400); font-size: .64rem; }
.dashboard-attachment { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; color: var(--brand-600); font-size: .68rem; font-weight: 700; }
.modal-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: var(--space-4); }
.modal-heading h3 { margin: 5px 0 0; }

@media (max-width: 1180px) {
  .dashboard-metrics-four { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-deadline-grid, .dashboard-class-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .dashboard-hero { align-items: flex-start; flex-direction: column; min-height: 0; }
  .dashboard-hero-actions { justify-content: flex-start; }
  .dashboard-grid-equal, .dashboard-grid-focus { grid-template-columns: minmax(0,1fr); }
  .dashboard-student-overview { grid-template-columns: minmax(0, 1fr); }
  .dashboard-student-overview > .dashboard-student-focus,
  .dashboard-student-overview > .dashboard-metrics,
  .dashboard-student-overview > .dashboard-student-schedule { grid-column: 1; grid-row: auto; }
  .dashboard-student-overview > .dashboard-student-focus { order: 0; }
  .dashboard-student-overview > .dashboard-metrics { order: 1; }
  .dashboard-student-overview > .dashboard-student-schedule { order: 2; }
}
@media (max-width: 650px) {
  .dashboard-shell { gap: 15px; }
  .dashboard-hero, .dashboard-card { border-radius: 17px; }
  .dashboard-hero { padding: 22px 18px; }
  .dashboard-hero-actions { width: 100%; }
  .dashboard-hero-actions .btn { flex: 1 1 150px; }
  .dashboard-context span { width: 100%; border-radius: 10px; }
  .dashboard-metrics-four { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .dashboard-metric { padding: 14px; }
  .dashboard-action { grid-template-columns: 34px minmax(0,1fr); }
  .dashboard-action .btn { grid-column: 2; justify-self: start; }
  .dashboard-section-heading { align-items: flex-start; }
  .dashboard-section-heading.compact { align-items: flex-start; }
  .dashboard-ratio-summary { align-items: stretch; flex-direction: column; }
  .dashboard-ring { align-self: center; }
  .dashboard-progress-row { grid-template-columns: 85px minmax(70px,1fr) 37px; gap: 8px; }
  .dashboard-quick-grid, .dashboard-deadline-grid, .dashboard-class-grid, .dashboard-announcement-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-timeline::before { left: 61px; }
  .dashboard-timeline-item { grid-template-columns: 44px 14px minmax(0,1fr); }
  .dashboard-state-pill { grid-column: 3; justify-self: start; margin-top: -8px; }
  .dashboard-time strong { font-size: .75rem; }
  .dashboard-guidance-banner, .dashboard-guidance-home { grid-template-columns: 52px minmax(0,1fr); }
  .dashboard-guidance-banner .btn, .dashboard-guidance-home .btn { grid-column: 1 / -1; width: 100%; }
  .dashboard-guidance-illustration { width: 52px; height: 52px; border-radius: 15px; }
  .dashboard-quiz-list > a { grid-template-columns: 36px minmax(0,1fr); }
  .dashboard-quiz-list > a > span:last-child { grid-column: 2; }
  .dashboard-mode-student .dashboard-hero { padding: 18px; gap: 15px; }
  .dashboard-mode-student .dashboard-hero h1 { font-size: 1.6rem; }
  .dashboard-mode-student .dashboard-hero-copy > p { font-size: .86rem; line-height: 1.45; }
  .dashboard-mode-student .dashboard-context-student { gap: 5px 12px; margin-top: 12px; }
  .dashboard-mode-student .dashboard-context-student span { width: auto; padding: 0; border: 0; background: none; font-size: .7rem; }
  .dashboard-mode-student .dashboard-hero-actions { gap: 8px; }
  .dashboard-mode-student .dashboard-hero-actions .btn { flex: 1 1 0; min-width: 0; padding: 9px 7px; font-size: .76rem; }
  .dashboard-student-overview { gap: 15px; }
  .dashboard-student-overview > .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .dashboard-student-overview .dashboard-metric { min-height: 120px; flex-direction: column; align-items: flex-start; gap: 7px; padding: 12px; }
  .dashboard-student-overview .dashboard-metric-icon { flex: 0 0 32px; width: 32px; height: 32px; border-radius: 9px; }
  .dashboard-student-overview .dashboard-metric-icon svg { width: 17px; height: 17px; }
  .dashboard-student-overview .dashboard-metric strong { font-size: 1.4rem; }
  .dashboard-student-overview .dashboard-metric small { overflow: visible; white-space: normal; line-height: 1.25; }
}
@media (max-width: 360px) {
  .dashboard-student-focus .dashboard-section-heading { flex-direction: column; gap: 5px; }
  .dashboard-student-focus .dashboard-task-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .dashboard-student-focus .dashboard-task-row strong { overflow: visible; text-overflow: clip; white-space: normal; }
  .dashboard-student-focus .dashboard-task-row b { justify-self: start; }
}

/* Pengumuman attachments */
.announcement-attachment-thumb { display: inline-block; margin-top: var(--space-2); }
.announcement-attachment-thumb img {
  max-width: 220px; max-height: 160px; border-radius: var(--radius-md); border: 1px solid var(--ink-200); display: block;
}
.announcement-attachment-file {
  display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-2);
  font-size: 0.82rem; font-weight: 600; color: var(--brand-700); background: var(--brand-50);
  border-radius: var(--radius-sm); padding: 6px 12px;
}
.announcement-attachment-file:hover { background: var(--brand-100); text-decoration: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: 10px 18px; border-radius: 10px;
  font-weight: 600; font-size: 0.9rem; cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
  min-height: 44px;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand-600), #5b4ff0); color: white; box-shadow: 0 7px 16px rgba(79,70,229,.2); }
.btn-primary:hover { background: linear-gradient(135deg, var(--brand-700), var(--brand-600)); box-shadow: 0 9px 20px rgba(79,70,229,.25); }
.btn-secondary { background: var(--white); color: var(--ink-700); border-color: var(--ink-300); }
.btn-secondary:hover { background: var(--ink-100); }
.btn-danger { background: var(--danger-600); color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: var(--ink-700); }
.btn-ghost:hover { background: var(--ink-100); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; min-height: 32px; }
.btn-icon { padding: 6px; width: 32px; min-width: 32px; gap: 0; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: var(--space-4); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }
@media (max-width: 700px) { .form-row { grid-template-columns: 1fr; } }
label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: var(--space-1); color: var(--ink-700); }
.hint { font-size: 0.78rem; color: var(--ink-500); margin-top: var(--space-1); }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="datetime-local"], input[type="search"], input[type="url"],
input[type="tel"], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--ink-300); border-radius: 10px;
  font-size: 0.9rem; font-family: inherit; color: var(--ink-900); background: var(--white);
  min-height: 44px; box-shadow: inset 0 1px 2px rgba(15,23,42,.025);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,.12); outline: none; }
.field-error { color: var(--danger-600); font-size: 0.8rem; margin-top: var(--space-1); }
.input-error { border-color: var(--danger-600) !important; }
.checkbox-row { display: flex; align-items: center; gap: var(--space-2); }
.checkbox-row input { width: 18px; height: 18px; min-height: unset; }

/* Table */
/* Live table search box */
.table-search {
  display: flex; align-items: center; gap: var(--space-2);
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 12px;
  padding: 9px 13px; margin-bottom: var(--space-4); box-shadow: var(--shadow-xs);
}
.table-search-icon { font-size: 0.85rem; opacity: 0.6; }
.table-search-input {
  flex: 1; border: none; background: transparent; padding: 0; min-height: auto;
  font-size: 0.88rem; color: var(--ink-900);
}
.table-search-input:focus { outline: none; }
.table-search-count { white-space: nowrap; }

/* Server-side pagination controls (App\Core\Paginator + pagination_links()) */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; }
.pagination-controls { display: flex; align-items: center; gap: var(--space-3); }
.pagination-disabled { opacity: 0.45; pointer-events: none; }

/* Drag-and-drop reorder list (Susun Urutan Guru) */
.reorder-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ink-200); border-radius: var(--radius-md); overflow: hidden; }
.reorder-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); background: var(--white); border-bottom: 1px solid var(--ink-100);
  cursor: grab;
}
.reorder-item:last-child { border-bottom: none; }
.reorder-item.is-dragging { opacity: 0.4; background: var(--brand-50); }
.reorder-handle { color: var(--ink-300); font-size: 1.1rem; user-select: none; }
.reorder-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.reorder-name { font-weight: 600; }
.reorder-move { display: flex; gap: var(--space-1); }

/* -webkit-overflow-scrolling:touch gives real momentum scroll on iOS Safari
   (without it, older iOS versions can feel like dragging does nothing at all).
   The explicit scrollbar styling below makes the scrollbar a visible, always-on
   ~10px bar instead of the OS/browser-default thin overlay one that only shows
   on hover — on a table wider than its container, a hidden-until-hover scrollbar
   gives no visual clue that dragging it (or swiping) would reveal more columns. */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--ink-200); border-radius: 14px; background: var(--white);
  scrollbar-width: auto; scrollbar-color: var(--ink-300) var(--ink-100);
}
.table-wrap::-webkit-scrollbar { height: 10px; width: 10px; }
.table-wrap::-webkit-scrollbar-track { background: var(--ink-100); }
.table-wrap::-webkit-scrollbar-thumb { background: var(--ink-300); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: var(--ink-500); }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 560px; }
thead th {
  text-align: left; background: #f8faff; color: var(--ink-500);
  font-weight: 700; text-transform: uppercase; font-size: 0.7rem; letter-spacing: 0.04em;
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--ink-200);
}
tbody td { padding: 14px var(--space-4); border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: #fafbff; }
tbody tr.row-self-checkin { background: var(--brand-50, #eef2ff); }
tbody tr.row-self-checkin:hover { background: var(--brand-100); }

/* Below this width a wide data-table (NIS/Nama/Ruang, Status/Nilai, etc.) never
   reads well no matter how good the horizontal-scroll affordance is — content
   at the far edge is still effectively hidden until a reader notices they can
   scroll. Switch to one stacked mini-card per row instead: no scrolling
   needed, everything is simply visible top-to-bottom. app.js populates each
   <td>'s data-label from the table's own <thead th> text so this works for
   every table already in the app without touching any view file. */
@media (max-width: 640px) {
  .table-wrap { overflow-x: visible; border: none; }
  .table-wrap table { min-width: 0; }
  .table-wrap thead { display: none; }
  .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap tbody tr {
    background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-md);
    margin-bottom: var(--space-3); padding: 0 var(--space-4);
  }
  .table-wrap tbody tr:last-child { margin-bottom: 0; }
  .table-wrap tbody td {
    display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
    padding: var(--space-3) 0; border-bottom: 1px solid var(--ink-100); text-align: right;
  }
  .table-wrap tbody td:last-child { border-bottom: none; }
  .table-wrap tbody td[data-label]::before {
    content: attr(data-label); font-weight: 700; color: var(--ink-500); font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.03em; text-align: left; margin-right: auto;
  }
  .table-wrap tbody td:empty { display: none; }
}

/* Badges */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
}
.badge-neutral { background: var(--ink-100); color: var(--ink-700); }
.badge-success { background: var(--success-100); color: var(--success-600); }
.badge-warning { background: var(--warning-100); color: var(--warning-600); }
.badge-danger { background: var(--danger-100); color: var(--danger-600); }
.badge-info { background: var(--info-100); color: var(--info-600); }
.badge-muted { background: var(--ink-100); color: var(--ink-500); }

/* Alerts / flash */
.alert { padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); margin-bottom: var(--space-4); font-size: 0.9rem; display: flex; gap: var(--space-2); align-items: flex-start; }
.alert-success { background: var(--success-100); color: #14532d; }
.alert-error { background: var(--danger-100); color: #7f1d1d; }
.alert-info { background: var(--info-100); color: #0c4a6e; }
.alert-warning { background: var(--warning-100); color: #78350f; }

/* Empty state */
.empty-state { text-align: center; padding: var(--space-8) var(--space-4); color: var(--ink-500); }
.empty-state .icon { font-size: 2rem; margin-bottom: var(--space-2); }

/* Progress bar */
.progress { height: 8px; background: var(--ink-100); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand-500); border-radius: 999px; }

/* Auth page */
.auth-shell {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-4);
  background: radial-gradient(circle at top, var(--brand-50), var(--ink-50));
  padding: var(--space-5);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-6); border: 1px solid var(--ink-200);
}
.auth-card .brand { justify-content: center; padding: 0 0 var(--space-5); }

.tag-list { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.chip {
  display: inline-flex; align-items: center;
  background: var(--ink-100); color: var(--ink-700); border: 1px solid transparent; border-radius: 999px; padding: 5px 12px; font-size: 0.78rem; font-weight: 650;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.tag-list a.chip:hover { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); text-decoration: none; }

.divider { height: 1px; background: var(--ink-200); margin: var(--space-4) 0; border: none; }

/* Main content + narrower action rail. Used where a page has one primary form
   and a set of secondary/batch actions that would otherwise leave the right
   half of a wide screen empty. minmax(0,…) so long content can shrink instead
   of forcing the grid wider than the viewport. */
.layout-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
}
@media (max-width: 1000px) { .layout-sidebar { grid-template-columns: minmax(0, 1fr); } }

/* Segmented filter — a link-based pill toggle (plain GET navigation, no JS),
   used where a small fixed set of mutually-exclusive filter values reads
   better as tabs than a <select> (e.g. Jenis: Semua/Reguler/PTS/PAS). */
.segmented {
  display: inline-flex; border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  overflow: hidden; background: var(--white);
}
.segmented a {
  padding: 9px 16px; font-size: 0.85rem; font-weight: 600; color: var(--ink-700);
  border-right: 1px solid var(--ink-200); white-space: nowrap;
}
.segmented a:last-child { border-right: none; }
.segmented a:hover { background: var(--ink-50); text-decoration: none; }
.segmented a.active { background: var(--brand-600); color: white; }
.segmented a.active:hover { background: var(--brand-700); }

/* Criteria step cards — used on the Generate Otomatis page to show generation rules */
.criteria-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }
@media (max-width: 900px) { .criteria-grid { grid-template-columns: 1fr; } }
.criteria-item { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); background: var(--ink-50); border-radius: var(--radius-md); }
.criteria-icon {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.criteria-item strong { display: block; font-size: 0.88rem; color: var(--ink-900); margin-bottom: 2px; }
.criteria-item p { margin: 0; font-size: 0.82rem; color: var(--ink-700); line-height: 1.5; }

/* Day-picker pills (Hari Operasional toggle) */
.day-picker { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.day-pill { position: relative; }
.day-pill input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.day-pill span {
  display: flex; align-items: center; justify-content: center;
  min-width: 60px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--ink-300);
  font-size: 0.85rem; font-weight: 600; color: var(--ink-700); background: var(--white);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.day-pill input:checked + span { background: var(--brand-600); border-color: var(--brand-600); color: white; }
.day-pill input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; }

/* Kelas Digital cards */
.course-card {
  display: flex; flex-direction: column;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.course-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md, 0 8px 20px rgba(0,0,0,.08)); border-color: var(--brand-300, var(--brand-200)); }
.course-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: var(--space-3); }
.course-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; font-weight: 700;
}
.course-card-title { margin: 0 0 4px; }
.course-card-sub { margin-bottom: var(--space-3); }
.course-card-schedule {
  margin-top: auto; padding-top: var(--space-3); border-top: 1px solid var(--ink-100);
  font-size: 0.78rem; color: var(--ink-600);
  display: flex; align-items: center; gap: 6px;
}
.course-card-icon { display: inline-flex; flex-shrink: 0; }
.course-card-stats { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.course-card-stat {
  display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; font-weight: 600;
  color: var(--ink-600); background: var(--ink-50); border-radius: 999px; padding: 3px 10px;
}
.course-card-stat-warning { color: var(--warning-600); background: var(--warning-100); }
.course-card-enter {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  text-align: center; margin-top: var(--space-3);
}
.course-card-actions { display: flex; gap: var(--space-2); margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--ink-100); }
.course-card-action {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 0.76rem; font-weight: 600; color: var(--ink-700);
  background: var(--ink-50); border-radius: var(--radius-sm); padding: 6px 4px; text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.course-card-action:hover { background: var(--brand-100); color: var(--brand-700); }

/* Reusable collection cards for quizzes, exams and future content indexes. */
.resource-card {
  display: flex; flex-direction: column; min-height: 250px; position: relative; overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.resource-card::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-300));
}
.resource-card-exam::before { background: linear-gradient(90deg, #0284c7, #818cf8); }
.resource-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-100); }
.resource-card-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-3); min-height: 25px; }
.resource-card-title { margin-bottom: 5px; line-height: 1.35; }
.resource-card-subtitle { margin-bottom: var(--space-3); }
.resource-card-time {
  display: flex; align-items: flex-start; gap: 7px; margin-bottom: var(--space-4);
  padding: 10px 12px; border-radius: 10px; background: var(--ink-50);
  color: var(--ink-500); font-size: .78rem; line-height: 1.45;
}
.resource-card-footer {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2);
  margin-top: auto; padding-top: var(--space-4); border-top: 1px solid var(--ink-100);
}

/* Absen Mengajar (teacher check-in/out) — attendance/session-show.php */
.attendance-window-card {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-4); padding: var(--space-4); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm);
}
.attendance-window-icon { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: 14px; background: var(--ink-100); color: var(--ink-500); }
.attendance-window-title { margin-bottom: 2px; color: var(--ink-900); font-size: .95rem; font-weight: 800; }
.attendance-window-detail { color: var(--ink-500); font-size: .78rem; }
.attendance-window-detail strong { margin-left: 5px; color: var(--ink-700); white-space: nowrap; }
.attendance-window-badge { padding: 5px 10px; border-radius: 999px; background: var(--ink-100); color: var(--ink-500); font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.attendance-window-card.is-open { border-color: #86efac; background: linear-gradient(105deg, var(--success-100), var(--white) 45%); }
.attendance-window-card.is-open .attendance-window-icon, .attendance-window-card.is-open .attendance-window-badge { background: var(--success-600); color: white; }
.attendance-window-card.is-before { border-color: #bae6fd; background: linear-gradient(105deg, var(--info-100), var(--white) 45%); }
.attendance-window-card.is-before .attendance-window-icon, .attendance-window-card.is-before .attendance-window-badge { background: var(--info-600); color: white; }
.attendance-window-card.is-after { border-color: var(--ink-300); background: linear-gradient(105deg, var(--ink-100), var(--white) 45%); }
.attendance-window-card.is-after .attendance-window-icon { color: var(--ink-700); }
.attendance-audit-alert { align-items: center; }
.attendance-audit-alert svg { flex-shrink: 0; }
.teaching-attendance-card { position: relative; overflow: hidden; }
.teaching-attendance-card::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand-500); }
.teaching-attendance { display: flex; gap: var(--space-5); flex-wrap: wrap; }
.teaching-attendance-step { display: flex; align-items: center; gap: var(--space-3); flex: 1; min-width: 220px; }
.teaching-attendance-step + .teaching-attendance-step { border-left: 1px solid var(--ink-200); padding-left: var(--space-5); }
@media (max-width: 700px) { .teaching-attendance-step + .teaching-attendance-step { border-left: none; padding-left: 0; } }
.teaching-attendance-icon {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  background: var(--ink-100); color: var(--ink-400, var(--ink-500));
  transition: background .15s ease, color .15s ease;
}
.teaching-attendance-icon.is-done { background: var(--success-100); color: var(--success-600); }
.teaching-attendance-icon.is-blocked { background: var(--warning-100); color: var(--warning-600); }
.teaching-attendance-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-500); margin-bottom: 2px; }
.teaching-attendance-value { font-size: 0.92rem; font-weight: 600; color: var(--ink-900); }
.teaching-attendance-hint { font-size: 0.78rem; color: var(--ink-500); margin-top: 2px; }

.attendance-roster-card { padding: 0; overflow: hidden; }
.attendance-roster-card form > input[type="hidden"] { display: none; }
.attendance-topic-field { margin: 0; padding: var(--space-5); border-bottom: 1px solid var(--ink-200); background: linear-gradient(180deg, var(--white), var(--ink-50)); }
.attendance-topic-field input { background: var(--white); }
.attendance-roster-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-5) var(--space-3); }
.attendance-roster-heading h3 { margin: 0; }
.attendance-roster-eyebrow { display: block; margin-bottom: 2px; color: var(--brand-600); font-size: .66rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.attendance-roster-actions { display: flex; align-items: center; gap: var(--space-2); }
.attendance-summary { display: grid; grid-template-columns: repeat(4, minmax(100px, 1fr)); gap: var(--space-2); padding: 0 var(--space-5) var(--space-4); }
.attendance-summary > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 9px 11px; border: 1px solid var(--ink-200); border-radius: 10px; background: var(--ink-50); }
.attendance-summary span { color: var(--ink-500); font-size: .7rem; font-weight: 700; }
.attendance-summary strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.attendance-summary .is-hadir strong { color: var(--success-600); }
.attendance-summary .is-izin strong { color: var(--info-600); }
.attendance-summary .is-sakit strong { color: var(--warning-600); }
.attendance-summary .is-alpa strong { color: var(--danger-600); }
.attendance-table-wrap { margin: 0 var(--space-5); border: 1px solid var(--ink-200); border-radius: var(--radius-md); }
.attendance-table { margin: 0; }
.attendance-table thead th { background: var(--ink-50); }
.attendance-table tbody tr { transition: background .15s ease; }
.attendance-table tbody tr:hover { background: var(--brand-50); }
.attendance-table tbody tr.row-self-checkin { background: #f5f7ff; }
.attendance-table tbody tr.row-checkin-outside-window { background: #fff7ed; box-shadow: inset 3px 0 var(--danger-600); }
.attendance-table tbody tr.row-checkin-outside-window:hover { background: var(--warning-100); }
.attendance-checkin-origin { display: flex; align-items: center; gap: 5px; margin-top: 3px; color: var(--brand-600); font-size: .68rem; font-weight: 700; flex-wrap: wrap; }
.attendance-checkin-origin svg { flex-shrink: 0; }
.attendance-checkin-origin.is-invalid-time { color: var(--danger-600); }
.attendance-checkin-origin strong { padding: 2px 6px; border-radius: 999px; background: var(--danger-100); font-size: .62rem; text-transform: uppercase; }
.attendance-save-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--ink-200); background: var(--ink-50); }
.attendance-save-bar > span { color: var(--ink-500); font-size: .74rem; }

@media (max-width: 700px) {
  .attendance-window-card { grid-template-columns: 42px minmax(0, 1fr); }
  .attendance-window-icon { width: 42px; height: 42px; }
  .attendance-window-badge { grid-column: 2; justify-self: start; }
  .attendance-roster-heading { align-items: flex-start; flex-direction: column; }
  .attendance-roster-actions { width: 100%; justify-content: space-between; }
  .attendance-summary { grid-template-columns: repeat(2, 1fr); }
  .attendance-table-wrap { margin: 0 var(--space-3); border: 0; }
  .attendance-save-bar { position: sticky; bottom: 0; z-index: 5; }
}

/* Roll-call status pills — replaces a plain <select> in attendance tables so
   hadir/izin/sakit/alpa are readable at a glance across a long roster. */
.status-pills { display: flex; gap: 5px; }
.status-pill { position: relative; }
.status-pill input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.status-pill span {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%; font-size: 0.72rem; font-weight: 800;
  border: 1.5px solid transparent; background: var(--ink-100); color: var(--ink-400, var(--ink-500));
  transition: background .12s ease, color .12s ease, border-color .12s ease, transform .1s ease;
}
.status-pill input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.status-pill input:checked + span { transform: scale(1.06); }
.status-pill-hadir span { border-color: var(--success-100); color: var(--success-600); }
.status-pill-hadir input:checked + span { background: var(--success-600); color: white; border-color: var(--success-600); }
.status-pill-izin span { border-color: var(--info-100); color: var(--info-600); }
.status-pill-izin input:checked + span { background: var(--info-600); color: white; border-color: var(--info-600); }
.status-pill-sakit span { border-color: var(--warning-100); color: var(--warning-600); }
.status-pill-sakit input:checked + span { background: var(--warning-600); color: white; border-color: var(--warning-600); }
.status-pill-alpa span { border-color: var(--danger-100); color: var(--danger-600); }
.status-pill-alpa input:checked + span { background: var(--danger-600); color: white; border-color: var(--danger-600); }

/* Weekly schedule day-cards — used on Jadwal Mengajar / Jadwal Belajar */
.day-card.is-today { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-100), var(--shadow-sm); }
.day-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.day-card-header h3 { margin: 0; }
.schedule-slot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) 0; border-bottom: 1px solid var(--ink-100); }
.schedule-slot:last-child { border-bottom: none; }
.schedule-time { font-weight: 700; font-size: 0.78rem; color: var(--brand-600); }
.schedule-status-link { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-decoration: none; }
.schedule-status-link:hover .badge { filter: brightness(0.95); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -280px; z-index: 30; transition: left .2s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { left: 0; }
  .content { padding: var(--space-4); }
  .topbar { padding: var(--space-3) var(--space-4); }
  body.menu-open { overflow: hidden; }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 25; border: 0; padding: 0;
    background: rgba(15, 23, 42, .44); opacity: 0; pointer-events: none;
    backdrop-filter: blur(2px); transition: opacity .2s ease;
  }
  body.menu-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }

  /* .notif-panel/.user-panel are position:absolute anchored to their own trigger
     (the bell/avatar), not to the topbar's right edge — on narrow screens the bell
     sits well left of the screen edge (the avatar+name block is what's flush right),
     so the 320px/220px-wide panel overflowed off-canvas to the left, cutting its
     own text off. Anchor to the viewport instead so width becomes fluid and it
     always fits regardless of where the trigger happens to sit. */
  .notif-panel, .user-panel {
    position: fixed; left: var(--space-4); right: var(--space-4); top: 72px;
    width: auto; max-width: none;
  }
}

.menu-toggle { display: none; align-items:center; justify-content:center; width:40px; height:40px; background: var(--white); border: 1px solid var(--ink-300); border-radius: 10px; padding: var(--space-2); cursor: pointer; }
@media (max-width: 900px) { .menu-toggle { display: inline-flex; } }

@media (max-width: 640px) {
  .content { padding: var(--space-3); }
  .page-header { padding: var(--space-4); border-radius: 16px; }
  .page-header > .btn, .page-header > div:not(:first-child) { width: 100%; }
  .page-header > .btn { justify-content: center; }
  .page-header > div:not(:first-child).flex { flex-wrap: wrap; }
  .page-header > div:not(:first-child).flex .btn { flex: 1 1 auto; }
  .card { padding: var(--space-4); border-radius: 16px; }
  .card-title { align-items: flex-start; flex-wrap: wrap; }
  .topbar-context-date, .user-summary-copy { display: none; }
  .topbar-context-label { font-size: .74rem; }
  .table-search { margin-bottom: var(--space-3); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Course detail workspace — role-aware, hash-addressable tabs replace the old
   single long page. The cdw namespace keeps this richer layout isolated from
   generic cards/tables used across the rest of the LMS. */
.cdw-hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
  padding: clamp(24px, 3vw, 38px);
  overflow: visible;
  border: 1px solid #d9ddff;
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 8%, rgba(99, 102, 241, .16), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.99), rgba(241,244,255,.96));
  box-shadow: 0 18px 45px rgba(79, 70, 229, .08);
}
.cdw-hero::after {
  content: '';
  position: absolute;
  left: 0;
  top: 28px;
  bottom: 28px;
  width: 4px;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(var(--brand-500), #8b5cf6);
}
.cdw-hero-main { min-width: 0; }
.cdw-eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; color: var(--ink-500); font-size: .73rem; font-weight: 700; }
.cdw-eyebrow > span:not(.badge) { padding-left: 9px; border-left: 1px solid var(--ink-200); }
.cdw-hero h1 { margin: 0; color: var(--ink-950); font-size: clamp(1.75rem, 3vw, 2.35rem); letter-spacing: -.035em; line-height: 1.12; }
.cdw-hero-main > p { margin: 8px 0 0; color: var(--ink-500); font-size: .96rem; }
.cdw-hero-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.cdw-hero-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid rgba(148,163,184,.22); border-radius: 10px; color: var(--ink-600); background: rgba(255,255,255,.72); font-size: .76rem; font-weight: 650; }
.cdw-hero-actions { position: relative; z-index: 4; display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cdw-more { position: relative; }
.cdw-more > summary { list-style: none; cursor: pointer; }
.cdw-more > summary::-webkit-details-marker { display: none; }
.cdw-more[open] > summary svg { transform: rotate(180deg); }
.cdw-more-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 20; width: 210px; padding: 7px; border: 1px solid var(--ink-200); border-radius: 14px; background: var(--white); box-shadow: 0 18px 40px rgba(15,23,42,.16); }
.cdw-more-menu form { margin: 0; }
.cdw-more-menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 10px 11px; border: 0; border-radius: 9px; color: var(--ink-700); background: transparent; font: inherit; font-size: .83rem; font-weight: 650; text-align: left; cursor: pointer; }
.cdw-more-menu button:hover { background: var(--ink-50); color: var(--brand-700); }
.cdw-more-menu button.is-danger { color: var(--danger-600); }

.cdw-notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: var(--space-4); padding: 14px 16px; border-radius: 14px; font-size: .84rem; }
.cdw-notice-warning { border: 1px solid #fde68a; color: #92400e; background: #fffbeb; }
.cdw-notice svg { flex: 0 0 auto; margin-top: 1px; }
.cdw-notice strong { display: block; margin-bottom: 2px; }
.cdw-notice p { margin: 0; color: inherit; opacity: .86; }

.cdw-tabs {
  position: sticky;
  top: 76px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: var(--space-4);
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--ink-200);
  border-radius: 16px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 8px 24px rgba(15,23,42,.06);
  backdrop-filter: blur(14px);
  scrollbar-width: none;
}
.cdw-tabs::-webkit-scrollbar { display: none; }
.cdw-tabs button { position: relative; display: inline-flex; flex: 1 0 auto; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 9px 13px; border: 0; border-radius: 11px; color: var(--ink-500); background: transparent; font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cdw-tabs button:hover { color: var(--brand-700); background: #f5f6ff; }
.cdw-tabs button[aria-selected="true"] { color: var(--brand-700); background: #eef0ff; box-shadow: inset 0 0 0 1px #d9ddff; }
.cdw-tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 24%; right: 24%; bottom: 3px; height: 2px; border-radius: 3px; background: var(--brand-500); }
.cdw-tabs b { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; color: var(--ink-500); background: rgba(148,163,184,.14); font-size: .67rem; }
.cdw-tabs button[aria-selected="true"] b { color: var(--brand-700); background: var(--white); }
.cdw-panel[hidden] { display: none !important; }

.cdw-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: var(--space-4); }
.cdw-stats article { position: relative; min-width: 0; padding: 18px 20px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 16px; background: var(--white); box-shadow: 0 7px 22px rgba(15,23,42,.045); }
.cdw-stats article::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: #818cf8; }
.cdw-stats article.is-attention::before { background: #f59e0b; }
.cdw-stats span { display: block; color: var(--ink-500); font-size: .7rem; font-weight: 800; letter-spacing: .055em; text-transform: uppercase; }
.cdw-stats strong { display: block; margin: 5px 0 2px; color: var(--ink-950); font-size: 1.6rem; line-height: 1.1; }
.cdw-stats small { display: block; overflow: hidden; color: var(--ink-500); font-size: .71rem; text-overflow: ellipsis; white-space: nowrap; }
.cdw-overview-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: var(--space-4); }
.cdw-section-card { margin-bottom: 0; padding: clamp(18px, 2vw, 26px); }
.cdw-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: 20px; }
.cdw-section-head h2 { margin: 2px 0 0; color: var(--ink-950); font-size: 1.13rem; letter-spacing: -.015em; }
.cdw-section-head p { margin: 5px 0 0; color: var(--ink-500); font-size: .78rem; line-height: 1.5; }
.cdw-kicker { color: var(--brand-600); font-size: .65rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.cdw-schedule-list { display: flex; flex-wrap: wrap; gap: 9px; }
.cdw-schedule { display: flex; flex: 1 1 190px; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--ink-200); border-radius: 13px; background: var(--ink-25, #fbfcfe); }
.cdw-schedule.has-warning { border-color: #fde68a; background: #fffbeb; }
.cdw-schedule-icon { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; flex: 0 0 auto; border-radius: 10px; color: var(--brand-600); background: #eef0ff; }
.cdw-schedule > div { min-width: 0; flex: 1; }
.cdw-schedule strong, .cdw-schedule small { display: block; }
.cdw-schedule strong { color: var(--ink-800); font-size: .8rem; }
.cdw-schedule small { margin-top: 1px; color: var(--ink-500); font-size: .72rem; }
.cdw-latest-session { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-top: 12px; padding: 14px 15px; border-radius: 13px; color: inherit; background: linear-gradient(135deg, #f8f9ff, #f2f7ff); text-decoration: none; }
.cdw-latest-session:hover { background: #eef1ff; }
.cdw-latest-session span > * { display: block; }
.cdw-latest-session small { margin-bottom: 3px; color: var(--brand-600); font-size: .6rem; font-weight: 850; letter-spacing: .09em; }
.cdw-latest-session strong { color: var(--ink-850, var(--ink-900)); font-size: .84rem; }
.cdw-latest-session em { margin-top: 2px; color: var(--ink-500); font-size: .7rem; font-style: normal; }
.cdw-latest-session b { color: var(--brand-700); font-size: .76rem; white-space: nowrap; }
.cdw-priority-list { display: grid; gap: 9px; }
.cdw-priority { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--ink-200); border-radius: 12px; color: var(--brand-600); }
.cdw-priority.warning { border-color: #fde68a; color: #d97706; background: #fffbeb; }
.cdw-priority > svg { justify-self: center; }
.cdw-priority strong, .cdw-priority p { display: block; }
.cdw-priority strong { color: var(--ink-800); font-size: .79rem; }
.cdw-priority p { margin: 2px 0 0; color: var(--ink-500); font-size: .7rem; line-height: 1.35; }
.cdw-priority a, .cdw-priority button { padding: 5px 8px; border: 0; border-radius: 7px; color: var(--brand-700); background: rgba(79,70,229,.08); font: inherit; font-size: .7rem; font-weight: 750; text-decoration: none; cursor: pointer; }
.cdw-quick-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: var(--space-4); padding: 11px 13px; border: 1px solid var(--ink-200); border-radius: 14px; background: rgba(255,255,255,.72); }
.cdw-quick-actions > span { margin-right: 3px; color: var(--ink-500); font-size: .67rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.cdw-quick-actions button, .cdw-quick-actions a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 0; border-radius: 8px; color: var(--ink-700); background: var(--ink-50); font: inherit; font-size: .72rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.cdw-quick-actions button:hover, .cdw-quick-actions a:hover { color: var(--brand-700); background: #eef0ff; }

.cdw-empty { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 170px; padding: 24px; border: 1px dashed var(--ink-300); border-radius: 14px; color: var(--ink-400); text-align: left; background: var(--ink-25, #fbfcfe); }
.cdw-empty.compact { min-height: 84px; justify-content: flex-start; padding: 15px; }
.cdw-empty.is-success { border-color: #bbf7d0; color: #16a34a; background: #f0fdf4; }
.cdw-empty strong { display: block; color: var(--ink-700); font-size: .82rem; }
.cdw-empty p { margin: 3px 0 0; color: var(--ink-500); font-size: .73rem; line-height: 1.4; }
.cdw-inline-alert { display: flex; align-items: center; gap: 10px; margin: -5px 0 17px; padding: 11px 13px; border: 1px solid #fde68a; border-radius: 11px; color: #92400e; background: #fffbeb; font-size: .75rem; }
.cdw-inline-alert svg { flex: 0 0 auto; }
.cdw-inline-alert span { flex: 1; }
.cdw-inline-alert a { color: #92400e; font-weight: 750; white-space: nowrap; }
.cdw-table td > strong, .cdw-table td > small { display: block; }
.cdw-table td > small { margin-top: 2px; color: var(--ink-500); font-size: .69rem; }
.cdw-row-action { text-align: right; }
.cdw-total-pill { padding: 7px 10px; border-radius: 999px; color: var(--brand-700); background: #eef0ff; font-size: .72rem; font-weight: 750; white-space: nowrap; }
.cdw-auto-pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #bbf7d0; border-radius: 999px; color: #15803d; background: #f0fdf4; font-size: .7rem; font-weight: 750; white-space: nowrap; }

.cdw-material-list { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; background: var(--white); }
.cdw-material-row { padding: 14px 16px; }
.cdw-material-row:last-child { border-bottom: 0; }
.cdw-resource-links { display: flex !important; align-items: center; flex-wrap: wrap; gap: 6px !important; margin-top: 8px; }
.cdw-resource-links a { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid var(--ink-200); border-radius: 8px; color: var(--brand-700); background: var(--ink-50); font-size: .68rem; font-weight: 700; text-decoration: none; }
.cdw-resource-links a:hover { border-color: var(--brand-300); background: #eef0ff; }

.cdw-student-cell { display: flex; align-items: center; gap: 10px; min-width: 210px; }
.cdw-student-cell > span:last-child { min-width: 0; }
.cdw-student-cell strong, .cdw-student-cell small { display: block; }
.cdw-student-cell strong { color: var(--ink-850, var(--ink-900)); line-height: 1.3; }
.cdw-student-cell small { margin-top: 3px; color: var(--ink-500); font-size: .68rem; line-height: 1.2; }
.cdw-student-avatar { width: 38px; height: 38px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; border: 2px solid var(--white); border-radius: 12px; color: var(--brand-700); background: linear-gradient(145deg, #e0e7ff, #f5f3ff); box-shadow: 0 0 0 1px var(--ink-200); font-size: .7rem; font-weight: 850; }
.cdw-student-avatar img { width: 100%; height: 100%; object-fit: cover; }

.cdw-course-lock { display: flex; align-items: center; gap: 9px; margin-bottom: 18px; padding: 10px 12px; border: 1px solid #bbf7d0; border-radius: 11px; color: #15803d; background: #f0fdf4; font-size: .71rem; }
.cdw-course-lock > svg { flex: 0 0 auto; }
.cdw-course-lock span, .cdw-course-lock strong { display: block; }
.cdw-course-lock strong { margin-bottom: 1px; font-size: .72rem; }
.cdw-resource-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.cdw-resource-grid .form-group { margin-bottom: 0; }
.cdw-resource-grid label { display: flex; align-items: center; gap: 6px; }
.cdw-upload-box { padding: 12px; border: 1px dashed #a5b4fc; border-radius: 11px; background: #f8f9ff; }
.cdw-upload-box input[type="file"] { padding: 8px; background: var(--white); }
.cdw-check-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cdw-check-grid label { display: flex; align-items: flex-start; gap: 8px; padding: 10px; border: 1px solid var(--ink-200); border-radius: 11px; background: var(--ink-50); cursor: pointer; }
.cdw-check-grid input { flex: 0 0 auto; margin-top: 2px; }
.cdw-check-grid strong, .cdw-check-grid small { display: block; }
.cdw-check-grid strong { color: var(--ink-800); font-size: .71rem; }
.cdw-check-grid small { margin-top: 2px; color: var(--ink-500); font-size: .63rem; line-height: 1.35; }
.cdw-current-file { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: var(--space-4); padding: 11px 12px; border: 1px solid var(--ink-200); border-radius: 11px; background: var(--ink-50); }
.cdw-current-file > span { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--brand-700); background: #e9edff; }
.cdw-current-file strong, .cdw-current-file small { display: block; }
.cdw-current-file strong { color: var(--ink-800); font-size: .74rem; }
.cdw-current-file small { margin-top: 2px; color: var(--ink-500); font-size: .68rem; overflow-wrap: anywhere; }

.assignment-resource-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); border-color: #c7d2fe; background: linear-gradient(135deg, #f8f9ff, var(--white)); }
.assignment-resource-icon { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; color: var(--brand-700); background: #e9edff; }
.assignment-resource-card h3 { margin: 2px 0 3px; color: var(--ink-900); font-size: .95rem; }
.assignment-resource-card p { margin: 0; color: var(--ink-500); font-size: .72rem; }
.assignment-reader-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); padding: clamp(20px, 3vw, 30px); border: 1px solid #d9ddff; border-radius: 20px; background: linear-gradient(135deg, var(--white), #f1f4ff); }
.assignment-reader-head h1 { margin: 3px 0 6px; font-size: clamp(1.4rem, 2.5vw, 2rem); }
.assignment-reader-head p { margin: 0; color: var(--ink-500); font-size: .8rem; }
.assignment-reader-notice { display: flex; align-items: flex-start; gap: 9px; margin-bottom: var(--space-3); padding: 11px 13px; border: 1px solid #bfdbfe; border-radius: 12px; color: #1d4ed8; background: #eff6ff; font-size: .72rem; }
.assignment-reader-notice svg { flex: 0 0 auto; }
.assignment-reader-notice strong { display: block; margin-bottom: 2px; }
.assignment-reader-frame { min-height: 72vh; overflow: auto; border: 1px solid var(--ink-200); border-radius: 16px; background: #dfe3ea; box-shadow: var(--shadow-sm); user-select: none; }
.assignment-reader-frame iframe { display: block; width: 100%; min-height: 72vh; border: 0; background: var(--white); }
.assignment-reader-frame img { display: block; max-width: 100%; margin: 0 auto; pointer-events: none; }

.cdw-curriculum { display: grid; gap: 10px; }
.cdw-chapter { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; background: var(--white); }
.cdw-chapter > summary { display: grid; grid-template-columns: 42px minmax(0, 1fr) 22px; align-items: center; gap: 11px; padding: 14px 16px; list-style: none; cursor: pointer; }
.cdw-chapter > summary::-webkit-details-marker { display: none; }
.cdw-chapter > summary:hover { background: #fafbff; }
.cdw-chapter > summary > span:nth-child(2) strong, .cdw-chapter > summary > span:nth-child(2) small { display: block; }
.cdw-chapter > summary strong { color: var(--ink-850, var(--ink-900)); font-size: .84rem; }
.cdw-chapter > summary small { margin-top: 2px; color: var(--ink-500); font-size: .68rem; }
.cdw-chapter > summary > svg { color: var(--ink-400); transition: transform .2s ease; }
.cdw-chapter[open] > summary > svg { transform: rotate(180deg); }
.cdw-chapter-number { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 11px; color: var(--brand-700); background: #eef0ff; font-size: .75rem; font-weight: 850; }
.cdw-lessons { padding: 0 14px 14px; border-top: 1px solid var(--ink-100); background: #fcfcff; }
.cdw-lesson { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: start; gap: 11px; padding: 14px 2px; border-bottom: 1px solid var(--ink-100); }
.cdw-lesson.is-done { opacity: .82; }
.cdw-lesson-icon { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 35px; border-radius: 10px; color: var(--brand-600); background: #eef0ff; }
.cdw-lesson-copy { min-width: 0; }
.cdw-lesson-copy > div { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.cdw-lesson-copy strong { color: var(--ink-850, var(--ink-900)); font-size: .82rem; }
.cdw-type { color: var(--brand-600); font-size: .61rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.cdw-lesson-copy p { display: -webkit-box; margin: 6px 0 0; overflow: hidden; color: var(--ink-500); font-size: .72rem; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.cdw-lesson-copy > a { display: inline-block; margin-top: 6px; font-size: .71rem; font-weight: 700; }
.cdw-lesson-actions { display: flex; align-items: center; gap: 6px; }
.cdw-add-lesson { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; padding: 8px 10px; border: 1px dashed #a5b4fc; border-radius: 9px; color: var(--brand-700); background: #f6f7ff; font: inherit; font-size: .72rem; font-weight: 750; cursor: pointer; }

.cdw-activity-list { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; }
.cdw-activity { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 24px; align-items: center; gap: 11px; min-height: 70px; padding: 11px 14px; border-bottom: 1px solid var(--ink-100); color: inherit; text-decoration: none; }
.cdw-activity:last-child { border-bottom: 0; }
.cdw-activity:hover { background: #fafbff; }
.cdw-activity-icon { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; border-radius: 11px; color: var(--brand-600); background: #eef0ff; }
.cdw-activity-icon.quiz { color: #7c3aed; background: #f3e8ff; }
.cdw-activity-copy { min-width: 0; }
.cdw-activity-copy strong, .cdw-activity-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdw-activity-copy strong { color: var(--ink-850, var(--ink-900)); font-size: .82rem; }
.cdw-activity-copy small { margin-top: 4px; color: var(--ink-500); font-size: .7rem; }
.cdw-activity-arrow { color: var(--ink-400); font-weight: 800; }

.cdw-modal { padding: 0; overflow: hidden; }
.cdw-modal > form { padding: 20px 22px 22px; }
.cdw-modal-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) 34px; align-items: start; gap: 11px; padding: 18px 20px; border-bottom: 1px solid var(--ink-200); background: linear-gradient(135deg, #f7f8ff, #fff); }
.cdw-modal-head > span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; color: var(--brand-600); background: #e9edff; }
.cdw-modal-head h3 { margin: 1px 0 3px; font-size: 1rem; }
.cdw-modal-head p { margin: 0; color: var(--ink-500); font-size: .72rem; }
.cdw-modal-head > button { width: 32px; height: 32px; border: 0; border-radius: 9px; color: var(--ink-500); background: var(--white); font-size: 1.25rem; cursor: pointer; }
.cdw-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

@media (max-width: 1100px) {
  .cdw-hero { flex-direction: column; }
  .cdw-hero-actions { justify-content: flex-start; }
  .cdw-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cdw-overview-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .cdw-hero { padding: 22px 18px; border-radius: 18px; }
  .cdw-hero-actions, .cdw-hero-actions > .btn { width: 100%; }
  .cdw-hero-actions > .btn { justify-content: center; }
  .cdw-more { flex: 1; }
  .cdw-more > summary { justify-content: center; width: 100%; }
  .cdw-more-menu { left: 0; right: auto; width: min(260px, calc(100vw - 48px)); }
  .cdw-tabs { top: 66px; margin-left: -4px; margin-right: -4px; border-radius: 13px; }
  .cdw-tabs button { flex: 0 0 auto; }
  .cdw-tabs button span { display: inline; }
  .cdw-section-head { flex-direction: column; }
  .cdw-section-head .btn { width: 100%; justify-content: center; }
  .cdw-lesson { grid-template-columns: 36px minmax(0, 1fr); }
  .cdw-lesson-actions { grid-column: 2; flex-wrap: wrap; }
  .cdw-activity { grid-template-columns: 40px minmax(0, 1fr) 20px; }
  .cdw-activity > .badge { grid-column: 2; justify-self: start; }
  .cdw-activity-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .cdw-resource-grid, .cdw-check-grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .cdw-hero-meta span:last-child { width: 100%; }
  .cdw-stats { gap: 8px; }
  .cdw-stats article { padding: 15px 14px; }
  .cdw-stats strong { font-size: 1.35rem; }
  .cdw-stats small { white-space: normal; }
  .cdw-section-card { padding: 16px; }
  .cdw-priority { grid-template-columns: 32px minmax(0, 1fr); }
  .cdw-priority > a, .cdw-priority > button { grid-column: 2; justify-self: start; }
  .cdw-latest-session { align-items: flex-start; flex-direction: column; }
  .cdw-quick-actions > span { width: 100%; }
  .cdw-chapter > summary { padding: 12px; }
  .cdw-lessons { padding: 0 10px 10px; }
  .cdw-modal > form { padding: 18px; }
  .cdw-modal-actions .btn { flex: 1; }
  .cdw-current-file { grid-template-columns: 36px minmax(0, 1fr); }
  .cdw-current-file .btn { grid-column: 2; justify-self: start; }
  .assignment-resource-card { grid-template-columns: 42px minmax(0, 1fr); }
  .assignment-resource-card .btn { grid-column: 2; justify-self: start; }
  .assignment-reader-head { flex-direction: column; }
  .assignment-reader-head .btn { width: 100%; justify-content: center; }
}

/* Modal system — shared by the confirm-action modal (pengganti window.confirm())
   and edit modals; each usage nests its own content inside .modal-box. */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5);
  align-items: center; justify-content: center; z-index: 100; padding: var(--space-4);
}
.modal-overlay.is-open { display: flex; }
.modal-box {
  width: 100%; max-width: 420px; background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: var(--space-6); border: 1px solid var(--ink-200);
  max-height: calc(100vh - var(--space-8)); overflow-y: auto;
}
.modal-box-wide { max-width: 560px; }
.confirm-modal-message { margin: 0 0 var(--space-5); font-size: 0.95rem; color: var(--ink-900); line-height: 1.5; white-space: pre-line; }
.confirm-modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }

/* Create-exam modal — a compact three-step form instead of a full empty page. */
.modal-box-exam-create {
  max-width: 820px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - var(--space-8));
}
.exam-create-modal-head {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 38px;
  align-items: start;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-4);
  background: linear-gradient(135deg, rgba(238, 242, 255, .9), rgba(255, 255, 255, .96));
  border-bottom: 1px solid var(--ink-200);
}
.exam-create-modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  background: linear-gradient(135deg, var(--brand-600), #7c3aed);
  box-shadow: 0 10px 24px rgba(79, 70, 229, .22);
}
.exam-create-eyebrow {
  display: block;
  margin: 1px 0 3px;
  color: var(--brand-600);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .1em;
}
.exam-create-modal-head h2 { margin-bottom: 3px; font-size: 1.3rem; }
.exam-create-modal-head p { margin: 0; font-size: .86rem; color: var(--ink-500); }
.exam-create-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--ink-500);
  cursor: pointer;
}
.exam-create-close:hover { background: var(--white); color: var(--ink-900); box-shadow: var(--shadow-xs); }
.exam-create-form { min-height: 0; display: flex; flex-direction: column; }
.exam-create-modal-body {
  min-height: 0;
  overflow-y: auto;
  padding: var(--space-4) var(--space-5);
  display: grid;
  gap: var(--space-3);
  background: var(--ink-50);
}
.exam-form-section {
  padding: var(--space-4);
  border: 1px solid var(--ink-200);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-xs);
}
.exam-form-section-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.exam-form-section-head > span {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-700);
  background: var(--brand-50);
  font-size: .77rem;
  font-weight: 800;
}
.exam-form-section-head strong { display: block; font-size: .9rem; color: var(--ink-900); }
.exam-form-section-head small { display: block; margin-top: 1px; font-size: .75rem; color: var(--ink-500); font-weight: 500; }
.exam-duration-field { max-width: 240px; }
.exam-number-suffix { position: relative; }
.exam-number-suffix input { padding-right: 62px; }
.exam-number-suffix span {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-500);
  font-size: .78rem;
  pointer-events: none;
}
.exam-policy-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin-top: var(--space-3);
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink-700);
  background: var(--brand-25);
  font-size: .76rem;
  line-height: 1.45;
}
.exam-policy-note svg { flex: 0 0 auto; color: var(--brand-600); margin-top: 1px; }
.exam-create-modal-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--ink-200);
  background: var(--white);
}
.exam-create-modal-actions > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink-500);
  font-size: .76rem;
}
.exam-create-modal-actions > span svg { color: var(--success-600); }
.exam-create-modal-actions > div { display: flex; gap: var(--space-2); }

@media (max-width: 640px) {
  .modal-box-exam-create { max-height: calc(100dvh - var(--space-4)); }
  .exam-create-modal-head { grid-template-columns: 40px minmax(0, 1fr) 34px; gap: var(--space-3); padding: var(--space-4); }
  .exam-create-modal-icon { width: 40px; height: 40px; border-radius: 12px; }
  .exam-create-modal-head h2 { font-size: 1.08rem; }
  .exam-create-modal-head p { display: none; }
  .exam-create-modal-body { padding: var(--space-3); }
  .exam-form-section { padding: var(--space-3); }
  .exam-form-section-head small { display: none; }
  .exam-duration-field { max-width: none; }
  .exam-create-modal-actions { align-items: stretch; flex-direction: column; padding: var(--space-3); }
  .exam-create-modal-actions > span { display: none; }
  .exam-create-modal-actions > div { width: 100%; }
  .exam-create-modal-actions .btn { flex: 1; justify-content: center; }
}

/* Print / "Simpan sebagai PDF" — sembunyikan chrome navigasi, tampilkan konten laporan bersih */
@media print {
  .sidebar, .topbar, .menu-toggle, form button, .btn, [data-flash], .modal-overlay { display: none !important; }
  .app-shell, .main, .content { display: block !important; padding: 0 !important; margin: 0 !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a[href]:after { content: ""; }
  .table-wrap { overflow: visible; }
}

/* ============================================================
   Landing page (halaman publik "/") — prefixed .lp- so none of
   it can leak into the authenticated dashboard styles above.
   ============================================================ */
.lp-container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 var(--space-5); }

.lp-nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--ink-200);
}
.lp-nav-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); padding: var(--space-4) var(--space-5); }
.lp-brand { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-900); }
.lp-brand:hover { text-decoration: none; }
.lp-brand-mark {
  width: 40px; height: 40px; flex-shrink: 0; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-600), var(--brand-500));
  color: #fff; font-weight: 800; font-size: 0.95rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-sm);
}
.lp-brand-text { font-weight: 800; font-size: 1.02rem; line-height: 1.2; }
.lp-brand-text small { display: block; font-weight: 500; font-size: 0.72rem; color: var(--ink-500); }

.lp-hero { background: radial-gradient(ellipse at top, var(--brand-50), var(--ink-50) 70%); border-bottom: 1px solid var(--ink-200); }
.lp-hero-inner { padding: clamp(56px, 9vw, 104px) var(--space-5); text-align: center; }
.lp-eyebrow {
  margin: 0 0 var(--space-3); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--brand-600);
}
.lp-title {
  margin: 0 0 var(--space-4); font-size: clamp(1.9rem, 5vw, 3.1rem);
  line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance;
}
.lp-lede {
  margin: 0 auto var(--space-6); max-width: 58ch;
  font-size: clamp(0.98rem, 1.6vw, 1.12rem); color: var(--ink-700);
}
.lp-cta { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.btn-lg { padding: 14px 28px; font-size: 1rem; min-height: 52px; }
.lp-cta-note { font-size: 0.82rem; color: var(--ink-500); }

.lp-stats { background: var(--white); border-bottom: 1px solid var(--ink-200); }
.lp-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4); padding: var(--space-6) var(--space-5); text-align: center;
}
.lp-stat { display: flex; flex-direction: column; gap: 2px; }
.lp-stat-num { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 800; color: var(--brand-700); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lp-stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-500); }

.lp-section { padding: clamp(48px, 7vw, 80px) 0; }
.lp-section-alt { background: var(--white); border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }
.lp-h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -0.015em; margin: 0 0 var(--space-5); text-wrap: balance; }
.lp-muted { color: var(--ink-500); }

.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.lp-feature {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.lp-feature h3 { font-size: 1.02rem; margin: var(--space-3) 0 var(--space-2); }
.lp-feature p { margin: 0; font-size: 0.9rem; color: var(--ink-700); }
.lp-feature-icon {
  width: 44px; height: 44px; border-radius: var(--radius-md);
  display: inline-flex; align-items: center; justify-content: center;
}
.lp-icon-brand { background: var(--brand-100); color: var(--brand-700); }
.lp-icon-green { background: var(--success-100); color: var(--success-600); }
.lp-icon-amber { background: var(--warning-100); color: var(--warning-600); }
.lp-icon-info  { background: var(--info-100); color: var(--info-600); }

.lp-roles { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: var(--space-6); align-items: start; }
.lp-role-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lp-role-list li { padding: var(--space-4) 0; border-bottom: 1px solid var(--ink-200); display: flex; flex-direction: column; gap: 4px; }
.lp-role-list li:last-child { border-bottom: none; }
.lp-role-list strong { font-size: 0.95rem; }
.lp-role-list span { font-size: 0.88rem; color: var(--ink-700); }

.lp-footer { background: var(--white); border-top: 1px solid var(--ink-200); }
.lp-footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap; padding: var(--space-5);
}
.lp-footer-inner strong { display: block; }
.lp-footer-inner span { font-size: 0.85rem; }

@media (max-width: 900px) {
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-roles { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .lp-features { grid-template-columns: minmax(0, 1fr); }
  .lp-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Logo sekolah — dipakai di sidebar, halaman login, dan halaman depan.
   object-fit:contain supaya lambang bulat tidak terpotong atau gepeng,
   dan latar gradasi merek dimatikan karena logonya punya warna sendiri. */
.mark-logo { background: none !important; box-shadow: none; object-fit: contain; padding: 0; }
.lp-brand-logo { background: none !important; box-shadow: none; object-fit: contain; padding: 0; }

/* Nav links halaman depan */
.lp-nav-links { display: flex; align-items: center; gap: var(--space-5); }
.lp-nav-links > a:not(.btn) { font-size: 0.9rem; font-weight: 600; color: var(--ink-700); }
.lp-nav-links > a:not(.btn):hover { color: var(--brand-600); text-decoration: none; }
@media (max-width: 640px) { .lp-nav-links > a:not(.btn) { display: none; } }

/* Landing header on a phone. At 378px the brand, the language switch and the Masuk
   button together wanted 364px of a 314px row, so the button was pushed off the edge.
   Each piece gives up what it can spare, in order of how little it costs:
     - the "SMAN 48 Jakarta" subtitle goes (logo + name already identify the school)
     - the language switch drops its ID/EN letters (the flag alone reads as the language,
       and on Windows the flag itself renders as those very letters)
     - padding shrinks everywhere
   That leaves roughly 280px used of 334px available — room to spare down to 320px. */
@media (max-width: 640px) {
  .lp-nav-inner { padding: var(--space-3) var(--space-4); gap: var(--space-3); }
  .lp-brand { min-width: 0; gap: var(--space-2); }
  .lp-brand-mark { width: 34px; height: 34px; }
  .lp-brand-text {
    font-size: 0.95rem; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; min-width: 0;
  }
  .lp-brand-text small { display: none; }

  .lp-nav-links { gap: var(--space-2); flex-shrink: 0; }
  .lp-nav-links .lang-switch { margin-right: 0; padding: 2px; }
  .lp-nav-links .lang-code { display: none; }
  .lp-nav-links .lang-switch-item { padding: 5px 7px; }
  .lp-nav-links .btn { padding: 8px 12px; font-size: 0.85rem; }
}

/* 320px (iPhone SE) is 10px short even after the trims above. The brand carries the
   shortfall via ellipsis rather than the button being pushed off-screen, but shaving
   the mark and the gap keeps the name readable instead of truncated. */
@media (max-width: 360px) {
  .lp-nav-inner { padding: var(--space-3); gap: var(--space-2); }
  .lp-brand-mark { width: 30px; height: 30px; }
  .lp-brand-text { font-size: 0.88rem; }
  .lp-nav-links .btn { padding: 8px 10px; }
}

/* Panduan per peran */
.lp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.lp-step {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.lp-step-badge {
  display: inline-block; margin-bottom: var(--space-4); padding: 4px 12px; border-radius: 999px;
  background: var(--brand-50); color: var(--brand-700);
  font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em;
}
.lp-step ol { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: var(--space-2); }
.lp-step li { font-size: 0.88rem; color: var(--ink-700); }
@media (max-width: 900px) { .lp-steps { grid-template-columns: minmax(0, 1fr); } }

/* Tanya jawab — <details> bawaan browser, tanpa JS, tetap bisa diakses keyboard */
.lp-faq { border: 1px solid var(--ink-200); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
.lp-faq details { border-bottom: 1px solid var(--ink-200); }
.lp-faq details:last-child { border-bottom: none; }
.lp-faq summary {
  cursor: pointer; padding: var(--space-4) var(--space-5); font-weight: 600; font-size: 0.95rem;
  list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
}
.lp-faq summary::-webkit-details-marker { display: none; }
.lp-faq summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; color: var(--ink-500); flex-shrink: 0; }
.lp-faq details[open] summary::after { content: "\2212"; }
.lp-faq summary:hover { background: var(--ink-50); }
.lp-faq details[open] summary { color: var(--brand-700); }
.lp-faq p { margin: 0; padding: 0 var(--space-5) var(--space-4); font-size: 0.9rem; color: var(--ink-700); }

/* Muncul-saat-digulir. Dimulai dari keadaan terlihat, lalu JS menandai
   .lp-reveal-ready — jadi kalau JS mati atau gagal, isinya tetap terbaca
   (bukan halaman kosong permanen, kegagalan paling umum pola animasi ini). */
.lp-reveal-ready .lp-reveal { opacity: 0; transform: translateY(14px); }
.lp-reveal-ready .lp-reveal.is-visible {
  opacity: 1; transform: none;
  transition: opacity .5s ease, transform .5s ease;
}

/* ============================================================
   Landing page 2026 — public-facing product story.
   Kept under .lp-* so the authenticated workspace remains isolated.
   ============================================================ */
.public-page { background: #f8faff; overflow-x: hidden; }
.public-page main { display: block; }
.public-page .lp-container { max-width: 1200px; padding-inline: clamp(18px, 3vw, 32px); }

.public-page .lp-nav {
  background: rgba(255, 255, 255, .86); border-bottom-color: rgba(226, 232, 240, .82);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.public-page .lp-nav-inner { min-height: 76px; padding-block: 12px; }
.public-page .lp-brand-mark { width: 44px; height: 44px; }
.public-page .lp-brand-text { font-size: 1.06rem; letter-spacing: -.01em; }
.public-page .lp-nav-links { gap: clamp(14px, 2vw, 28px); }
.public-page .lp-nav-links > a:not(.btn) { position: relative; font-size: .84rem; }
.public-page .lp-nav-links > a:not(.btn)::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: -7px; height: 2px;
  border-radius: 99px; background: var(--brand-600); transition: right .16s ease;
}
.public-page .lp-nav-links > a:not(.btn):hover::after { right: 0; }

.public-page .lp-hero {
  position: relative; overflow: hidden; border-bottom: 0;
  background:
    linear-gradient(180deg, rgba(238,242,255,.9), rgba(248,250,255,.92) 74%, #fff 100%);
}
.lp-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .34;
  background-image: radial-gradient(rgba(79,70,229,.2) .7px, transparent .7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000, transparent 82%);
}
.lp-hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.lp-hero-orb-one { width: 420px; height: 420px; top: -250px; left: -150px; background: rgba(99,102,241,.14); }
.lp-hero-orb-two { width: 360px; height: 360px; right: -150px; bottom: -210px; background: rgba(14,165,233,.12); }
.public-page .lp-hero-inner {
  position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .96fr) minmax(500px, 1.04fr);
  align-items: center; gap: clamp(40px, 6vw, 84px); padding-block: clamp(72px, 9vw, 124px) 118px;
  text-align: left;
}
.lp-hero-copy { min-width: 0; }
.public-page .lp-eyebrow {
  display: inline-flex; align-items: center; gap: 9px; margin-bottom: 20px; padding: 7px 12px;
  border: 1px solid rgba(165,180,252,.58); border-radius: 999px; background: rgba(255,255,255,.76);
  color: var(--brand-700); font-size: .7rem; letter-spacing: .11em; box-shadow: var(--shadow-xs);
}
.lp-eyebrow-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success-600); box-shadow: 0 0 0 4px rgba(22,163,74,.12); }
.public-page .lp-title {
  max-width: 760px; margin-bottom: 22px; font-size: clamp(2.55rem, 5.1vw, 4.45rem);
  line-height: 1.035; letter-spacing: -.048em; text-wrap: balance;
}
.public-page .lp-title span {
  background: linear-gradient(105deg, var(--brand-700), #6366f1 60%, #0284c7);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.public-page .lp-lede { max-width: 60ch; margin: 0 0 28px; font-size: clamp(1rem, 1.5vw, 1.14rem); line-height: 1.72; }
.lp-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.lp-hero-actions .btn-secondary { background: rgba(255,255,255,.78); }
.lp-hero-assurance { display: flex; flex-wrap: wrap; gap: 10px 18px; color: var(--ink-700); font-size: .78rem; font-weight: 650; }
.lp-hero-assurance span { display: inline-flex; align-items: center; gap: 6px; }
.lp-hero-assurance svg { color: var(--success-600); }
.public-page .lp-cta-note { margin-top: 14px; display: block; }

/* Code-native product preview: no student data, screenshot, or heavy image asset. */
.lp-product-stage { position: relative; min-width: 0; perspective: 1100px; }
.lp-product-glow {
  position: absolute; inset: 8% 3% -4%; border-radius: 44px;
  background: linear-gradient(135deg, rgba(79,70,229,.26), rgba(14,165,233,.18));
  filter: blur(38px); opacity: .7;
}
.lp-product-window {
  position: relative; overflow: hidden; border: 1px solid rgba(199,210,254,.9); border-radius: 22px;
  background: #fff; box-shadow: 0 30px 70px rgba(30,41,59,.18), 0 8px 24px rgba(79,70,229,.1);
  transform: rotateY(-2deg) rotateX(1deg);
}
.lp-product-bar {
  height: 44px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 14px; border-bottom: 1px solid var(--ink-100); background: #fbfcff;
}
.lp-window-dots { display: flex; gap: 5px; }
.lp-window-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); }
.lp-window-dots i:first-child { background: #fca5a5; }
.lp-window-dots i:nth-child(2) { background: #fcd34d; }
.lp-window-dots i:last-child { background: #86efac; }
.lp-product-address { color: var(--ink-500); font-size: .65rem; font-weight: 700; }
.lp-product-live { justify-self: end; display: inline-flex; align-items: center; gap: 5px; color: var(--success-600); font-size: .62rem; font-weight: 800; }
.lp-product-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(22,163,74,.1); }
.lp-product-body { display: grid; grid-template-columns: 54px minmax(0,1fr); min-height: 390px; }
.lp-product-sidebar {
  display: flex; flex-direction: column; align-items: center; gap: 11px; padding: 13px 9px;
  border-right: 1px solid var(--ink-100); background: #fff;
}
.lp-mini-brand { width: 30px; height: 30px; margin-bottom: 7px; border-radius: 9px; display: grid; place-items: center; background: linear-gradient(135deg,var(--brand-700),var(--brand-500)); color:#fff; font-size:.62rem; font-weight:900; }
.lp-product-sidebar > span { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-300); }
.lp-product-sidebar > span.is-active { background: var(--brand-50); color: var(--brand-600); }
.lp-product-main { min-width: 0; padding: 22px; background: #f7f9fd; }
.lp-product-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.lp-product-heading div { display: flex; flex-direction: column; }
.lp-product-heading small { color: var(--ink-500); font-size: .62rem; }
.lp-product-heading strong { font-size: .92rem; }
.lp-product-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); font-size: .6rem; font-weight: 900; }
.lp-product-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-bottom: 12px; }
.lp-product-metrics > div { display: grid; grid-template-columns: 29px 1fr; column-gap: 8px; padding: 11px; border: 1px solid var(--ink-100); border-radius: 11px; background: #fff; }
.lp-product-metric-icon { grid-row: 1/3; width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; }
.lp-product-metric-icon.is-purple { background: var(--brand-100); color: var(--brand-700); }
.lp-product-metric-icon.is-blue { background: var(--info-100); color: var(--info-600); }
.lp-product-metric-icon.is-green { background: var(--success-100); color: var(--success-600); }
.lp-product-metrics small { color: var(--ink-500); font-size: .53rem; }
.lp-product-metrics strong { font-size: .8rem; line-height: 1.2; }
.lp-product-grid { display: grid; grid-template-columns: 1.5fr .8fr; gap: 12px; }
.lp-product-panel { border: 1px solid var(--ink-100); border-radius: 12px; background: #fff; padding: 14px; }
.lp-product-panel-title { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 12px; font-size: .61rem; }
.lp-product-panel-title span { color: var(--brand-600); font-size: .52rem; font-weight: 700; }
.lp-schedule-row { display: grid; grid-template-columns: 32px 5px 1fr; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--ink-100); }
.lp-schedule-row:last-child { border: 0; }
.lp-schedule-row time { color: var(--ink-500); font-size: .51rem; font-weight: 700; }
.lp-schedule-row > i { width: 5px; height: 24px; border-radius: 99px; background: var(--brand-500); }
.lp-schedule-row > i.is-blue { background: var(--info-600); }
.lp-schedule-row > i.is-green { background: var(--success-600); }
.lp-schedule-row div { display: flex; flex-direction: column; }
.lp-schedule-row strong { font-size: .58rem; }
.lp-schedule-row small { color: var(--ink-500); font-size: .48rem; }
.lp-product-progress { text-align: center; }
.lp-progress-ring { width: 82px; height: 82px; margin: 18px auto 13px; padding: 8px; border-radius: 50%; background: conic-gradient(var(--brand-600) 84%, var(--brand-100) 0); }
.lp-progress-ring span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background:#fff; font-size:1rem; font-weight:850; }
.lp-progress-ring small { font-size:.5rem; }
.lp-product-progress p { margin: 0 0 11px; color: var(--ink-500); font-size: .52rem; }
.lp-progress-line { height: 5px; border-radius:99px; background:var(--ink-100); overflow:hidden; }
.lp-progress-line span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand-600),var(--brand-300)); }
.lp-float-card {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; min-width: 164px;
  padding: 10px 12px; border: 1px solid rgba(226,232,240,.9); border-radius: 12px;
  background: rgba(255,255,255,.92); box-shadow: 0 12px 30px rgba(15,23,42,.13); backdrop-filter: blur(9px);
}
.lp-float-card-score { left: -32px; bottom: 38px; }
.lp-float-card-secure { right: -24px; top: 72px; }
.lp-float-icon { width: 31px; height:31px; display:grid; place-items:center; border-radius:9px; flex-shrink:0; }
.lp-float-icon.is-green { background:var(--success-100); color:var(--success-600); }
.lp-float-icon.is-purple { background:var(--brand-100); color:var(--brand-700); }
.lp-float-card div { display:flex; flex-direction:column; }
.lp-float-card small { color:var(--ink-500); font-size:.53rem; }
.lp-float-card strong { color:var(--ink-900); font-size:.64rem; }

.public-page .lp-stats { position: relative; z-index: 3; border: 0; background: transparent; }
.public-page .lp-stats-grid {
  margin-top: -48px; padding-block: 0; gap: 0; border: 1px solid rgba(226,232,240,.9);
  border-radius: 18px; background: rgba(255,255,255,.96); box-shadow: 0 16px 42px rgba(15,23,42,.09);
  overflow: hidden; text-align: left;
}
.public-page .lp-stat { flex-direction: row; align-items: center; gap: 13px; padding: 22px; border-right: 1px solid var(--ink-100); }
.public-page .lp-stat:last-child { border-right: 0; }
.lp-stat-icon { width: 42px; height:42px; display:grid; place-items:center; border-radius:12px; flex-shrink:0; }
.lp-stat-icon.is-purple { background:var(--brand-100); color:var(--brand-700); }
.lp-stat-icon.is-blue { background:var(--info-100); color:var(--info-600); }
.lp-stat-icon.is-green { background:var(--success-100); color:var(--success-600); }
.lp-stat-icon.is-amber { background:var(--warning-100); color:var(--warning-600); }
.public-page .lp-stat > div { display:flex; flex-direction:column; }
.public-page .lp-stat-num { color:var(--ink-900); font-size:1.45rem; line-height:1.1; }
.public-page .lp-stat-label { margin-top:3px; font-size:.62rem; letter-spacing:.04em; }

.public-page .lp-section { padding-block: clamp(76px, 8vw, 112px); }
.public-page .lp-section-alt { border-color:rgba(226,232,240,.8); background:#fff; }
.lp-section-head { max-width: 720px; margin: 0 auto 42px; text-align:center; }
.lp-section-kicker { display:inline-block; margin-bottom:10px; color:var(--brand-600); font-size:.7rem; font-weight:850; letter-spacing:.13em; text-transform:uppercase; }
.public-page .lp-h2 { margin-bottom:13px; font-size:clamp(1.85rem,3.4vw,2.75rem); line-height:1.15; letter-spacing:-.035em; }
.lp-section-head p, .lp-faq-heading p, .lp-guide-intro > p { margin:0; color:var(--ink-500); font-size:.96rem; line-height:1.7; }

.public-page .lp-features { grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.public-page .lp-feature {
  position:relative; overflow:hidden; min-height:280px; padding:28px; border-radius:18px;
  box-shadow:var(--shadow-sm); transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
}
.public-page .lp-feature:hover { transform:translateY(-4px); box-shadow:var(--shadow-md); border-color:var(--brand-100); }
.public-page .lp-feature-icon { width:46px; height:46px; border-radius:13px; }
.lp-feature-number { position:absolute; right:23px; top:22px; color:var(--ink-200); font-size:1.55rem; font-weight:900; letter-spacing:-.04em; }
.public-page .lp-feature h3 { margin-top:23px; font-size:1.1rem; }
.public-page .lp-feature p { min-height:84px; line-height:1.65; }
.lp-feature-link { display:flex; align-items:center; gap:7px; margin-top:20px; color:var(--brand-600); font-size:.76rem; font-weight:750; }
.lp-feature-dark { border-color:#253151 !important; background:linear-gradient(145deg,#111c35,#1e2d50) !important; }
.lp-feature-dark h3,.lp-feature-dark p,.lp-feature-dark .lp-feature-link { color:#fff !important; }
.lp-feature-dark p { opacity:.76; }
.lp-feature-dark .lp-feature-number { color:rgba(255,255,255,.12); }
.lp-feature-dark .lp-icon-info { background:rgba(56,189,248,.15); color:#7dd3fc; }

.lp-role-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; align-items:stretch; }
.lp-role-card { position:relative; padding:30px; border:1px solid var(--ink-200); border-radius:18px; background:#fff; box-shadow:var(--shadow-sm); }
.lp-role-card.is-featured { border-color:rgba(165,180,252,.75); background:linear-gradient(150deg,#fff,var(--brand-50)); box-shadow:0 14px 36px rgba(79,70,229,.09); }
.lp-role-avatar { width:48px; height:48px; display:grid; place-items:center; margin-bottom:20px; border-radius:14px; }
.lp-role-avatar.is-student { background:var(--info-100); color:var(--info-600); }
.lp-role-avatar.is-teacher { background:var(--brand-100); color:var(--brand-700); }
.lp-role-avatar.is-parent { background:var(--success-100); color:var(--success-600); }
.lp-role-label { color:var(--brand-600); font-size:.66rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.lp-role-card h3 { margin:5px 0 13px; font-size:1.15rem; line-height:1.35; }
.lp-role-card > p { min-height:72px; margin-bottom:20px; font-size:.88rem; line-height:1.65; }
.lp-role-card ul { list-style:none; margin:0; padding:16px 0 0; border-top:1px solid var(--ink-100); display:flex; flex-direction:column; gap:9px; }
.lp-role-card li { position:relative; padding-left:21px; color:var(--ink-700); font-size:.8rem; }
.lp-role-card li::before { content:'✓'; position:absolute; left:0; color:var(--success-600); font-weight:900; }

.lp-guide-shell { display:grid; grid-template-columns:minmax(0,.82fr) minmax(0,1.18fr); gap:clamp(42px,8vw,96px); align-items:center; padding:clamp(32px,5vw,64px); border:1px solid rgba(199,210,254,.7); border-radius:24px; background:linear-gradient(135deg,#fff,var(--brand-50)); box-shadow:0 18px 48px rgba(79,70,229,.08); }
.lp-guide-intro .lp-h2 { font-size:clamp(1.7rem,3vw,2.4rem); }
.lp-guide-intro > p { margin-bottom:24px; }
.lp-guide-steps { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; }
.lp-guide-steps li { position:relative; display:grid; grid-template-columns:46px 1fr; gap:17px; padding:0 0 27px; }
.lp-guide-steps li:last-child { padding-bottom:0; }
.lp-guide-steps li:not(:last-child)::after { content:''; position:absolute; left:22px; top:45px; bottom:4px; width:1px; background:var(--brand-100); }
.lp-guide-steps li > span { width:46px; height:46px; display:grid; place-items:center; border-radius:14px; background:var(--brand-600); color:#fff; font-size:.72rem; font-weight:850; box-shadow:0 8px 18px rgba(79,70,229,.2); }
.lp-guide-steps strong { display:block; margin:2px 0 5px; font-size:.94rem; }
.lp-guide-steps p { margin:0; color:var(--ink-500); font-size:.82rem; line-height:1.6; }

.lp-faq-layout { display:grid; grid-template-columns:minmax(240px,.62fr) minmax(0,1.38fr); gap:clamp(42px,7vw,88px); align-items:start; }
.lp-faq-heading { position:sticky; top:112px; }
.lp-faq-heading .lp-h2 { font-size:clamp(1.7rem,3vw,2.35rem); }
.public-page .lp-faq { border-radius:18px; box-shadow:var(--shadow-sm); }
.public-page .lp-faq details { transition:background .12s ease; }
.public-page .lp-faq details[open] { background:#fbfcff; }
.public-page .lp-faq summary { padding:19px 22px; font-size:.9rem; }
.public-page .lp-faq p { padding:0 22px 20px; line-height:1.65; }

.lp-final-cta { padding:80px 0; background:#fff; }
.lp-cta-panel { position:relative; overflow:hidden; display:flex; align-items:center; justify-content:space-between; gap:36px; padding:clamp(34px,5vw,58px); border-radius:24px; background:linear-gradient(125deg,#101a33,#293b6a); box-shadow:0 22px 52px rgba(15,23,42,.2); }
.lp-cta-panel::after { content:''; position:absolute; width:320px; height:320px; right:-110px; top:-190px; border-radius:50%; background:rgba(99,102,241,.28); }
.lp-cta-panel > * { position:relative; z-index:1; }
.lp-cta-panel .lp-section-kicker { color:#a5b4fc; }
.lp-cta-panel h2 { max-width:680px; margin-bottom:9px; color:#fff; font-size:clamp(1.65rem,3vw,2.35rem); }
.lp-cta-panel p { margin:0; color:#cbd5e1; }
.lp-cta-panel .btn { flex-shrink:0; background:#fff; color:var(--brand-700); box-shadow:none; }
.lp-cta-panel .btn:hover { background:var(--brand-50); }

.public-page .lp-footer { background:#f8faff; }
.public-page .lp-footer-inner { display:grid; grid-template-columns:1fr auto; gap:24px 44px; padding-block:34px; }
.lp-footer-brand { display:flex; align-items:center; gap:12px; }
.lp-footer-logo { width:40px; height:40px; object-fit:contain; }
.lp-footer-logo-fallback { display:grid; place-items:center; border-radius:11px; background:var(--brand-600); color:#fff; font-size:.75rem; font-weight:900; }
.lp-footer-brand div { display:flex; flex-direction:column; }
.lp-footer-brand span { color:var(--ink-500); font-size:.75rem; }
.lp-footer-links { display:flex; align-items:center; gap:22px; }
.lp-footer-links a { color:var(--ink-700); font-size:.78rem; font-weight:650; }
.lp-footer-copy { grid-column:1/-1; padding-top:18px; border-top:1px solid var(--ink-200); color:var(--ink-500); font-size:.72rem; }

@media (max-width: 1080px) {
  .public-page .lp-hero-inner { grid-template-columns:minmax(0,1fr); max-width:820px; text-align:center; }
  .lp-hero-copy { display:flex; flex-direction:column; align-items:center; }
  .lp-hero-actions,.lp-hero-assurance { justify-content:center; }
  .lp-product-stage { width:100%; max-width:700px; margin:10px auto 0; text-align:left; }
  .lp-float-card-score { left:-18px; }
  .lp-float-card-secure { right:-18px; }
}
@media (max-width: 900px) {
  .public-page .lp-features,.lp-role-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .lp-role-card:last-child { grid-column:1/-1; }
  .lp-guide-shell,.lp-faq-layout { grid-template-columns:minmax(0,1fr); }
  .lp-faq-heading { position:static; max-width:640px; }
  .lp-cta-panel { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 720px) {
  .public-page .lp-nav-inner { min-height:66px; }
  .public-page .lp-brand-mark { width:36px; height:36px; }
  .public-page .lp-hero-inner { padding-block:58px 92px; }
  .public-page .lp-title { font-size:clamp(2.2rem,11vw,3.45rem); }
  .public-page .lp-lede { font-size:.98rem; }
  .lp-product-window { border-radius:17px; transform:none; }
  .lp-product-body { min-height:350px; }
  .lp-product-main { padding:15px; }
  .lp-product-grid { grid-template-columns:minmax(0,1fr); }
  .lp-product-progress { display:none; }
  .lp-float-card { display:none; }
  .public-page .lp-stats-grid { grid-template-columns:repeat(2,1fr); }
  .public-page .lp-stat:nth-child(2) { border-right:0; }
  .public-page .lp-stat:nth-child(-n+2) { border-bottom:1px solid var(--ink-100); }
  .public-page .lp-section { padding-block:68px; }
}
@media (max-width: 640px) {
  .public-page .lp-nav-links > a:not(.btn) { display:none; }
  .public-page .lp-nav-inner { padding-inline:16px; }
  .public-page .lp-hero-actions { width:100%; }
  .public-page .lp-hero-actions .btn { width:100%; }
  .lp-hero-assurance { flex-direction:column; align-items:flex-start; }
  .public-page .lp-features,.lp-role-grid { grid-template-columns:minmax(0,1fr); }
  .lp-role-card:last-child { grid-column:auto; }
  .public-page .lp-feature,.lp-role-card { padding:24px; }
  .lp-guide-shell { padding:27px 22px; border-radius:19px; }
  .lp-final-cta { padding-block:54px; }
  .lp-cta-panel { padding:30px 24px; border-radius:20px; }
  .lp-cta-panel .btn { width:100%; }
  .public-page .lp-footer-inner { grid-template-columns:1fr; }
  .lp-footer-links { flex-wrap:wrap; gap:12px 20px; }
  .lp-footer-copy { grid-column:auto; }
}
@media (max-width: 420px) {
  .public-page .lp-container { padding-inline:14px; }
  .public-page .lp-stat { padding:16px 13px; gap:9px; }
  .lp-stat-icon { width:34px; height:34px; border-radius:10px; }
  .public-page .lp-stat-num { font-size:1.18rem; }
  .public-page .lp-stat-label { font-size:.55rem; }
  .lp-product-body { grid-template-columns:42px minmax(0,1fr); }
  .lp-product-sidebar { padding-inline:6px; }
  .lp-product-sidebar > span { width:28px; height:28px; }
  .lp-product-metrics > div { display:flex; flex-direction:column; gap:4px; padding:8px; }
  .lp-product-metric-icon { width:25px; height:25px; }
}

/* Halaman login — pelengkap .auth-shell / .auth-card yang sudah ada */
.auth-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 600; color: var(--ink-500);
}
.auth-back:hover { color: var(--brand-600); text-decoration: none; }
/* Panah menghadap ke kiri: ikon 'enter' aslinya mengarah ke kanan (masuk). */
.auth-back-icon { transform: scaleX(-1); }

.auth-password { position: relative; display: flex; align-items: center; }
.auth-password input { padding-right: 92px; }
.auth-password-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; font-family: inherit;
  font-size: 0.78rem; font-weight: 700; color: var(--brand-600);
  padding: 6px 10px; border-radius: var(--radius-sm);
}
.auth-password-toggle:hover { background: var(--brand-50); }

.auth-roles { margin-top: var(--space-5); padding-top: var(--space-4); border-top: 1px solid var(--ink-200); }
.auth-roles-title {
  font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--ink-500); margin-bottom: var(--space-2);
}
.auth-roles ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.auth-roles li { display: flex; justify-content: space-between; gap: var(--space-3); font-size: 0.84rem; }
.auth-roles li strong { font-weight: 600; color: var(--ink-700); }
.auth-roles li span { color: var(--ink-500); }

/* Logo lebih besar & disusun menurun khusus di halaman login — di sini logo
   sekolah jadi penanda utama halaman, bukan sekadar label kecil seperti di
   sidebar, jadi ukurannya dinaikkan dan diletakkan di atas nama sistem. */
.auth-card .brand { flex-direction: column; gap: var(--space-3); text-align: center; }
.auth-card .brand .mark { width: 96px; height: 96px; font-size: 2rem; border-radius: var(--radius-lg); }
.auth-card .brand .mark-logo { width: 104px; height: 104px; border-radius: 0; }

/* ---------------------------------------------------------------- language switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--ink-100);
  border-radius: 999px;
  background: var(--surface, #fff);
}
.lang-switch-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1;
  color: var(--ink-500);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.lang-switch-item:hover { background: var(--ink-100); color: var(--ink-900); }
.lang-switch-item.is-active { background: var(--brand-600, #4f46e5); color: #fff; }
.lang-flag { font-size: 1.05rem; line-height: 1; }
/* Windows renders regional-indicator pairs as letters, which would duplicate the code
   next to it — there the flag alone already reads as "ID"/"GB". */
.lang-switch-compact .lang-code { display: none; }
.lang-switch-compact .lang-switch-item { padding: 5px 8px; }
.auth-lang { display: flex; justify-content: center; margin-bottom: var(--space-4); }
.lp-nav-links .lang-switch { margin-right: var(--space-2); }
.auth-card-wide { max-width: 760px; }

/* ---------------------------------------------------------------- Auth experience 2026 */
.auth-page { min-height:100vh; background:#f6f8ff; }
.auth-page .auth-shell {
  min-height:100dvh; display:grid; grid-template-rows:auto 1fr auto; gap:0;
  align-items:stretch; justify-content:normal; padding:0; background:
    radial-gradient(circle at 8% 10%,rgba(99,102,241,.12),transparent 300px),
    radial-gradient(circle at 92% 88%,rgba(14,165,233,.09),transparent 330px),
    #f7f9ff;
}
.auth-page-bar {
  width:100%; max-width:1280px; min-height:70px; margin:0 auto; padding:13px clamp(18px,3vw,34px);
  display:flex; align-items:center; justify-content:space-between; gap:var(--space-4);
}
.auth-page-home { display:inline-flex; align-items:center; gap:7px; color:var(--ink-500); font-size:.8rem; font-weight:700; }
.auth-page-home:hover { color:var(--brand-600); text-decoration:none; }
.auth-page .auth-lang { margin:0; }
.auth-content {
  width:100%; display:flex; flex-direction:column; align-items:center; justify-content:center;
  padding:20px clamp(18px,3vw,34px) 36px;
}
.auth-page-footer { padding:14px 20px 20px; color:var(--ink-500); font-size:.68rem; text-align:center; }
.auth-content > .auth-back { width:100%; max-width:400px; margin-bottom:4px; }
.auth-content > .auth-card { width:100%; }

.auth-login-shell {
  width:100%; max-width:1040px; min-height:620px; display:grid; grid-template-columns:minmax(0,.92fr) minmax(430px,1.08fr);
  overflow:hidden; border:1px solid rgba(199,210,254,.75); border-radius:26px; background:#fff;
  box-shadow:0 30px 80px rgba(30,41,59,.14),0 8px 26px rgba(79,70,229,.08);
}
.auth-story {
  position:relative; isolation:isolate; overflow:hidden; display:flex; flex-direction:column; justify-content:space-between;
  padding:clamp(38px,5vw,58px); color:#fff;
  background:
    linear-gradient(145deg,rgba(15,23,42,.97),rgba(30,45,80,.96)),
    var(--ink-900);
}
.auth-story::before {
  content:''; position:absolute; inset:0; z-index:-1; opacity:.25;
  background-image:radial-gradient(rgba(255,255,255,.25) .7px,transparent .7px); background-size:22px 22px;
  mask-image:linear-gradient(145deg,#000,transparent 82%);
}
.auth-story-orb { position:absolute; z-index:-1; border-radius:50%; pointer-events:none; }
.auth-story-orb-one { width:360px; height:360px; right:-190px; top:-170px; background:rgba(99,102,241,.4); }
.auth-story-orb-two { width:250px; height:250px; left:-140px; bottom:-100px; background:rgba(14,165,233,.22); }
.auth-story-content { position:relative; z-index:1; }
.auth-story-brand { display:flex; align-items:center; gap:13px; margin-bottom:clamp(55px,8vw,92px); }
.auth-story-logo { width:54px; height:54px; object-fit:contain; filter:drop-shadow(0 6px 12px rgba(0,0,0,.18)); }
.auth-story-logo-fallback { display:grid; place-items:center; border-radius:15px; background:linear-gradient(135deg,var(--brand-600),var(--brand-500)); font-size:.8rem; font-weight:900; }
.auth-story-brand div { display:flex; flex-direction:column; }
.auth-story-brand strong { color:#fff; font-size:1.05rem; }
.auth-story-brand span { color:#aebbd1; font-size:.72rem; }
.auth-story-kicker { display:inline-flex; align-items:center; gap:8px; margin-bottom:15px; color:#c7d2fe; font-size:.68rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.auth-story-kicker i { width:7px; height:7px; border-radius:50%; background:#4ade80; box-shadow:0 0 0 4px rgba(74,222,128,.12); }
.auth-story-copy h1 { margin-bottom:16px; color:#fff; font-size:clamp(2rem,3.1vw,2.8rem); line-height:1.08; letter-spacing:-.04em; }
.auth-story-copy p { margin:0; color:#bdc8d9; font-size:.92rem; line-height:1.72; }
.auth-story-benefits { list-style:none; margin:34px 0 0; padding:0; display:flex; flex-direction:column; gap:16px; }
.auth-story-benefits li { display:flex; align-items:flex-start; gap:12px; }
.auth-story-benefits li > span { width:36px; height:36px; display:grid; place-items:center; flex-shrink:0; border:1px solid rgba(165,180,252,.18); border-radius:11px; background:rgba(99,102,241,.13); color:#a5b4fc; }
.auth-story-benefits div { display:flex; flex-direction:column; }
.auth-story-benefits strong { color:#f8fafc; font-size:.8rem; }
.auth-story-benefits small { margin-top:2px; color:#94a3b8; font-size:.68rem; line-height:1.45; }
.auth-story-foot { position:relative; z-index:1; display:flex; align-items:center; gap:7px; margin-top:32px; color:#aebbd1; font-size:.68rem; }
.auth-story-foot svg { color:#4ade80; }

.auth-form-panel { display:flex; flex-direction:column; justify-content:center; min-width:0; padding:clamp(38px,5vw,66px); background:#fff; }
.auth-mobile-brand { display:none; align-items:center; gap:10px; margin-bottom:28px; }
.auth-mobile-brand > img,.auth-mobile-brand > span { width:43px; height:43px; object-fit:contain; }
.auth-mobile-brand > span { display:grid; place-items:center; border-radius:12px; background:var(--brand-600); color:#fff; font-size:.7rem; font-weight:900; }
.auth-mobile-brand div { display:flex; flex-direction:column; }
.auth-mobile-brand strong { font-size:.92rem; }
.auth-mobile-brand small { color:var(--ink-500); font-size:.66rem; }
.auth-form-heading { margin-bottom:25px; }
.auth-form-kicker { display:block; margin-bottom:7px; color:var(--brand-600); font-size:.68rem; font-weight:850; letter-spacing:.1em; text-transform:uppercase; }
.auth-form-heading h2 { margin-bottom:8px; font-size:clamp(1.65rem,2.4vw,2rem); letter-spacing:-.035em; }
.auth-form-heading p { margin:0; color:var(--ink-500); font-size:.84rem; }
.auth-login-alert { align-items:center; margin-bottom:19px; }
.auth-login-alert svg { flex-shrink:0; }
.auth-login-form label { margin-bottom:7px; }
.auth-input-wrap { position:relative; display:flex; align-items:center; }
.auth-input-wrap .auth-input-icon { position:absolute; left:13px; z-index:1; display:flex; color:var(--ink-500); pointer-events:none; }
.auth-input-wrap input { min-height:50px; padding-left:43px; border-radius:12px; background:#fbfcff; }
.auth-input-wrap input::placeholder { color:#94a3b8; }
.auth-input-wrap:focus-within .auth-input-icon { color:var(--brand-600); }
.auth-input-wrap.has-error input { border-color:var(--danger-600); }
.auth-label-row { display:flex; align-items:center; justify-content:space-between; gap:var(--space-3); }
.auth-label-row a { margin-bottom:var(--space-1); font-size:.75rem; font-weight:750; }
.auth-password input { padding-left:43px; padding-right:94px; }
.auth-password-toggle { right:7px; }
.auth-caps-lock { display:flex; align-items:center; gap:5px; margin-top:7px; color:var(--warning-600); font-size:.72rem; font-weight:650; }
.auth-caps-lock[hidden] { display:none; }
.auth-submit { width:100%; min-height:50px; margin-top:24px; border-radius:12px; }
.auth-submit:disabled { transform:none; }

.auth-identity-guide { margin-top:25px; padding-top:20px; border-top:1px solid var(--ink-100); }
.auth-identity-title { margin-bottom:10px; color:var(--ink-500); font-size:.64rem; font-weight:850; letter-spacing:.09em; text-transform:uppercase; }
.auth-identity-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.auth-identity-options > div { display:grid; grid-template-columns:27px 1fr; column-gap:7px; align-items:center; min-width:0; padding:9px; border:1px solid var(--ink-100); border-radius:10px; background:#fbfcff; }
.auth-identity-options span { grid-row:1/3; width:27px; height:27px; display:grid; place-items:center; border-radius:8px; }
.auth-identity-options span.is-student { background:var(--info-100); color:var(--info-600); }
.auth-identity-options span.is-teacher { background:var(--brand-100); color:var(--brand-700); }
.auth-identity-options span.is-parent { background:var(--success-100); color:var(--success-600); }
.auth-identity-options strong { overflow:hidden; color:var(--ink-700); font-size:.64rem; text-overflow:ellipsis; white-space:nowrap; }
.auth-identity-options small { color:var(--ink-500); font-size:.58rem; }
.auth-security-note { display:flex; align-items:flex-start; gap:7px; margin-top:16px; padding:10px 12px; border-radius:10px; background:var(--ink-50); color:var(--ink-500); font-size:.67rem; line-height:1.5; }
.auth-security-note svg { flex-shrink:0; margin-top:1px; color:var(--success-600); }

@media (max-width:900px) {
  .auth-login-shell { max-width:620px; min-height:0; grid-template-columns:minmax(0,1fr); }
  .auth-story { padding:28px 34px; }
  .auth-story-brand { margin:0; }
  .auth-story-copy,.auth-story-benefits,.auth-story-foot { display:none; }
  .auth-form-panel { padding:38px 42px 44px; }
}
@media (max-width:640px) {
  .auth-page-bar { min-height:60px; padding-inline:16px; }
  .auth-page-home { font-size:.72rem; }
  .auth-content { justify-content:flex-start; padding:10px 14px 28px; }
  .auth-login-shell { border-radius:20px; }
  .auth-story { display:none; }
  .auth-form-panel { padding:30px 23px; }
  .auth-mobile-brand { display:flex; }
  .auth-form-heading { margin-bottom:22px; }
  .auth-form-heading h2 { font-size:1.65rem; }
  .auth-identity-options { grid-template-columns:minmax(0,1fr); }
  .auth-identity-options > div { grid-template-columns:30px 1fr auto; }
  .auth-identity-options span { grid-row:auto; }
  .auth-identity-options small { justify-self:end; }
  .auth-page-footer { padding-top:6px; }
}
@media (max-width:380px) {
  .auth-page-bar .lang-switch { padding:2px; }
  .auth-page-bar .lang-code { display:none; }
  .auth-page-bar .lang-switch-item { padding:5px 7px; }
  .auth-page-home { max-width:126px; }
  .auth-form-panel { padding-inline:19px; }
}
.onboard-step { border-top: 1px solid var(--ink-100); padding-top: var(--space-5); margin-top: var(--space-5); }
.onboard-step:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.onboard-step-head { display: flex; gap: var(--space-3); align-items: flex-start; margin-bottom: var(--space-4); }
.onboard-step-num {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-600); color: #fff; font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}

/* ---------------------------------------------------------------- ID cards
   CR80 (85.6 × 54 mm), the same as a bank card. Dimensions are in mm because px
   would render at whatever DPI the printer happens to use.

   The card is a three-row grid with FIXED row heights rather than flex, because
   the first attempt let the QR stretch the footer, which squeezed the body until
   a 26 mm photo overflowed straight through the footer's top border — the stray
   line across the middle. Fixed rows make that overflow impossible:
       header 11mm + body 31mm + footer 6mm = 48mm, plus 3mm padding top/bottom. */
.print-body { background: var(--ink-100); padding: var(--space-5); }
.print-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  max-width: 720px; margin: 0 auto var(--space-3); padding: var(--space-3) var(--space-4);
  background: var(--white); border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  flex-wrap: wrap;
}
.print-hint { max-width: 720px; margin: 0 auto var(--space-5); font-size: 0.8rem; color: var(--ink-500); }

.card-sheet { display: flex; gap: 8mm; justify-content: center; flex-wrap: wrap; }

.idcard {
  width: 85.6mm; height: 54mm;
  box-sizing: border-box;
  position: relative;
  background: var(--white);
  border-radius: 3mm;
  padding: 3mm;
  display: grid;
  grid-template-rows: 11mm 31mm 6mm;
  font-size: 2.7mm; line-height: 1.3;
  color: var(--ink-900);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
/* A diagonal wash in the school's colour: enough personality to look issued rather
   than printed from a spreadsheet, faint enough not to fight the photo or the QR. */
.idcard::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(60mm 40mm at 100% 0%, var(--brand-50) 0%, transparent 70%),
    linear-gradient(160deg, transparent 60%, var(--brand-50) 100%);
  pointer-events: none;
}
.idcard > * { position: relative; }

.idcard-head { display: flex; align-items: center; gap: 2.5mm; min-width: 0; }
.idcard-logo { width: 9mm; height: 9mm; object-fit: contain; flex-shrink: 0; }
.idcard-head-text { display: flex; flex-direction: column; min-width: 0; }
.idcard-school { font-weight: 800; font-size: 3.2mm; letter-spacing: -0.02em; line-height: 1.1; }
.idcard-kind {
  font-size: 2.2mm; font-weight: 800; letter-spacing: 0.16em; color: var(--brand-600);
  margin-top: 0.6mm;
}
/* The rule under the header is a deliberate accent, not a divider that can drift. */
.idcard-head::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 0.6mm;
  border-radius: 1mm;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-500) 40%, transparent 100%);
}

.idcard-body { display: grid; grid-template-columns: 18mm 1fr auto; gap: 2.5mm; padding-top: 2.5mm; min-height: 0; }

.idcard-photo {
  width: 18mm; height: 22.5mm;
  border-radius: 1.5mm; overflow: hidden;
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 0.3mm var(--white), 0 0 0 0.6mm var(--brand-100);
}
.idcard-photo img { width: 100%; height: 100%; object-fit: cover; }
/* Only one account in the roster has a photo, so the fallback has to look
   deliberate rather than like a failed image. */
.idcard-initials { font-size: 8mm; font-weight: 800; letter-spacing: -0.03em; }

.idcard-fields { min-width: 0; display: flex; flex-direction: column; gap: 0.8mm; overflow: hidden; }
.idcard-name {
  font-size: 3.7mm; font-weight: 800; line-height: 1.1; margin-bottom: 1.2mm;
  letter-spacing: -0.02em; overflow-wrap: break-word;
}
/* Long names step down in size so every field still fits beside the QR;
   a card must never drop the class or subject line. */
.idcard-name-long { font-size: 3.1mm; }
.idcard-name-xlong { font-size: 2.7mm; margin-bottom: 0.8mm; }
.idcard-row { display: flex; gap: 1.5mm; align-items: baseline; }
.idcard-row > span {
  width: 10mm; flex-shrink: 0; color: var(--ink-500); font-size: 2.2mm;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.idcard-row > strong { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.idcard-row-wrap { align-items: flex-start; }

/* QR sits in its own grid column so it can never push anything else around.
   23 mm gives modules of about 0.8 mm: 15 mm (about 0.5 mm modules) was too fine
   for gate cameras to read reliably. The SVG carries its own white quiet zone, so
   the box needs no extra padding. */
.idcard-qr {
  width: 23mm; height: 23mm; align-self: end;
  background: var(--white);
  border-radius: 1mm; box-shadow: 0 0 0 0.25mm var(--ink-200);
  overflow: hidden;
}
.idcard-qr svg { width: 100%; height: 100%; display: block; }

.idcard-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 2mm;
  font-size: 2.3mm; color: var(--ink-500);
  border-top: 0.25mm solid var(--ink-200); padding-top: 1.2mm;
}

.idcard-back { grid-template-rows: 1fr auto auto; }
.idcard-back-fields { display: flex; flex-direction: column; gap: 1.2mm; padding-top: 1mm; }
.idcard-note {
  font-size: 2.2mm; color: var(--ink-500); line-height: 1.35;
  border-top: 0.25mm solid var(--ink-200); padding-top: 1.5mm;
}
.idcard-sign { display: flex; flex-direction: column; align-items: flex-end; font-size: 2.3mm; padding-top: 1mm; }
.idcard-sign-role { color: var(--ink-500); }
.idcard-sign-line { height: 6mm; }
.idcard-sign-name { font-weight: 700; border-top: 0.3mm solid var(--ink-900); padding-top: 0.5mm; }
.idcard-sign-nip { color: var(--ink-500); font-size: 2.1mm; }

@media print {
  @page { margin: 8mm; }
  .print-body { background: none; padding: 0; }
  .print-toolbar, .print-hint { display: none; }
  .card-sheet { gap: 6mm; }
  /* Borders replace the shadow, which most printers drop anyway, and give a
     cutting line. print-color-adjust keeps the brand wash, photo and QR from
     being stripped by the browser's ink-saving default. */
  .idcard {
    box-shadow: none;
    border: 0.3mm solid var(--ink-300);
    break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

.card-preview { display: flex; flex-direction: column; gap: var(--space-4); align-items: flex-start; }

/* ---------------------------------------------------------------- weekly schedule
   Replaces the plain card-per-day grid. The point of each addition is scanning
   speed, not decoration: a duration on every slot makes an absurd entry obvious at
   a glance, and a per-subject hue lets the eye follow one subject across the week
   without reading any text. */
.sched-summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-5);
  padding: var(--space-4) var(--space-5);
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-4);
}
.sched-metric { display: flex; flex-direction: column; gap: 2px; }
.sched-metric-num { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.sched-metric-label { font-size: 0.72rem; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.05em; }
/* Pushed to the far end so "what's next" reads as an answer, not another statistic. */
.sched-next {
  margin-left: auto; display: flex; flex-direction: column; gap: 1px;
  padding: var(--space-2) var(--space-4);
  background: var(--brand-50); border-radius: var(--radius-md);
  border-left: 3px solid var(--brand-600);
}
.sched-next-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-600); }
.sched-next-meta { font-size: 0.78rem; color: var(--ink-500); }

/* align-items:start supaya kartu hari setinggi isinya sendiri. Tanpa ini hari kosong
   ikut memanjang menyamai hari terpadat, dan kolom Selasa–Kamis jadi kotak kosong
   setinggi Senin tanpa alasan. */
.sched-week {
  display: grid; gap: var(--space-4); align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.sched-day {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-2);
}
/* Empty days recede instead of shouting the same sentence five times over. */
.sched-day.is-empty { background: transparent; border-style: dashed; box-shadow: none; }
.sched-day.is-today { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }

.sched-day-head { display: flex; align-items: center; gap: var(--space-2); }
.sched-day-head h3 { margin: 0; font-size: 1rem; }
.sched-today-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.sched-day-total { margin-left: auto; font-size: 0.72rem; font-weight: 700; color: var(--ink-500); }
.sched-free { margin: 0; font-size: 0.82rem; color: var(--ink-300); font-style: italic; }

/* Stacked, not side-by-side. Each day is a ~260px column in the week grid, and an
   action button next to the text left roughly 90px for it — enough to snap
   "11:14 – 14:00" onto three lines and split "Informatika" mid-word. Vertical costs
   a little height and gives the text the whole column. */
.sched-slot {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: hsl(var(--slot-hue) 70% 97%);
  border-left: 3px solid hsl(var(--slot-hue) 55% 60%);
  transition: transform .12s ease, box-shadow .12s ease;
}
.sched-slot:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); }
.sched-slot.is-open { box-shadow: 0 0 0 2px var(--success-100); }
.sched-slot-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sched-slot-time {
  display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
  font-size: 0.78rem; font-weight: 700; color: hsl(var(--slot-hue) 55% 32%);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.sched-slot-time span { font-weight: 600; opacity: 0.75; }
.sched-slot-time em { font-style: normal; font-weight: 600; font-size: 0.7rem; color: var(--ink-500); margin-left: 4px; }
.sched-slot-subject { font-weight: 700; overflow-wrap: break-word; line-height: 1.3; }
.sched-slot-class { font-size: 0.75rem; color: var(--ink-500); }
.sched-slot-action { text-align: left; }
.sched-slot-action .btn { width: 100%; justify-content: center; }
.sched-slot-action .schedule-status-link { align-items: flex-start; }

@media (max-width: 640px) {
  .sched-summary { gap: var(--space-4); padding: var(--space-4); }
  .sched-next { margin-left: 0; width: 100%; }
  .sched-week { grid-template-columns: minmax(0, 1fr); }
}
/* Day colour tells you at a glance whether attendance can happen at all: green when
   this is the day, red when it is not. Kept as a left rail plus a tinted header rather
   than a full red card, so four red days do not drown the one that matters. */
.sched-day.is-today { border-color: var(--success-600); box-shadow: 0 0 0 3px var(--success-100); }
.sched-day.is-today .sched-day-head h3 { color: var(--success-600); }
.sched-day.is-today .sched-today-dot { background: var(--success-600); box-shadow: 0 0 0 3px var(--success-100); }
.sched-day.is-other { border-color: var(--danger-100); }
.sched-day.is-other .sched-day-head h3 { color: var(--danger-600); }
.sched-day.is-other.is-empty { border-color: var(--danger-100); background: transparent; }
.sched-window-note { font-size: 0.7rem; color: var(--ink-500); margin-top: 4px; }
/* What is inside a digital class, shown on the card. 432 of 433 classes were empty
   shells and nothing on this page said so — the teacher had to open each one to find
   out. An empty class now reads as unfinished rather than as merely another card. */
.course-fill {
  display: flex; flex-wrap: wrap; gap: var(--space-3);
  margin-top: var(--space-3); padding-top: var(--space-3);
  border-top: 1px dashed var(--ink-200);
  font-size: 0.76rem; color: var(--ink-500);
}
.course-fill-item { display: inline-flex; align-items: center; gap: 5px; }
.course-fill-item strong { color: var(--ink-900); font-weight: 700; }
.course-fill.is-empty { border-top-color: var(--warning-100); }
.course-fill-empty { color: var(--warning-600); font-weight: 600; }

/* ---------------------------------------------------------------- exam player
   The old page was a page-header, one timer card, and a plain card per question —
   no dedicated CSS at all. On a 40-question exam a student could not see how many
   were still blank, could not jump to question 25, and submitted blind. */
.xp { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: var(--space-5); align-items: start; }
.xp-main { min-width: 0; display: flex; flex-direction: column; gap: var(--space-4); }

.xp-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4);
  flex-wrap: wrap;
}
.xp-head h1 { margin-bottom: 2px; }
.xp-conn {
  font-size: 0.78rem; font-weight: 600; white-space: nowrap;
  padding: 6px 12px; border-radius: 999px;
  background: var(--success-100); color: var(--success-600);
}
.xp-conn.is-down { background: var(--danger-100); color: var(--danger-600); }

.xp-q {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: var(--space-5);
  border-left: 4px solid var(--ink-200);
  transition: border-color .15s ease;
  scroll-margin-top: var(--space-5);
}
.xp-q.is-answered { border-left-color: var(--success-600); }

.xp-q-head { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); flex-wrap: wrap; }
.xp-q-num {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: var(--brand-600); color: #fff; font-weight: 800; font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.xp-q-type {
  font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--brand-600); background: var(--brand-50); padding: 3px 9px; border-radius: 999px;
}
.xp-q-points { font-size: 0.72rem; color: var(--ink-500); }
.xp-q-status { margin-left: auto; font-size: 0.72rem; color: var(--ink-500); }
.xp-flag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.72rem; font-weight: 600; font-family: inherit;
  padding: 4px 9px; border-radius: 999px; cursor: pointer;
  background: none; border: 1px solid var(--ink-200); color: var(--ink-500);
}
.xp-flag:hover { border-color: var(--warning-600); color: var(--warning-600); }
.xp-flag.is-on { background: var(--warning-100); border-color: var(--warning-600); color: var(--warning-600); }

.xp-q-stem { font-size: 1rem; line-height: 1.6; margin-bottom: var(--space-4); overflow-wrap: anywhere; }
.xp-q-image { max-width: 100%; max-height: 380px; display: block; border-radius: var(--radius-md); margin-bottom: var(--space-4); }

.xp-options { display: flex; flex-direction: column; gap: var(--space-2); }
.xp-option {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3); border: 1px solid var(--ink-200); border-radius: var(--radius-md);
  cursor: pointer; font-weight: 400; margin: 0;
  transition: border-color .12s ease, background .12s ease;
}
.xp-option:hover { border-color: var(--brand-500); background: var(--brand-50); }
.xp-option input { margin-top: 3px; flex-shrink: 0; }
.xp-option-key {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px;
  background: var(--ink-100); color: var(--ink-700); font-weight: 700; font-size: 0.75rem;
  display: flex; align-items: center; justify-content: center;
}
.xp-option:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.xp-option:has(input:checked) .xp-option-key { background: var(--brand-600); color: #fff; }
.xp-option-text { min-width: 0; overflow-wrap: anywhere; }
.xp-textarea { width: 100%; }

/* Rail stays in view so the timer and the blank-question count are never scrolled away. */
.xp-rail { position: sticky; top: var(--space-5); }
.xp-rail-inner {
  background: var(--white); border: 1px solid var(--ink-200);
  border-radius: var(--radius-lg); padding: var(--space-4);
  display: flex; flex-direction: column; gap: var(--space-4);
}
.xp-timer {
  text-align: center; padding: var(--space-3); border-radius: var(--radius-md);
  background: var(--ink-50); border: 1px solid var(--ink-200);
}
.xp-timer-label { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); font-weight: 700; }
.xp-timer-value { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.xp-timer.is-warning { background: var(--warning-100); border-color: var(--warning-600); }
.xp-timer.is-warning .xp-timer-value { color: var(--warning-600); }
.xp-timer.is-critical { background: var(--danger-100); border-color: var(--danger-600); }
.xp-timer.is-critical .xp-timer-value { color: var(--danger-600); }

.xp-progress-text { font-size: 0.82rem; margin-bottom: 6px; }
.xp-progress-bar { height: 7px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.xp-progress-bar > span { display: block; height: 100%; background: var(--success-600); transition: width .2s ease; }

.xp-nav { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.xp-nav-item {
  aspect-ratio: 1; border-radius: 7px; cursor: pointer; font-family: inherit;
  font-size: 0.76rem; font-weight: 700;
  background: var(--ink-100); color: var(--ink-500); border: 1px solid transparent;
}
.xp-nav-item:hover { border-color: var(--brand-500); }
.xp-nav-item.is-answered { background: var(--success-100); color: var(--success-600); }
.xp-nav-item.is-flagged { background: var(--warning-100); color: var(--warning-600); box-shadow: inset 0 0 0 2px var(--warning-600); }

.xp-legend { display: flex; flex-direction: column; gap: 4px; font-size: 0.7rem; color: var(--ink-500); }
.xp-legend .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--ink-100); margin-right: 5px; }
.xp-legend .dot.is-answered { background: var(--success-100); box-shadow: inset 0 0 0 1px var(--success-600); }
.xp-legend .dot.is-flagged { background: var(--warning-100); box-shadow: inset 0 0 0 2px var(--warning-600); }

.xp-submit { width: 100%; }
.xp-help { font-size: 0.7rem; color: var(--ink-500); margin: 0; line-height: 1.4; }

@media (max-width: 900px) {
  .xp { grid-template-columns: minmax(0, 1fr); }
  /* On a phone the rail leads: the timer and the blank count matter more than the
     first question, which is one scroll away regardless. */
  .xp-rail { position: static; order: -1; }
  .xp-nav { grid-template-columns: repeat(8, 1fr); }
}
/* Exam rules, shown before the student can start. */
.exam-rules { margin: 0; padding-left: var(--space-5); display: flex; flex-direction: column; gap: var(--space-2); }
.exam-rules li { font-size: 0.88rem; line-height: 1.5; color: var(--ink-700); }
.exam-rules li::marker { font-weight: 700; color: var(--brand-600); }
.exam-agree {
  display: flex; align-items: flex-start; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4);
  background: var(--brand-50); border: 1px solid var(--brand-100);
  border-radius: var(--radius-md); cursor: pointer; font-weight: 500; font-size: 0.88rem;
}
.exam-agree input { margin-top: 3px; flex-shrink: 0; }

/* QR Absensi — dipakai siswa untuk ditunjukkan ke pemindai dari layar HP.
   Sengaja hitam-putih murni dan tidak mengikuti tema gelap: pemindai membaca
   kontras, dan QR putih di atas latar gelap gagal dibaca banyak pembaca murah. */
.print-body.qr-screen { padding: 0; background: #fff; }
.qrs { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: var(--space-4); background:#fff; color-scheme:light; }
.quick-student-qr{white-space:nowrap;min-height:44px;flex-shrink:0}
@media(max-width:480px){.topbar:has(.quick-student-qr) .topbar-context{display:none}.quick-student-qr{padding:10px 12px}}
.qrs-box {
  background: #ffffff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: var(--space-6) var(--space-5); text-align: center; max-width: 420px; width: 100%;
}
.qrs-school {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: #64748b; margin-bottom: var(--space-3);
}
.qrs-code { display: flex; justify-content: center; margin: 0 auto; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: var(--radius-md); -webkit-tap-highlight-color: transparent; transition: transform .15s ease; }
.qrs-code:active { transform: scale(.98); }
.qrs-code:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 4px; }
.qrs-tap-hint { margin: var(--space-2) 0 0; font-size: 0.78rem; color: #64748b; }
/* Large QR modal: always white with dark modules so scanners read it in any theme. */
.qrs-modal { width: min(calc(100vw - 16px), 600px); max-width: none; max-height: calc(100dvh - 16px); padding: 56px 8px 20px; border: 0; border-radius: 20px; background: #fff; color: #0f172a; text-align: center; box-shadow: 0 24px 60px rgba(15,23,42,.35); overflow-y: auto; }
.qrs-modal::backdrop { background: rgba(15, 23, 42, 0.72); }
.qrs-modal[open] { animation: qrs-pop .18s ease-out; }
@keyframes qrs-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .qrs-modal[open] { animation: none; } .qrs-code { transition: none; } }
.qrs-modal-code svg { width: min(calc(100vw - 32px), calc(100dvh - 200px), 580px); height: auto; max-width: 100%; display: block; margin: 0 auto; }
.qrs-modal-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: #f1f5f9; color: #0f172a; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.qrs-modal-close:focus-visible { outline: 3px solid var(--brand-500); outline-offset: 2px; }
.qrs-code svg { width: min(75vw, 320px); height: auto; max-width: 100%; display: block; }
.qrs-id { margin-top: var(--space-3); font-size: 1.05rem; color: #0f172a; font-variant-numeric: tabular-nums; }
.qrs-id strong { letter-spacing: 0.06em; }
.qrs-name { margin-top: 2px; font-size: 1.15rem; font-weight: 800; color: #0f172a; }
.qrs-class { margin-top: 2px; font-size: 0.9rem; color: #475569; }
.qrs-hint { margin: var(--space-3) 0 0; font-size: 0.8rem; color: #64748b; line-height: 1.5; }
.qrs-other-warning { color: var(--warning-600); }
.qrs-actions { display: flex; gap: var(--space-2); justify-content: center; margin-top: var(--space-4); flex-wrap: wrap; }
.qrs-actions .btn { min-height: 44px; }

/* Teacher exam workspace — dense information, clear decisions, fewer long-page trips. */
.exam-workspace-hero {
  position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5);
  overflow: hidden; margin-bottom: var(--space-4); padding: var(--space-5); border: 1px solid var(--brand-100);
  border-radius: var(--radius-lg); background: linear-gradient(120deg, var(--brand-50), var(--white) 58%, #ecfeff); box-shadow: var(--shadow-sm);
}
.exam-workspace-hero::after { content: ''; position: absolute; right: -50px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: rgba(99,102,241,.06); pointer-events: none; }
.exam-workspace-main { position: relative; z-index: 1; min-width: 0; }
.exam-workspace-kicker { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); }
.exam-workspace-kicker > span:first-child { color: var(--brand-600); font-size: .69rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.exam-workspace-hero h1 { margin-bottom: 4px; font-size: clamp(1.45rem, 2vw, 1.9rem); }
.exam-workspace-hero p { max-width: 760px; margin-bottom: var(--space-3); color: var(--ink-500); font-size: .82rem; }
.exam-workspace-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.exam-workspace-meta span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(203,213,225,.8); border-radius: 999px; background: rgba(255,255,255,.78); color: var(--ink-700); font-size: .68rem; font-weight: 650; }
.exam-workspace-meta svg { color: var(--brand-600); }
.exam-workspace-actions { position: relative; z-index: 1; display: flex; max-width: 440px; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.exam-workspace-actions form { margin: 0; }

.exam-overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.exam-overview-card { display: flex; min-width: 0; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.exam-overview-icon { display: flex; width: 40px; height: 40px; flex: 0 0 40px; align-items: center; justify-content: center; border-radius: 12px; }
.exam-overview-icon.is-brand { background: var(--brand-100); color: var(--brand-600); }
.exam-overview-icon.is-success { background: var(--success-100); color: var(--success-600); }
.exam-overview-icon.is-warning { background: var(--warning-100); color: var(--warning-600); }
.exam-overview-icon.is-info { background: var(--info-100); color: var(--info-600); }
.exam-overview-card > div { display: flex; min-width: 0; flex-direction: column; }
.exam-overview-card small { color: var(--ink-500); font-size: .64rem; font-weight: 700; }
.exam-overview-card strong { color: var(--ink-900); font-size: 1.12rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.exam-overview-card strong span { color: var(--ink-500); font-size: .72rem; }
.exam-overview-card em { overflow: hidden; color: var(--ink-500); font-size: .61rem; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }

.exam-section-nav { position: sticky; top: 76px; z-index: 8; display: flex; align-items: center; gap: 4px; width: max-content; max-width: 100%; overflow-x: auto; margin: 0 auto var(--space-5); padding: 4px; border: 1px solid var(--ink-200); border-radius: 12px; background: rgba(255,255,255,.94); box-shadow: var(--shadow-md); backdrop-filter: blur(10px); }
.exam-section-nav a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 9px; color: var(--ink-700); font-size: .7rem; font-weight: 750; white-space: nowrap; }
.exam-section-nav a:hover { background: var(--brand-50); color: var(--brand-600); text-decoration: none; }
.exam-section-nav a span { min-width: 20px; padding: 1px 5px; border-radius: 999px; background: var(--ink-100); color: var(--ink-500); font-size: .59rem; text-align: center; }
.exam-context-alert { display: flex; align-items: center; gap: var(--space-2); }
.exam-context-alert svg { flex-shrink: 0; }
.exam-management-grid { align-items: start; }
.exam-management-card, .exam-package-card, .exam-results-card { scroll-margin-top: 135px; }

.exam-package-card { padding: 0; }
.exam-package-summary { display: grid; grid-template-columns: 42px minmax(150px, 1fr) auto auto 20px; align-items: center; gap: var(--space-3); padding: var(--space-4); cursor: pointer; list-style: none; }
.exam-package-summary::-webkit-details-marker { display: none; }
.exam-package-summary-icon { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: var(--brand-100); color: var(--brand-600); }
.exam-package-summary > span:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.exam-package-summary small { color: var(--ink-500); font-size: .62rem; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.exam-package-summary strong { font-size: .9rem; }
.exam-package-types { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; }
.exam-package-types em { padding: 4px 7px; border-radius: 999px; background: var(--ink-100); color: var(--ink-500); font-size: .61rem; font-style: normal; font-weight: 700; }
.exam-package-chevron { color: var(--ink-500); transition: transform .18s ease; }
.exam-package-card[open] .exam-package-chevron { transform: rotate(180deg); }
.exam-package-body { padding: 0 var(--space-4) var(--space-4); border-top: 1px solid var(--ink-100); }
.exam-package-body > p:first-child { margin-top: var(--space-3); }

.exam-results-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.exam-section-eyebrow { display: block; margin-bottom: 2px; color: var(--brand-600); font-size: .65rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.exam-results-heading h3 { margin-bottom: 2px; }
.exam-results-heading p { margin: 0; color: var(--ink-500); font-size: .74rem; }
.exam-release-state { display: inline-flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 11px; }
.exam-release-state.is-released { background: var(--success-100); color: var(--success-600); }
.exam-release-state > span { display: flex; flex-direction: column; }
.exam-release-state strong { font-size: .68rem; }
.exam-release-state small { font-size: .58rem; }
.exam-result-insights { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); overflow: hidden; margin-bottom: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--ink-200); gap: 1px; }
.exam-result-insights > div { display: flex; min-width: 0; flex-direction: column; padding: 9px 12px; background: var(--ink-50); }
.exam-result-insights span { color: var(--ink-500); font-size: .61rem; }
.exam-result-insights strong { font-size: .98rem; font-variant-numeric: tabular-nums; }
.exam-result-insights strong.is-good { color: var(--success-600); }
.exam-result-insights strong.is-low { color: var(--danger-600); }
.exam-result-insights strong.is-warning { color: var(--warning-600); }
.exam-result-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); }
.exam-result-toolbar .table-search { margin: 0; }
.exam-result-filters { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--ink-100); }
.exam-result-filter { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 5px 8px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-500); font: inherit; font-size: .65rem; font-weight: 750; white-space: nowrap; cursor: pointer; }
.exam-result-filter:hover { color: var(--ink-900); }
.exam-result-filter.is-active { background: var(--white); color: var(--brand-600); box-shadow: var(--shadow-sm); }
.exam-result-filter span { min-width: 18px; padding: 1px 5px; border-radius: 999px; background: var(--ink-200); color: var(--ink-500); font-size: .57rem; }
.exam-results-table-wrap { border: 1px solid var(--ink-200); border-radius: var(--radius-md); }
.exam-results-table { margin: 0; }
.exam-results-table thead th { background: var(--ink-50); color: var(--ink-500); font-size: .63rem; }
.exam-results-table tbody tr[data-attempt-row]:hover { background: var(--brand-50); }
.exam-participant-cell { display: flex; min-width: 190px; align-items: center; gap: var(--space-2); }
.exam-participant-cell > span { display: flex; width: 34px; height: 34px; flex: 0 0 34px; align-items: center; justify-content: center; border-radius: 10px; background: var(--brand-100); color: var(--brand-700); font-size: .65rem; font-weight: 850; }
.exam-participant-cell > div { display: flex; min-width: 0; flex-direction: column; }
.exam-participant-cell strong { overflow: hidden; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.exam-participant-cell small { color: var(--ink-500); font-size: .61rem; }
.exam-activity { display: block; margin-top: 4px; font-size: .6rem; }
.exam-activity.is-live { color: var(--success-600); }
.exam-activity.is-stale { color: var(--danger-600); }
.exam-integrity-state { display: inline-flex; align-items: center; gap: 5px; max-width: 340px; padding: 5px 7px; border-radius: 8px; font-size: .66rem; font-weight: 700; }
.exam-integrity-state.is-clean { background: var(--success-100); color: var(--success-600); }
.exam-integrity-state.is-flagged { background: var(--warning-100); color: var(--warning-600); }
button.exam-integrity-state { border: 0; font-family: inherit; text-align: left; cursor: pointer; }
button.exam-integrity-state:hover { box-shadow: inset 0 0 0 1px rgba(217,119,6,.28); }
button.exam-integrity-state > span { display: flex; min-width: 0; flex-direction: column; }
button.exam-integrity-state > span > small { color: inherit; font-size: .56rem; font-weight: 650; opacity: .8; }
.exam-integrity-chevron { flex-shrink: 0; transition: transform .16s ease; }
button.exam-integrity-state[aria-expanded="true"] .exam-integrity-chevron { transform: rotate(180deg); }
.exam-integrity-detail-row > td { padding: 0 !important; border-top: 0; background: var(--ink-50); }
.exam-integrity-detail { margin: 0 var(--space-3) var(--space-3); padding: var(--space-4); border: 1px solid var(--warning-100); border-radius: var(--radius-md); background: linear-gradient(145deg, #fffbeb, var(--white) 35%); box-shadow: inset 3px 0 0 var(--warning-600); }
.exam-integrity-detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--ink-200); }
.exam-integrity-detail-heading > div { display: flex; flex-direction: column; }
.exam-integrity-detail-heading strong { font-size: .86rem; }
.exam-integrity-detail-heading small { color: var(--ink-500); font-size: .63rem; }
.exam-integrity-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.exam-integrity-detail-section { min-width: 0; padding: var(--space-3); border: 1px solid var(--ink-200); border-radius: 11px; background: rgba(255,255,255,.82); }
.exam-integrity-detail-section h4 { display: flex; align-items: center; gap: 6px; margin-bottom: var(--space-3); color: var(--ink-700); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; }
.exam-integrity-detail-section h4 svg { color: var(--brand-600); }
.exam-audit-item { position: relative; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: flex-start; gap: 8px; padding: 8px 0; border-top: 1px solid var(--ink-100); }
.exam-audit-item:first-of-type { padding-top: 0; border-top: 0; }
.exam-audit-item:last-child { padding-bottom: 0; }
.exam-audit-dot { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: var(--ink-300); }
.exam-audit-item.is-warning .exam-audit-dot { background: var(--warning-600); }
.exam-audit-item.is-critical .exam-audit-dot { background: var(--danger-600); box-shadow: 0 0 0 3px var(--danger-100); }
.exam-audit-item.is-info .exam-audit-dot { background: var(--info-600); }
.exam-audit-item.is-success .exam-audit-dot { background: var(--success-600); }
.exam-audit-item > div { display: flex; min-width: 0; flex-direction: column; }
.exam-audit-item > div > strong { color: var(--ink-700); font-size: .69rem; }
.exam-audit-item small { color: var(--ink-500); font-size: .6rem; line-height: 1.45; }
.exam-audit-item p { margin: 3px 0 0; color: var(--ink-700); font-size: .63rem; }
.exam-audit-item > .badge { align-self: start; font-size: .53rem; }
.exam-integrity-disclaimer { display: flex; align-items: center; gap: 6px; margin: var(--space-3) 0 0; color: var(--ink-500); font-size: .61rem; }
.exam-integrity-disclaimer svg { flex-shrink: 0; }
.exam-score-value { display: inline-flex; min-width: 64px; justify-content: center; padding: 6px 9px; border-radius: 9px; background: var(--ink-100); font-size: .86rem; font-variant-numeric: tabular-nums; }
.exam-score-value.is-good { background: var(--success-100); color: var(--success-600); }
.exam-score-value.is-low { background: var(--danger-100); color: var(--danger-600); }
.exam-score-value.is-empty { color: var(--ink-500); }
.exam-manual-answer-row { background: var(--ink-50); }
.exam-filter-empty { padding: var(--space-5); color: var(--ink-500); text-align: center; font-size: .78rem; }

@media (max-width: 1050px) {
  .exam-workspace-hero { flex-direction: column; }
  .exam-workspace-actions { max-width: none; justify-content: flex-start; }
  .exam-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-result-toolbar { grid-template-columns: 1fr; }
  .exam-result-filters { width: max-content; max-width: 100%; overflow-x: auto; }
}
@media (max-width: 700px) {
  .exam-workspace-hero { padding: var(--space-4); }
  .exam-overview-grid { grid-template-columns: 1fr; }
  .exam-section-nav { top: 64px; margin-left: 0; }
  .exam-package-summary { grid-template-columns: 38px minmax(0, 1fr) 18px; }
  .exam-package-summary-icon { width: 38px; height: 38px; }
  .exam-package-types, .exam-package-summary > .badge { grid-column: 2; justify-content: flex-start; justify-self: start; }
  .exam-package-chevron { grid-column: 3; grid-row: 1; }
  .exam-results-heading { flex-direction: column; }
  .exam-result-insights { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .exam-integrity-detail-grid { grid-template-columns: 1fr; }
}

/* Automatic gradebook — source-driven components and read-only derived scores. */
.gradebook-page-header { margin-bottom: var(--space-4); }
.gradebook-eyebrow { display: block; margin-bottom: 3px; color: var(--brand-600); font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.gradebook-automation-hero {
  display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4);
  margin-bottom: var(--space-5); padding: var(--space-4) var(--space-5); border: 1px solid var(--brand-100);
  border-radius: var(--radius-lg); background: linear-gradient(110deg, var(--brand-50), var(--white) 55%); box-shadow: var(--shadow-sm);
}
.gradebook-automation-icon { display: flex; width: 52px; height: 52px; align-items: center; justify-content: center; border-radius: 15px; background: var(--brand-600); color: white; box-shadow: 0 8px 18px rgba(79, 70, 229, .24); }
.gradebook-automation-copy h2 { margin: 0 0 2px; font-size: 1.05rem; }
.gradebook-automation-copy p { margin: 0; max-width: 700px; color: var(--ink-500); font-size: .79rem; }
.gradebook-automation-stats { display: flex; align-items: stretch; gap: 1px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--ink-200); }
.gradebook-automation-stats > div { display: flex; min-width: 96px; flex-direction: column; justify-content: center; padding: 9px 12px; background: var(--white); text-align: center; }
.gradebook-automation-stats strong { color: var(--ink-900); font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.gradebook-automation-stats span { color: var(--ink-500); font-size: .62rem; white-space: nowrap; }
.gradebook-automation-stats .is-weight strong { color: var(--success-600); }
.gradebook-excluded { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); padding: var(--space-3) var(--space-4); border: 1px dashed var(--ink-300); border-radius: var(--radius-md); background: var(--ink-50); }
.gradebook-excluded > div:first-child { display: flex; align-items: center; gap: var(--space-3); color: var(--ink-500); }
.gradebook-excluded > div:first-child > span { display: flex; flex-direction: column; }
.gradebook-excluded strong { color: var(--ink-700); font-size: .78rem; }
.gradebook-excluded small { font-size: .68rem; }
.gradebook-excluded-list { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.gradebook-empty .empty-state .icon { display: inline-flex; color: var(--brand-600); }
.gradebook-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-4); }
.gradebook-section-heading h3 { margin: 0 0 2px; }
.gradebook-section-heading p { margin: 0; color: var(--ink-500); font-size: .76rem; }
.gradebook-weight-action { display: flex; align-items: center; gap: var(--space-3); }
.gradebook-weight-action > span { color: var(--ink-500); font-size: .72rem; text-align: right; }
.gradebook-weight-action > span strong { display: block; color: var(--ink-900); font-size: 1rem; font-variant-numeric: tabular-nums; }
.gradebook-weight-action > span.is-exact strong { color: var(--success-600); }
.gradebook-weight-action > span.is-normalized strong { color: var(--warning-600); }
.gradebook-component-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.gradebook-component { --component-color: var(--brand-600); --component-soft: var(--brand-50); display: flex; min-width: 0; flex-direction: column; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: linear-gradient(135deg, var(--component-soft), var(--white) 52%); transition: border-color .15s ease, box-shadow .15s ease; }
.gradebook-component:hover { border-color: var(--component-color); box-shadow: var(--shadow-md); }
.gradebook-component-exam_regular { --component-color: var(--info-600); --component-soft: var(--info-100); }
.gradebook-component-pts { --component-color: var(--warning-600); --component-soft: #fff7ed; }
.gradebook-component-pas { --component-color: #9333ea; --component-soft: #f3e8ff; }
.gradebook-component-legacy { --component-color: var(--ink-500); --component-soft: var(--ink-100); }
.gradebook-component-top { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3); }
.gradebook-component-mark { display: flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; background: var(--component-color); color: white; font-size: .68rem; font-weight: 900; }
.gradebook-component-top h4 { margin: 0 0 2px; font-size: .9rem; }
.gradebook-component-top > div > span { display: block; overflow: hidden; color: var(--ink-500); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }
.gradebook-component-top > .badge { font-size: .58rem; }
.gradebook-source-list { display: flex; min-width: 0; align-items: center; gap: 6px; padding: 7px 9px; border-radius: 8px; background: rgba(255,255,255,.72); color: var(--ink-500); font-size: .67rem; }
.gradebook-source-list svg { flex-shrink: 0; color: var(--component-color); }
.gradebook-source-list span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gradebook-component-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding-top: var(--space-2); border-top: 1px solid var(--ink-200); }
.gradebook-component-bottom > label { display: grid; grid-template-columns: auto auto; align-items: center; gap: 3px 9px; color: var(--ink-500); font-size: .68rem; font-weight: 700; }
.gradebook-weight-input { display: flex; align-items: center; gap: 5px; }
.gradebook-weight-input input { width: 82px; height: 38px; font-size: .9rem; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.gradebook-weight-input strong { color: var(--ink-500); }
.gradebook-component-bottom label > small { grid-column: 2; min-height: 14px; color: var(--warning-600); font-size: .62rem; font-weight: 700; }
.gradebook-matrix-card { overflow: hidden; }
.gradebook-table-wrap { border: 1px solid var(--ink-200); border-radius: var(--radius-md); }
.gradebook-table { margin: 0; }
.gradebook-table thead th { vertical-align: bottom; background: var(--ink-50); }
.gradebook-table thead th > span { display: block; color: var(--ink-700); font-size: .7rem; white-space: nowrap; }
.gradebook-table thead th > small { display: block; margin-top: 2px; color: var(--ink-500); font-size: .58rem; font-weight: 600; white-space: nowrap; }
.gradebook-table .gradebook-student-column { min-width: 220px; }
.gradebook-table tbody td:not(:first-child) { text-align: center; }
.gradebook-student { display: flex; align-items: center; gap: var(--space-2); }
.gradebook-student > span { display: flex; width: 34px; height: 34px; flex-shrink: 0; align-items: center; justify-content: center; border-radius: 10px; background: var(--brand-100); color: var(--brand-700); font-size: .67rem; font-weight: 800; }
.gradebook-student > div { display: flex; min-width: 0; flex-direction: column; }
.gradebook-student strong { overflow: hidden; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.gradebook-student small { color: var(--ink-500); font-size: .63rem; }
.gradebook-score { display: inline-flex; min-width: 58px; justify-content: center; padding: 5px 8px; border-radius: 8px; background: var(--ink-100); color: var(--ink-700); font-size: .78rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.gradebook-score.is-good { background: var(--success-100); color: var(--success-600); }
.gradebook-score.is-low { background: var(--danger-100); color: var(--danger-600); }
.gradebook-score.is-empty { color: var(--ink-500); }
.gradebook-final { font-size: .96rem; font-variant-numeric: tabular-nums; }
.gradebook-final.is-good { color: var(--success-600); }
.gradebook-final.is-low { color: var(--danger-600); }
.gradebook-final.is-running { color: var(--ink-500); }

@media (max-width: 950px) {
  .gradebook-automation-hero { grid-template-columns: 52px minmax(0, 1fr); }
  .gradebook-automation-stats { grid-column: 1 / -1; }
  .gradebook-automation-stats > div { flex: 1; }
}
@media (max-width: 700px) {
  .gradebook-excluded, .gradebook-section-heading { align-items: stretch; flex-direction: column; }
  .gradebook-excluded-list { justify-content: flex-start; }
  .gradebook-weight-action { justify-content: space-between; }
  .gradebook-component-grid { grid-template-columns: 1fr; }
  .gradebook-component-top { grid-template-columns: 38px minmax(0, 1fr); }
  .gradebook-component-mark { width: 38px; height: 38px; }
  .gradebook-component-top > .badge { grid-column: 2; justify-self: start; }
}

/* Modern question picker: type is visible before a teacher attaches a question. */
.question-picker-title { align-items: flex-start; gap: var(--space-4); }
.question-picker-title h3 { margin-bottom: 3px; }
.question-picker-title p { margin: 0; color: var(--ink-500); font-size: .82rem; }
.question-picker-actions { display: flex; align-items: center; gap: var(--space-2); flex-shrink: 0; }
.question-picker-toolbar {
  display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: var(--space-3); align-items: center;
  margin-bottom: var(--space-4); padding: var(--space-3); border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--ink-50);
}
.question-picker-search input { width: 100%; min-height: 40px; background: var(--white); }
.question-picker-filters { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--ink-100); }
.question-picker-filter {
  min-height: 34px; padding: 5px 9px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-500); font: inherit; font-size: .72rem; font-weight: 700; white-space: nowrap; cursor: pointer;
}
.question-picker-filter:hover { color: var(--ink-900); }
.question-picker-filter.is-active { color: var(--brand-700); background: var(--white); box-shadow: var(--shadow-sm); }
.question-picker-filter > span { display: inline-flex; min-width: 18px; justify-content: center; margin-left: 3px; color: inherit; font-size: .65rem; }
.question-picker-bank { margin-top: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); overflow: hidden; }
.question-picker-bank[hidden], .question-picker-item[hidden], .question-picker-no-results[hidden] { display: none !important; }
.question-picker-bank-heading {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--ink-200); background: linear-gradient(90deg, var(--brand-50), var(--white));
}
.question-picker-bank-heading > div { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.question-picker-bank-heading h4 { overflow: hidden; margin: 0; font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
.question-picker-bank-heading > span { color: var(--ink-500); font-size: .72rem; white-space: nowrap; }
.question-picker-bank-icon { display: inline-flex; padding: 6px; border-radius: 8px; background: var(--brand-100); color: var(--brand-700); }
.question-picker-bank-empty { margin: 0; padding: var(--space-4); color: var(--ink-500); font-size: .82rem; }
.question-picker-list { display: flex; flex-direction: column; }
.question-picker-item {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  min-width: 0; padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--ink-100);
  background: var(--white); color: inherit; cursor: pointer; transition: background .15s ease, box-shadow .15s ease;
}
.question-picker-item:last-child { border-bottom: 0; }
.question-picker-item:not(.is-attached):hover { background: var(--brand-50); }
.question-picker-item.is-selected { background: var(--brand-50); box-shadow: inset 3px 0 var(--brand-600); }
.question-picker-item.is-attached { background: var(--ink-50); cursor: default; }
.question-picker-check { display: flex; align-items: center; justify-content: center; }
.question-picker-check input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.question-picker-check input + span {
  display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center;
  border: 1.5px solid var(--ink-300); border-radius: 6px; background: var(--white); transition: all .15s ease;
}
.question-picker-check input:focus-visible + span { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.question-picker-check input:checked + span { border-color: var(--brand-600); background: var(--brand-600); }
.question-picker-check input:checked + span::after { content: ''; width: 8px; height: 4px; border-bottom: 2px solid white; border-left: 2px solid white; transform: translateY(-1px) rotate(-45deg); }
.question-picker-sequence { color: var(--ink-300); font-size: .7rem; font-weight: 800; }
.question-picker-content { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.question-picker-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.question-picker-stem { color: var(--ink-900); font-size: .84rem; line-height: 1.45; }
.question-type-badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border-radius: 999px;
  font-size: .67rem; font-weight: 800; letter-spacing: .01em; white-space: nowrap;
}
.question-type-badge > span { display: inline-flex; min-width: 24px; height: 20px; align-items: center; justify-content: center; border-radius: 999px; color: white; font-size: .58rem; letter-spacing: .02em; }
.question-type-mcq { color: var(--brand-700); background: var(--brand-50); }
.question-type-mcq > span { background: var(--brand-600); }
.question-type-short_answer { color: var(--info-600); background: var(--info-100); }
.question-type-short_answer > span { background: var(--info-600); }
.question-type-essay { color: #7e22ce; background: #f3e8ff; }
.question-type-essay > span { background: #9333ea; }
.question-difficulty, .question-has-image { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-500); font-size: .67rem; font-weight: 700; }
.question-difficulty::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-300); }
.question-difficulty-mudah::before { background: var(--success-600); }
.question-difficulty-sedang::before { background: var(--warning-600); }
.question-difficulty-sulit::before { background: var(--danger-600); }
.question-has-image svg { color: var(--info-600); }
.question-picker-state { min-width: 104px; color: var(--ink-500); font-size: .7rem; font-weight: 700; text-align: right; white-space: nowrap; }
.question-picker-item.is-selected .question-picker-state { color: var(--brand-700); }
.question-picker-no-results { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: var(--space-4); padding: var(--space-6); border: 1px dashed var(--ink-300); border-radius: var(--radius-md); color: var(--ink-500); font-size: .8rem; }
.question-picker-no-results strong { color: var(--ink-700); font-size: .9rem; }

@media (max-width: 1000px) {
  .question-picker-toolbar { grid-template-columns: 1fr; }
  .question-picker-filters { overflow-x: auto; }
}
@media (max-width: 700px) {
  .question-picker-title { flex-direction: column; }
  .question-picker-actions { width: 100%; }
  .question-picker-actions .btn { flex: 1; }
  .question-picker-filter { flex: 1; }
  .question-picker-item { grid-template-columns: 24px minmax(0, 1fr); padding: var(--space-3); }
  .question-picker-state { grid-column: 2; min-width: 0; text-align: left; }
}

/* Bulk grading workspace — built for checking a full class without page reloads. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.quiz-grading { scroll-margin-top: 88px; overflow: visible; }
.quiz-grading-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-5);
  margin-bottom: var(--space-3);
}
.quiz-grading-heading h3 { margin-bottom: 3px; font-size: 1.25rem; }
.quiz-grading-heading p { margin: 0; font-size: .875rem; }
.quiz-grading-eyebrow {
  display: block; margin-bottom: 3px; color: var(--brand-600); font-size: .7rem;
  font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
}
.quiz-grading-progress-summary { display: flex; align-items: baseline; gap: 7px; white-space: nowrap; color: var(--ink-500); font-size: .78rem; }
.quiz-grading-progress-summary strong { color: var(--ink-900); font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.quiz-grading-progress { height: 7px; margin-bottom: var(--space-4); overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.quiz-grading-progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), var(--success-600)); transition: width .25s ease; }

.quiz-grading-toolbar {
  position: sticky; top: 69px; z-index: 8;
  display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: var(--space-3);
  margin: 0 calc(var(--space-5) * -1) var(--space-4); padding: var(--space-3) var(--space-5);
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200);
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05); backdrop-filter: blur(10px);
}
.quiz-grading-search input { width: 100%; min-height: 40px; padding-left: var(--space-3); background: var(--ink-50); }
.quiz-grading-filters { display: flex; padding: 3px; border-radius: 10px; background: var(--ink-100); }
.quiz-grading-filter {
  min-height: 34px; padding: 5px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-500); font: inherit; font-size: .76rem; font-weight: 700; cursor: pointer;
}
.quiz-grading-filter:hover { color: var(--ink-900); }
.quiz-grading-filter.is-active { color: var(--brand-700); background: var(--white); box-shadow: var(--shadow-sm); }
.quiz-grading-filter span { display: inline-flex; min-width: 19px; justify-content: center; margin-left: 3px; padding: 1px 5px; border-radius: 999px; background: var(--warning-100); color: var(--warning-600); }
.quiz-grading-save-group { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.quiz-grading-save-state { max-width: 170px; color: var(--ink-500); font-size: .74rem; text-align: right; line-height: 1.3; }
.quiz-grading-save-state.is-dirty { color: var(--warning-600); font-weight: 700; }
.quiz-grading-save-state.is-saving { color: var(--info-600); }
.quiz-grading-save-state.is-success { color: var(--success-600); font-weight: 700; }
.quiz-grading-save-state.is-error { color: var(--danger-600); font-weight: 700; }
.quiz-grading-save-group .btn { white-space: nowrap; }

.quiz-grading-students { display: flex; flex-direction: column; gap: var(--space-4); }
.quiz-grading-student {
  overflow: hidden; border: 1px solid var(--ink-200); border-radius: var(--radius-lg);
  background: var(--white); box-shadow: var(--shadow-sm);
}
.quiz-grading-student-header {
  display: grid; grid-template-columns: 28px 42px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--ink-200); background: linear-gradient(90deg, var(--brand-50), var(--white) 42%);
}
.quiz-grading-student-number { color: var(--ink-300); font-size: .76rem; font-weight: 800; text-align: center; }
.quiz-grading-avatar {
  display: flex; width: 42px; height: 42px; align-items: center; justify-content: center;
  border: 1px solid var(--brand-100); border-radius: 12px; background: var(--brand-100); color: var(--brand-700); font-size: .8rem; font-weight: 800;
}
.quiz-grading-student-identity { min-width: 0; }
.quiz-grading-student-identity h4 { overflow: hidden; margin: 0 0 1px; font-size: .95rem; text-overflow: ellipsis; white-space: nowrap; }
.quiz-grading-student-identity span { color: var(--ink-500); font-size: .74rem; }
.quiz-grading-student-result { display: flex; align-items: center; gap: var(--space-3); }
.quiz-grading-current-score { color: var(--ink-500); font-size: .72rem; white-space: nowrap; }
.quiz-grading-current-score strong { margin-left: 3px; color: var(--ink-900); font-size: .9rem; font-variant-numeric: tabular-nums; }

.quiz-grading-answer { display: grid; grid-template-columns: minmax(0, 1fr) 178px; transition: background .2s ease, box-shadow .2s ease; }
.quiz-grading-answer + .quiz-grading-answer { border-top: 1px solid var(--ink-100); }
.quiz-grading-answer[hidden], .quiz-grading-student[hidden], .quiz-grading-empty[hidden] { display: none !important; }
.quiz-grading-answer.is-dirty { background: #fffbeb; box-shadow: inset 3px 0 var(--warning-600); }
.quiz-grading-answer.is-just-saved { background: var(--success-100); }
.quiz-grading-question { min-width: 0; padding: var(--space-4); }
.quiz-grading-question-meta { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-2); color: var(--ink-500); font-size: .7rem; font-weight: 700; }
.quiz-grading-stem { margin-bottom: var(--space-3); color: var(--ink-700); font-size: .82rem; line-height: 1.55; }
.quiz-grading-response { padding: var(--space-3); border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--ink-50); }
.quiz-grading-response > span { display: block; margin-bottom: 4px; color: var(--ink-500); font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.quiz-grading-response p { margin: 0; color: var(--ink-900); font-size: .9rem; line-height: 1.55; white-space: pre-line; }
.quiz-grading-response.is-empty p { color: var(--ink-500); font-style: italic; }
.quiz-grading-score-panel { display: flex; flex-direction: column; justify-content: center; padding: var(--space-4); border-left: 1px solid var(--ink-100); background: rgba(248, 250, 252, .65); }
.quiz-grading-score-owner { overflow: hidden; margin-bottom: var(--space-2); color: var(--brand-700); font-size: .68rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.quiz-grading-score-panel > label { margin-bottom: 5px; color: var(--ink-700); font-size: .72rem; font-weight: 800; }
.quiz-grading-score-input { display: flex; align-items: center; gap: 7px; }
.quiz-grading-score-input input { width: 88px; height: 42px; font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; text-align: center; }
.quiz-grading-score-input span { color: var(--ink-500); font-size: .74rem; }
.quiz-grading-quick { display: flex; gap: 4px; margin-top: 7px; }
.quiz-grading-quick button {
  flex: 1; min-height: 28px; padding: 3px 6px; border: 1px solid var(--ink-200); border-radius: 7px;
  background: var(--white); color: var(--ink-700); font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer;
}
.quiz-grading-quick button:hover { border-color: var(--brand-500); color: var(--brand-700); background: var(--brand-50); }
.quiz-grading-row-state { margin-top: 7px; color: var(--ink-500); font-size: .65rem; }
.quiz-grading-answer.is-dirty .quiz-grading-row-state { color: var(--warning-600); font-weight: 700; }
.quiz-grading-empty { padding: var(--space-6); border: 1px dashed var(--ink-300); border-radius: var(--radius-md); color: var(--ink-500); text-align: center; font-size: .85rem; }
.quiz-grading-footnote { display: flex; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-4); color: var(--ink-500); font-size: .7rem; }
.quiz-grading-footnote kbd { padding: 1px 5px; border: 1px solid var(--ink-300); border-bottom-width: 2px; border-radius: 5px; background: var(--white); color: var(--ink-700); font-family: inherit; font-size: .65rem; }

@media (max-width: 1100px) {
  .quiz-grading-toolbar { grid-template-columns: minmax(220px, 1fr) auto; }
  .quiz-grading-save-group { grid-column: 1 / -1; justify-content: space-between; }
  .quiz-grading-save-state { max-width: none; text-align: left; }
}
@media (max-width: 700px) {
  .quiz-grading-heading { flex-direction: column; gap: var(--space-2); }
  .quiz-grading-toolbar { position: static; grid-template-columns: 1fr; margin-right: calc(var(--space-4) * -1); margin-left: calc(var(--space-4) * -1); padding: var(--space-3) var(--space-4); }
  .quiz-grading-filters { overflow-x: auto; }
  .quiz-grading-filter { flex: 1; white-space: nowrap; }
  .quiz-grading-save-group { grid-column: auto; }
  .quiz-grading-student-header { grid-template-columns: 24px 38px minmax(0, 1fr); }
  .quiz-grading-avatar { width: 38px; height: 38px; }
  .quiz-grading-student-result { grid-column: 2 / -1; justify-content: space-between; }
  .quiz-grading-answer { grid-template-columns: 1fr; }
  .quiz-grading-score-panel { border-top: 1px solid var(--ink-100); border-left: 0; }
  .quiz-grading-score-input input { width: 110px; }
  .quiz-grading-footnote { flex-direction: column; }
}

/* Layar sempit: kode dibesarkan sampai hampir selebar layar, karena jarak pindai
   di gerbang sering lebih jauh dari jarak baca. */
@media (max-width: 420px) {
  .qrs { padding: var(--space-2); }
  .qrs-box { padding: var(--space-3) 10px; box-shadow: none; }
  .qrs-school { margin-bottom: var(--space-2); }
  .qrs-id { margin-top: var(--space-2); }
  .qrs-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: var(--space-3); }
  .qrs-actions > a:only-of-type { grid-column: 1 / -1; }
  .qrs-actions .btn { padding-inline: var(--space-2); }
}

/* ---------------------------------------------------------------- course workspace
   Kelas Digital is an operational queue for teachers and students, not a passive
   catalogue. The cw namespace keeps this denser, priority-led UI isolated from the
   legacy course detail components. */
.cw { display: grid; gap: var(--space-4); }
.cw-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5);
  padding: clamp(24px, 3vw, 38px); border: 1px solid rgba(199, 210, 254, .75);
  border-radius: 22px; background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(238,242,255,.9));
  box-shadow: 0 12px 34px rgba(79, 70, 229, .07);
}
.cw-hero::after {
  content: ''; position: absolute; z-index: -1; width: 300px; height: 300px; right: -105px; top: -175px;
  border-radius: 50%; background: radial-gradient(circle, rgba(99,102,241,.22), rgba(99,102,241,0) 70%);
}
.cw-hero-copy { min-width: 0; }
.cw-eyebrow { display: block; margin-bottom: 5px; color: var(--brand-600); font-size: .67rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.cw-hero h1 { margin-bottom: 7px; font-size: clamp(1.65rem, 2.4vw, 2.15rem); letter-spacing: -.035em; }
.cw-hero p { max-width: 770px; margin: 0; color: var(--ink-500); font-size: .92rem; line-height: 1.55; }
.cw-hero-context { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-4); }
.cw-hero-context span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid rgba(199,210,254,.6); border-radius: 9px; color: var(--ink-700); background: rgba(255,255,255,.76); font-size: .7rem; font-weight: 700; }
.cw-hero-art { flex: 0 0 76px; width: 76px; height: 76px; display: inline-flex; align-items: center; justify-content: center; border-radius: 22px; color: var(--white); background: linear-gradient(145deg, var(--brand-600), #7c3aed); box-shadow: 0 16px 34px rgba(79,70,229,.22); transform: rotate(3deg); }

.cw-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.cw-metric { position: relative; overflow: hidden; min-height: 116px; display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: 17px; background: var(--white); box-shadow: var(--shadow-sm); }
.cw-metric::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--brand-500); }
.cw-metric-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: var(--brand-700); background: var(--brand-100); }
.cw-metric div > span, .cw-metric div > strong, .cw-metric div > small { display: block; }
.cw-metric div > span { color: var(--ink-500); font-size: .66rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; }
.cw-metric div > strong { margin: 1px 0; color: var(--ink-900); font-size: 1.45rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cw-metric div > small { color: var(--ink-500); font-size: .65rem; line-height: 1.35; }
.cw-metric.is-success::before { background: var(--success-600); }
.cw-metric.is-success .cw-metric-icon { color: var(--success-600); background: var(--success-100); }
.cw-metric.is-warning::before { background: var(--warning-600); }
.cw-metric.is-warning .cw-metric-icon { color: var(--warning-600); background: var(--warning-100); }
.cw-metric.is-danger::before { background: var(--danger-600); }
.cw-metric.is-danger .cw-metric-icon { color: var(--danger-600); background: var(--danger-100); }
.cw-metric.is-info::before { background: var(--info-600); }
.cw-metric.is-info .cw-metric-icon { color: var(--info-600); background: var(--info-100); }

.cw-priority { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; align-items: center; gap: var(--space-3); padding: 13px 15px; border: 1px solid #fde68a; border-radius: 15px; background: linear-gradient(100deg, #fffbeb, var(--white)); }
.cw-priority.has-alert { border-color: #fecaca; background: linear-gradient(100deg, #fff7ed, var(--white)); }
.cw-priority-icon { width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--warning-600); background: var(--warning-100); }
.cw-priority.has-alert .cw-priority-icon { color: var(--danger-600); background: var(--danger-100); }
.cw-priority strong { display: block; margin-bottom: 3px; color: var(--ink-900); font-size: .82rem; }
.cw-priority p { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; color: var(--ink-500); font-size: .7rem; }
.cw-priority p span { position: relative; }
.cw-priority p span + span::before { content: '·'; position: absolute; left: -9px; }

.cw-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--ink-200); border-radius: 16px; background: var(--white); box-shadow: var(--shadow-sm); }
.cw-search { position: relative; min-width: 0; display: flex; align-items: center; }
.cw-search > span:first-child { position: absolute; left: 13px; z-index: 1; color: var(--ink-400, var(--ink-500)); font-size: 1.25rem; line-height: 1; }
.cw-search input { width: 100%; height: 44px; padding-left: 40px; background: var(--ink-50); }
.cw-filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.cw-filters button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 10px; border: 1px solid transparent; border-radius: 999px; color: var(--ink-600); background: var(--ink-100); font: inherit; font-size: .7rem; font-weight: 750; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.cw-filters button:hover { color: var(--brand-700); border-color: var(--brand-200); background: var(--brand-50); }
.cw-filters button.is-active { color: var(--white); border-color: var(--brand-600); background: var(--brand-600); }
.cw-filters button span { display: inline-flex; min-width: 20px; height: 20px; align-items: center; justify-content: center; padding: 0 5px; border-radius: 999px; background: rgba(255,255,255,.65); color: var(--ink-700); font-size: .62rem; }
.cw-result-count { align-self: center; justify-self: end; color: var(--ink-500); font-size: .67rem; white-space: nowrap; }

.cw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: var(--space-4); align-items: start; }
.cw-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-width: 0; padding: var(--space-5); border: 1px solid var(--ink-200); border-radius: 19px; background: var(--white); box-shadow: var(--shadow-sm); transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease; }
.cw-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, var(--brand-500), var(--brand-300)); }
.cw-card.is-warning::before { background: linear-gradient(90deg, var(--warning-600), #fbbf24); }
.cw-card.is-danger::before { background: linear-gradient(90deg, var(--danger-600), #fb923c); }
.cw-card.is-ready::before { background: linear-gradient(90deg, var(--success-600), #4ade80); }
.cw-card:hover { transform: translateY(-2px); border-color: var(--brand-200); box-shadow: var(--shadow-md); }
.cw-card[hidden] { display: none !important; }
.cw-card-head { display: grid; grid-template-columns: 48px minmax(0,1fr) auto; align-items: start; gap: var(--space-3); }
.cw-subject-icon { width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; color: var(--brand-700); background: linear-gradient(145deg, var(--brand-100), #f5f3ff); font-size: 1.15rem; font-weight: 850; }
.cw-class-label { display: block; margin-bottom: 1px; color: var(--brand-600); font-size: .62rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.cw-card-identity { min-width: 0; }
.cw-card-identity h2 { overflow: hidden; margin: 0; color: var(--ink-900); font-size: 1rem; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.cw-card-identity p { overflow: hidden; margin: 2px 0 0; color: var(--ink-500); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.cw-status { display: inline-flex; align-items: center; justify-content: center; padding: 5px 8px; border-radius: 999px; color: var(--ink-600); background: var(--ink-100); font-size: .59rem; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; white-space: nowrap; }
.cw-status.is-published { color: var(--success-600); background: var(--success-100); }
.cw-status.is-draft, .cw-status.is-review, .cw-status.is-preparing { color: var(--warning-600); background: var(--warning-100); }
.cw-status.is-archived { color: var(--ink-500); background: var(--ink-100); }

.cw-schedule { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 9px; margin-top: var(--space-4); padding: 10px 11px; border: 1px solid var(--ink-100); border-radius: 11px; background: var(--ink-50); }
.cw-schedule > span { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; color: var(--brand-600); background: var(--brand-100); }
.cw-schedule strong, .cw-schedule div > span { display: block; }
.cw-schedule strong { margin-bottom: 2px; color: var(--ink-700); font-size: .67rem; }
.cw-schedule div > span { color: var(--ink-500); font-size: .68rem; line-height: 1.45; overflow-wrap: anywhere; }
.cw-schedule.has-alert { border-color: #fecaca; background: #fff7ed; }
.cw-schedule.has-alert > span { color: var(--danger-600); background: var(--danger-100); }
.cw-schedule.has-alert strong { color: var(--danger-600); }

.cw-readiness { margin-top: var(--space-4); }
.cw-readiness > div { display: flex; justify-content: space-between; gap: var(--space-3); margin-bottom: 6px; color: var(--ink-500); font-size: .68rem; }
.cw-readiness > div strong { color: var(--ink-900); font-size: .72rem; font-variant-numeric: tabular-nums; }
.cw-progress { height: 7px; display: block; overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.cw-progress i { display: block; width: var(--cw-progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), #8b5cf6); transition: width .3s ease; }
.cw-readiness > small { display: block; margin-top: 5px; color: var(--ink-500); font-size: .61rem; line-height: 1.35; }
.cw-readiness.is-student .cw-progress i { background: linear-gradient(90deg, var(--info-600), var(--brand-500)); }

.cw-resources { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: var(--space-4); }
.cw-resources > a, .cw-resources > span { min-width: 0; display: grid; grid-template-columns: 28px minmax(0,1fr); align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--ink-100); border-radius: 10px; color: var(--ink-700); background: var(--ink-50); text-decoration: none; }
.cw-resources > a:hover { border-color: var(--brand-200); color: var(--brand-700); background: var(--brand-50); }
.cw-resources > a > span, .cw-resources > span > b { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--brand-600); background: var(--brand-100); font-weight: inherit; }
.cw-resources strong, .cw-resources small { display: block; }
.cw-resources strong { color: inherit; font-size: .8rem; line-height: 1; }
.cw-resources small { margin-top: 2px; color: var(--ink-500); font-size: .58rem; }
.cw-card-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: var(--space-3); color: var(--ink-500); font-size: .65rem; }
.cw-card-meta span { display: inline-flex; align-items: center; gap: 5px; }

.cw-card-alert, .cw-card-note { display: flex; align-items: center; gap: 9px; margin-top: var(--space-3); padding: 9px 10px; border: 1px solid #fde68a; border-radius: 10px; color: var(--warning-600); background: #fffbeb; font-size: .66rem; text-decoration: none; }
.cw-card-alert:hover { color: var(--warning-600); border-color: #fbbf24; text-decoration: none; }
.cw-card-alert > svg, .cw-card-note > svg { flex: 0 0 auto; }
.cw-card-alert > span { min-width: 0; flex: 1; }
.cw-card-alert strong, .cw-card-alert small { display: block; }
.cw-card-alert strong { color: var(--warning-600); font-size: .68rem; }
.cw-card-alert small { margin-top: 1px; color: var(--ink-500); font-size: .61rem; }
.cw-card-alert b { font-size: 1rem; }
.cw-card-alert.is-danger { color: var(--danger-600); border-color: #fecaca; background: #fff7ed; }
.cw-card-alert.is-danger strong { color: var(--danger-600); }
.cw-card-note.is-action { color: var(--brand-700); border-color: var(--brand-200); background: var(--brand-50); }
.cw-card-note.is-clear { color: var(--success-600); border-color: #bbf7d0; background: var(--success-100); }
.cw-card-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: auto; padding-top: var(--space-4); }
.cw-card-footer .btn { width: 100%; justify-content: center; }
.cw-card-footer small { color: var(--ink-500); font-size: .63rem; }

.cw-empty, .cw-filter-empty { min-height: 180px; display: flex; align-items: center; justify-content: center; gap: var(--space-3); padding: var(--space-6); border: 1px dashed var(--ink-300); border-radius: 18px; color: var(--ink-400, var(--ink-500)); background: var(--ink-50); }
.cw-empty > span { width: 54px; height: 54px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; color: var(--brand-600); background: var(--brand-100); }
.cw-empty strong, .cw-filter-empty strong, .cw-filter-empty span { display: block; }
.cw-empty p { max-width: 620px; margin: 3px 0 0; color: var(--ink-500); font-size: .76rem; }
.cw-filter-empty { min-height: 140px; flex-direction: column; gap: 5px; text-align: center; }
.cw-filter-empty span { color: var(--ink-500); font-size: .72rem; }

@media (max-width: 1100px) {
  .cw-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .cw-hero { align-items: flex-start; padding: var(--space-5); }
  .cw-hero-art { flex-basis: 54px; width: 54px; height: 54px; border-radius: 16px; }
  .cw-hero-art svg { width: 28px; height: 28px; }
  .cw-priority { grid-template-columns: 38px minmax(0,1fr); }
  .cw-priority-icon { width: 38px; height: 38px; }
  .cw-priority .btn { grid-column: 2; justify-self: start; }
  .cw-toolbar { grid-template-columns: 1fr; }
  .cw-result-count { grid-row: 2; justify-self: start; }
  .cw-filters { grid-column: auto; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: thin; }
  .cw-filters button { flex: 0 0 auto; }
}
@media (max-width: 520px) {
  .cw { gap: var(--space-3); }
  .cw-hero { border-radius: 17px; }
  .cw-hero-art { display: none; }
  .cw-metrics { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cw-metric { min-height: 102px; grid-template-columns: 34px minmax(0,1fr); gap: 8px; padding: 11px; border-radius: 13px; }
  .cw-metric-icon { width: 34px; height: 34px; border-radius: 10px; }
  .cw-metric-icon svg { width: 17px; height: 17px; }
  .cw-metric div > span { font-size: .57rem; }
  .cw-metric div > strong { font-size: 1.18rem; }
  .cw-metric div > small { display: none; }
  .cw-priority { padding: 11px; }
  .cw-priority p span + span::before { display: none; }
  .cw-card { padding: var(--space-4); border-radius: 16px; }
  .cw-card-head { grid-template-columns: 42px minmax(0,1fr); }
  .cw-subject-icon { width: 42px; height: 42px; }
  .cw-status { grid-column: 2; justify-self: start; margin-top: 2px; }
  .cw-resources { gap: 5px; }
  .cw-resources > a, .cw-resources > span { grid-template-columns: 1fr; justify-items: center; gap: 4px; padding: 7px 4px; text-align: center; }
}

/* ---------------------------------------------------------------- Profil Saya
   One hero that answers "who is this" (photo, name, class, ID numbers, how complete
   the data is), quick actions a student actually needs at the gate, then tabs so
   the long forms stop stacking into one endless page. */
.pf-hero {
  position: relative; overflow: hidden;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 20px;
  box-shadow: var(--shadow-sm); margin-bottom: var(--space-4);
}
.pf-hero-cover {
  height: 112px;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.22) 0%, transparent 55%),
    radial-gradient(80% 120% at 0% 100%, rgba(165,180,252,.45) 0%, transparent 60%),
    linear-gradient(120deg, var(--brand-700) 0%, var(--brand-600) 45%, #7c3aed 100%);
}
.pf-hero-main {
  display: grid; grid-template-columns: auto 1fr auto; align-items: start; gap: var(--space-5);
  padding: 0 var(--space-6) var(--space-5); margin-top: -52px;
}
.pf-avatar { position: relative; width: 116px; height: 116px; margin: 0; }
.pf-avatar-img {
  width: 116px; height: 116px; border-radius: 50%; object-fit: cover; display: block;
  border: 5px solid var(--white); box-shadow: 0 10px 28px rgba(15,23,42,.18); background: var(--white);
}
.pf-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-100), #ede9fe); color: var(--brand-700);
  font-size: 2.8rem; font-weight: 800; letter-spacing: -0.03em;
}
.pf-avatar-edit {
  position: absolute; right: 4px; bottom: 6px; width: 36px; height: 36px; margin: 0;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--brand-600); color: #fff; border: 3px solid var(--white); cursor: pointer;
  box-shadow: 0 4px 12px rgba(79,70,229,.35); transition: transform .15s ease, background .15s ease;
}
.pf-avatar-edit:hover { background: var(--brand-700); transform: scale(1.06); }
.pf-avatar-edit:focus-within, .pf-avatar-edit:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; }
/* The avatar overlaps the cover; the text starts below it so a long name never
   runs across the gradient edge. */
.pf-identity { min-width: 0; padding-top: 64px; }
.pf-name { margin: 0; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.025em; color: var(--ink-900); overflow-wrap: anywhere; }
.pf-subtitle { margin: 4px 0 0; color: var(--ink-500); font-size: 0.92rem; font-weight: 500; }
.pf-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-3); }
.pf-tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 4px;
  border-radius: 999px; background: var(--ink-50); border: 1px solid var(--ink-200);
  font-size: 0.82rem; font-weight: 700; color: var(--ink-900); font-variant-numeric: tabular-nums;
}
.pf-tag > span {
  padding: 2px 7px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700);
  font-size: 0.66rem; letter-spacing: .06em;
}
.pf-link-danger {
  display: inline-flex; align-items: center; gap: 4px; margin-top: var(--space-2);
  border: 0; background: none; padding: 0; color: var(--danger-600); font-size: 0.8rem; font-weight: 600; cursor: pointer;
}
.pf-link-danger:hover { text-decoration: underline; }

.pf-meter {
  display: flex; align-items: center; gap: var(--space-3); padding: 10px 16px 10px 10px; margin-top: 66px;
  border-radius: 16px; background: var(--ink-50); border: 1px solid var(--ink-200);
  text-decoration: none; color: inherit; transition: border-color .15s ease, background .15s ease;
}
.pf-meter:hover { border-color: var(--brand-300); background: var(--brand-25); }
.pf-meter-ring {
  --c: var(--warning-600);
  width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--ink-200) 0);
}
.pf-meter[style*="--pct: 100"] .pf-meter-ring { --c: var(--success-600); }
.pf-meter-ring > span {
  width: 40px; height: 40px; border-radius: 50%; background: var(--white);
  display: grid; place-items: center; font-size: 0.74rem; font-weight: 800; color: var(--ink-900);
}
.pf-meter-text { display: flex; flex-direction: column; line-height: 1.25; }
.pf-meter-text strong { font-size: 0.88rem; color: var(--ink-900); }
.pf-meter-text small { font-size: 0.76rem; color: var(--ink-500); }

.pf-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-3);
  padding: var(--space-4) var(--space-6) var(--space-5); border-top: 1px solid var(--ink-100);
}
.pf-action {
  display: flex; align-items: center; gap: var(--space-3); padding: 12px 14px;
  border-radius: 14px; border: 1px solid var(--ink-200); background: var(--white);
  text-decoration: none; color: var(--ink-900); min-height: 60px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pf-action:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--brand-300); }
.pf-action > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pf-action strong { font-size: 0.92rem; }
.pf-action small { font-size: 0.76rem; color: var(--ink-500); }
.pf-action-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600);
}
.pf-action-primary { background: linear-gradient(135deg, var(--brand-600), #7c3aed); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.25); }
.pf-action-primary small { color: rgba(255,255,255,.8); }
.pf-action-primary .pf-action-icon { background: rgba(255,255,255,.18); color: #fff; }
.pf-action-primary:hover { border-color: transparent; box-shadow: 0 10px 24px rgba(79,70,229,.32); }

.pf-tabs {
  display: flex; gap: 4px; padding: 5px; margin-bottom: var(--space-4);
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 16px;
  box-shadow: var(--shadow-xs); scroll-margin-top: 80px;
}
.pf-tab {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 12px; border-radius: 12px; min-height: 44px;
  color: var(--ink-500); font-weight: 700; font-size: 0.88rem; text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.pf-tab, .pf-tab:hover, .pf-tab:focus, .pf-action, .pf-action:hover, .pf-meter:hover { text-decoration: none; }
.pf-tab:hover { color: var(--ink-900); background: var(--ink-50); }
.pf-tab.is-active { background: var(--brand-600); color: #fff; box-shadow: 0 6px 16px rgba(79,70,229,.25); }
.pf-tab:focus-visible { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.pf-tab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warning-600); box-shadow: 0 0 0 2px var(--white); }
.pf-tab.is-active .pf-tab-dot { box-shadow: 0 0 0 2px var(--brand-600); }
/* Before the script runs (or without it) every panel stacks, so the tab bar is
   only shown once it can actually switch something. */
html:not(.pf-tabs-ready) .pf-tabs { display: none; }
.pf-panel { margin-bottom: var(--space-5); }
.pf-panel[hidden] { display: none; }
.pf-tabs-ready .pf-panel:not([hidden]) { animation: pf-in .2s ease-out; }
@keyframes pf-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pf-tabs-ready .pf-panel:not([hidden]) { animation: none; } .pf-action, .pf-avatar-edit { transition: none; } }

.pf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.pf-card {
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 18px;
  box-shadow: var(--shadow-xs); padding: var(--space-5); min-width: 0; margin: 0;
}
.pf-card-wide { grid-column: 1 / -1; }
.pf-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.pf-card-head .pf-card-title { margin: 0; }
.pf-card-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 var(--space-3);
  font-size: 1rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.01em; padding: 0;
}
.pf-card-title svg { color: var(--brand-600); flex-shrink: 0; }
.pf-card-link { display: inline-flex; align-items: center; gap: 2px; font-size: 0.82rem; font-weight: 700; color: var(--brand-600); text-decoration: none; }
.pf-card-link:hover { text-decoration: underline; }
.pf-list { margin: 0; display: flex; flex-direction: column; }
.pf-list > div {
  display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: var(--space-3);
  padding: 10px 0; border-bottom: 1px dashed var(--ink-200);
}
.pf-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.pf-list dt { color: var(--ink-500); font-size: 0.84rem; }
.pf-list dd { margin: 0; color: var(--ink-900); font-weight: 600; font-size: 0.9rem; min-width: 0; }
.pf-break { overflow-wrap: anywhere; }
.pf-roles { display: flex; flex-wrap: wrap; gap: 4px; }
.pf-role { padding: 2px 9px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: 0.76rem; font-weight: 700; }

.pf-idcard { display: flex; align-items: center; gap: var(--space-6); flex-wrap: wrap; }
.pf-idcard-preview .idcard { box-shadow: 0 14px 30px rgba(15,23,42,.12); }
.pf-idcard-side { flex: 1; min-width: 220px; }
.pf-idcard-side p { color: var(--ink-500); font-size: 0.88rem; margin: 0 0 var(--space-4); }
.pf-btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pf-btn-row .btn { display: inline-flex; align-items: center; gap: 6px; }

.pf-form { display: flex; flex-direction: column; gap: var(--space-4); }
.pf-progress {
  padding: var(--space-4) var(--space-5); border-radius: 18px;
  background: linear-gradient(135deg, #fffbeb, #fff7ed); border: 1px solid #fde68a;
}
.pf-progress.is-done { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border-color: #bbf7d0; }
.pf-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); }
.pf-progress-head strong { color: var(--ink-900); font-size: 0.95rem; }
.pf-progress-head span { font-weight: 800; color: var(--warning-600); font-variant-numeric: tabular-nums; }
.pf-progress.is-done .pf-progress-head span { color: var(--success-600); }
.pf-progress-bar { height: 8px; border-radius: 999px; background: rgba(15,23,42,.08); margin: 10px 0; overflow: hidden; }
.pf-progress-bar > span { display: block; height: 100%; border-radius: inherit; background: var(--warning-600); }
.pf-progress.is-done .pf-progress-bar > span { background: var(--success-600); }
.pf-progress-missing { margin: 0 0 4px; font-size: 0.84rem; color: #92400e; font-weight: 600; }
.pf-progress-note { margin: 0; font-size: 0.8rem; color: var(--ink-500); }
.pf-fieldset { border: 1px solid var(--ink-200); }
.pf-fieldset > legend { float: left; width: 100%; }
.pf-fieldset > legend + * { clear: both; }
.pf-fieldset-hint { margin: -6px 0 var(--space-3); font-size: 0.84rem; color: var(--ink-500); }
.pf-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-4); }
.pf-fields .form-group { min-width: 0; }
.pf-span-2 { grid-column: 1 / -1; }
.pf-fields textarea { min-height: 76px; }
/* Empty fields get a quiet amber edge, not an error: the data is optional,
   it is only being asked for. */
.pf-missing input, .pf-missing select, .pf-missing textarea { border-color: #fcd34d; background: #fffdf5; }
.pf-missing > label::after {
  content: 'Belum diisi'; margin-left: 8px; padding: 1px 7px; border-radius: 999px;
  background: var(--warning-100); color: #92400e; font-size: 0.68rem; font-weight: 700; vertical-align: 1px;
}
.pf-savebar {
  position: sticky; bottom: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: 12px 12px 12px 20px; border-radius: 16px;
  background: rgba(255,255,255,.92); border: 1px solid var(--ink-200);
  box-shadow: 0 12px 30px rgba(15,23,42,.12); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.pf-savebar-text { font-size: 0.85rem; color: var(--ink-500); }

.pf-grid-security { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.pf-password { position: relative; }
.pf-password input { padding-right: 48px; }
.pf-eye {
  position: absolute; top: 50%; right: 4px; transform: translateY(-50%);
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: none; color: var(--ink-500); cursor: pointer;
}
.pf-eye:hover { color: var(--ink-900); background: var(--ink-50); }
.pf-match.is-ok { color: var(--success-600); font-weight: 600; }
.pf-match.is-bad { color: var(--danger-600); font-weight: 600; }
.pf-tips { background: linear-gradient(160deg, var(--brand-25), var(--white)); }
.pf-tips ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pf-tips li { position: relative; padding-left: 26px; font-size: 0.86rem; color: var(--ink-700); line-height: 1.45; }
.pf-tips li::before {
  content: '✓'; position: absolute; left: 0; top: 0; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); font-size: 0.68rem; font-weight: 800;
}

.pf-narrow { max-width: 560px; }
.pf-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--space-2); margin-bottom: var(--space-4); }
.pf-choice {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: 14px; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.pf-choice input { width: 18px; height: 18px; accent-color: var(--brand-600); margin: 0; flex-shrink: 0; }
.pf-choice > span { display: flex; flex-direction: column; line-height: 1.25; }
.pf-choice strong { font-size: 0.9rem; color: var(--ink-900); }
.pf-choice small { font-size: 0.72rem; color: var(--ink-500); font-weight: 600; letter-spacing: .06em; }
.pf-choice:has(input:checked) { border-color: var(--brand-500); background: var(--brand-25); box-shadow: 0 0 0 3px rgba(99,102,241,.1); }

@media (max-width: 900px) {
  .pf-hero-main { grid-template-columns: auto 1fr; }
  .pf-meter { grid-column: 1 / -1; margin-top: 0; }
  .pf-grid, .pf-grid-security { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .pf-hero { border-radius: 18px; }
  .pf-hero-cover { height: 88px; }
  .pf-hero-main { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: var(--space-3); padding: 0 var(--space-4) var(--space-4); margin-top: -50px; }
  .pf-identity { padding-top: 0; }
  .pf-avatar, .pf-avatar-img { width: 100px; height: 100px; }
  .pf-name { font-size: 1.35rem; }
  .pf-tags { justify-content: center; }
  .pf-meter { justify-self: stretch; text-align: left; }
  .pf-actions { grid-template-columns: 1fr 1fr; padding: var(--space-3) var(--space-4) var(--space-4); gap: var(--space-2); }
  .pf-action-primary { grid-column: 1 / -1; }
  .pf-action { padding: 10px 12px; }
  .pf-action-icon { width: 36px; height: 36px; border-radius: 10px; }
  .pf-tabs { position: sticky; top: 64px; z-index: 6; overflow-x: auto; scrollbar-width: none; }
  .pf-tabs::-webkit-scrollbar { display: none; }
  .pf-tab { flex-direction: column; gap: 3px; padding: 8px 6px; font-size: 0.72rem; min-width: 72px; }
  .pf-card { padding: var(--space-4); border-radius: 16px; }
  .pf-list > div { grid-template-columns: minmax(92px, 38%) 1fr; gap: var(--space-2); padding: 9px 0; }
  .pf-list dt { font-size: 0.8rem; }
  .pf-list dd { font-size: 0.86rem; }
  .pf-list > div.pf-stack { grid-template-columns: 1fr; gap: 2px; }
  .pf-fields { grid-template-columns: minmax(0, 1fr); }
  .pf-idcard { justify-content: center; gap: var(--space-4); }
  .pf-idcard-side { text-align: center; }
  .pf-btn-row { justify-content: center; }
  .pf-savebar { padding: 10px; bottom: 8px; }
  .pf-savebar-text { display: none; }
  .pf-savebar .btn { width: 100%; }
  .pf-progress { padding: var(--space-4); }
}

/* ---------------------------------------------------------------- Locked exam page
   Its own layout with no navigation. The bar keeps who/what/time in view on every
   screen size; overlays cover the gate, a fullscreen exit and the end state. */
body.exam-locked {
  background: var(--ink-50); margin: 0; min-height: 100vh;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  overscroll-behavior: none;
}
body.exam-locked textarea { -webkit-user-select: text; user-select: text; }
body.exam-locked img { -webkit-user-drag: none; pointer-events: none; }
.xl-content { max-width: 1240px; margin: 0 auto; padding: var(--space-4) var(--space-5) var(--space-8); }
.xl-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  margin: calc(-1 * var(--space-4)) calc(-1 * var(--space-5)) var(--space-4);
  padding: 10px var(--space-5); padding-top: max(10px, env(safe-area-inset-top));
  background: linear-gradient(120deg, #1e1b4b, #312e81 60%, #4338ca); color: #fff;
  box-shadow: 0 6px 20px rgba(15,23,42,.18);
}
.xl-bar-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.xl-bar-id strong { font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-bar-id span { font-size: 0.76rem; color: rgba(255,255,255,.75); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xl-bar-right { display: flex; align-items: center; gap: var(--space-3); flex-shrink: 0; }
.xl-conn { display: inline-flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; color: rgba(255,255,255,.85); }
.xl-conn i { width: 9px; height: 9px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.xl-conn.is-down i { background: #f87171; box-shadow: 0 0 0 3px rgba(248,113,113,.3); }
.xl-conn.is-down { color: #fecaca; }
.xl-timer {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.05;
  padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
}
.xl-timer-label { font-size: 0.62rem; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.7); font-weight: 700; }
.xl-timer-value { font-size: 1.3rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.xl-timer.is-warning { background: rgba(245,158,11,.25); border-color: rgba(251,191,36,.6); }
.xl-timer.is-critical { background: rgba(220,38,38,.35); border-color: rgba(248,113,113,.8); animation: xl-pulse 1s ease-in-out infinite; }
@keyframes xl-pulse { 50% { box-shadow: 0 0 0 4px rgba(248,113,113,.35); } }
.xl-notice {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: var(--brand-50); border: 1px solid var(--brand-100); color: var(--brand-700); font-size: 0.84rem; font-weight: 600;
}
.xp.is-veiled, .xp[inert] { filter: blur(10px); pointer-events: none; }

.xl-overlay {
  position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center;
  padding: var(--space-4); background: rgba(15, 23, 42, 0.82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.xl-overlay.is-open { display: flex; }
.xl-panel {
  width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--white); border-radius: 22px; padding: var(--space-6) var(--space-5); text-align: center;
  box-shadow: 0 30px 70px rgba(0,0,0,.35);
}
.xl-panel h1 { margin: var(--space-3) 0 var(--space-2); font-size: 1.4rem; letter-spacing: -0.02em; color: var(--ink-900); }
.xl-panel-icon { width: 60px; height: 60px; margin: 0 auto; border-radius: 18px; display: grid; place-items: center; }
.xl-panel-icon.is-brand { background: var(--brand-50); color: var(--brand-600); }
.xl-panel-icon.is-warn { background: var(--warning-100); color: var(--warning-600); }
.xl-panel-icon.is-danger { background: var(--danger-100); color: var(--danger-600); }
.xl-panel-lead { margin: 0 0 var(--space-3); color: var(--ink-700); font-size: 0.95rem; font-weight: 600; line-height: 1.5; }
.xl-panel-desc { margin: 0 0 var(--space-3); color: var(--ink-500); font-size: 0.88rem; line-height: 1.5; }
.xl-panel-note { margin: 0 0 var(--space-5); padding: 10px 12px; border-radius: 12px; background: var(--ink-50); color: var(--ink-500); font-size: 0.8rem; line-height: 1.5; text-align: left; }
.xl-panel-note:empty { display: none; }
.xl-panel-hint { margin: var(--space-3) 0 0; font-size: 0.78rem; color: var(--ink-500); }
.xl-rules { margin: 0 0 var(--space-4); padding: 0; list-style: none; text-align: left; display: flex; flex-direction: column; gap: 8px; }
.xl-rules li {
  position: relative; padding: 10px 12px 10px 40px; border-radius: 12px; background: var(--danger-100);
  color: #7f1d1d; font-size: 0.86rem; font-weight: 600; line-height: 1.4;
}
.xl-rules li::before {
  content: '!'; position: absolute; left: 12px; top: 10px; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; background: var(--danger-600); color: #fff; font-size: 0.7rem; font-weight: 800;
}
.xl-start { width: 100%; min-height: 50px; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.xl-countdown { font-size: 3.4rem; font-weight: 800; color: var(--danger-600); font-variant-numeric: tabular-nums; margin: 0 0 var(--space-4); line-height: 1; }

@media (max-width: 900px) {
  .xl-content { padding: var(--space-3) var(--space-3) var(--space-8); }
  .xl-bar { margin: calc(-1 * var(--space-3)) calc(-1 * var(--space-3)) var(--space-3); padding-left: var(--space-3); padding-right: var(--space-3); }
}
@media (max-width: 520px) {
  .xl-conn span { display: none; }
  .xl-timer-value { font-size: 1.15rem; }
  .xl-panel { padding: var(--space-5) var(--space-4); border-radius: 18px; }
}
@media (prefers-reduced-motion: reduce) { .xl-timer.is-critical { animation: none; } }
.exam-locked .xp-rail { top: 88px; }

/* Proctor console: violations feed and the reopen form. */
.violation-list { display: flex; flex-direction: column; }
.violation-item {
  display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center;
  padding: 12px 4px; border-bottom: 1px solid var(--ink-100); color: inherit; text-decoration: none;
}
.violation-item:hover { background: var(--ink-50); text-decoration: none; }
.violation-item:last-child { border-bottom: 0; }
.violation-time { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--danger-600); }
.violation-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.violation-body strong { color: var(--ink-900); }
.violation-body strong small { color: var(--ink-500); font-weight: 600; margin-left: 4px; }
.violation-type { font-weight: 700; color: var(--danger-600); font-size: 0.88rem; }
.violation-body > small { color: var(--ink-500); font-size: 0.78rem; overflow-wrap: anywhere; }
.proctor-reopen > summary { list-style: none; cursor: pointer; }
.proctor-reopen > summary::-webkit-details-marker { display: none; }
.proctor-reopen form { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; min-width: 220px; }
.proctor-reopen textarea { min-height: 60px; font-size: 0.82rem; }
@media (max-width: 640px) { .violation-item { grid-template-columns: minmax(0, 1fr); gap: 4px; } .violation-time { font-size: 0.82rem; } }

/* Exam violations: list for leadership and per-attempt detail. */
.vio-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.4fr) auto; gap: var(--space-3); align-items: end; }
.vio-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.vio-stat { background: var(--white); border: 1px solid var(--ink-200); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vio-stat span { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.vio-stat strong { font-size: 1.7rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.vio-stat .vio-stat-text { font-size: 0.98rem; line-height: 1.3; }
.vio-stat small { font-size: 0.76rem; color: var(--ink-500); }
.vio-stat.is-danger { border-color: #fecaca; background: linear-gradient(160deg, #fff5f5, #fff); }
.vio-stat.is-danger strong { color: var(--danger-600); }
.vio-stat.is-warn strong { color: var(--warning-600); }
.vio-table { display: flex; flex-direction: column; }
.vio-row {
  display: grid; grid-template-columns: 96px minmax(0, 1.1fr) minmax(0, 1.5fr) minmax(0, 1.3fr) 130px; gap: var(--space-3);
  align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--ink-100); color: inherit; text-decoration: none;
}
.vio-row:hover { background: var(--ink-50); text-decoration: none; }
.vio-row > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vio-row strong { color: var(--ink-900); font-size: 0.88rem; overflow-wrap: anywhere; }
.vio-row small { color: var(--ink-500); font-size: 0.76rem; overflow-wrap: anywhere; }
.vio-row .vio-what strong { color: var(--danger-600); }
.vio-row .vio-when strong { font-variant-numeric: tabular-nums; }
.vio-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); padding-top: 0; }
.vio-head:hover { background: none; }

.vd-hero {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-4); align-items: center;
  padding: var(--space-5); border-radius: 18px; margin-bottom: var(--space-4); border: 1px solid;
}
.vd-hero.is-danger { background: linear-gradient(135deg, #fef2f2, #fff); border-color: #fecaca; }
.vd-hero.is-warn { background: linear-gradient(135deg, #fffbeb, #fff); border-color: #fde68a; }
.vd-hero.is-clean { background: linear-gradient(135deg, #f0fdf4, #fff); border-color: #bbf7d0; }
.vd-hero-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--white); box-shadow: var(--shadow-xs); }
.is-danger .vd-hero-icon { color: var(--danger-600); }
.is-warn .vd-hero-icon { color: var(--warning-600); }
.is-clean .vd-hero-icon { color: var(--success-600); }
.vd-hero-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.vd-hero-text strong { font-size: 1.05rem; color: var(--ink-900); }
.vd-hero-text span { font-size: 0.86rem; color: var(--ink-700); line-height: 1.5; }
.vd-hero-score { text-align: right; display: flex; flex-direction: column; }
.vd-hero-score span { font-size: 0.7rem; text-transform: uppercase; font-weight: 700; letter-spacing: .06em; color: var(--ink-500); }
.vd-hero-score strong { font-size: 2rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.vd-hero-score small { font-size: 0.74rem; color: var(--ink-500); }
.vd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--space-4); align-items: start; }
.vd-dl { margin: 0; display: flex; flex-direction: column; }
.vd-dl > div { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: var(--space-3); padding: 8px 0; border-bottom: 1px dashed var(--ink-200); }
.vd-dl > div:last-child { border-bottom: 0; }
.vd-dl dt { color: var(--ink-500); font-size: 0.82rem; }
.vd-dl dd { margin: 0; font-size: 0.86rem; font-weight: 600; color: var(--ink-900); min-width: 0; overflow-wrap: anywhere; }
.vd-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.72rem !important; font-weight: 500 !important; color: var(--ink-500) !important; }
.vd-bar { height: 6px; border-radius: 999px; background: var(--ink-100); overflow: hidden; margin-bottom: 4px; }
.vd-bar span { display: block; height: 100%; background: var(--brand-600); border-radius: inherit; }
.vd-sub { margin: var(--space-4) 0 var(--space-2); font-size: 0.86rem; color: var(--ink-700); }
.vd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-chip { padding: 4px 10px; border-radius: 999px; background: var(--warning-100); color: #92400e; font-size: 0.76rem; font-weight: 600; }
.vd-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.vd-timeline::before { content: ''; position: absolute; left: 76px; top: 6px; bottom: 6px; width: 2px; background: var(--ink-100); }
.vd-timeline li { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 24px; padding: 8px 0; }
.vd-timeline li::before {
  content: ''; position: absolute; left: 67px; top: 13px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--ink-300); box-shadow: 0 0 0 3px var(--white);
}
.vd-timeline time { font-size: 0.8rem; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-500); padding-top: 2px; }
.vd-timeline li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vd-timeline strong { font-size: 0.88rem; color: var(--ink-900); }
.vd-timeline small { font-size: 0.78rem; color: var(--ink-500); overflow-wrap: anywhere; }
.vd-timeline li.is-danger::before { background: var(--danger-600); box-shadow: 0 0 0 3px var(--white), 0 0 0 6px rgba(220,38,38,.18); }
.vd-timeline li.is-danger strong { color: var(--danger-600); }
.vd-timeline li.is-danger-soft::before { background: #f87171; }
.vd-timeline li.is-warn::before { background: var(--warning-600); }
.vd-timeline li.is-info::before { background: var(--info-600); }
.vd-timeline li.is-brand::before { background: var(--brand-600); }

@media (max-width: 1000px) {
  .vio-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vio-filter-q { grid-column: 1 / -1; }
  .vio-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vio-head { display: none; }
  .vio-row { grid-template-columns: 76px minmax(0, 1fr); row-gap: 6px; }
  .vio-row .vio-who, .vio-row .vio-what, .vio-row .vio-where, .vio-row .vio-state { grid-column: 2; }
  .vio-row .vio-when { grid-row: 1 / span 4; align-self: start; }
  .vd-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .vd-hero { grid-template-columns: auto minmax(0, 1fr); padding: var(--space-4); }
  .vd-hero-score { grid-column: 1 / -1; text-align: left; flex-direction: row; align-items: baseline; gap: 8px; }
  .vd-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .vio-filter .btn { grid-column: 1 / -1; }
}

/* Monitoring Ujian: totals across the exams on screen. */
.mon-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.mon-summary > div { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--ink-200); background: var(--ink-50); display: flex; flex-direction: column; gap: 2px; }
.mon-summary span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.mon-summary strong { font-size: 1.5rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; }
.mon-summary a { font-size: 0.78rem; font-weight: 700; }
.mon-summary .is-danger { background: #fef2f2; border-color: #fecaca; }
.mon-summary .is-danger strong { color: var(--danger-600); }
.mon-summary .is-warn { background: #fffbeb; border-color: #fde68a; }
.mon-summary .is-warn strong { color: var(--warning-600); }
@media (max-width: 700px) { .mon-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Student exam card: what happened to this exam, at a glance. */
.exam-card-state { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; width: 100%; margin-bottom: 8px; }
.exam-card-state > span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.exam-card-state strong { font-size: 0.84rem; }
.exam-card-state small { font-size: 0.74rem; opacity: .85; }
.exam-card-state.is-danger { background: var(--danger-100); color: #991b1b; }
.exam-card-state.is-done { background: var(--success-100); color: #166534; }
.exam-card-state.is-live { background: var(--warning-100); color: #92400e; }

/* Exam lobby: the last page before the locked exam. */
.lb-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: var(--space-4);
  padding: var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(255,255,255,.14), transparent 55%), linear-gradient(120deg, #1e1b4b, #312e81 55%, #4338ca);
  box-shadow: 0 14px 34px rgba(30,27,75,.25);
}
.lb-hero-main { min-width: 0; }
.lb-back { display: inline-block; margin-bottom: var(--space-2); color: rgba(255,255,255,.75); font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.lb-back:hover { color: #fff; text-decoration: none; }
.lb-hero h1 { margin: 0; font-size: 1.6rem; letter-spacing: -0.02em; color: #fff; overflow-wrap: anywhere; }
.lb-hero p { margin: 4px 0 var(--space-3); color: rgba(255,255,255,.8); }
.lb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 0.8rem; font-weight: 600; }
.lb-window i { width: 8px; height: 8px; border-radius: 50%; background: #fbbf24; }
.lb-window.is-ok i { background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.3); }
.lb-window.is-bad i { background: #f87171; }
.lb-hero-icon { flex-shrink: 0; width: 76px; height: 76px; border-radius: 22px; display: grid; place-items: center; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.lb-state .empty-state p { max-width: 560px; margin-left: auto; margin-right: auto; line-height: 1.6; }
.lb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--space-4); align-items: start; }
.lb-main { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.lb-main > .card, .lb-side > .card { margin: 0; }
.lb-side { position: sticky; top: 92px; }
.lb-title { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--space-4); font-size: 1.02rem; font-weight: 800; color: var(--ink-900); }
.lb-title svg { color: var(--brand-600); }
.lb-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lb-steps li { position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px dashed var(--ink-200); }
.lb-steps li:last-child { border-bottom: 0; }
.lb-steps li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lb-steps strong { font-size: 0.92rem; color: var(--ink-900); }
.lb-steps small { font-size: 0.8rem; color: var(--ink-500); line-height: 1.45; }
.lb-step-dot { width: 22px; height: 22px; border-radius: 50%; margin-top: 1px; border: 2px solid var(--ink-300); background: var(--white); }
.lb-steps li.is-ok .lb-step-dot { border-color: var(--success-600); background: var(--success-600); box-shadow: inset 0 0 0 4px #fff; }
.lb-steps li.is-bad .lb-step-dot { border-color: var(--danger-600); }
.lb-geo-btn { margin-top: 8px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; }
.lb-geo-msg { margin: 6px 0 0; font-size: 0.82rem; color: var(--ink-700); }
.lb-geo-msg:empty { display: none; }
.lb-lock { border-color: #fecaca; background: linear-gradient(160deg, #fff5f5, #fff 60%); }
.lb-lock .lb-title svg { color: var(--danger-600); }
.lb-lock-lead { margin: 0 0 var(--space-2); font-size: 0.92rem; color: var(--ink-900); }
.lb-lock-list { margin: 0 0 var(--space-3); padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.lb-lock-list li { position: relative; padding: 9px 12px 9px 38px; border-radius: 12px; background: var(--danger-100); color: #7f1d1d; font-size: 0.86rem; font-weight: 600; line-height: 1.4; }
.lb-lock-list li::before { content: '!'; position: absolute; left: 12px; top: 9px; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--danger-600); color: #fff; font-size: 0.7rem; font-weight: 800; }
.lb-lock-note { margin: 0; font-size: 0.84rem; color: var(--ink-700); line-height: 1.55; }
.lb-start { border-color: var(--brand-100); box-shadow: 0 12px 30px rgba(79,70,229,.12); }
.lb-token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.5rem !important; font-weight: 800; letter-spacing: .25em; text-align: center; min-height: 58px !important; }
.lb-start-btn { width: 100%; min-height: 50px; font-size: 1rem; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.lb-start-note { margin: 10px 0 0; font-size: 0.78rem; color: var(--ink-500); text-align: center; line-height: 1.45; }
@media (max-width: 960px) {
  .lb-layout { grid-template-columns: minmax(0, 1fr); }
  .lb-side { position: static; }
}
@media (max-width: 600px) {
  .lb-hero { padding: var(--space-5) var(--space-4); border-radius: 18px; }
  .lb-hero h1 { font-size: 1.3rem; }
  .lb-hero-icon { display: none; }
  .lb-steps li { grid-template-columns: 22px minmax(0, 1fr); }
  .lb-steps li > .badge, .lb-steps li > #geo-status { grid-column: 2; justify-self: start; }
}

/* Exam receipt. */
.rc-hero { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; border: 1px solid; }
.rc-hero.is-ok { background: linear-gradient(135deg, #f0fdf4, #fff 70%); border-color: #bbf7d0; }
.rc-hero.is-warn { background: linear-gradient(135deg, #fffbeb, #fff 70%); border-color: #fde68a; }
.rc-hero.is-danger { background: linear-gradient(135deg, #fef2f2, #fff 70%); border-color: #fecaca; }
.rc-hero-icon { flex-shrink: 0; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--white); box-shadow: var(--shadow-sm); }
.is-ok .rc-hero-icon { color: var(--success-600); }
.is-warn .rc-hero-icon { color: var(--warning-600); }
.is-danger .rc-hero-icon { color: var(--danger-600); }
.rc-hero-text { min-width: 0; }
.rc-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.rc-hero h1 { margin: 4px 0; font-size: 1.55rem; letter-spacing: -0.02em; color: var(--ink-900); }
.rc-hero p { margin: 0; color: var(--ink-700); overflow-wrap: anywhere; }
.rc-alert { padding: var(--space-4) var(--space-5); margin-bottom: var(--space-4); border-radius: 16px; background: var(--danger-100); color: #7f1d1d; }
.rc-alert strong { display: block; font-size: 0.98rem; margin-bottom: 4px; }
.rc-alert p { margin: 4px 0 0; font-size: 0.88rem; line-height: 1.55; }
.rc-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; }
.rc-card { margin: 0; }
.rc-code { text-align: center; padding: var(--space-4); margin-bottom: var(--space-4); border-radius: 16px; background: var(--brand-25); border: 1px dashed var(--brand-300); }
.rc-code span { display: block; font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-700); }
.rc-code strong { display: block; margin: 6px 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.8rem; letter-spacing: .14em; color: var(--ink-900); }
.rc-code small { font-size: 0.78rem; color: var(--ink-500); }
.rc-dl { margin: 0; display: flex; flex-direction: column; }
.rc-dl > div { display: grid; grid-template-columns: minmax(130px, 40%) 1fr; gap: var(--space-3); padding: 10px 0; border-bottom: 1px dashed var(--ink-200); }
.rc-dl > div:last-child { border-bottom: 0; }
.rc-dl dt { color: var(--ink-500); font-size: 0.86rem; }
.rc-dl dd { margin: 0; font-weight: 700; color: var(--ink-900); font-size: 0.9rem; }
.rc-bar { display: block; height: 6px; margin-top: 6px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.rc-bar i { display: block; height: 100%; background: var(--brand-600); border-radius: inherit; }
.rc-hash { margin-top: var(--space-3); font-size: 0.82rem; color: var(--ink-500); }
.rc-hash summary { cursor: pointer; font-weight: 600; }
.rc-hash code { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: var(--ink-50); font-size: 0.72rem; word-break: break-all; color: var(--ink-700); }
.rc-hash p { margin: 6px 0 0; }
.rc-score { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rc-score-label { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.rc-score-value { font-size: 3.2rem; font-weight: 800; line-height: 1.1; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.rc-score-value.is-pending { color: var(--ink-300); }
.rc-score small { font-size: 0.82rem; color: var(--ink-500); line-height: 1.5; max-width: 260px; }
.rc-score.is-released { border-color: #bbf7d0; background: linear-gradient(160deg, #f0fdf4, #fff); }
.rc-back { margin-top: var(--space-4); width: 100%; }
@media (max-width: 860px) { .rc-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .rc-hero { padding: var(--space-5) var(--space-4); flex-direction: column; text-align: center; }
  .rc-hero h1 { font-size: 1.3rem; }
  .rc-dl > div { grid-template-columns: 1fr; gap: 2px; }
  .rc-code strong { font-size: 1.4rem; }
}

/* Konsol Pengawas. */
.pc-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-4); align-items: center;
  padding: var(--space-5) var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(255,255,255,.12), transparent 55%), linear-gradient(120deg, #1e1b4b, #312e81 55%, #4338ca);
  box-shadow: 0 14px 34px rgba(30,27,75,.22);
}
.pc-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.pc-hero h1 { margin: 4px 0; font-size: 1.55rem; color: #fff; letter-spacing: -0.02em; }
.pc-hero h1 small { font-size: 1rem; font-weight: 600; color: rgba(255,255,255,.7); }
.pc-hero p { margin: 0; color: rgba(255,255,255,.8); font-size: 0.9rem; overflow-wrap: anywhere; }
.pc-token {
  min-width: 250px; padding: 14px 18px; border-radius: 16px; text-align: center;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); display: flex; flex-direction: column; gap: 4px;
}
.pc-token-label { font-size: 0.68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.pc-token-value { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 2rem; letter-spacing: .16em; font-weight: 800; color: #fff; }
.pc-token-value.is-muted { opacity: .45; }
.pc-token small { font-size: 0.76rem; color: rgba(255,255,255,.75); }
.pc-token-btn { margin-top: 6px; width: 100%; background: #fff; color: var(--brand-700); font-weight: 700; }
.pc-token-btn:hover { background: var(--brand-50); }

.pc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.pc-stat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; cursor: pointer; text-align: left;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 14px; font: inherit; color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pc-stat span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.pc-stat strong { font-size: 1.6rem; font-weight: 800; line-height: 1.1; color: var(--ink-900); }
.pc-stat em { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--danger-600); }
.pc-stat.is-live strong { color: var(--warning-600); }
.pc-stat.is-done strong { color: var(--success-600); }
.pc-stat.is-stopped strong { color: var(--danger-600); }
.pc-stat:hover { border-color: var(--brand-300); }
.pc-stat.is-active { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }

.pc-roster-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.pc-roster-head h2 { margin: 0; font-size: 1.05rem; }
.pc-roster-head input { max-width: 280px; }
.pc-list { display: flex; flex-direction: column; }
.pc-row {
  display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) 110px 230px; gap: var(--space-3); align-items: center;
  padding: 12px 10px; border-bottom: 1px solid var(--ink-100); border-left: 3px solid transparent;
}
.pc-row:last-of-type { border-bottom: 0; }
.pc-row.is-stopped { border-left-color: var(--danger-600); background: #fffafa; }
.pc-row.is-live { border-left-color: var(--warning-600); }
.pc-row.is-done { border-left-color: var(--success-600); }
.pc-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pc-person > div { display: flex; flex-direction: column; min-width: 0; }
.pc-person strong { font-size: 0.9rem; color: var(--ink-900); overflow-wrap: anywhere; }
.pc-person small { font-size: 0.76rem; color: var(--ink-500); }
.pc-avatar { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-weight: 800; }
.pc-status { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.pc-status small { font-size: 0.75rem; color: var(--ink-500); }
.pc-status .pc-silent { color: var(--danger-600); font-weight: 700; }
.pc-reason { color: var(--danger-600) !important; font-weight: 600; }
.pc-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 800; background: var(--ink-100); color: var(--ink-700); }
.pc-pill.is-live { background: var(--warning-100); color: #92400e; }
.pc-pill.is-paused { background: var(--info-100); color: #075985; }
.pc-pill.is-done { background: var(--success-100); color: #166534; }
.pc-pill.is-stopped { background: var(--danger-100); color: #991b1b; }
.pc-signal-link { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; background: var(--warning-100); color: #92400e; font-size: 0.76rem; font-weight: 700; text-decoration: none; }
.pc-signal-link:hover { text-decoration: none; background: #fde68a; }
.pc-clean { display: inline-flex; align-items: center; gap: 4px; font-size: 0.76rem; color: var(--success-600); font-weight: 600; }
.pc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.pc-actions form { margin: 0; }
.pc-pop { position: relative; }
.pc-pop > summary { list-style: none; cursor: pointer; }
.pc-pop > summary::-webkit-details-marker { display: none; }
.pc-pop-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 280px; padding: 12px;
  background: var(--white); border: 1px solid var(--ink-200); border-radius: 14px; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 8px;
}
.pc-pop-panel label { margin: 0; font-size: 0.8rem; }
.pc-pop-panel textarea { min-height: 70px; font-size: 0.84rem; }
.pc-pop-panel p { margin: 0; font-size: 0.74rem; color: var(--ink-500); }
.pc-menu { padding: 6px; gap: 2px; }
.pc-menu a, .pc-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: none;
  font: inherit; font-size: 0.86rem; color: var(--ink-700); text-align: left; text-decoration: none; cursor: pointer;
}
.pc-menu a:hover, .pc-menu button:hover { background: var(--ink-50); text-decoration: none; }
.pc-menu button.is-danger { color: var(--danger-600); }
.pc-menu .pc-inline { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); margin: 4px 0; }
.pc-menu .pc-inline span { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; font-size: 0.86rem; color: var(--ink-700); }
.pc-menu .pc-inline input { min-height: 36px; padding: 6px 8px; font-size: 0.82rem; }
.pc-menu .pc-inline button { width: auto; padding: 6px 10px; }
.pc-empty-filter { margin: var(--space-4) 0; text-align: center; color: var(--ink-500); font-size: 0.88rem; }
.pc-incident { padding: var(--space-3) 0; border-bottom: 1px solid var(--ink-100); }
.pc-incident p { margin: 4px 0; }

@media (max-width: 1000px) {
  .pc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pc-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pc-status, .pc-signal { grid-column: 1; }
  .pc-actions { grid-column: 2; grid-row: 1 / span 3; align-self: start; flex-direction: column; align-items: flex-end; }
}
@media (max-width: 640px) {
  .pc-hero { grid-template-columns: minmax(0, 1fr); padding: var(--space-5) var(--space-4); }
  .pc-token { min-width: 0; }
  .pc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 6 kartu: 3 baris rapi tanpa kartu melebar */
  .pc-roster-head { flex-direction: column; align-items: stretch; }
  .pc-roster-head input { max-width: none; }
  .pc-row { grid-template-columns: minmax(0, 1fr); }
  .pc-actions { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: flex-start; align-items: center; }
  .pc-pop-panel { right: auto; left: 0; width: min(300px, calc(100vw - 48px)); }
}

/* ---------------------------------------------------------------- Period picker
   Which semester the pages show. Lives in the top bar on desktop and at the top of
   the sidebar (the mobile menu). */
.period-picker { position: relative; }
.period-picker > summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 6px; border-radius: 12px; border: 1px solid var(--ink-200); background: var(--white);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.period-picker > summary::-webkit-details-marker { display: none; }
.period-picker > summary:hover { border-color: var(--brand-300); }
.period-picker[open] > summary { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.period-picker-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); flex-shrink: 0; }
.period-picker-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.period-picker-text small { font-size: 0.64rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.period-picker-text strong { font-size: 0.84rem; color: var(--ink-900); white-space: nowrap; }
.period-picker-caret { color: var(--ink-500); transition: transform .15s ease; }
.period-picker[open] .period-picker-caret { transform: rotate(180deg); }
.period-picker.is-archive > summary { border-color: #fcd34d; background: #fffbeb; }
.period-picker.is-archive .period-picker-icon { background: var(--warning-100); color: var(--warning-600); }
.period-picker.is-archive .period-picker-text small { color: #92400e; }
.period-panel {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; width: 320px; max-height: min(70vh, 460px); overflow-y: auto;
  padding: 8px; background: var(--white); border: 1px solid var(--ink-200); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.period-panel-head { padding: 6px 10px 8px; font-size: 0.78rem; font-weight: 800; color: var(--ink-900); }
.period-year { padding: 8px 10px 4px; font-size: 0.66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); }
.period-option {
  display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center;
  padding: 9px 10px; border-radius: 12px; color: inherit; text-decoration: none;
}
.period-option:hover { background: var(--ink-50); text-decoration: none; }
.period-option.is-current { background: var(--brand-25); box-shadow: inset 0 0 0 1px var(--brand-100); }
.period-option-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.period-option-text strong { font-size: 0.86rem; color: var(--ink-900); }
.period-option-text small { font-size: 0.72rem; color: var(--ink-500); }
.period-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-300); }
.period-dot.is-active { background: var(--success-600); box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.period-dot.is-closed { background: var(--ink-500); }
.period-dot.is-upcoming { background: var(--info-600); }
.period-status { font-size: 0.66rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--ink-100); color: var(--ink-700); }
.period-status.is-active { background: var(--success-100); color: #166534; }
.period-status.is-upcoming { background: var(--info-100); color: #075985; }
.period-check { color: var(--brand-600); }
.period-back { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; padding: 10px; border-radius: 12px; background: var(--brand-600); color: #fff; font-weight: 700; font-size: 0.84rem; text-decoration: none; }
.period-back:hover { background: var(--brand-700); text-decoration: none; }
.topbar-context .period-picker > summary { padding: 4px 10px 4px 4px; }
.sidebar-period { padding: 0 var(--space-3) var(--space-3); }
.sidebar-period .period-picker > summary { width: 100%; }
.sidebar-period .period-picker-text { flex: 1; }
.sidebar-period .period-panel { width: 100%; min-width: 250px; }
/* Desktop has it in the top bar; the sidebar copy is for the mobile menu. */
@media (min-width: 901px) { .sidebar-period { display: none; } }
@media (max-width: 900px) { .topbar-context .period-picker { display: none; } }

.archive-banner {
  position: sticky; top: 72px; z-index: 15; display: flex; align-items: center; gap: 12px;
  margin: 0; padding: 10px var(--space-6); border-bottom: 1px solid #fcd34d;
  background: linear-gradient(90deg, #fffbeb, #fef3c7); color: #78350f;
}
.archive-banner.is-upcoming { background: linear-gradient(90deg, #f0f9ff, #e0f2fe); border-bottom-color: #7dd3fc; color: #0c4a6e; }
.archive-banner-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.7); flex-shrink: 0; }
.archive-banner-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.3; }
.archive-banner-text strong { font-size: 0.9rem; }
.archive-banner-text small { font-size: 0.78rem; opacity: .85; }
.archive-banner-btn { flex-shrink: 0; padding: 8px 14px; border-radius: 10px; background: #78350f; color: #fff; font-size: 0.8rem; font-weight: 700; text-decoration: none; }
.archive-banner.is-upcoming .archive-banner-btn { background: #0c4a6e; }
.archive-banner-btn:hover { color: #fff; text-decoration: none; opacity: .92; }
@media (max-width: 900px) {
  .archive-banner { padding: 10px var(--space-4); top: 64px; }
}
@media (max-width: 560px) {
  .archive-banner { flex-wrap: wrap; }
  .archive-banner-btn { width: 100%; text-align: center; }
}

/* Riwayat Akademik. */
.hs-hero {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); flex-wrap: wrap;
  padding: var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(255,255,255,.14), transparent 55%), linear-gradient(120deg, #312e81, #4338ca 55%, #7c3aed);
  box-shadow: 0 14px 34px rgba(67,56,202,.22);
}
.hs-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.hs-hero h1 { margin: 4px 0; font-size: 1.6rem; color: #fff; letter-spacing: -0.02em; }
.hs-hero p { margin: 0; color: rgba(255,255,255,.82); max-width: 560px; }
.hs-hero-stats { display: flex; gap: var(--space-3); }
.hs-hero-stats > div { min-width: 120px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); display: flex; flex-direction: column; }
.hs-hero-stats strong { font-size: 1.8rem; font-weight: 800; line-height: 1.1; }
.hs-hero-stats span { font-size: 0.76rem; color: rgba(255,255,255,.78); }
.hs-title { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--space-4); font-size: 1.02rem; font-weight: 800; }
.hs-title svg { color: var(--brand-600); }
.hs-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-3); overflow-x: auto; }
.hs-steps li {
  position: relative; flex: 0 0 auto; min-width: 150px; padding: 12px 14px; border-radius: 14px;
  background: var(--ink-50); border: 1px solid var(--ink-200); display: flex; flex-direction: column; gap: 2px;
}
.hs-steps li + li::before { content: '→'; position: absolute; left: -16px; top: 50%; transform: translateY(-50%); color: var(--ink-300); font-weight: 800; }
.hs-step-year { font-size: 0.7rem; font-weight: 800; letter-spacing: .06em; color: var(--ink-500); }
.hs-steps strong { font-size: 1rem; color: var(--ink-900); }
.hs-steps small { font-size: 0.76rem; color: var(--ink-500); }
.hs-steps li.is-naik, .hs-steps li.is-lulus { border-color: #bbf7d0; background: #f0fdf4; }
.hs-steps li.is-tinggal { border-color: #fde68a; background: #fffbeb; }
.hs-steps li.is-aktif { border-color: var(--brand-300); background: var(--brand-25); }
.hs-list { display: flex; flex-direction: column; gap: var(--space-4); }
.hs-card { background: var(--white); border: 1px solid var(--ink-200); border-radius: 20px; box-shadow: var(--shadow-xs); overflow: hidden; }
.hs-card.is-viewing { border-color: var(--brand-300); box-shadow: 0 0 0 3px rgba(99,102,241,.12); }
.hs-card-head { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-5) var(--space-5) var(--space-4); }
.hs-card-head h2 { margin: 8px 0 4px; font-size: 1.25rem; color: var(--ink-900); letter-spacing: -0.01em; }
.hs-card-head h2 small { font-size: 0.95rem; color: var(--ink-500); font-weight: 600; }
.hs-card-head p { margin: 0; font-size: 0.86rem; color: var(--ink-500); }
.hs-score { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; }
.hs-score span { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); }
.hs-score strong { font-size: 2.4rem; font-weight: 800; line-height: 1.05; color: var(--brand-700); font-variant-numeric: tabular-nums; }
.hs-score.is-empty strong { color: var(--ink-300); }
.hs-score small { font-size: 0.78rem; color: var(--ink-500); }
.hs-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--ink-100); border-top: 1px solid var(--ink-100); border-bottom: 1px solid var(--ink-100); }
.hs-metric { background: var(--white); padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.hs-metric > span { display: flex; align-items: center; gap: 6px; font-size: 0.74rem; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: .05em; }
.hs-metric > span svg { color: var(--brand-600); }
.hs-metric strong { font-size: 1.5rem; font-weight: 800; color: var(--ink-900); line-height: 1.1; font-variant-numeric: tabular-nums; }
.hs-metric strong em { font-style: normal; font-size: 1rem; color: var(--ink-300); }
.hs-metric small { font-size: 0.74rem; color: var(--ink-500); line-height: 1.4; }
.hs-bar { height: 6px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.hs-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-500), #7c3aed); }
.hs-bar.is-plain { background: transparent; }
.hs-card-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-3) var(--space-5); background: var(--ink-50); }
.hs-best { display: inline-flex; align-items: center; gap: 6px; font-size: 0.84rem; color: var(--ink-700); }
.hs-best svg { color: var(--warning-600); }
.hs-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hs-actions .btn { display: inline-flex; align-items: center; gap: 6px; }
.hs-viewing { font-size: 0.74rem; font-weight: 800; color: var(--brand-700); }
@media (max-width: 900px) { .hs-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .hs-hero { padding: var(--space-5) var(--space-4); }
  .hs-hero-stats { width: 100%; }
  .hs-hero-stats > div { flex: 1; min-width: 0; }
  .hs-card-head { flex-direction: column; padding: var(--space-4); }
  .hs-score { text-align: left; flex-direction: row; align-items: baseline; gap: 8px; }
  .hs-metric { padding: var(--space-3) var(--space-4); }
  .hs-card-foot { padding: var(--space-3) var(--space-4); }
  .hs-actions { width: 100%; }
  .hs-actions .btn { flex: 1; justify-content: center; }
}

/* Pergantian Semester. */
.st-hero {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-5); align-items: center;
  padding: var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(255,255,255,.14), transparent 55%), linear-gradient(120deg, #1e1b4b, #312e81 55%, #4338ca);
  box-shadow: 0 14px 34px rgba(30,27,75,.22);
}
.st-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.72); }
.st-hero h1 { margin: 4px 0; font-size: 1.65rem; color: #fff; letter-spacing: -0.02em; }
.st-hero p { margin: 0; color: rgba(255,255,255,.82); max-width: 520px; line-height: 1.55; }
.st-flow { display: flex; align-items: center; gap: var(--space-2); }
.st-sem { min-width: 190px; padding: 14px 16px; border-radius: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2); display: flex; flex-direction: column; gap: 4px; }
.st-sem strong { font-size: 1.1rem; color: #fff; }
.st-sem small { font-size: 0.76rem; color: rgba(255,255,255,.75); }
.st-sem small a { color: #fff; }
.st-sem .period-status { align-self: flex-start; }
.st-sem.is-to { background: #fff; border-color: #fff; box-shadow: 0 10px 26px rgba(0,0,0,.18); }
.st-sem.is-to strong { color: var(--ink-900); }
.st-sem.is-to small { color: var(--ink-500); }
.st-sem.is-to small a { color: var(--brand-600); }
.st-arrow { color: rgba(255,255,255,.75); }
.st-target { display: flex; align-items: flex-end; gap: var(--space-5); flex-wrap: wrap; }
.st-target .form-group { flex: 1; min-width: 240px; }
.st-toggle { display: flex; align-items: center; gap: 12px; margin: 0; cursor: pointer; flex: 1.4; min-width: 280px; }
.st-toggle input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.st-toggle-ui { position: relative; flex-shrink: 0; width: 46px; height: 26px; border-radius: 999px; background: var(--ink-300); transition: background .15s ease; }
.st-toggle-ui::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s ease; }
.st-toggle input:checked + .st-toggle-ui { background: var(--brand-600); }
.st-toggle input:checked + .st-toggle-ui::after { transform: translateX(20px); }
.st-toggle input:focus-visible + .st-toggle-ui { outline: 3px solid var(--brand-300); outline-offset: 2px; }
.st-toggle > span:last-child { display: flex; flex-direction: column; line-height: 1.3; }
.st-toggle strong { font-size: 0.92rem; color: var(--ink-900); }
.st-toggle small { font-size: 0.78rem; color: var(--ink-500); font-weight: 500; }
.st-note { display: flex; align-items: center; gap: 8px; flex: 1.4; padding: 10px 12px; border-radius: 12px; background: var(--info-100); color: #075985; font-size: 0.84rem; }
.st-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); align-items: start; margin-bottom: var(--space-4); }
.st-grid > .card, .st-compare > .card { margin: 0; }
.st-title { display: flex; align-items: center; gap: 8px; margin: 0 0 var(--space-4); font-size: 1rem; font-weight: 800; color: var(--ink-900); }
.st-title svg { color: var(--brand-600); }
.st-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.st-steps li { font-size: 0.88rem; color: var(--ink-700); line-height: 1.55; }
.st-steps li::marker { font-weight: 800; color: var(--brand-600); }
.st-steps em { font-style: normal; color: var(--success-600); font-weight: 600; }
.st-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.st-check-list li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid; }
.st-check-list li > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.st-check-list strong { font-size: 0.88rem; }
.st-check-list small { font-size: 0.8rem; line-height: 1.45; opacity: .9; }
.st-check-list a { font-size: 0.8rem; font-weight: 700; margin-top: 2px; }
.st-check-list .is-block { background: #fef2f2; border-color: #fecaca; color: #7f1d1d; }
.st-check-list .is-warn { background: #fffbeb; border-color: #fde68a; color: #78350f; }
.st-check-list .is-ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.st-check-icon { padding-top: 1px; }
.st-compare { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.st-stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.st-stat-grid > div { padding: 10px 12px; border-radius: 12px; background: var(--ink-50); display: flex; flex-direction: column; gap: 2px; }
.st-stat-grid span { display: flex; align-items: center; gap: 5px; font-size: 0.72rem; font-weight: 700; color: var(--ink-500); }
.st-stat-grid strong { font-size: 1.3rem; font-weight: 800; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.st-stats.is-to .st-stat-grid > div { background: var(--brand-25); }
.st-candidates { margin-bottom: var(--space-4); }
.st-candidates > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; cursor: pointer; list-style: none; }
.st-candidates > summary::-webkit-details-marker { display: none; }
.st-candidates > summary span { display: flex; align-items: center; gap: 8px; }
.st-candidates > summary span svg { color: var(--brand-600); }
.st-candidates > summary small { color: var(--brand-600); font-weight: 700; }
.st-candidates[open] > summary { margin-bottom: var(--space-3); }
.st-confirm { border: 2px solid var(--brand-100); }
.st-confirm.is-blocked { border-color: #fecaca; }
.st-blocked { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--danger-100); color: #7f1d1d; font-weight: 600; font-size: 0.9rem; }
.st-blocked.is-info { background: var(--info-100); color: #075985; }
.st-ack { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; margin: 0 0 var(--space-4); border-radius: 12px; background: #fffbeb; border: 1px solid #fde68a; font-size: 0.88rem; font-weight: 500; color: #78350f; cursor: pointer; }
.st-ack input { margin-top: 3px; }
.st-phrase { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 800; letter-spacing: .12em; max-width: 360px; }
.st-confirm code { padding: 2px 6px; border-radius: 6px; background: var(--ink-100); font-weight: 800; color: var(--ink-900); }
.st-run { min-height: 48px; display: inline-flex; align-items: center; gap: 8px; }
.st-history-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.st-history-list li { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--space-3); padding: 10px 0; border-bottom: 1px dashed var(--ink-200); }
.st-history-list li:last-child { border-bottom: 0; }
.st-history-list time { font-size: 0.8rem; color: var(--ink-500); font-variant-numeric: tabular-nums; }
.st-history-list li > div { display: flex; flex-direction: column; gap: 2px; }
.st-history-list strong { font-size: 0.9rem; }
.st-history-list small { font-size: 0.78rem; color: var(--ink-500); }
@media (max-width: 960px) {
  .st-hero { grid-template-columns: minmax(0, 1fr); }
  .st-grid, .st-compare { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .st-hero { padding: var(--space-5) var(--space-4); }
  .st-flow { flex-direction: column; align-items: stretch; }
  .st-arrow { transform: rotate(90deg); align-self: center; }
  .st-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-history-list li { grid-template-columns: 1fr; gap: 2px; }
  .st-run { width: 100%; justify-content: center; }
}

/* ---------------------------------------------------------------- Rapor (printable) */
.rpt-toolbar { max-width: 210mm; margin-left: auto; margin-right: auto; }
.rpt-hint { max-width: 210mm; margin: 0 auto var(--space-3); padding: 10px 14px; border-radius: 12px; }
.rpt-hint.is-warn { background: var(--warning-100); color: #78350f; }
.rpt-page {
  width: 210mm; min-height: 297mm; margin: 0 auto var(--space-6); padding: 16mm 15mm 14mm; box-sizing: border-box;
  background: #fff; color: #111827; box-shadow: var(--shadow-md); font-size: 10pt; line-height: 1.4;
}
.rpt-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 2.5px double #111827; margin-bottom: 12px; }
.rpt-logo { width: 18mm; height: 18mm; object-fit: contain; }
.rpt-head-text { display: flex; flex-direction: column; flex: 1; text-align: center; }
.rpt-head-kind { font-size: 9pt; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #374151; }
.rpt-head-text strong { font-size: 15pt; letter-spacing: .02em; text-transform: uppercase; }
.rpt-head-text span:last-child { font-size: 9.5pt; color: #374151; }
.rpt-id { width: 100%; border-collapse: collapse; margin-bottom: 12px; font-size: 9.5pt; }
.rpt-id th { text-align: left; font-weight: 600; color: #4b5563; width: 22%; padding: 2px 6px 2px 0; }
.rpt-id td { padding: 2px 0; font-weight: 700; width: 28%; }
.rpt-h { margin: 12px 0 6px; font-size: 10.5pt; font-weight: 800; letter-spacing: .02em; }
.rpt-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.rpt-table th, .rpt-table td { border: 1px solid #9ca3af; padding: 4px 6px; vertical-align: top; }
.rpt-table thead th { background: #eef2ff; font-weight: 800; text-align: center; font-size: 8.5pt; }
.rpt-table .c-no { width: 7mm; text-align: center; }
.rpt-table .c-subj { width: 46mm; }
.rpt-table .c-subj strong { display: block; }
.rpt-table .c-subj small { display: block; font-size: 7.5pt; color: #6b7280; }
.rpt-table .c-num { width: 15mm; text-align: center; font-variant-numeric: tabular-nums; }
.rpt-table .c-score { font-weight: 800; font-size: 10pt; }
.rpt-table .c-pred { width: 14mm; text-align: center; }
.rpt-table .c-desc { font-size: 8.5pt; color: #1f2937; }
.rpt-table tr.is-below .c-score { color: #b91c1c; }
.rpt-table tr.is-empty .c-score { color: #9ca3af; }
.rpt-group td { background: #f3f4f6; font-weight: 800; font-size: 8.5pt; text-transform: uppercase; letter-spacing: .05em; }
.rpt-table tfoot td { font-weight: 700; background: #fafafa; }
.rpt-summary { text-align: center; vertical-align: middle !important; }
.rpt-summary small { font-weight: 500; color: #6b7280; }
.rpt-pred { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 4px; font-weight: 800; }
.rpt-pred.is-a { background: #dcfce7; color: #166534; }
.rpt-pred.is-b { background: #e0f2fe; color: #075985; }
.rpt-pred.is-c { background: #fef3c7; color: #92400e; }
.rpt-pred.is-d { background: #fee2e2; color: #991b1b; }
.rpt-legend { margin: 4px 0 0; font-size: 7.5pt; color: #6b7280; }
.rpt-two { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 8mm; }
.rpt-two > section { min-width: 0; }
.rpt-small td { font-size: 9pt; }
.rpt-small small { color: #6b7280; }
.rpt-note { min-height: 22mm; padding: 6px 8px; border: 1px solid #9ca3af; font-size: 9pt; line-height: 1.5; }
.rpt-muted { color: #9ca3af; font-style: italic; }
.rpt-decision { margin-top: 6px; padding: 6px 8px; border: 1.5px solid #111827; display: flex; gap: 8px; align-items: baseline; }
.rpt-decision span { font-size: 8.5pt; color: #4b5563; }
.rpt-sign { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8mm; margin-top: 14mm; text-align: center; font-size: 9pt; }
.rpt-sign > div { display: flex; flex-direction: column; align-items: center; }
.rpt-sign i { display: block; height: 18mm; }
.rpt-sign strong { border-bottom: 1px solid #111827; padding: 0 4px; }
.rpt-sign small { margin-top: 2px; color: #374151; }
.rpt-sign-head { grid-column: 1 / -1; max-width: 70mm; margin: 4mm auto 0; }
.rpt-foot { margin: 10mm 0 0; font-size: 7pt; color: #9ca3af; text-align: right; }

/* Legger. */
.lg-page { max-width: 1400px; margin: 0 auto var(--space-6); padding: var(--space-5); background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); }
.lg-head { display: flex; justify-content: space-between; gap: var(--space-4); align-items: flex-end; margin-bottom: var(--space-4); }
.lg-head > div:first-child { display: flex; flex-direction: column; }
.lg-head span { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-600); }
.lg-head strong { font-size: 1.2rem; color: var(--ink-900); }
.lg-head small { color: var(--ink-500); }
.lg-head-stats { display: flex; gap: 8px; }
.lg-head-stats div { padding: 8px 14px; border-radius: 12px; background: var(--ink-50); text-align: center; display: flex; flex-direction: column; }
.lg-head-stats b { font-size: 1.3rem; }
.lg-head-stats span { font-size: 0.7rem; color: var(--ink-500); letter-spacing: 0; text-transform: none; font-weight: 600; }
.lg-scroll { overflow-x: auto; }
.lg-table { border-collapse: collapse; font-size: 0.78rem; width: auto; min-width: 60%; }
.lg-table th, .lg-table td { border: 1px solid var(--ink-200); padding: 4px 6px; }
.lg-table thead th { background: var(--ink-50); font-weight: 800; vertical-align: bottom; }
.lg-subj { height: 120px; width: 34px; min-width: 34px; padding: 4px 2px !important; }
.lg-subj span { display: inline-block; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; font-size: 0.72rem; }
.lg-subj.is-elective { background: var(--brand-50) !important; color: var(--brand-700); }
.lg-no { width: 28px; text-align: center; }
.lg-name { min-width: 170px; text-align: left; }
.lg-name strong { display: block; font-size: 0.8rem; }
.lg-name small { color: var(--ink-500); }
.lg-cell { text-align: center; font-variant-numeric: tabular-nums; }
.lg-cell.is-below { color: #b91c1c; font-weight: 700; background: #fef2f2; }
.lg-cell.is-empty { color: var(--ink-300); }
.lg-cell.is-na { background: repeating-linear-gradient(135deg, #fafafa 0 4px, #f3f4f6 4px 8px); }
.lg-sum { text-align: center; white-space: nowrap; font-variant-numeric: tabular-nums; background: #fafafa; }
.lg-rank { font-weight: 800; color: var(--brand-700); }
.lg-table tfoot td { font-weight: 700; background: var(--ink-50); }
.lg-legend { margin: var(--space-3) 0 0; font-size: 0.76rem; color: var(--ink-500); }
.lg-legend .is-below { color: #b91c1c; font-weight: 700; }

@media print {
  .rpt-page { box-shadow: none; margin: 0; width: auto; min-height: 0; padding: 0; }
  .rpt-hint { display: none; }
  @page rapor { size: A4 portrait; margin: 14mm 13mm; }
  .rpt-page { page: rapor; }
  @page legger { size: A4 landscape; margin: 8mm; }
  .lg-page { page: legger; box-shadow: none; padding: 0; max-width: none; }
  .lg-scroll { overflow: visible; }
  .lg-table { font-size: 7pt; }
  .lg-subj { height: 90px; }
  .rpt-table tr, .lg-table tr { break-inside: avoid; }
  .rpt-pred, .lg-cell.is-below, .rpt-table thead th, .rpt-group td, .lg-subj.is-elective { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
/* Screen only: printing A4 is narrower than this breakpoint, and the print must
   keep the full desktop layout (description column, identity grid). */
@media screen and (max-width: 860px) {
  .rpt-page { width: 100%; min-height: 0; padding: 18px 14px; font-size: 9.5pt; }
  .rpt-two { grid-template-columns: 1fr; gap: 0; }
  .rpt-page { overflow-x: auto; }
  .rpt-page table { min-width: 0 !important; }
  .rpt-table { font-size: 8.5pt; }
  .rpt-table th, .rpt-table td { padding: 4px 4px; }
  .rpt-table .c-subj, .rpt-table .c-num, .rpt-table .c-pred, .rpt-table .c-no { width: auto; }
  .rpt-table thead th { font-size: 7.5pt; }
  .rpt-summary { font-size: 8pt; }
  .rpt-table .c-desc { display: none; }
  .rpt-table thead th:last-child { display: none; }
  .rpt-group td { font-size: 8pt; }
  .rpt-id th, .rpt-id td { display: block; width: auto; }
  .rpt-sign { grid-template-columns: 1fr 1fr; }
  .lg-head { flex-direction: column; align-items: flex-start; }
}

/* Rapor kelas (app pages). */
.rc2-hero {
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-4); flex-wrap: wrap;
  padding: var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; color: #fff;
  background: radial-gradient(90% 140% at 100% 0%, rgba(255,255,255,.14), transparent 55%), linear-gradient(120deg, #312e81, #4338ca 55%, #7c3aed);
  box-shadow: 0 14px 34px rgba(67,56,202,.22);
}
.rc2-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.rc2-hero h1 { margin: 4px 0; font-size: 1.6rem; color: #fff; }
.rc2-hero p { margin: 0; color: rgba(255,255,255,.85); max-width: 620px; }
.rc2-hero-actions { display: flex; gap: 8px; }
.rc2-hero-actions .btn { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.3); color: #fff; display: inline-flex; align-items: center; gap: 6px; }
.rc2-hero-actions .btn:hover { background: rgba(255,255,255,.24); }
.rc2-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-4); margin-bottom: var(--space-4); align-items: stretch; }
.rc2-grid > .card { margin: 0; }
.rc2-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.rc2-stats-wide { margin-bottom: var(--space-4); }
.rc2-stats > div { padding: 14px 16px; border-radius: 16px; background: var(--white); border: 1px solid var(--ink-200); display: flex; flex-direction: column; gap: 2px; }
.rc2-stats span { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-500); }
.rc2-stats strong { font-size: 1.7rem; font-weight: 800; line-height: 1.1; color: var(--ink-900); }
.rc2-stats strong em { font-style: normal; font-size: 1rem; color: var(--ink-300); }
.rc2-stats small { font-size: 0.74rem; color: var(--ink-500); }
.rc2-stats .is-ok strong { color: var(--success-600); }
.rc2-stats .is-warn strong { color: var(--warning-600); }
.rc2-release { display: flex; flex-direction: column; gap: 10px; border: 2px solid var(--brand-100); }
.rc2-release.is-released { border-color: #bbf7d0; background: linear-gradient(160deg, #f0fdf4, #fff); }
.rc2-release-state { display: flex; gap: 10px; align-items: flex-start; }
.rc2-release-state svg { color: var(--brand-600); flex-shrink: 0; }
.is-released .rc2-release-state svg { color: var(--success-600); }
.rc2-release-state div { display: flex; flex-direction: column; }
.rc2-release-state small { color: var(--ink-500); font-size: 0.8rem; }
.rc2-release p { margin: 0; font-size: 0.86rem; color: var(--ink-700); }
.rc2-release-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.rc2-release-form label { width: 100%; margin: 0; font-size: 0.8rem; }
.rc2-release-form input { max-width: 180px; }
.rc2-release-form .btn { display: inline-flex; align-items: center; gap: 6px; }
.rc2-warn { margin: 0; font-size: 0.8rem; color: #92400e; font-weight: 600; }
.rc2-list-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: var(--space-3); }
.rc2-list-head h2 { margin: 0; font-size: 1.05rem; }
.rc2-list-head input { max-width: 280px; }
.rc2-list { display: flex; flex-direction: column; }
.rc2-row { display: grid; grid-template-columns: minmax(0, 1.5fr) 90px minmax(0, 1.2fr) auto; gap: var(--space-3); align-items: center; padding: 12px 6px; border-bottom: 1px solid var(--ink-100); scroll-margin-top: 140px; }
.rc2-row:last-child { border-bottom: 0; }
.rc2-row:target { background: var(--brand-25); border-radius: 12px; }
.rc2-person { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rc2-person > div { display: flex; flex-direction: column; min-width: 0; }
.rc2-person strong { font-size: 0.9rem; overflow-wrap: anywhere; }
.rc2-person small { font-size: 0.76rem; color: var(--ink-500); }
.rc2-rank { flex-shrink: 0; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-700); font-weight: 800; font-size: 0.82rem; }
.rc2-avg { display: flex; flex-direction: column; }
.rc2-avg span { font-size: 0.68rem; color: var(--ink-500); font-weight: 700; text-transform: uppercase; }
.rc2-avg strong { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rc2-progress { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; color: var(--ink-500); }
.rc2-bar { height: 6px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.rc2-bar i { display: block; height: 100%; border-radius: inherit; background: var(--warning-600); }
.rc2-bar.is-full i { background: var(--success-600); }
.rc2-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; position: relative; }
.rc2-actions .btn { display: inline-flex; align-items: center; gap: 5px; }
.rc2-note > summary { list-style: none; cursor: pointer; }
.rc2-note > summary::-webkit-details-marker { display: none; }
.rc2-note.has-note > summary { border-color: #bbf7d0; color: var(--success-600); }
.rc2-note-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: min(380px, 86vw); padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--white); border: 1px solid var(--ink-200); border-radius: 14px; box-shadow: var(--shadow-lg); }
.rc2-note-form label { margin: 0; font-size: 0.8rem; }
.rc2-note-form .btn { align-self: flex-end; }
.rc2-classes { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.rc2-class { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: 16px; background: var(--white); border: 1px solid var(--ink-200); color: inherit; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.rc2-class:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); border-color: var(--brand-300); text-decoration: none; }
.rc2-class-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rc2-class-top strong { font-size: 1.15rem; color: var(--ink-900); }
.rc2-class > small { color: var(--ink-500); font-size: 0.8rem; }
.rc2-pill { font-size: 0.68rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--warning-100); color: #92400e; }
.rc2-class.is-released .rc2-pill { background: var(--success-100); color: #166534; }
.rc2-class-meta { display: flex; gap: 10px; font-size: 0.76rem; color: var(--ink-500); }
@media (max-width: 960px) { .rc2-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 700px) {
  .rc2-hero { padding: var(--space-5) var(--space-4); }
  .rc2-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .rc2-stats > div { padding: 10px; }
  .rc2-stats strong { font-size: 1.3rem; }
  .rc2-row { grid-template-columns: minmax(0, 1fr) auto; }
  .rc2-progress { grid-column: 1 / -1; }
  .rc2-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .rc2-note-form { left: 0; right: auto; }
  .rc2-list-head { flex-direction: column; align-items: stretch; }
  .rc2-list-head input { max-width: none; }
}

/* Generate preview. */
.gp-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--space-5); align-items: center; padding: var(--space-5) var(--space-6); margin-bottom: var(--space-4); border-radius: 20px; background: var(--white); border: 1px solid var(--ink-200); box-shadow: var(--shadow-sm); }
.gp-ring { --c: var(--brand-600); width: 108px; height: 108px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--ink-100) 0); }
.gp-ring span { width: 84px; height: 84px; border-radius: 50%; background: var(--white); display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; color: var(--ink-900); }
.gp-eyebrow { font-size: 0.72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-600); }
.gp-hero-text h2 { margin: 4px 0; font-size: 1.4rem; color: var(--ink-900); }
.gp-hero-text p { margin: 0 0 10px; color: var(--ink-500); font-size: 0.88rem; }
.gp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gp-chips span { padding: 4px 10px; border-radius: 999px; background: var(--success-100); color: #166534; font-size: 0.8rem; }
.gp-chips span:first-child { background: var(--brand-50); color: var(--brand-700); }
.gp-chips .is-warn { background: var(--warning-100); color: #92400e; }
.gp-chips .is-info { background: var(--info-100); color: #075985; }
.gp-chips .is-muted { background: var(--ink-100); color: var(--ink-700); }
.gp-commit .btn { display: inline-flex; align-items: center; gap: 6px; min-height: 48px; }
.gp-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: var(--space-4); margin-bottom: var(--space-4); }
.gp-grid > .card { margin: 0; }
.gp-title { margin: 0 0 var(--space-3); font-size: 1rem; }
.gp-bar-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) 54px 80px; gap: 10px; align-items: center; padding: 8px 0; font-size: 0.86rem; }
.gp-bar-row small { color: var(--ink-500); text-align: right; }
.gp-bar { height: 10px; border-radius: 999px; background: var(--ink-100); overflow: hidden; }
.gp-bar i { display: block; height: 100%; border-radius: inherit; background: var(--danger-600); }
.gp-bar.is-ok i { background: var(--warning-600); }
.gp-bar.is-full i { background: var(--success-600); }
.gp-note { margin: 0 0 8px; font-size: 0.82rem; color: var(--ink-700); }
.gp-ok { display: flex; align-items: center; gap: 6px; color: var(--success-600); font-weight: 600; margin: 0; }
.gp-reasons { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.gp-reasons li { display: flex; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 10px; background: #fef2f2; font-size: 0.84rem; }
.gp-reasons li b { color: var(--danger-600); white-space: nowrap; }
.gp-reasons.is-muted li { background: var(--ink-50); }
.gp-reasons.is-muted li b { color: var(--ink-700); }
.gp-table-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: var(--space-3); }
.gp-table-head input { max-width: 300px; }
.gp-filter { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--ink-50); }
.gp-filter button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font: inherit; font-size: 0.82rem; font-weight: 700; color: var(--ink-500); cursor: pointer; }
.gp-filter button.is-active { background: var(--white); color: var(--brand-700); box-shadow: var(--shadow-xs); }
.gp-table td { vertical-align: top; }
.gp-table td small { display: block; font-size: 0.74rem; color: var(--ink-500); }
.gp-table tr.is-skip { background: var(--ink-50); }
.gp-table tr.is-partial { background: #fffbeb; }
.gp-jp b { font-size: 1rem; }
.gp-slots { display: flex; flex-wrap: wrap; gap: 4px; }
.gp-slots span { padding: 2px 8px; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.gp-slots .is-empty { background: none; color: var(--ink-300); }
.gp-why { margin-top: 3px; }
@media (max-width: 900px) {
  .gp-hero { grid-template-columns: auto minmax(0, 1fr); }
  .gp-commit { grid-column: 1 / -1; }
  .gp-commit .btn { width: 100%; justify-content: center; }
  .gp-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .gp-hero { grid-template-columns: minmax(0, 1fr); text-align: center; padding: var(--space-4); }
  .gp-ring { margin: 0 auto; }
  .gp-chips { justify-content: center; }
  .gp-bar-row { grid-template-columns: 56px minmax(0, 1fr) 48px; }
  .gp-bar-row small { display: none; }
}
.st-sched { margin-top: 0; }

/* Reset Kata Sandi */
.pr-hero { display:flex; justify-content:space-between; align-items:flex-start; gap:var(--space-4); padding:var(--space-6); margin-bottom:var(--space-4); border-radius:var(--radius-lg); background:linear-gradient(135deg,var(--brand-50),var(--white)); border:1px solid var(--brand-100); }
.pr-hero h1 { margin:var(--space-2) 0 var(--space-2); }
.pr-hero p { margin:0; color:var(--ink-500); max-width:62ch; }
.pr-eyebrow { display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--brand-600); }
.pr-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:var(--space-3); margin-bottom:var(--space-4); }
.pr-stats > div { padding:var(--space-4); border:1px solid var(--ink-100); border-radius:var(--radius-md); background:var(--white); }
.pr-stats span { display:block; font-size:12px; color:var(--ink-500); }
.pr-stats strong { font-size:26px; color:var(--ink-900); }
.pr-stats .pr-stat-text { font-size:18px; }
.pr-stats .is-warn { border-color:var(--warning-100); background:color-mix(in srgb,var(--warning-100) 35%,var(--white)); }
.pr-stats .is-warn strong { color:var(--warning-600); }
.pr-stats .is-ok strong { color:var(--success-600); }
.pr-tabs { display:flex; gap:var(--space-1); margin-bottom:var(--space-3); border-bottom:1px solid var(--ink-100); }
.pr-tabs a { padding:10px 14px; color:var(--ink-500); text-decoration:none; font-weight:600; border-bottom:2px solid transparent; margin-bottom:-1px; }
.pr-tabs a.is-active { color:var(--brand-600); border-color:var(--brand-600); }
.pr-tabs em { font-style:normal; font-size:12px; margin-left:4px; padding:1px 8px; border-radius:999px; background:var(--ink-100); color:var(--ink-700); }
.pr-tabs a.is-active em { background:var(--brand-100); color:var(--brand-700); }
.pr-secret { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.pr-secret code { min-width:96px; padding:4px 8px; border-radius:var(--radius-sm); background:var(--ink-50); font-size:14px; letter-spacing:.5px; }
.pr-secret.is-open code { background:var(--warning-100); color:var(--ink-900); }
.pr-secret .is-done { color:var(--success-600); border-color:var(--success-600); }
tr.pr-new td { background:color-mix(in srgb,var(--brand-50) 70%,transparent); }
.nav-count { margin-left:auto; min-width:20px; padding:0 6px; border-radius:999px; background:var(--danger-600); color:#fff; font-size:11px; font-weight:700; line-height:20px; text-align:center; }
@media screen and (max-width: 720px) {
  .pr-hero { flex-direction:column; padding:var(--space-4); }
  .pr-stats { gap:var(--space-2); }
  .pr-stats > div { padding:var(--space-3); }
  .pr-stats span { font-size:11px; line-height:1.3; }
  .pr-stats strong { font-size:20px; }
  .pr-stats .pr-stat-text { font-size:15px; }
}

/* ---------------------------------------------------------------------------
   Rombak Ujian (Nov 2026): soal ditulis di halaman ujian, PG / PG Kompleks /
   Benar-Salah, gambar di soal dan di pilihan jawaban.
   ------------------------------------------------------------------------- */
.resource-card-link { color: inherit; text-decoration: none; }
.resource-card-link::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.resource-card-exam .resource-card-footer, .resource-card-exam .resource-card-badges { position: relative; z-index: 1; }
.resource-card-exam:has(.resource-card-link):hover { border-color: var(--brand-300); box-shadow: var(--shadow-md); }

.eq-section { scroll-margin-top: 80px; }
.eq-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.eq-head-title { display: flex; align-items: center; gap: var(--space-3); }
.eq-head-title small { display: block; color: var(--ink-500); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.eq-head-title h3 { margin: 0; font-size: 18px; }
.eq-head-meta { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }

.eq-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); align-items: start; }
.eq-tool { display: flex; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--ink-50); color: inherit; text-decoration: none; transition: border-color .15s, background .15s; }
a.eq-tool:hover { border-color: var(--brand-500); background: var(--brand-50); }
.eq-tool strong { display: block; color: var(--ink-900); }
.eq-tool small { display: block; color: var(--ink-500); font-size: 13px; line-height: 1.45; margin-top: 2px; }
.eq-tool-icon { flex: 0 0 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); }
.eq-upload { display: block; }
.eq-upload > summary { display: flex; gap: var(--space-3); cursor: pointer; list-style: none; }
.eq-upload > summary::-webkit-details-marker { display: none; }
.eq-upload[open] { background: var(--white); border-color: var(--brand-300); }
.eq-steps { margin: var(--space-4) 0 var(--space-3); padding-left: 20px; font-size: 13.5px; color: var(--ink-700); line-height: 1.6; }
.eq-steps code, .eq-guide code { background: var(--ink-100); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.eq-upload-form .form-group { margin-bottom: var(--space-3); }
.eq-guide { margin: var(--space-4) 0 0; padding-left: 20px; font-size: 13.5px; color: var(--ink-700); line-height: 1.6; }

.eq-bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0 var(--space-3); border-bottom: 1px solid var(--ink-100); }
.eq-list { list-style: none; margin: 0; padding: 0; }
.eq-item { padding: var(--space-4) 0; border-bottom: 1px solid var(--ink-100); scroll-margin-top: 80px; }
.eq-item:last-child { border-bottom: 0; }
.eq-item:target { background: var(--brand-25); }
.eq-item-head { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; margin-bottom: var(--space-2); }
.eq-num { min-width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--ink-900); color: #fff; font-weight: 700; font-size: 13px; }
.eq-item-actions { margin-left: auto; display: flex; align-items: center; gap: var(--space-1); }
.eq-item-actions form { margin: 0; }
.eq-type-mcq_complex { background: var(--warning-100); color: #92400e; }
.eq-type-true_false { background: var(--info-100); color: #075985; }
.eq-stem { color: var(--ink-900); line-height: 1.6; overflow-wrap: anywhere; }
.eq-stem-image { display: block; max-width: min(100%, 520px); max-height: 320px; margin-top: var(--space-2); border-radius: var(--radius-sm); border: 1px solid var(--ink-200); }
.eq-opts { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: grid; gap: 6px; }
.eq-opts.is-tf { grid-template-columns: repeat(2, minmax(0, 160px)); }
.eq-opts li { display: flex; align-items: flex-start; gap: var(--space-2); padding: 6px 10px; border: 1px solid var(--ink-200); border-radius: var(--radius-sm); font-size: 14px; }
.eq-opts li.is-key { border-color: var(--success-600); background: var(--success-100); }
.eq-opt-letter { font-weight: 700; color: var(--ink-500); min-width: 14px; }
.eq-opt-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.eq-opt-body img { max-width: 220px; max-height: 140px; border-radius: 6px; border: 1px solid var(--ink-200); background: #fff; }
.eq-key-badge { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--success-600); font-size: 12px; font-weight: 700; white-space: nowrap; }
.eq-bank { margin-top: var(--space-4); padding-top: var(--space-3); border-top: 1px dashed var(--ink-200); }
.eq-bank > summary { cursor: pointer; color: var(--ink-700); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }

/* form tambah/edit */
.eq-form .card { margin-bottom: var(--space-4); }
.eq-error-list { margin: 6px 0; padding-left: 18px; }
.eq-types { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3); }
.eq-type { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border: 1.5px solid var(--ink-200); border-radius: var(--radius-md); cursor: pointer; margin: 0; font-weight: 400; }
.eq-type input { margin-top: 4px; }
.eq-type strong { display: block; color: var(--ink-900); }
.eq-type small { display: block; color: var(--ink-500); font-size: 13px; }
.eq-type:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); }
.eq-image-field { display: flex; gap: var(--space-4); align-items: flex-start; flex-wrap: wrap; }
.eq-thumb { margin: 0; display: flex; flex-direction: column; gap: 6px; }
.eq-thumb img { max-width: 220px; max-height: 160px; border-radius: var(--radius-sm); border: 1px solid var(--ink-200); background: #fff; }
.eq-thumb.is-small img { max-width: 120px; max-height: 80px; }
.eq-thumb .checkbox-row { font-size: 13px; margin: 0; }
.eq-options { display: flex; flex-direction: column; gap: var(--space-3); }
.eq-option { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3); border: 1px solid var(--ink-200); border-radius: var(--radius-md); }
.eq-option:has(.eq-key:not([hidden]) input:checked) { border-color: var(--success-600); background: #f0fdf4; }
.eq-option-key { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 0 0 64px; }
.eq-letter { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-100); font-weight: 700; color: var(--ink-700); }
.eq-key { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--success-600); margin: 0; cursor: pointer; }
.eq-key[hidden] { display: none; }
.eq-option-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.eq-option-image { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.eq-file { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-700); margin: 0; font-weight: 500; }
.eq-file input[type=file] { font-size: 12.5px; max-width: 230px; }
.eq-tf { display: flex; gap: var(--space-3); }
.eq-tf-choice { flex: 0 1 180px; display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border: 1.5px solid var(--ink-200); border-radius: var(--radius-md); font-weight: 600; cursor: pointer; margin: 0; }
.eq-tf-choice:has(input:checked) { border-color: var(--success-600); background: #f0fdf4; color: var(--success-600); }
.eq-footer { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.eq-points { max-width: 160px; }
.eq-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; justify-content: flex-end; }
.eq-commit { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.eq-commit .checkbox-row { margin: 0; }

/* pratinjau impor */
.eq-import-table td { vertical-align: top; }
.eq-import-stem { max-width: 420px; overflow-wrap: anywhere; }
tr.is-invalid td { background: #fff7f7; }
.eq-row-errors { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--danger-600); min-width: 220px; }

/* player siswa */
.xp-q-instruction { margin: 0 0 var(--space-2); font-size: 13.5px; font-weight: 600; color: var(--warning-600); }
.xp-option-text { display: flex; flex-direction: column; gap: 6px; }
.xp-option-image { display: block; max-width: min(100%, 320px); max-height: 220px; border-radius: 6px; border: 1px solid var(--ink-200); background: #fff; }
.xp-options.is-truefalse { flex-direction: row; flex-wrap: wrap; }
.xp-options.is-truefalse .xp-option { flex: 1 1 160px; }
.xp-option input[type=checkbox] { accent-color: var(--brand-600); }

@media (max-width: 640px) {
  .eq-option { flex-direction: column; }
  .eq-option-key { flex-direction: row; flex-basis: auto; }
  .eq-opts.is-tf { grid-template-columns: 1fr 1fr; }
  .eq-item-actions { margin-left: 0; width: 100%; justify-content: flex-end; }
  .eq-file input[type=file] { max-width: 100%; }
}

/* Ruang Ujian: sidebar khusus ujian + pintu masuk dari menu utama */
.nav-link-module { display: flex; align-items: center; }
.nav-module-arrow { margin-left: auto; opacity: .55; font-size: 18px; line-height: 1; }
.nav-exam .nav-back { font-size: 13px; opacity: .8; }
.nav-module-title { display: flex; align-items: center; gap: 8px; margin: var(--space-2) var(--space-3) 0; padding: var(--space-3); border-radius: var(--radius-md); background: var(--brand-50); color: var(--brand-700); font-weight: 700; font-size: 15px; }

/* Bank Soal Ujian (panitia) */
.eq-panitia-badge { display: inline-flex; align-items: center; gap: 4px; }
.eq-check-spacer { display: inline-block; width: 13px; }
.eb-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.eb-tabs { display: inline-flex; padding: 4px; border-radius: 999px; background: var(--ink-100); gap: 4px; }
.eb-tab { padding: 6px 18px; border-radius: 999px; font-weight: 700; color: var(--ink-700); text-decoration: none; }
.eb-tab.is-active { background: var(--white); color: var(--brand-700); box-shadow: var(--shadow-xs); }
.eb-grade { margin-bottom: var(--space-4); }
.eb-grade form { margin: 0; display: inline; }
.eq-row-warnings { margin: 4px 0 0; padding-left: 16px; font-size: 12.5px; color: var(--warning-600); min-width: 220px; }

/* Upload Jadwal Ujian: satu konteks, alur 4 langkah, daftar kesiapan */
.ub-context { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); background: var(--white); }
.ub-semester { display: flex; align-items: center; gap: var(--space-2); margin: 0; font-weight: 600; font-size: 13px; color: var(--ink-500); }
.ub-semester select { min-width: 230px; }
.ub-context-note { margin-left: auto; font-size: 13px; color: var(--ink-500); }
.ub-steps { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.ub-step { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3); border-radius: var(--radius-md); background: var(--ink-50); border: 1px solid var(--ink-200); }
.ub-step strong { display: block; font-size: 14px; color: var(--ink-900); }
.ub-step small { display: block; font-size: 12px; color: var(--ink-500); }
.ub-step-num { flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--ink-200); font-weight: 700; font-size: 13px; color: var(--ink-700); }
.ub-step.is-done { background: #f0fdf4; border-color: #bbf7d0; }
.ub-step.is-done .ub-step-num { background: var(--success-600); color: #fff; }
.ub-step.is-current { background: var(--brand-50); border-color: var(--brand-300); box-shadow: var(--shadow-xs); }
.ub-step.is-current .ub-step-num { background: var(--brand-600); color: #fff; }
.ub-card { margin-bottom: var(--space-4); }
.ub-card-head { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-4); }
.ub-card-head h3 { margin: 0 0 2px; font-size: 17px; }
.ub-card-head p { margin: 0; font-size: 13.5px; }
.ub-card-head > div { flex: 1; min-width: 0; }
.ub-badge { flex: 0 0 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); font-weight: 800; }
.ub-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); }
.ub-field { padding: 8px 10px; border-radius: var(--radius-sm); background: var(--ink-50); border: 1px dashed var(--ink-200); font-size: 13px; }
.ub-field strong { display: block; color: var(--ink-900); }
.ub-field span { color: var(--ink-500); }
.ub-field code { font-size: 12.5px; color: var(--brand-700); }
.ub-field.is-required { border-style: solid; border-color: var(--brand-300); background: var(--brand-25); }
.ub-field.is-required strong::after { content: " *"; color: var(--danger-600); }
.ub-more { margin-top: var(--space-3); font-size: 13.5px; }
.ub-more > summary { cursor: pointer; color: var(--brand-700); font-weight: 600; }
.ub-more ul { margin: var(--space-2) 0 0; padding-left: 20px; line-height: 1.6; color: var(--ink-700); }
.ub-more .table-wrap { margin-top: var(--space-2); }
.ub-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: var(--space-5); margin-bottom: var(--space-4); border: 2px dashed var(--ink-300); border-radius: var(--radius-lg); background: var(--ink-50); color: var(--ink-500); cursor: pointer; text-align: center; font-weight: 400; transition: border-color .15s, background .15s; }
.ub-drop strong { color: var(--ink-900); font-size: 15px; }
.ub-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ub-drop:hover, .ub-drop.is-drag { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.ub-drop.has-file { border-style: solid; border-color: var(--success-600); background: #f0fdf4; color: var(--success-600); }
.ub-upload { position: relative; }
.ub-status { margin-bottom: var(--space-4); }
.ub-progress { height: 8px; border-radius: 999px; background: var(--ink-100); overflow: hidden; margin-bottom: var(--space-2); }
.ub-progress span { display: block; height: 100%; background: var(--success-600); border-radius: 999px; }
.ub-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ub-checklist li { display: flex; align-items: center; gap: var(--space-2); padding: 8px 10px; border-radius: var(--radius-sm); font-size: 13.5px; }
.ub-checklist li > span:not(.ub-check), .ub-checklist li > a { flex: 1; }
.ub-checklist li.is-ok { background: #f0fdf4; color: var(--ink-700); }
.ub-checklist li.is-ok .ub-check { color: var(--success-600); }
.ub-checklist li.is-todo { background: var(--warning-100); }
.ub-checklist li.is-todo .ub-check, .ub-checklist li.is-todo strong { color: #92400e; }
.ub-checklist a { color: #92400e; font-weight: 600; }
.ub-check { display: inline-flex; }
.ub-wide { width: 100%; justify-content: center; margin-bottom: var(--space-2); }
.ub-danger { border-color: #fecaca; }
.ub-danger > summary { cursor: pointer; color: var(--danger-600); font-weight: 600; display: flex; align-items: center; gap: 6px; }
@media (max-width: 900px) {
  .ub-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ub-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ub-context-note { margin-left: 0; width: 100%; }
}
@media (max-width: 560px) {
  .ub-steps, .ub-fields { grid-template-columns: 1fr; }
  .ub-card-head { flex-wrap: wrap; }
  .ub-semester select { min-width: 0; width: 100%; }
}

/* Ujian: watermark, pengumuman pengawas, konsol */
.xp-watermark { position: fixed; inset: -20%; z-index: 40; pointer-events: none; overflow: hidden; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 70px 90px; padding: 40px; transform: rotate(-22deg); opacity: .06; user-select: none; }
.xp-watermark span { font-size: 15px; font-weight: 700; color: var(--ink-900); white-space: nowrap; }
.xp-announce { position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 60; width: min(560px, calc(100% - 32px)); display: flex; flex-direction: column; gap: 8px; }
.xp-announce-item { background: #fffbeb; border: 2px solid var(--warning-600); border-radius: var(--radius-md); padding: 12px 14px; box-shadow: var(--shadow-lg); }
.xp-announce-item strong { display: block; color: #92400e; font-size: 13px; }
.xp-announce-item p { margin: 4px 0 8px; font-size: 15px; color: var(--ink-900); }
.xp-announce-item button { border: 0; background: var(--warning-600); color: #fff; border-radius: 8px; padding: 5px 14px; font-weight: 700; cursor: pointer; }
.pc-token-value.is-fresh { animation: pc-fresh 2.4s ease; }
@keyframes pc-fresh { 0% { color: var(--success-600); transform: scale(1.08); } 100% { transform: none; } }
.pc-stat.is-risk strong { color: var(--danger-600); }
.pc-signal { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pc-announce-form { display: flex; gap: var(--space-2); }
.pc-announce-form input { flex: 1; }
.pc-announce-list { list-style: none; margin: var(--space-3) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.pc-announce-list li { padding: 6px 10px; background: var(--ink-50); border-radius: var(--radius-sm); }

/* Analisis hasil ujian */
.ea-card { margin-top: var(--space-4); }
.ea-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-5); }
.ea-sub { margin: 0 0 var(--space-2); font-size: 15px; display: inline; }
.ea-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); margin: var(--space-2) 0 var(--space-4); }
.ea-stats div { padding: 8px 10px; background: var(--ink-50); border-radius: var(--radius-sm); }
.ea-stats small { display: block; font-size: 11.5px; color: var(--ink-500); }
.ea-stats strong { font-size: 17px; }
.ea-histogram { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 6px; align-items: end; height: 150px; }
.ea-bar { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; justify-content: flex-end; }
.ea-bar progress { writing-mode: vertical-lr; direction: rtl; width: 100%; height: 110px; appearance: none; -webkit-appearance: none; border: 0; background: transparent; }
.ea-bar progress::-webkit-progress-bar { background: var(--ink-100); border-radius: 6px; }
.ea-bar progress::-webkit-progress-value { background: var(--warning-600); border-radius: 6px; }
.ea-bar progress::-moz-progress-bar { background: var(--warning-600); border-radius: 6px; }
.ea-bar.is-pass progress::-webkit-progress-value { background: var(--success-600); }
.ea-bar.is-pass progress::-moz-progress-bar { background: var(--success-600); }
.ea-bar small { font-size: 11px; color: var(--ink-500); }
.ea-bar-n { font-size: 12px; font-weight: 700; min-height: 16px; }
.ea-pairs { list-style: none; margin: var(--space-2) 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ea-pairs li { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; padding: 8px 10px; background: #fff7ed; border-radius: var(--radius-sm); font-size: 14px; }
.ea-pairs li .badge { margin-left: auto; }
.ea-pair-link { color: var(--ink-500); }
.ea-items { margin-top: var(--space-4); }
.ea-items > summary { cursor: pointer; }
@media (max-width: 900px) { .ea-grid { grid-template-columns: 1fr; } .ea-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Geofence Sekolah */
.gf-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-5); }
.gf-facts > div { display: flex; gap: var(--space-2); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--white); border: 1px solid var(--ink-200); font-size: 13.5px; line-height: 1.5; color: var(--ink-700); }
.gf-facts svg { flex: 0 0 auto; margin-top: 2px; color: var(--brand-600); }
.gf-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.gf-card { margin: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.gf-card.is-off { background: var(--ink-50); }
.gf-card.is-off .gf-pin { background: var(--ink-200); color: var(--ink-500); }
.gf-card-head { display: flex; gap: var(--space-3); align-items: center; }
.gf-pin { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-100); color: var(--brand-700); }
.gf-title h3 { margin: 0 0 4px; font-size: 17px; }
.gf-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.gf-specs { margin: 0; display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: var(--space-2); }
.gf-specs div { padding: 8px 10px; background: var(--ink-50); border-radius: var(--radius-sm); min-width: 0; }
.gf-card.is-off .gf-specs div { background: var(--white); }
.gf-specs dt { font-size: 11.5px; color: var(--ink-500); }
.gf-specs dd { margin: 2px 0 0; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.gf-specs dd small { font-weight: 400; color: var(--ink-500); }
.gf-warn { margin: 0; font-size: 12.5px; color: #92400e; background: var(--warning-100); padding: 6px 10px; border-radius: var(--radius-sm); display: flex; gap: 6px; align-items: flex-start; }
.gf-warn svg { flex: 0 0 auto; margin-top: 2px; }
.gf-actions { display: flex; gap: var(--space-2); flex-wrap: wrap; align-items: center; padding-top: var(--space-3); border-top: 1px solid var(--ink-100); }
.gf-actions form { margin: 0; }
.gf-spacer { flex: 1; }
.gf-delete { color: var(--danger-600); }
.gf-delete-note { font-size: 11.5px; color: var(--ink-500); width: 100%; text-align: right; }
.modal-box.gf-modal { max-width: 560px; }
.gf-modal h3 { margin-top: 0; }
.gf-modal-note { background: var(--info-100); color: #075985; padding: 6px 10px; border-radius: var(--radius-sm); }
.gf-coord { display: flex; gap: var(--space-2); }
.gf-coord input { flex: 1; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.gf-numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); }
.gf-numbers .hint { font-size: 11.5px; line-height: 1.4; }
.gf-unit { display: flex; align-items: center; gap: 6px; }
.gf-unit input { flex: 1; min-width: 0; }
.gf-unit span { color: var(--ink-500); font-size: 13px; }
.gf-form-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }
.gf-exc-form { display: grid; grid-template-columns: 2fr 1fr 1.2fr auto; gap: var(--space-3); align-items: end; }
.gf-exc-form .form-group { margin: 0; }
@media (max-width: 900px) { .gf-facts { grid-template-columns: 1fr; } .gf-exc-form { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .gf-list { grid-template-columns: 1fr; } .gf-specs, .gf-numbers { grid-template-columns: 1fr; } .gf-coord { flex-direction: column; } }

/* Modal Buat Jadwal Ujian */
.modal-box.sm-modal { max-width: 720px; }
.sm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-3); }
.sm-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.sm-form .form-group { margin-bottom: var(--space-3); }
.sm-row { display: flex; gap: var(--space-3); flex-wrap: wrap; align-items: flex-end; }
.sm-row > .form-group { flex: 1 1 140px; }
.sm-row > .sm-grow { flex: 2 1 220px; }
.sm-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; color: var(--ink-700); }
.sm-seg { display: inline-flex; padding: 3px; background: var(--ink-100); border-radius: 999px; }
.sm-seg label { margin: 0; cursor: pointer; }
.sm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sm-seg span { display: block; padding: 7px 18px; border-radius: 999px; font-weight: 700; color: var(--ink-700); }
.sm-seg input:checked + span { background: var(--white); color: var(--brand-700); box-shadow: var(--shadow-xs); }
.sm-seg input:focus-visible + span { outline: 2px solid var(--brand-500); }
.sm-classes { display: flex; flex-direction: column; gap: var(--space-2); max-height: 230px; overflow-y: auto; padding: var(--space-2); border: 1px solid var(--ink-200); border-radius: var(--radius-md); }
.sm-grade-all { font-size: 13px; font-weight: 700; margin: 0 0 4px; display: inline-flex; gap: 6px; align-items: center; color: var(--ink-700); }
.sm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-chip { margin: 0; cursor: pointer; }
.sm-chip input { position: absolute; opacity: 0; pointer-events: none; }
.sm-chip span { display: inline-block; padding: 5px 12px; border: 1.5px solid var(--ink-200); border-radius: 999px; font-size: 13px; font-weight: 600; }
.sm-chip input:checked + span { border-color: var(--brand-600); background: var(--brand-50); color: var(--brand-700); }
.sm-chip input:focus-visible + span { outline: 2px solid var(--brand-500); }
.sm-count { display: block; margin-top: 4px; font-size: 12px; color: var(--ink-500); }
.sm-count.is-error { color: var(--danger-600); font-weight: 700; }
.sm-time > .form-group { flex: 1 1 120px; }
.sm-dur-hint { margin: -6px 0 var(--space-3); }
.sm-more { margin: 0 0 var(--space-3); }
.sm-more > summary { cursor: pointer; font-weight: 600; color: var(--brand-700); font-size: 13.5px; margin-bottom: var(--space-2); }
.sm-actions { display: flex; align-items: center; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; padding-top: var(--space-3); border-top: 1px solid var(--ink-100); }
.sm-actions .text-xs { margin-right: auto; max-width: 320px; }

/* Paket mapel pilihan */
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.pk-card { position: relative; display: block; margin: 0; padding: var(--space-4); border: 2px solid var(--ink-200); border-radius: var(--radius-lg); cursor: pointer; background: var(--white); font-weight: 400; }
.pk-card input { position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; }
.pk-card:has(input:checked) { border-color: var(--brand-600); background: var(--brand-50); box-shadow: var(--shadow-sm); }
.pk-code { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-100); color: var(--brand-700); font-size: 20px; font-weight: 800; margin-bottom: var(--space-2); }
.pk-card ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: var(--ink-900); }
.pk-twin { display: block; margin-top: 6px; font-size: 11.5px; color: var(--ink-500); }
.pk-inline { display: flex; gap: 6px; align-items: center; }
.pk-inline select { min-width: 220px; }
.pk-table td { padding: 6px; }
.pk-code-input { width: 64px; text-align: center; font-weight: 700; text-transform: uppercase; }
.pk-table tr.pk-new td { background: var(--ink-50); }
.pk-table tr.is-removed td { opacity: .4; text-decoration: line-through; }
.pk-admin { margin-bottom: var(--space-4); }
.eb-group td { background: var(--brand-25); border-top: 2px solid var(--brand-100); }
.lb-religion select { width: 100%; }
.lb-religion-info { display: flex; gap: 6px; align-items: center; padding: 8px 10px; background: var(--brand-50); border-radius: var(--radius-sm); font-size: 14px; }
.eq-religion-mix { padding: var(--space-3); margin-bottom: var(--space-3); border-radius: var(--radius-md); background: var(--brand-25); border: 1px solid var(--brand-100); }
.eq-religion-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }

/* Token Ujian (panitia) */
.tk-section { margin-bottom: var(--space-5); }
.tk-section h2 { font-size: 18px; margin: 0 0 var(--space-3); }
.tk-day { font-size: 14px; color: var(--ink-500); margin: var(--space-4) 0 var(--space-2); }
.tk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-3); }
.tk-grid.is-today { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.tk-card { background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; }
.tk-card.is-running { border: 2px solid var(--success-600); box-shadow: var(--shadow-md); }
.tk-card.is-finished { opacity: .6; }
.tk-card form { margin: 0; }
.tk-head { display: flex; flex-direction: column; gap: 2px; }
.tk-head > div { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); }
.tk-head small { color: var(--ink-500); font-size: 12.5px; }
.tk-time { font-size: 18px; font-weight: 800; color: var(--ink-900); }
.tk-token { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 34px; font-weight: 800; letter-spacing: .18em; color: var(--brand-700); text-align: center; padding: 10px 0; background: var(--brand-25); border-radius: var(--radius-md); }
.tk-card.is-big .tk-token { font-size: 54px; padding: 18px 0; }
.tk-token.is-fresh { animation: pc-fresh 2.4s ease; }
.tk-count { text-align: center; font-size: 13px; color: var(--ink-700); }
.tk-count strong { font-family: ui-monospace, monospace; font-size: 16px; }
.tk-subjects { margin: 0; font-size: 12.5px; color: var(--ink-500); line-height: 1.5; }
.tk-done > summary { cursor: pointer; font-weight: 600; color: var(--ink-500); margin-bottom: var(--space-2); }
#tk-stage:fullscreen { background: var(--ink-50); padding: 32px; overflow: auto; }
#tk-stage:fullscreen .tk-card.is-big .tk-token { font-size: 96px; }
#tk-stage:fullscreen .tk-later, #tk-stage:fullscreen .tk-done { display: none; }
.tk-subject { font-size: 18px; font-weight: 800; color: var(--ink-900); }
.tk-slot { font-size: 15px; margin: var(--space-3) 0 var(--space-2); }
.tk-slot.is-small { font-size: 13px; color: var(--ink-700); }

/* ============================================================
   Laporan Hasil Ujian (.xr-)
   ============================================================ */
.xr-filter { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: flex-end; padding: var(--space-3) var(--space-4); margin-bottom: var(--space-3); }
.xr-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--ink-500); min-width: 150px; flex: 1 1 150px; }
.xr-filter select { width: 100%; }
.xr-filter-actions { display: flex; gap: var(--space-2); }
.xr-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--ink-200); margin-bottom: var(--space-4); scrollbar-width: thin; }
.xr-tabs a { padding: 10px 14px; white-space: nowrap; font-weight: 600; font-size: 14px; color: var(--ink-500); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.xr-tabs a:hover { color: var(--ink-900); }
.xr-tabs a.is-active { color: var(--brand-700); border-bottom-color: var(--brand-500); }
.xr-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--ink-100); color: var(--ink-700); font-size: 11px; text-align: center; }
.xr-alerts { background: var(--warning-100); border: 1px solid #fcd34d; border-radius: var(--radius-md, 10px); padding: var(--space-3) var(--space-4); margin-bottom: var(--space-4); }
.xr-alerts p { margin: 2px 0; font-size: 13px; }
.xr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--space-3); margin-bottom: var(--space-4); }
.xr-kpis.is-compact { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin: 0; flex: 1; }
.xr-kpi { background: var(--surface, #fff); border: 1px solid var(--ink-200); border-left: 3px solid var(--ink-300); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.xr-kpi small { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-500); }
.xr-kpi strong { font-size: 26px; font-weight: 800; color: var(--ink-900); line-height: 1.15; }
.xr-kpi span { font-size: 12px; color: var(--ink-500); }
.xr-kpi.is-brand { border-left-color: var(--brand-500); }
.xr-kpi.is-green { border-left-color: var(--success-600); }
.xr-kpi.is-red { border-left-color: #dc2626; }
.xr-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-bottom: var(--space-4); }
.xr-grid-2 > .card { margin: 0; }
@media (max-width: 900px) { .xr-grid-2 { grid-template-columns: 1fr; } }
.xr-h { font-size: 15px; font-weight: 700; margin: 0 0 var(--space-3); }
.xr-bar { display: inline-block; width: 100%; max-width: 160px; height: 8px; border-radius: 999px; background: var(--ink-100); overflow: hidden; vertical-align: middle; }
.xr-bar > span { display: block; height: 100%; background: var(--brand-500); border-radius: 999px; }
.xr-bar.is-a > span { background: #16a34a; } .xr-bar.is-b > span { background: #2563eb; } .xr-bar.is-c > span { background: #d97706; } .xr-bar.is-d > span { background: #dc2626; }
.xr-pred { display: grid; grid-template-columns: auto 120px 1fr auto; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 13px; }
.xr-pred > .xr-bar { max-width: none; }
.xr-pred em { font-style: normal; color: var(--ink-500); font-size: 12px; white-space: nowrap; }
.xr-pred b { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: #fff; font-size: 12px; }
.xr-pred-A { background: #16a34a; } .xr-pred-B { background: #2563eb; } .xr-pred-C { background: #d97706; } .xr-pred-D { background: #dc2626; }
.xr-pred:not(:has(b)) { grid-template-columns: 120px 1fr auto; }
.xr-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 0; }
.xr-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-500); padding: 8px; border-bottom: 1px solid var(--ink-200); white-space: nowrap; }
.xr-table td { padding: 7px 8px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; }
.xr-table.is-striped tbody tr:nth-child(even) { background: var(--ink-50, #f8fafc); }
.xr-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.xr-wide { min-width: 140px; }
.xr-table .is-below, .is-below { color: #b91c1c; }
.xr-hint { font-size: 13px; background: var(--brand-100); color: var(--brand-700); padding: 8px 12px; border-radius: 8px; }
.xr-leger-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-2); }
.lg-cell.is-absent { color: #92400e; background: #fffbeb; font-weight: 700; }
.lg-cell.is-stop { color: #fff; background: #dc2626; font-weight: 800; }
.lg-cell.is-pending { font-style: italic; }
.lg-name a { color: inherit; text-decoration: none; }
.lg-name a:hover strong { text-decoration: underline; }
.xr-student-head { display: flex; gap: var(--space-4); justify-content: space-between; flex-wrap: wrap; align-items: flex-start; margin-bottom: var(--space-3); }
.xr-student-head h2 { margin: 4px 0; font-size: 22px; }
.xr-print-head { display: none; }
@media print {
  .xr-noprint, .xr-tabs, .xr-filter { display: none !important; }
  .xr-print-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4mm; border-bottom: 1px solid #94a3b8; padding-bottom: 2mm; }
  .xr-print-head strong { font-size: 13pt; } .xr-print-head small { color: #475569; }
  @page { size: A4 landscape; margin: 8mm; }
  .xr-table { font-size: 8.5pt; } .xr-table td, .xr-table th { padding: 3px 5px; }
  .xr-kpi, .xr-bar, .xr-bar > span, .xr-pred b, .lg-cell.is-stop, .lg-cell.is-absent { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .xr-grid-2 { grid-template-columns: 1fr 1fr; }
  .table-wrap, .lg-scroll { overflow: visible !important; }
}

/* Validasi Bank Soal Ujian (.bv-) */
.bv-panel { border-left: 4px solid var(--ink-300); }
.bv-panel.is-valid { border-left-color: #16a34a; }
.bv-panel.is-partial { border-left-color: #2563eb; }
.bv-panel.is-revisi { border-left-color: #dc2626; }
.bv-panel.is-stale { border-left-color: #d97706; }
.bv-head h3 { margin: 4px 0; font-size: 16px; }
.bv-list { list-style: none; padding: 0; margin: var(--space-3) 0 0; display: grid; gap: 8px; }
.bv-list li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--ink-100); border-radius: 8px; }
.bv-name { font-weight: 600; min-width: 180px; }
.bv-note { flex-basis: 100%; margin: 4px 0 0; padding: 6px 10px; border-left: 3px solid var(--ink-300); background: var(--ink-50, #f8fafc); font-size: 13px; }
.bv-actions { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--ink-100); }
.bv-form { display: grid; gap: 8px; }
.bv-form textarea { width: 100%; }

/* Atur Pengampu Ujian (.tp-) */
.tp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.tp-head h3 { margin: 0 0 2px; font-size: 16px; }
.tp-bulk { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tp-bulk select { min-width: 220px; }
.tp-table select { min-width: 240px; max-width: 100%; }
.tp-table select.is-changed { border-color: var(--brand-500); box-shadow: 0 0 0 2px var(--brand-100); }
.tp-hint { display: inline-block; margin-left: 6px; font-size: 12px; color: var(--brand-700); background: var(--brand-100); border: 0; border-radius: 999px; padding: 2px 8px; cursor: pointer; }
.tp-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); padding: 12px 16px; margin-top: var(--space-3); background: var(--surface, #fff); border: 1px solid var(--ink-200); border-radius: 12px; box-shadow: 0 -4px 16px rgba(15, 23, 42, .08); }

/* ---------------------------------------------------------------- Layar ujian: HP & pesan singkat */
.xp-pager, .xp-sheet-head, .xp-sheet-backdrop { display: none; }
.xp-q-current-hint { display: none; }
.xp-nav-item.is-current { outline: 2px solid var(--brand-600); outline-offset: 1px; }
.xp-toast {
  position: fixed; left: 50%; top: calc(72px + env(safe-area-inset-top)); transform: translateX(-50%); z-index: 260;
  max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px;
  background: #111827; color: #fff; font-size: 0.86rem; font-weight: 600; box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.xp-toast[hidden] { display: none; }

@media (max-width: 900px) {
  .xl-notice { font-size: 0.76rem; padding: 8px 12px; }
  .xp.is-paged { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  .xp-q { padding: var(--space-4); }
  .xp-q-stem { font-size: 1.05rem; line-height: 1.65; }
  .xp-q-image { max-height: 46vh; margin-left: auto; margin-right: auto; }
  /* Pilihan jawaban: target sentuh besar, seluruh kotak bisa diketuk. */
  .xp-option { min-height: 56px; align-items: center; padding: 12px 14px; gap: 12px; border-radius: 14px; }
  .xp-option input { width: 20px; height: 20px; margin: 0; }
  .xp-option-key { width: 32px; height: 32px; border-radius: 9px; font-size: 0.92rem; }
  .xp-option-text { font-size: 1rem; line-height: 1.45; }
  .xp-option-image { max-width: 100%; max-height: 32vh; }
  .xp-options.is-truefalse { flex-direction: row; }
  .xp-options.is-truefalse .xp-option { flex: 1; justify-content: center; }
  .xp-flag { padding: 7px 12px; font-size: 0.8rem; }

  /* Navigasi bawah. */
  .xp.is-paged .xp-pager {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.97); border-top: 1px solid var(--ink-200); box-shadow: 0 -8px 24px rgba(15,23,42,.10);
  }
  .xp-pager-btn {
    min-height: 50px; border-radius: 14px; border: 1px solid var(--ink-200); background: var(--white);
    font: inherit; font-weight: 700; font-size: 0.95rem; color: var(--ink-700); cursor: pointer;
  }
  .xp-pager-btn.is-next { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
  .xp-pager-btn:disabled { opacity: .4; }
  .xp-pager-mid {
    min-height: 50px; padding: 4px 14px; border-radius: 14px; border: 0; background: var(--brand-50); color: var(--brand-700);
    font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; cursor: pointer;
  }
  .xp-pager-mid strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
  .xp-pager-mid small { font-size: 0.7rem; font-weight: 600; }

  /* Daftar soal sebagai panel dari bawah. */
  .xp.is-paged .xp-rail {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 120; order: 0;
    max-height: 82dvh; overflow-y: auto; transform: translateY(105%); transition: transform .22s ease;
  }
  .xp.is-paged.sheet-open .xp-rail { transform: none; }
  .xp.is-paged .xp-rail-inner { border-radius: 22px 22px 0 0; border-bottom: 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); box-shadow: 0 -12px 40px rgba(15,23,42,.25); }
  .xp.is-paged .xp-sheet-head { display: flex; align-items: center; justify-content: space-between; }
  .xp-sheet-close { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--ink-200); background: var(--white); font-size: 1rem; cursor: pointer; }
  .xp.is-paged .xp-nav { grid-template-columns: repeat(6, 1fr); gap: 8px; }
  .xp.is-paged .xp-nav-item { min-height: 44px; font-size: 0.9rem; border-radius: 10px; }
  .xp.is-paged .xp-legend { flex-direction: row; flex-wrap: wrap; gap: 6px 14px; }
  .xp.is-paged .xp-submit { min-height: 52px; font-size: 1rem; }
  .xp-sheet-backdrop.is-open { display: block; position: fixed; inset: 0; z-index: 110; background: rgba(15,23,42,.45); }
}
@media (prefers-reduced-motion: reduce) { .xp.is-paged .xp-rail { transition: none; } }
/* Konfirmasi "Kumpulkan" muncul di atas panel daftar soal di HP. */
body.exam-locked .modal-overlay { z-index: 280; }
/* Baris baru yang ditulis panitia di teks soal tetap tampil. */
.xp-q-stem { white-space: pre-line; }
.xp-toast { border-radius: 14px; text-align: center; width: max-content; max-width: min(420px, calc(100vw - 32px)); }
/* Lompat ke soal: kepala soal tidak tertutup bilah atas yang menempel. */
.exam-locked .xp-q { scroll-margin-top: 92px; }

/* Satu soal per layar (HP & laptop). */
.xp.is-paged .xp-q { display: none; }
.xp.is-paged .xp-q.is-current { display: block; }
.xp.is-paged .xp-pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.xp-pager-btn {
  min-height: 46px; border-radius: 12px; border: 1px solid var(--ink-200); background: var(--white);
  font: inherit; font-weight: 700; font-size: 0.92rem; color: var(--ink-700); cursor: pointer;
}
.xp-pager-btn:hover:not(:disabled) { border-color: var(--brand-500); }
.xp-pager-btn.is-next { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.xp-pager-btn.is-next:hover { background: var(--brand-700); }
.xp-pager-btn:disabled { opacity: .4; cursor: default; }
.xp-pager-mid {
  min-height: 46px; padding: 4px 18px; border-radius: 12px; border: 0; background: var(--brand-50); color: var(--brand-700);
  font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; cursor: pointer;
}
.xp-pager-mid strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.xp-pager-mid small { font-size: 0.72rem; font-weight: 600; }
.xp-submit.is-attention { box-shadow: 0 0 0 4px var(--brand-100), 0 0 0 7px var(--brand-500); }
@media (min-width: 901px) {
  .xp-pager-list { display: none; }
  .xp.is-paged .xp-pager { max-width: 560px; width: 100%; margin: 0 auto; }
  .xp.is-paged .xp-q.is-current { min-height: 52vh; }
}
@media (max-width: 900px) {
  .xp-pager-btn { min-height: 50px; border-radius: 14px; font-size: 0.95rem; }
  .xp-pager-mid { min-height: 50px; border-radius: 14px; padding: 4px 14px; }
}

/* Bank Soal Ujian: pengunggah soal & tautan dari halaman ujian per kelas. */
.eq-author { font-size: 0.72rem; font-weight: 600; color: var(--ink-500); background: var(--ink-100); padding: 2px 8px; border-radius: 999px; }
.eq-author.is-mine { color: var(--brand-700); background: var(--brand-100); }
.eq-bank-link { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; padding: var(--space-4); margin-bottom: var(--space-4);
  border: 1px dashed var(--brand-300, #a5b4fc); border-radius: var(--radius-lg); background: var(--brand-50); }
.eq-bank-link > div { flex: 1 1 260px; display: flex; flex-direction: column; gap: 2px; }
.eq-bank-link small { color: var(--ink-500); }
/* Langkah upload: kata tebal & kode tetap sebaris dengan kalimatnya. */
.eq-steps strong, .eq-steps small, .eq-steps code { display: inline; margin: 0; }
/* Lobi: mapel pilihan minat. */
.lb-elective { display: flex; gap: 10px; align-items: flex-start; margin: var(--space-3) 0; }
.lb-elective p { margin: 4px 0 8px; }
.lb-elective-ok { margin: var(--space-3) 0; }

/* Jenis penilaian di upload jadwal: dipilih sadar & selalu terlihat. */
.ub-type-pill { display: inline-block; padding: 2px 14px; border-radius: 999px; font-size: 0.8em; color: #fff; vertical-align: middle; }
.ub-type-pill.is-pts, .ub-type-banner.is-pts > strong { background: #2563eb; }
.ub-type-pill.is-pas, .ub-type-banner.is-pas > strong { background: #c2410c; }
.ub-type-banner { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; padding: var(--space-4); margin-bottom: var(--space-4); border-radius: var(--radius-lg); border: 2px solid; }
.ub-type-banner.is-pts { border-color: #93c5fd; background: #eff6ff; }
.ub-type-banner.is-pas { border-color: #fdba74; background: #fff7ed; }
.ub-type-banner > strong { color: #fff; font-size: 1.6rem; font-weight: 800; padding: 10px 18px; border-radius: 14px; letter-spacing: .04em; }
.ub-type-banner > div { flex: 1 1 280px; display: flex; flex-direction: column; gap: 2px; }
.ub-type-banner > div b { font-size: 1.1rem; }
.ub-type-banner form { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ub-type-choose { border: 0; padding: 0; margin: 0 0 var(--space-3); display: flex; gap: var(--space-3); flex-wrap: wrap; }
.ub-type-choose legend { font-weight: 700; margin-bottom: 8px; width: 100%; }
.ub-type-opt { flex: 1 1 200px; display: flex; gap: 10px; align-items: center; padding: 12px 16px; border: 2px solid var(--ink-200); border-radius: 14px; cursor: pointer; }
.ub-type-opt span { display: flex; flex-direction: column; }
.ub-type-opt b { font-size: 1.1rem; }
.ub-type-opt small { color: var(--ink-500); }
.ub-type-opt.is-pts:has(input:checked) { border-color: #2563eb; background: #eff6ff; }
.ub-type-opt.is-pas:has(input:checked) { border-color: #c2410c; background: #fff7ed; }
/* Atur Pengampu ringkas: satu baris per mapel·tingkat. */
.tp-filter { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.tp-filter .checkbox-row { white-space: nowrap; }
.tp-grade-row td { background: var(--ink-50, #f8fafc); font-weight: 800; color: var(--brand-700); font-size: 0.85rem; letter-spacing: .03em; }
.tp-table tr.is-empty td:first-child strong::after { content: ' •'; color: #dc2626; }
.tp-table td { vertical-align: middle; }
.tp-table select { width: 100%; min-width: 260px; }
/* Jadwal Ujian: kotak publikasi. */
.js-publish { display: flex; gap: var(--space-4); align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid var(--brand-500); }
.js-publish > div { flex: 1 1 360px; }
.js-publish .is-ok { color: var(--success-600); }
/* Atur Pengampu: tim guru (chip). */
.tp-team { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 4px; border-radius: 10px; }
.tp-team.is-changed { box-shadow: 0 0 0 2px var(--brand-100); background: var(--brand-50); }
.tp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--brand-100); color: var(--brand-700); font-weight: 600; font-size: 0.85rem; }
.tp-chip-x { border: 0; background: rgba(255,255,255,.7); color: var(--brand-700); width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 0.95rem; line-height: 1; }
.tp-chip-x:hover { background: #fee2e2; color: #b91c1c; }
.tp-team .tp-add { width: auto; min-width: 180px; max-width: 260px; }
.tp-mixed { flex-basis: 100%; color: #b45309; }
/* Jadwal Ujian: kolom token. */
.js-token-cell { white-space: nowrap; }
.js-token { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; letter-spacing: .12em; color: var(--brand-700); }
.js-token.is-fresh { animation: js-token-flash 2.4s ease; }
@keyframes js-token-flash { 0% { background: #fef08a; } 100% { background: transparent; } }
.js-token-note { display: block; font-size: 0.72rem; }
.js-pkg-warn { color: #b45309; font-weight: 600; }
/* Jadwal Ujian: daftar kelas yang bisa dibuka. */
.js-classes summary { cursor: pointer; list-style: none; }
.js-classes summary::-webkit-details-marker { display: none; }
.js-classes ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 3px; min-width: 170px; }
.js-classes li { display: flex; gap: 6px; align-items: baseline; font-size: 0.82rem; }
.js-classes li strong { min-width: 48px; }
@media print { .js-classes ul { display: none; } }
.eb-live { font-size: 0.72rem; color: var(--success-600); font-weight: 700; margin-left: 4px; }
.xp-pick-note { display: block; margin-top: 2px; font-weight: 500; color: var(--danger-600, #dc2626); }

/* ---------------------------------------------------------- Pemantauan ujian langsung */
.mon-summary { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.mon-summary small { font-size: .72rem; color: var(--ink-500); }
.xlive-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: xlive-pulse 2s infinite; vertical-align: middle; margin-right: 4px; }
.xlive-dot.is-off { background: #dc2626; animation: none; }
@keyframes xlive-pulse { 0% { box-shadow: 0 0 0 0 rgba(22,163,74,.45); } 70% { box-shadow: 0 0 0 7px rgba(22,163,74,0); } 100% { box-shadow: 0 0 0 0 rgba(22,163,74,0); } }
.xlive-sound { white-space: nowrap; }
.xlive-stack { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); }
.xlive-toast { position: relative; background: #fff; border-radius: 12px; padding: 12px 36px 12px 14px; box-shadow: 0 10px 30px rgba(15,23,42,.18); border-left: 5px solid #d97706; display: flex; flex-direction: column; gap: 3px; font-size: .86rem; animation: xlive-in .25s ease-out; }
.xlive-toast.is-stop { border-left-color: #dc2626; }
.xlive-toast strong { color: #111827; }
.xlive-toast span { color: #4b5563; }
.xlive-toast .xlive-links { display: flex; gap: 12px; margin-top: 2px; }
.xlive-toast .xlive-links a { font-weight: 600; }
.xlive-toast button { position: absolute; top: 6px; right: 8px; border: 0; background: none; font-size: 1.2rem; line-height: 1; color: #6b7280; cursor: pointer; }
@keyframes xlive-in { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }
.pc-livebar { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: .82rem; color: var(--ink-500); margin-bottom: var(--space-3); }
.pc-device { white-space: nowrap; }
.pc-device.is-app { color: #15803d; font-weight: 600; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .xlive-toast { background: #1f2937; } :root:not([data-theme="light"]) .xlive-toast strong { color: #f9fafb; } :root:not([data-theme="light"]) .xlive-toast span { color: #d1d5db; } }
:root[data-theme="dark"] .xlive-toast { background: #1f2937; }
:root[data-theme="dark"] .xlive-toast strong { color: #f9fafb; }
:root[data-theme="dark"] .xlive-toast span { color: #d1d5db; }

/* Batas pelanggaran di Jadwal Ujian */
.xr-vlimit-form { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.xr-vlimit-form > div { flex: 1 1 320px; }
.xr-vlimit-pick { display: flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.xr-vlimit-pick select { width: auto; min-width: 120px; }

/* Monitoring per siswa */
.ms-toolbar { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.ms-toolbar input { flex: 1 1 240px; }
.ms-toolbar select { flex: 0 1 200px; }
.ms-stats { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.ms-table td { vertical-align: top; }
.ms-table .ms-actions { white-space: nowrap; }
.ms-table .ms-actions form, .ms-table .ms-actions details { display: inline-block; vertical-align: top; }
.ms-row-stopped td { background: rgba(220, 38, 38, .05); }
.ms-panel { position: absolute; z-index: 9000; width: min(340px, calc(100vw - 16px)); padding: 12px 14px; box-shadow: 0 14px 40px rgba(15,23,42,.22); display: flex; flex-direction: column; gap: 10px; }
.ms-panel[hidden], .ms-panel .ms-f[hidden] { display: none; }
.ms-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ms-panel-close { border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: var(--ink-500); }
.ms-panel textarea { width: 100%; }
.ms-panel-links { display: flex; gap: 14px; font-size: .85rem; border-top: 1px solid var(--ink-100); padding-top: 8px; }

/* Editor soal: gambar tempel di mana saja dalam teks */
.qe-wrap { display: flex; flex-direction: column; gap: 6px; }
.qe-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qe-hint { font-size: .8rem; color: var(--ink-500); }
.qe-status { font-size: .8rem; color: #b45309; font-weight: 600; }
.qe-editor { min-height: 140px; padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: 12px; background: var(--surface, #fff); line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; outline: none; }
.qe-editor:focus { border-color: var(--brand-500, #4f46e5); box-shadow: 0 0 0 3px rgba(79,70,229,.15); }
.qe-editor.is-empty::before { content: attr(data-placeholder); color: var(--ink-400); pointer-events: none; }
.qe-editor.is-drop { border-style: dashed; border-color: var(--brand-500, #4f46e5); background: rgba(79,70,229,.04); }
.qe-editor img, .q-inline-img { display: block; max-width: 100%; max-height: 420px; height: auto; margin: 8px 0; border-radius: 8px; }
.qe-uploading { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--ink-50); font-size: .85rem; color: var(--ink-500); }
.qe-legacy summary { cursor: pointer; margin-top: 8px; }
.xp-q-stem .q-inline-img { margin: 10px 0; }
.qe-opt-preview figcaption { font-size: .72rem; color: #15803d; }

/* Pelanggaran: unduh & kelompok event */
.vio-download { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 var(--space-4); }
.vio-group-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; padding: 12px 14px 8px; margin-top: 8px; border-bottom: 2px solid var(--brand-500, #4f46e5); }
.vio-group-head strong { font-size: 1rem; }
.vio-group-head span { color: var(--ink-500); font-size: .85rem; }
.vio-group-head a { margin-left: auto; font-size: .85rem; font-weight: 600; }

/* Jadwal: ujian yang sudah lewat dilipat di bawah */
.xr-past { margin-top: var(--space-4); }
.xr-past-summary { cursor: pointer; padding: 12px 16px; border-radius: 12px; background: var(--ink-50); color: var(--ink-600); font-weight: 600; margin-bottom: var(--space-3); }
.js-day.is-past { opacity: .85; }
@media print { .xr-past { display: block; } .xr-past > summary { display: none; } }

/* Mengumpulkan jawaban */
.xl-spinner { width: 42px; height: 42px; margin: 12px auto 0; border-radius: 50%; border: 4px solid rgba(79,70,229,.2); border-top-color: #4f46e5; animation: xl-spin .9s linear infinite; }
@keyframes xl-spin { to { transform: rotate(360deg); } }
.ms-panel-links[hidden] { display: none; }

/* Palet rumus & pratinjau soal */
.qe-palette { border: 1px solid var(--ink-200); border-radius: 12px; padding: 10px 12px; background: var(--ink-50); display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; }
.qe-palette-help { font-size: .8rem; color: var(--ink-500); margin: 0; }
.qe-pal-group strong { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-500); }
.qe-pal-items { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.qe-pal-btn { border: 1px solid var(--ink-200); background: var(--surface, #fff); border-radius: 8px; padding: 4px 8px; min-width: 36px; cursor: pointer; font-size: .95rem; }
.qe-pal-btn:hover { border-color: var(--brand-500, #4f46e5); background: rgba(79,70,229,.06); }
.qe-preview { border: 1px dashed var(--ink-200); border-radius: 12px; padding: 14px 16px; min-height: 60px; }
.qe-preview .xp-q-stem { white-space: pre-line; }
.katex { font-size: 1.08em; }
.sm-elective { padding: 10px 12px; border: 1px dashed var(--ink-200); border-radius: 12px; }
.sm-elective-box { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.sm-elective-box[hidden] { display: none; }
.sm-suggest { display: flex; flex-wrap: wrap; gap: 6px; }
.sm-sg { border: 1px solid var(--ink-200); background: var(--surface, #fff); border-radius: 999px; padding: 5px 12px; font-size: .85rem; cursor: pointer; }
.sm-sg.is-full { border-color: #16a34a; color: #15803d; font-weight: 600; }
.sm-sg small { font-weight: 400; color: var(--ink-500); margin-left: 4px; }
.sm-sg:hover { background: rgba(79,70,229,.06); }
.sm-sg.is-active { background: #4f46e5; border-color: #4f46e5; color: #fff; }
.sm-sg.is-active small { color: rgba(255,255,255,.85); }
.sm-chip.is-blocked { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.sm-el-count { margin-left: 4px; font-size: .7rem; color: #15803d; font-weight: 700; }
.sm-grade-all.is-blocked, label.is-blocked { opacity: .4; cursor: not-allowed; }
.xr-rel { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 3px; margin-top: 3px; }
.xr-rel span { font-size: .68rem; padding: 1px 6px; border-radius: 999px; background: #dcfce7; color: #166534; white-space: nowrap; }
.xr-rel span.is-missing { background: #fee2e2; color: #b91c1c; }
.sq-rel-head { margin: var(--space-4) 0 var(--space-2); padding-bottom: 6px; border-bottom: 2px solid var(--brand-500, #4f46e5); font-size: 1rem; }
.sq-rel-head small { font-weight: 400; color: var(--ink-500); margin-left: 6px; }
.xr-parts { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.xr-part { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.xr-part-name { font-size: .8rem; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }

/* ===== Teks Bacaan & Benar-Salah Majemuk (27 Nov 2026) ===== */
.xp-stim, .eq-stim { border: 1px solid #bfdbfe; background: #eff6ff; border-radius: 12px; margin: 0 0 14px; }
.xp-stim-head, .eq-stim-head { font-weight: 700; color: #1e40af; padding: 10px 14px; font-size: .92rem; }
.xp-stim > summary { cursor: pointer; list-style: none; }
.xp-stim > summary::-webkit-details-marker { display: none; }
.xp-stim > summary::after { content: ' ▾'; font-weight: 400; }
.xp-stim:not([open]) > summary::after { content: ' ▸ (tampilkan)'; }
.xp-stim-body, .eq-stim-body { padding: 0 14px 12px; line-height: 1.65; color: var(--ink-900); overflow-wrap: anywhere; }
.xp-stim-body { max-height: 45vh; overflow-y: auto; }
.xp-stim-body img, .eq-stim-body img { max-width: 100%; height: auto; }
.eq-stim { margin-top: 6px; }
.xp-tfm { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.xp-tfm-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid var(--ink-200); border-radius: 12px; background: var(--white, #fff); }
.xp-tfm-head { border: 0; background: transparent; padding: 0 12px; font-size: .75rem; color: var(--ink-500); font-weight: 600; }
.xp-tfm-head span:not(:first-child) { width: 84px; text-align: center; }
.xp-tfm-text { line-height: 1.5; overflow-wrap: anywhere; }
.xp-tfm-text img { display: block; max-width: 100%; margin-top: 6px; }
.xp-tfm-pick { position: relative; cursor: pointer; }
.xp-tfm-pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.xp-tfm-pick span { display: inline-flex; align-items: center; justify-content: center; gap: 4px; width: 84px; min-height: 44px; border: 1.5px solid var(--ink-200); border-radius: 10px; font-weight: 700; color: var(--ink-500); }
.xp-tfm-pick span em { font-style: normal; font-size: .85rem; }
.xp-tfm-pick.is-b input:checked + span { background: #16a34a; border-color: #16a34a; color: #fff; }
.xp-tfm-pick.is-s input:checked + span { background: #dc2626; border-color: #dc2626; color: #fff; }
.xp-tfm-pick input:focus-visible + span { outline: 3px solid var(--brand-300, #a5b4fc); outline-offset: 2px; }
@media (max-width: 560px) {
  .xp-tfm-row { grid-template-columns: 1fr 1fr; }
  .xp-tfm-text { grid-column: 1 / -1; }
  .xp-tfm-head { display: none; }
  .xp-tfm-pick span { width: 100%; }
}
.eq-key-tfm { display: inline-flex; gap: 6px; font-size: .8rem; }
.eq-key-tfm label { display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border: 1px solid var(--ink-200); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.eq-key-tfm label:has(input[value="B"]:checked) { background: #dcfce7; border-color: #16a34a; color: #166534; }
.eq-key-tfm label:has(input[value="S"]:checked) { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.eq-key-badge.is-s { color: #b91c1c; }
.eq-opts.is-tfm .eq-opt-letter { min-width: 1.6rem; }
.eq-import-stim { font-size: .78rem; color: #1e40af; margin-bottom: 2px; }
.eq-key-tfm[hidden], #qe-stim-body-wrap[hidden] { display: none !important; }
.eq-option-key:has(.eq-key-tfm:not([hidden])) { flex-basis: 86px; }
.eq-option-key .eq-key-tfm { flex-direction: column; }
@media (max-width: 640px) { .eq-option-key .eq-key-tfm { flex-direction: row; } }
.qe-palette[hidden] { display: none !important; }

/* ==== Jaring pengaman tampilan HP (audit responsif 27 Nov 2026) ====
   Diuji di 360 px dan 300 px (≈ HP dengan huruf sistem besar di aplikasi). */
@media (max-width: 640px) {
  input, select, textarea { max-width: 100%; }

  .table-wrap table { display: block; width: 100%; }

  /* Kartu tabel: nilai panjang (nama berkas, daftar) boleh patah, tidak menembus kartu. */
  .table-wrap tbody td { min-width: 0; overflow-wrap: break-word; flex-wrap: wrap; row-gap: 4px; }
  .table-wrap tbody td > * { min-width: 0; max-width: 100%; }
  .table-wrap tbody td[data-label]::before { flex: 0 0 auto; max-width: 45%; overflow-wrap: normal; }
  /* Sel berisi isian/daftar lipat: label di atas, isi selebar kartu. */
  .table-wrap tbody td:has(> form, > details, input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea, .tag-list) {
    flex-direction: column; align-items: stretch; text-align: left;
  }
  .table-wrap tbody td:has(> form, > details, input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea, .tag-list)::before { max-width: none; margin-right: 0; }
  /* Baris kosong / ringkasan (colspan) tidak diberi label kolom. */
  .table-wrap tbody td[colspan] { justify-content: center; text-align: center; }
  .table-wrap tbody td[colspan]::before { display: none; }

  /* Deret isian + tombol dalam satu baris: turun ke baris berikutnya bila sempit. */
  form.flex, .flex.items-end { flex-wrap: wrap; }
  form.flex > .form-group, .flex.items-end > .form-group { min-width: 0 !important; flex: 1 1 140px !important; }
  form.flex > .btn, .flex.items-end > .btn { flex: 0 0 auto; }

  /* Formulir di header halaman (filter tanggal dsb.). */
  .page-header form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; max-width: 100%; }
  .page-header form input[type=date] { flex: 1 1 140px; min-width: 0; }
  .inline-filter { flex-wrap: wrap; }
  .inline-filter label { flex: 1 1 100%; }

  /* Kartu langkah Upload Jadwal: tombol turun ke bawah teks. */
  .ub-card-head { flex-wrap: wrap; }
  .ub-card-head > div { flex: 1 1 180px; min-width: 0; }

  /* Batas pelanggaran di Jadwal Ujian. */
  .xr-vlimit-pick { flex-wrap: wrap; white-space: normal; }
  .xr-vlimit-pick select { min-width: 0; flex: 1 1 140px; }

  /* Daftar kelas lipat di Jadwal Ujian. */
  .js-classes, .js-classes ul { min-width: 0; max-width: 100%; }
  .js-classes li { flex-wrap: wrap; min-width: 0; }

  /* Tabel panduan yang lebar: geser di dalam kartunya sendiri. */
  .mg-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
