@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 4px 16px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ── App background (all admin/setup pages) ── */
body.app-page {
  background-color: #e8eef5;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(99, 102, 241, 0.1), transparent),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.4), transparent 70%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

body.app-page .sidebar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
}

body.app-page .main {
  background: transparent;
}

body.app-page .card,
body.app-page .stat-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

a { color: var(--accent); text-decoration: none; font-weight: 500; }
a:hover { color: var(--accent-hover); }

/* ── Auth pages (legacy + premium) ── */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background-color: #e8eef5;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(37, 99, 235, 0.14), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(99, 102, 241, 0.12), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}
.auth-card.wide { max-width: 600px; }

.badge {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.25rem; }
.auth-card .sub { color: var(--muted); font-size: 0.9rem; margin-bottom: 1.25rem; }
.auth-footer { margin-top: 1.25rem; text-align: center; font-size: 0.88rem; color: var(--muted); }

/* Premium auth — matches mobile login */
.auth-premium {
  --auth-accent: #4F46E5;
  --auth-accent-soft: rgba(79, 70, 229, 0.1);
  --auth-accent-border: rgba(79, 70, 229, 0.2);
  min-height: 100vh;
  background: #FAFBFC;
  color: #0F172A;
  position: relative;
  overflow-x: hidden;
}
.auth-premium--admin {
  --auth-accent: #7C3AED;
  --auth-accent-soft: rgba(124, 58, 237, 0.1);
  --auth-accent-border: rgba(124, 58, 237, 0.22);
}
.auth-premium--teacher {
  --auth-accent: #2563EB;
  --auth-accent-soft: rgba(37, 99, 235, 0.1);
  --auth-accent-border: rgba(37, 99, 235, 0.22);
}
.auth-premium--parent {
  --auth-accent: #0891B2;
  --auth-accent-soft: rgba(8, 145, 178, 0.1);
  --auth-accent-border: rgba(8, 145, 178, 0.22);
}
.auth-premium--welcome { --auth-accent: #4F46E5; }

.auth-premium__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.92) 0%, #F8FAFC 45%, #fff 100%);
}
.auth-premium__orb {
  position: absolute;
  border-radius: 50%;
}
.auth-premium__orb--1 {
  width: 260px; height: 260px;
  top: -120px; right: -80px;
  background: var(--auth-accent);
  opacity: 0.07;
}
.auth-premium__orb--2 {
  width: 220px; height: 220px;
  top: 180px; left: -100px;
  background: #6366F1;
  opacity: 0.05;
}
.auth-premium__orb--3 {
  width: 180px; height: 180px;
  bottom: -40px; right: -30px;
  background: #0EA5E9;
  opacity: 0.05;
}

.auth-premium__shell {
  position: relative;
  z-index: 1;
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-premium__shell--welcome {
  justify-content: center;
  align-items: center;
}
.auth-premium__legal {
  margin-top: auto;
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}
.auth-premium__legal a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.auth-premium__legal a:hover {
  color: var(--accent);
}

.auth-premium__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.auth-premium__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  transition: background 0.15s;
}
.auth-premium__back:hover {
  background: rgba(15, 23, 42, 0.05);
  color: #0F172A;
}
.auth-premium__role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--auth-accent-soft);
  border: 1px solid var(--auth-accent-border);
  color: var(--auth-accent);
  font-size: 0.82rem;
  font-weight: 700;
}
.auth-premium__role-emoji { font-size: 1rem; line-height: 1; }

.auth-premium__grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}
@media (max-width: 860px) {
  .auth-premium__grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .auth-premium__hero { text-align: center; }
  .auth-premium__hero-points { justify-content: center; }
}

.auth-premium__hero {
  padding: 0.5rem 0.25rem 0;
}
.auth-premium__illustration {
  color: var(--auth-accent);
  max-width: 320px;
  margin-bottom: 1.25rem;
}
.auth-premium__illustration svg { width: 100%; height: auto; display: block; }
.auth-premium__illustration--welcome {
  max-width: 280px;
  margin: 0 auto 1.25rem;
  color: #4F46E5;
}
.auth-premium__hero-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.auth-premium__hero-sub {
  color: #64748B;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 1rem;
  max-width: 28rem;
}
.auth-premium__hero-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.auth-premium__hero-points li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 500;
}
.auth-premium__hero-points li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--auth-accent);
  opacity: 0.75;
  flex-shrink: 0;
}

.auth-premium__card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 24px;
  padding: 1.5rem 1.5rem 1.35rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.auth-premium__card-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.2rem;
}
.auth-premium__card-sub {
  color: #64748B;
  font-size: 0.86rem;
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.auth-premium__form .alert { margin-bottom: 1rem; }
.auth-premium__footer-link {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: #64748B;
}
.auth-premium__footer-link a {
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
}
.auth-premium__footer-link a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-field { margin-bottom: 0.85rem; }
.auth-field label,
.auth-field .form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.4rem;
}
.auth-field__wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 0 0.85rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-field__wrap:focus-within {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--auth-accent) 18%, transparent);
}
.auth-field__icon {
  font-size: 1rem;
  line-height: 1;
  opacity: 0.85;
  flex-shrink: 0;
}
.auth-field__wrap input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.85rem 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0F172A;
  min-width: 0;
}
.auth-field__wrap input:focus { outline: none; }
.auth-field .form-hint { margin-top: 0.35rem; }

.auth-field__label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.auth-field__label-row .form-label,
.auth-field__label-row label {
  margin-bottom: 0;
}

.auth-forgot-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: -0.01em;
  transition: color 0.15s ease, opacity 0.15s ease;
}
.auth-forgot-link:hover {
  color: color-mix(in srgb, var(--auth-accent) 82%, #0F172A);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-forgot-link:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.auth-back-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid #E2E8F0;
  font-size: 0.88rem;
  color: #64748B;
}
.auth-back-row a {
  font-weight: 600;
  color: var(--auth-accent);
  text-decoration: none;
}
.auth-back-row a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-premium__submit {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 14px;
  background: var(--auth-accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, filter 0.12s;
}
.auth-premium__submit:hover { filter: brightness(1.04); }
.auth-premium__submit:active { transform: scale(0.99); }

.auth-otp-banner {
  background: #ECFDF5;
  border-color: #BBF7D0;
  color: #047857;
}

/* Welcome / role select */
.auth-welcome {
  width: 100%;
  max-width: 480px;
  text-align: center;
}
.auth-welcome__title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.45rem;
}
.auth-welcome__sub {
  color: #64748B;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 1.5rem;
}
.auth-welcome__label {
  font-size: 1rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.85rem;
}
.auth-welcome__footer {
  margin-top: 1.35rem;
  font-size: 0.88rem;
  color: #64748B;
}

.auth-role-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.auth-role-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 20px;
  padding: 1rem 1.1rem;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.03);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  color: inherit;
}
.auth-role-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  border-color: #CBD5E1;
}
.auth-role-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  flex-shrink: 0;
}
.auth-role-card--admin .auth-role-card__icon { background: rgba(124, 58, 237, 0.1); }
.auth-role-card--teacher .auth-role-card__icon { background: rgba(37, 99, 235, 0.1); }
.auth-role-card--parent .auth-role-card__icon { background: rgba(8, 145, 178, 0.1); }
.auth-role-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}
.auth-role-card__body strong {
  font-size: 1.02rem;
  color: #0F172A;
}
.auth-role-card__body span {
  font-size: 0.82rem;
  color: #64748B;
  line-height: 1.35;
}
.auth-role-card__arrow {
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
}
.auth-role-card--admin .auth-role-card__arrow { color: #7C3AED; }
.auth-role-card--teacher .auth-role-card__arrow { color: #2563EB; }
.auth-role-card--parent .auth-role-card__arrow { color: #0891B2; }

.section-title { font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin: 1.25rem 0 0.75rem; }

/* ── Forms ── */
.field { margin-bottom: 1rem; }
.field label, .form-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 0.4rem;
  font-weight: 600;
}
.field input, .field select, .field textarea,
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.92rem;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus,
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.field .err, .form-hint { font-size: 0.8rem; margin-top: 0.3rem; }
.field .err { color: var(--danger); }
.form-hint { color: var(--muted); }

.form-multiselect { min-height: 7rem; }
.form-textarea { min-height: 8rem; resize: vertical; line-height: 1.6; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.checkbox-grid label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  margin: 0;
}
.checkbox-grid input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 0.65rem 1.25rem;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
}
.btn:hover { background: var(--accent-hover); color: #fff !important; }
.btn:active { transform: scale(0.98); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.82rem; }
.btn-outline {
  background: var(--surface);
  color: var(--muted) !important;
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-outline:hover { background: var(--surface2); color: var(--text) !important; }
.btn-ghost { background: transparent; color: var(--accent) !important; box-shadow: none; padding-left: 0; }
.btn-ghost:hover { background: var(--accent-soft); }

/* ── Alerts ── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}
.alert-error { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: var(--success-soft); color: #065f46; border: 1px solid #a7f3d0; }
.alert-info { background: var(--accent-soft); color: #1e40af; border: 1px solid #bfdbfe; }

/* ── App shell ── */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 0;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.04);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, #eff6ff, #fff);
}
.sidebar-brand h1 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.sidebar-brand p {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.sidebar:not(.teacher-sidebar):not(.portal-sidebar) nav { padding: 1rem 0.75rem; flex: 1; }
.sidebar:not(.teacher-sidebar):not(.portal-sidebar) nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.15rem;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s;
}
.sidebar:not(.teacher-sidebar):not(.portal-sidebar) nav a:hover { background: var(--surface2); color: var(--text); }
.sidebar:not(.teacher-sidebar):not(.portal-sidebar) nav a.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.wizard-nav a::before {
  content: attr(data-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--surface2);
  color: var(--muted);
  flex-shrink: 0;
}
.wizard-nav a.active::before { background: rgba(255,255,255,0.25); color: #fff; }
.wizard-nav a.done::before { background: var(--success-soft); color: var(--success); }
.wizard-nav a.wizard-nav__dashboard::before { display: none; }
.wizard-nav a.wizard-nav__dashboard {
  margin-bottom: 0.65rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-weight: 600;
  color: var(--accent);
}
.wizard-nav a.wizard-nav__dashboard:hover {
  background: var(--accent-soft);
  color: var(--accent-hover);
}

.main {
  flex: 1;
  padding: 1.75rem 2rem 2.5rem;
  max-width: 1100px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}
.topbar h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.topbar .meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.2rem; }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 1rem; }
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 { font-size: 1rem; font-weight: 600; }
.card-header .count {
  font-size: 0.8rem;
  color: var(--muted);
  background: var(--surface2);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.page-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1.25rem; align-items: start; }

/* ── Stats ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent);
}
.stat-card.green::before { background: var(--success); }
.stat-card.purple::before { background: #7c3aed; }
.stat-card.orange::before { background: #ea580c; }
.stat-label { color: var(--muted); font-size: 0.82rem; font-weight: 500; margin-bottom: 0.35rem; }
.stat-value { font-size: 2rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1; }

/* ── Tables ── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.data-table th {
  text-align: left;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
}
.data-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); }
.data-table tbody tr:hover { background: var(--surface2); }
.data-table tbody tr:last-child td { border-bottom: none; }

.plain-list { list-style: none; }
.plain-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.plain-list li:last-child { border-bottom: none; }

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.empty-state .icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.5; }

.checklist { list-style: none; }
.checklist li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
}
.checklist li.done { color: var(--success); font-weight: 500; }
.checklist li.done::before { content: "✓ "; font-weight: 700; }
.checklist li.blocker { color: var(--danger); }
.checklist li.blocker::before { content: "✕ "; font-weight: 700; }
.checklist li.warning { color: var(--warning, #b45309); }
.checklist li.warning::before { content: "⚠ "; font-weight: 700; }
.checklist-detail {
  display: block;
  color: var(--muted);
  font-weight: 400;
  font-size: 0.88rem;
  margin-top: 0.15rem;
}
.checklist-fix {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}
.go-live-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface2);
}
.go-live-hero--ready {
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, var(--surface2));
}
.go-live-hero__ring {
  --pct: 0;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--primary) calc(var(--pct) * 1%), var(--border) 0);
  flex-shrink: 0;
}
.go-live-hero--ready .go-live-hero__ring {
  background: conic-gradient(var(--success) calc(var(--pct) * 1%), var(--border) 0);
}
.go-live-hero__pct {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
}
.go-live-hero__text h3 { margin: 0 0 0.35rem; }
.go-live-hero__text p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.go-live-section-title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.go-live-section-title--blocker { color: var(--danger); }
.go-live-section-title--warning { color: var(--warning, #b45309); }
.go-live-section-title--done { color: var(--success); }

code {
  background: var(--surface2);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85em;
  border: 1px solid var(--border);
}

.card-actions { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Teacher mobile ── */
.mobile-page {
  min-height: 100vh;
  background-color: #e8eef5;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(99, 102, 241, 0.1), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}
.mobile-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.mobile-header h1 { font-size: 1.05rem; font-weight: 600; }
.mobile-main { padding: 1.25rem; max-width: 480px; margin: 0 auto; }

/* Parent portal */
.parent-page { background-color: #eef2f7; }
.child-tab-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin-bottom: 1rem;
  padding-bottom: 0.25rem;
}
.child-tab {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.9);
  border: 1.5px solid var(--border);
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
}
.child-tab small { font-size: 0.72rem; color: var(--muted); font-weight: 500; margin-top: 0.1rem; }
.child-tab.active {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: transparent;
  color: #fff;
}
.child-tab.active small { color: rgba(255,255,255,0.85); }

.parent-child-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.parent-child-card__name { font-size: 1.1rem; font-weight: 700; }
.parent-child-card__meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }

.today-status-card {
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
  color: #fff;
}
.today-status-card__label { font-size: 0.8rem; opacity: 0.9; margin-bottom: 0.35rem; }
.today-status-card__value { font-size: 1.35rem; font-weight: 700; }
.today-status-card--present { background: linear-gradient(135deg, #059669, #10b981); }
.today-status-card--absent { background: linear-gradient(135deg, #dc2626, #ef4444); }
.today-status-card--leave { background: linear-gradient(135deg, #d97706, #f59e0b); }
.today-status-card--pending { background: linear-gradient(135deg, #64748b, #94a3b8); }

.attendance-calendar {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.attendance-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}
.attendance-calendar__header h2 {
  font-size: 0.95rem;
  font-weight: 700;
}
.cal-nav {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.cal-grid--labels span {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 0.35rem;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  position: relative;
  font-size: 0.82rem;
  font-weight: 600;
}
.cal-day--muted { opacity: 0.35; }
.cal-day--today { box-shadow: 0 0 0 2px var(--accent); }
.cal-day--present { background: #d1fae5; color: #047857; }
.cal-day--absent { background: #fee2e2; color: #b91c1c; }
.cal-day--leave { background: #fef3c7; color: #b45309; }
.cal-day--holiday { background: #ede9fe; color: #6d28d9; }
.cal-day--sunday { background: #f8fafc; color: #94a3b8; }
.cal-day--weekend { background: #f8fafc; color: #94a3b8; }
.cal-day--leave-approved {
  background: #d1fae5;
  color: #047857;
}
.cal-day--leave-approved.cal-day--today {
  box-shadow: 0 0 0 2px var(--accent);
}
.cal-day--leave-pending {
  box-shadow: inset 0 0 0 2px #d97706;
  background: linear-gradient(180deg, rgba(254, 243, 199, 0.75), rgba(255, 251, 235, 0.95));
}
.cal-day--leave-rejected {
  box-shadow: inset 0 0 0 2px #dc2626;
  background: linear-gradient(180deg, rgba(254, 226, 226, 0.65), rgba(254, 242, 242, 0.95));
}

/* Parent web calendar — readable labels */
.attendance-calendar--parent {
  margin-top: 1rem;
}
.cal-grid--parent {
  gap: 0.5rem;
}
.cal-day--parent {
  aspect-ratio: auto;
  min-height: 4.75rem;
  padding: 0.4rem 0.3rem 0.35rem;
  gap: 0.2rem;
  justify-content: flex-start;
}
.cal-day--parent .cal-day__num {
  font-size: 0.95rem;
  line-height: 1.1;
}
.cal-day__status-label {
  display: block;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  letter-spacing: 0.01em;
}
.cal-day--present .cal-day__status-label { color: #047857; }
.cal-day--absent .cal-day__status-label { color: #b91c1c; }
.cal-day--leave .cal-day__status-label { color: #b45309; }
.cal-day--leave-approved .cal-day__status-label { color: #047857; }
.cal-day__status-label--holiday {
  color: #6d28d9;
  font-weight: 700;
}
.cal-day__status-label--muted {
  color: #94a3b8;
  font-weight: 600;
}
.cal-day__leave-chip {
  margin-top: auto;
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.15rem 0.35rem;
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-day__leave-chip--pending {
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.cal-day__leave-chip--approved {
  color: #166534;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
}
.cal-day__leave-chip--rejected {
  color: #991b1b;
  background: #fee2e2;
  border: 1px solid #fecaca;
}
.cal-legend--parent {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
  justify-content: center;
  margin-top: 1rem;
}
.cal-legend__item,
.cal-legend__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.55rem;
  border-radius: 8px;
  font-size: 0.72rem;
  font-weight: 700;
}
.cal-legend__item--present {
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}
.cal-legend__item--absent {
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
}
.cal-legend__item--leave {
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fde68a;
}
.cal-legend__item--approved-leave {
  color: #047857;
  background: #d1fae5;
  border: 1px solid #a7f3d0;
}
.cal-legend__chip--pending {
  color: #92400e;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
}
.cal-legend__chip--approved {
  color: #166534;
  background: #f0fdf4;
  border: 1px dashed #22c55e;
}
.cal-legend__chip--rejected {
  color: #991b1b;
  background: #fef2f2;
  border: 1px dashed #ef4444;
}

.cal-day--present .cal-day__dot { background: #10b981; }
.cal-day--absent .cal-day__dot { background: #ef4444; }
.cal-day--leave .cal-day__dot { background: #f59e0b; }
.cal-day__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 2px;
}
.cal-day__leave-badge {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  padding: 0.12rem 0.22rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.cal-day__leave-badge--approved {
  color: #15803d;
  background: #dcfce7;
}
.cal-day__leave-badge--pending {
  color: #b45309;
  background: #fef3c7;
}
.cal-day__leave-badge--rejected {
  color: #b91c1c;
  background: #fee2e2;
}
.cal-day { position: relative; }
.dot--holiday { background: #8b5cf6; }
.dot--leave-approved { background: #16a34a; }
.dot--leave-pending { background: #d97706; }
.cal-legend--expanded {
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}
.attendance-web-row__name--link {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.attendance-web-row__name--link:hover {
  color: var(--accent);
  text-decoration: underline;
}
.attendance-web-row--link:hover {
  background: #f8fafc;
}
.teacher-student-attendance-side__hint {
  margin: -0.25rem 0 1rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.cal-legend {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.cal-legend span { display: flex; align-items: center; gap: 0.35rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot--present { background: #10b981; }
.dot--absent { background: #ef4444; }
.dot--leave { background: #f59e0b; }
.cal-legend__ring {
  width: 12px;
  height: 12px;
  border-radius: 4px;
  display: inline-block;
  box-shadow: inset 0 0 0 2px currentColor;
  background: transparent;
}
.cal-legend__ring--pending { color: #d97706; }
.cal-legend__ring--approved { color: #16a34a; }
.cal-legend__ring--rejected { color: #dc2626; }
.cal-legend {
  flex-wrap: wrap;
}

.parent-subject-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 1rem 1rem;
}
.parent-subject-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}
.parent-subject-grade {
  font-weight: 800;
  color: var(--accent);
}
.parent-subject-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.2);
  overflow: hidden;
}
.parent-subject-bar__fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #5b8def);
  min-width: 4px;
}
.parent-subject-item__meta {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.parent-mark-score {
  font-weight: 800;
  color: var(--text);
}
.portal-premium--parent .teacher-profile-dropdown__actions {
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}
.portal-premium--parent .teacher-profile-dropdown__actions .btn {
  width: 100%;
  text-align: center;
}

.class-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.65rem;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.class-card:hover { border-color: var(--accent); box-shadow: 0 4px 12px rgba(37,99,235,0.12); color: inherit; }
.class-card span:last-child { color: var(--accent); font-size: 0.85rem; font-weight: 600; }
.student-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}
.student-row label { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-size: 0.92rem; }
.student-row .roll { color: var(--muted); min-width: 2rem; font-weight: 600; }

/* Teacher attendance dashboard */
.teacher-attendance-page .back-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}
.mobile-header__badge {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
}

.attendance-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}
.attendance-hero__icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.attendance-hero__title { font-size: 1.2rem; font-weight: 700; margin: 0; color: #fff; }
.attendance-hero__date { font-size: 0.82rem; opacity: 0.9; margin: 0.2rem 0 0; color: #fff; }
.attendance-hero__status {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
}
.attendance-hero__status--open { background: rgba(255,255,255,0.25); }
.attendance-hero__status--done { background: rgba(16, 185, 129, 0.9); }

.attendance-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.attendance-stat {
  background: #fff;
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.attendance-stat__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.attendance-stat__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-top: 0.15rem;
}
.attendance-stat--present .attendance-stat__value { color: #059669; }
.attendance-stat--absent .attendance-stat__value { color: #dc2626; }
.attendance-stat--leave .attendance-stat__value { color: #b45309; }

.attendance-instruction {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--accent-soft);
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  color: #1e40af;
  margin-bottom: 1rem;
  line-height: 1.45;
}
.attendance-instruction__icon { flex-shrink: 0; }

.attendance-empty {
  background: #fff;
  border-radius: 14px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px dashed #cbd5e1;
}
.attendance-empty__icon { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.6; }
.attendance-empty h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; }
.attendance-empty p { font-size: 0.9rem; color: var(--muted); line-height: 1.5; margin-bottom: 0.5rem; }
.attendance-empty__hint { font-size: 0.82rem !important; }

.attendance-list {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.attendance-list__header {
  display: grid;
  grid-template-columns: 2.5rem 1fr 4.5rem;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--surface2);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
}
.attendance-row {
  display: grid;
  grid-template-columns: 2.5rem 1fr 4.5rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.attendance-row:last-child { border-bottom: none; }
.attendance-row--toggle { cursor: pointer; }
.attendance-row--toggle:hover { background: var(--surface2); }
.attendance-row--absent { background: #fef2f2; }
.attendance-row__roll {
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--surface2);
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.attendance-row--absent .attendance-row__roll { background: #fee2e2; color: #b91c1c; }
.attendance-row__name { font-size: 0.92rem; font-weight: 600; }
.attendance-row__badge {
  justify-self: end;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}
.attendance-row--present .attendance-row__badge { background: #d1fae5; color: #047857; }
.attendance-row--absent .attendance-row__badge { background: #fee2e2; color: #b91c1c; }
.attendance-row--leave .attendance-row__badge { background: #fef3c7; color: #b45309; }

.attendance-toggle { justify-self: end; position: relative; }
.attendance-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.attendance-toggle__track {
  display: block;
  width: 2.75rem;
  height: 1.5rem;
  background: #d1fae5;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}
.attendance-toggle input:checked + .attendance-toggle__track { background: #fecaca; }
.attendance-toggle__thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 1.15rem;
  height: 1.15rem;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.2s;
}
.attendance-toggle input:checked + .attendance-toggle__track .attendance-toggle__thumb {
  transform: translateX(1.25rem);
}

.attendance-submit-bar {
  position: sticky;
  bottom: 0;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(8px);
  padding: 1rem 0 0.5rem;
  border-top: 1px solid var(--border);
  margin: 0 -0.25rem;
}
.attendance-submit-bar p {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  margin-bottom: 0.65rem;
}

/* Teacher dashboard */
.teacher-dashboard-page { background-color: #eef2f7; }
.teacher-dashboard-header { align-items: flex-start; }
.teacher-dashboard-header h1 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.teacher-dashboard-header__school {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.teacher-dashboard-hero {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  border-radius: 14px;
  padding: 1.15rem 1.2rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.25);
}
.teacher-dashboard-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.teacher-dashboard-hero__date { font-size: 0.9rem; font-weight: 600; margin: 0; color: #fff; }
.teacher-dashboard-hero__sub { font-size: 0.82rem; opacity: 0.9; margin: 0.35rem 0 0; color: #fff; }

.dashboard-summary-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.dashboard-summary-box {
  border-radius: 12px;
  padding: 0.85rem 0.75rem;
  color: #fff;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.dashboard-summary-box--green { background: linear-gradient(135deg, #059669, #10b981); }
.dashboard-summary-box--blue { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.dashboard-summary-box--red { background: linear-gradient(135deg, #dc2626, #ef4444); }
.dashboard-summary-box__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}
.dashboard-summary-box__label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.92;
  margin-top: 0.2rem;
}

.teacher-quick-actions {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.teacher-quick-actions__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.55rem;
}
.teacher-quick-actions__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid #bfdbfe;
  transition: all 0.15s;
}
.quick-pill:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.quick-pill--done {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.teacher-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.teacher-student-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.teacher-student-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.12);
}
.teacher-student-card--present { border-top: 4px solid #10b981; }
.teacher-student-card--absent { border-top: 4px solid #ef4444; }
.teacher-student-card__profile {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1rem 1rem 0.75rem;
  text-decoration: none;
  color: inherit;
  flex: 1;
}
.teacher-student-card__profile:hover { color: inherit; }
.teacher-student-card__avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.teacher-student-card__body { flex: 1; min-width: 0; }
.teacher-student-card__name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.2rem;
}
.teacher-student-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.teacher-student-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.teacher-student-card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--muted);
}
.teacher-student-card--present .teacher-student-card__badge {
  background: #d1fae5;
  color: #047857;
}
.teacher-student-card--absent .teacher-student-card__badge {
  background: #fee2e2;
  color: #b91c1c;
}
.teacher-student-card__month {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
}
.teacher-student-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
  padding-top: 0.75rem;
}
.teacher-student-card__actions form { margin: 0; }
.mark-btn {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
}
.mark-btn--present { color: #047857; border-color: #a7f3d0; background: #f0fdf4; }
.mark-btn--present:hover { background: #059669; color: #fff; border-color: #059669; }
.mark-btn--present.mark-btn--active { background: #059669; color: #fff; border-color: #059669; }
.mark-btn--absent { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
.mark-btn--absent:hover { background: #dc2626; color: #fff; border-color: #dc2626; }
.mark-btn--absent.mark-btn--active { background: #dc2626; color: #fff; border-color: #dc2626; }
.mark-btn--leave { color: #b45309; border-color: #fde68a; background: #fffbeb; }
.mark-btn--leave:hover { background: #d97706; color: #fff; border-color: #d97706; }
.mark-btn--leave.mark-btn--active { background: #d97706; color: #fff; border-color: #d97706; }
.mark-btn--compact {
  min-width: 2.35rem;
  padding: 0.45rem 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Teacher portal — web layout (responsive) */
.teacher-portal-page {
  min-height: 100vh;
  background-color: #e8eef5;
  background-image:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(37, 99, 235, 0.12), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(99, 102, 241, 0.1), transparent),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2394a3b8' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  background-attachment: fixed;
}
.teacher-portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1rem 2rem;
  background: #fff;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.teacher-portal-header h1 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.teacher-portal-header__school {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.15rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.teacher-portal-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.teacher-portal-header__code {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
}
.teacher-portal-header__date {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}
.teacher-portal-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem 2.5rem;
}
.teacher-portal-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}
.teacher-portal-top .teacher-dashboard-hero {
  margin-bottom: 0;
  display: flex;
  align-items: center;
}
.teacher-portal-top .dashboard-summary-row {
  margin-bottom: 0;
  min-width: 320px;
}
.teacher-portal-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.teacher-portal-tabs {
  flex: 1;
  margin-bottom: 0;
}
.teacher-quick-actions--inline {
  margin-bottom: 0;
  flex-shrink: 0;
}
.teacher-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.teacher-section-head .teacher-section-title { margin-bottom: 0; }
.teacher-section-hint {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}
.teacher-portal-students {
  background: rgba(255,255,255,0.65);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
}
.teacher-submit-strip {
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.teacher-submit-strip__form {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 0.65rem;
  align-items: end;
}
.teacher-submit-strip label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.teacher-submit-strip p {
  margin-top: 0.55rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.teacher-student-attendance-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1rem;
  align-items: start;
}
.teacher-student-attendance-side .parent-child-card,
.teacher-student-attendance-side .today-status-card {
  margin-bottom: 1rem;
}
.teacher-student-attendance-main .attendance-calendar--web {
  padding: 1.15rem;
}
.teacher-student-attendance-main .cal-grid {
  gap: 0.45rem;
}
.teacher-student-attendance-main .cal-day--parent {
  min-height: 4.75rem;
}

/* Class attendance submit — web layout */
.teacher-class-attendance-page .teacher-portal-main {
  max-width: 960px;
}
.teacher-class-attendance-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1.25rem;
}
.attendance-hero--compact {
  margin-bottom: 0;
  align-items: center;
}
.attendance-hero--compact .attendance-hero__title {
  font-size: 1.35rem;
}
.attendance-stats--web {
  margin-bottom: 0;
  min-width: 300px;
}
.attendance-status-pill {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
}
.attendance-status-pill--open {
  background: #fef3c7;
  color: #b45309;
}
.attendance-status-pill--done {
  background: #d1fae5;
  color: #047857;
}
.teacher-class-attendance-panel {
  padding: 1.25rem 1.5rem 1.5rem;
}
.attendance-web-table {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.attendance-web-table__header,
.attendance-web-row {
  display: grid;
  grid-template-columns: 4rem 1fr 10rem;
  gap: 1rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
}
.attendance-web-table__header {
  background: var(--surface2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.attendance-web-row {
  border-bottom: 1px solid var(--border);
}
.attendance-web-row:last-child {
  border-bottom: none;
}
.attendance-web-row--editable:hover {
  background: #f8fafc;
}
.attendance-web-row__roll {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--surface2);
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--muted);
}
.attendance-web-row__name {
  font-size: 0.95rem;
  font-weight: 600;
}
.attendance-web-row__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.attendance-web-row__actions--pal {
  grid-template-columns: repeat(3, 1fr);
  max-width: 9.5rem;
  justify-self: end;
}
.attendance-bulk-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
}
.attendance-bulk-action strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}
.attendance-bulk-action p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.attendance-row--leave .attendance-web-row__roll,
.attendance-web-row.attendance-row--leave .attendance-web-row__roll {
  background: #fef3c7;
  color: #b45309;
}
.attendance-row--leave .attendance-web-row__badge,
.attendance-web-row.attendance-row--leave .attendance-web-row__badge {
  background: #fef3c7;
  color: #b45309;
}
.attendance-web-row__actions .absent-cb {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.attendance-web-row__badge {
  justify-self: start;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.attendance-row--present .attendance-web-row__badge,
.attendance-web-row.attendance-row--present .attendance-web-row__badge {
  background: #d1fae5;
  color: #047857;
}
.attendance-row--absent .attendance-web-row__badge,
.attendance-web-row.attendance-row--absent {
  background: #fef2f2;
}
.attendance-row--absent .attendance-web-row__roll,
.attendance-web-row.attendance-row--absent .attendance-web-row__roll {
  background: #fee2e2;
  color: #b91c1c;
}
.attendance-row--absent .attendance-web-row__badge,
.attendance-web-row.attendance-row--absent .attendance-web-row__badge {
  background: #fee2e2;
  color: #b91c1c;
}
.teacher-class-attendance-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.teacher-class-attendance-submit p {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

@media (min-width: 1024px) {
  .teacher-student-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .teacher-portal-top {
    grid-template-columns: 1fr;
  }
  .teacher-portal-top .dashboard-summary-row {
    min-width: 0;
  }
  .teacher-portal-header {
    padding: 1rem 1.25rem;
  }
  .teacher-portal-main {
    padding: 1.25rem;
    max-width: 480px;
  }
  .teacher-portal-toolbar {
    flex-direction: column;
  }
  .teacher-student-grid {
    grid-template-columns: 1fr;
  }
  .teacher-submit-strip__form {
    grid-template-columns: 1fr;
  }
  .teacher-student-attendance-layout {
    grid-template-columns: 1fr;
  }
  .teacher-class-attendance-top {
    grid-template-columns: 1fr;
  }
  .attendance-stats--web {
    min-width: 0;
  }
  .attendance-web-table__header,
  .attendance-web-row {
    grid-template-columns: 3rem 1fr 160px;
    padding: 0.75rem 1rem;
    gap: 0.65rem;
  }
  .teacher-class-attendance-submit {
    flex-direction: column;
    align-items: stretch;
  }
  .teacher-class-attendance-submit .btn {
    width: 100%;
  }
}

.teacher-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}
.teacher-class-list { display: flex; flex-direction: column; gap: 0.65rem; }
.teacher-class-card {
  display: block;
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.teacher-class-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12);
  color: inherit;
}
.teacher-class-card--done { border-color: #a7f3d0; background: linear-gradient(180deg, #fff, #f0fdf4); }
.teacher-class-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}
.teacher-class-card__name { font-size: 1.1rem; font-weight: 700; color: var(--accent); }
.teacher-class-card__status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
}
.teacher-class-card__status--pending { background: #fef3c7; color: #b45309; }
.teacher-class-card__meta { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.5rem; }
.teacher-class-card__action { font-size: 0.85rem; font-weight: 600; color: var(--accent); }

@media (max-width: 800px) {
  .grid-2, .page-grid, .grid-3, .checkbox-grid { grid-template-columns: 1fr; }
  .layout { flex-direction: column; }
  .sidebar { width: 100%; position: static; height: auto; overflow-y: visible; }
  .main { padding: 1.25rem; }
  .add-class-panel__hero { flex-direction: column; text-align: center; }
  .setup-panel__hero { flex-direction: column; text-align: center; }
}

/* ── Shared setup panels (classes, teachers, students) ── */
.setup-panel,
.add-class-panel {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(37, 99, 235, 0.15);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08), var(--shadow);
  background: linear-gradient(160deg, rgba(255,255,255,0.98) 0%, rgba(239,246,255,0.95) 100%);
}

.setup-panel__hero,
.add-class-panel__hero {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: #fff;
}
.setup-panel--teachers { border-color: rgba(124, 58, 237, 0.15); box-shadow: 0 4px 24px rgba(124, 58, 237, 0.08), var(--shadow); }
.setup-panel--teachers .setup-panel__hero { background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%); }
.setup-panel--students { border-color: rgba(5, 150, 105, 0.15); box-shadow: 0 4px 24px rgba(5, 150, 105, 0.08), var(--shadow); }
.setup-panel--students .setup-panel__hero { background: linear-gradient(135deg, #059669 0%, #0d9488 100%); }
.setup-panel--import { border-color: rgba(14, 165, 233, 0.15); }
.setup-panel--import .setup-panel__hero { background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%); }

.setup-panel__icon,
.add-class-panel__icon {
  width: 3rem;
  height: 3rem;
  background: rgba(255,255,255,0.2);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.setup-panel__hero h3,
.add-class-panel__hero h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.15rem; color: #fff; }
.setup-panel__hero p,
.add-class-panel__hero p { font-size: 0.85rem; opacity: 0.9; margin: 0; color: #fff; }

.setup-panel__body,
.add-class-panel__body { padding: 1.5rem; }

.setup-panel__footer,
.add-class-panel__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 0.25rem;
}
.setup-panel__footer .hint,
.add-class-panel__footer .hint { font-size: 0.82rem; color: var(--muted); }

.field-group-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

/* Toggle chips (classes, subjects) */
.toggle-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.toggle-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  user-select: none;
}
.toggle-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-chip span {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
}
.toggle-chip:hover span {
  border-color: #bfdbfe;
  background: var(--accent-soft);
}
.toggle-chip.selected span,
.toggle-chip input:checked + span {
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}
.toggle-chip-group--disabled {
  opacity: 0.55;
  pointer-events: none;
}
.toggle-chip input:disabled + span {
  cursor: not-allowed;
}

/* Class tab bar (students) */
.class-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
.class-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface2);
  border: 1.5px solid transparent;
  text-decoration: none;
  transition: all 0.15s;
}
.class-tab:hover {
  color: var(--accent);
  background: var(--accent-soft);
}
.class-tab.active {
  color: #fff;
  background: linear-gradient(135deg, #059669, #0d9488);
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.3);
}

/* Person cards (teachers) */
.person-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.person-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  background: linear-gradient(180deg, #fff, var(--surface2));
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.person-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.1);
  border-color: #ddd6fe;
}
.person-card__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 10px;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  color: #6d28d9;
  font-weight: 700;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.person-card__name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}
.person-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.person-card__badge {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 4px;
}
.person-card__body { flex: 1; min-width: 0; }
.person-card__classes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}
.person-card__class-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 999px;
}
.person-card__edit {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.person-card__edit:hover { text-decoration: underline; }
.person-card--active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* Student cards */
.student-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.student-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(180deg, #fff, var(--surface2));
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.student-card:hover {
  transform: translateX(4px);
  border-color: #a7f3d0;
  box-shadow: 0 2px 12px rgba(5, 150, 105, 0.08);
}
.student-card__roll {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  color: #047857;
  font-weight: 700;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.student-card__name {
  font-weight: 600;
  font-size: 0.92rem;
}
.student-card__body { flex: 1; min-width: 0; }
.student-card__meta {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}
.student-card--active {
  border-color: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}
.class-chip-item--active {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

.admin-card-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}
.admin-card-actions--center {
  justify-content: center;
  margin-top: 0.6rem;
  flex-wrap: wrap;
}
.admin-card-actions form { display: inline; margin: 0; }
.admin-card-actions__edit {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}
.admin-card-actions__edit:hover { text-decoration: underline; }
.admin-card-actions__remove {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--danger);
  cursor: pointer;
  font-family: inherit;
}
.admin-card-actions__remove:hover { text-decoration: underline; }

/* CSV upload zone */
.csv-upload-zone {
  position: relative;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  background: rgba(255,255,255,0.6);
  transition: border-color 0.2s, background 0.2s;
  margin-bottom: 1rem;
}
.csv-upload-zone:hover,
.csv-upload-zone.dragover {
  border-color: #0ea5e9;
  background: rgba(224, 242, 254, 0.5);
}
.csv-upload-zone__icon { font-size: 2rem; margin-bottom: 0.5rem; opacity: 0.7; }
.csv-upload-zone p { font-size: 0.88rem; color: var(--muted); margin-bottom: 0.25rem; }
.csv-upload-zone .format-hint {
  font-size: 0.78rem;
  color: #94a3b8;
  font-family: 'SF Mono', monospace;
  margin-bottom: 0.75rem;
}
.csv-upload-zone input[type="file"] {
  font-size: 0.85rem;
  max-width: 100%;
}

.example-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
  align-items: center;
}
.example-chips__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 0.25rem;
}
.chip-example {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.7rem;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}
.chip-example:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
}

.modern-textarea-wrap {
  position: relative;
  margin-bottom: 1rem;
}
.modern-textarea-wrap textarea {
  width: 100%;
  min-height: 9rem;
  padding: 1rem 1.15rem;
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.95rem;
  line-height: 1.7;
  background: rgba(255,255,255,0.8);
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.modern-textarea-wrap textarea:focus {
  outline: none;
  border-color: var(--accent);
  border-style: solid;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.modern-textarea-wrap textarea::placeholder { color: #94a3b8; }

.class-preview {
  margin-bottom: 1.25rem;
}
.class-preview__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}
.class-preview-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  min-height: 2rem;
}
.class-preview-chips:empty::after {
  content: 'Classes will appear here as you type…';
  color: #94a3b8;
  font-size: 0.85rem;
  font-style: italic;
}
.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #3730a3;
  animation: chipIn 0.2s ease;
}
@keyframes chipIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

/* Class grid */
.class-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.65rem;
}
.class-chip-item {
  text-align: center;
  padding: 0.85rem 0.5rem;
  background: linear-gradient(180deg, #fff, var(--surface2));
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.class-chip-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(37,99,235,0.1);
  border-color: #bfdbfe;
}
.class-chip-item__name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.class-chip-item__meta {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

/* Admin classes table */
.admin-classes-card {
  padding: 0;
  overflow: hidden;
}
.admin-classes-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border);
}
.admin-classes-card__header h3 {
  margin: 0 0 0.2rem;
}
.admin-classes-card__sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.admin-classes-table-wrap {
  overflow: auto;
}
.admin-classes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-classes-table thead th {
  padding: 0.72rem 0.9rem;
  text-align: left;
  background: var(--surface2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-classes-table tbody td {
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-classes-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.85);
}
.admin-classes-table tbody tr:last-child td {
  border-bottom: none;
}
.admin-classes-table__row--active {
  background: rgba(124, 58, 237, 0.06);
}
.admin-classes-table__name {
  color: var(--accent);
  font-weight: 700;
}
.admin-classes-table__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
.admin-classes-table__ct {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}
.admin-classes-table__ct--assigned {
  background: #d1fae5;
  color: #047857;
}
.admin-classes-table__ct-icon {
  font-size: 0.72rem;
  line-height: 1;
}
.admin-classes-table__ct--missing {
  background: #fef3c7;
  color: #b45309;
}
.admin-classes-table__actions {
  white-space: nowrap;
}
.admin-classes-table__actions .admin-card-actions__edit,
.admin-classes-table__actions .admin-card-actions__remove {
  font-size: 0.82rem;
}
.admin-classes-table__actions form {
  display: inline;
  margin: 0;
}
.admin-classes-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  padding: 0.9rem 1.15rem;
  border-top: 1px solid var(--border);
  background: var(--surface2);
}
.portal-premium .admin-classes-card {
  border-radius: 16px;
}
.portal-premium .admin-classes-table thead th {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  border-bottom: none;
}
.portal-premium .admin-classes-table__name {
  color: var(--portal-accent);
}
.admin-classes-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.65);
}
.admin-classes-tabs a {
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.admin-classes-tabs a:hover {
  background: #fff;
  border-color: var(--border);
}
.admin-classes-tabs a.active {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}
.portal-premium .admin-classes-tabs a.active {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  box-shadow: 0 4px 12px var(--portal-accent-glow);
}
.admin-classes-table__action-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.admin-classes-table__assign {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin: 0;
}
.admin-classes-table__assign-select {
  min-width: 9.5rem;
  max-width: 11rem;
  padding: 0.35rem 0.55rem;
  font-size: 0.82rem;
}
.admin-classes-table__assign-hint {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
}
.admin-classes-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.15rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
.admin-classes-table__actions {
  min-width: 12rem;
}

.parent-app .teacher-sidebar {
  background: rgba(255, 255, 255, 0.88);
}
.parent-app .teacher-nav a.active {
  background: linear-gradient(135deg, #0891b2, #0e7490);
  box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
}

.school-news-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.school-news-item {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}
.school-news-item__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.school-news-item__head strong {
  font-size: 0.95rem;
  color: #0f172a;
}
.school-news-item__head small {
  color: #64748b;
  font-size: 0.75rem;
  white-space: nowrap;
}
.school-news-item p {
  margin: 0;
  color: #334155;
  font-size: 0.9rem;
  line-height: 1.5;
  white-space: pre-wrap;
}

.teacher-app .teacher-layout { min-height: 100vh; }
.teacher-sidebar {
  width: 280px;
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
  border-right: none;
  color: #e2e8f0;
  display: flex;
  flex-direction: column;
}
.teacher-sidebar__brand {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 1.35rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: transparent;
}
.teacher-sidebar__brand h1 {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
}
.teacher-sidebar__brand p {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: 0.15rem 0 0;
}
.teacher-sidebar__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.teacher-nav,
.portal-nav {
  padding: 1rem 0.85rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  justify-content: flex-start;
  overflow-y: auto;
  min-height: 0;
}
.teacher-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  color: #cbd5e1;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}
body.portal-premium .teacher-sidebar .teacher-nav a,
body.portal-premium .portal-sidebar .portal-nav a {
  color: #475569;
}
.teacher-nav a:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}
body.portal-premium .teacher-sidebar .teacher-nav a:hover,
body.portal-premium .portal-sidebar .portal-nav a:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}
.teacher-nav a.active {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}
.teacher-nav__icon {
  font-size: 1.05rem;
  line-height: 1;
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}
.teacher-sidebar__footer {
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.teacher-sidebar__code {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.1);
  color: #e2e8f0;
  margin-bottom: 0.75rem;
}
.teacher-sidebar__footer .btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.2);
  color: #e2e8f0 !important;
}
.teacher-sidebar__footer .btn-outline:hover {
  background: rgba(255,255,255,0.1);
  color: #fff !important;
}
.teacher-main {
  max-width: none;
  padding: 1.75rem 2rem 2.5rem;
  background: transparent;
}
.teacher-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 40;
}

.teacher-profile-menu {
  position: relative;
  flex-shrink: 0;
  z-index: 50;
}
.teacher-profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.75rem 0.45rem 0.45rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.teacher-profile-trigger:hover,
.teacher-profile-menu:hover .teacher-profile-trigger {
  border-color: #bfdbfe;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.12);
}
.teacher-profile-trigger__avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
}
.teacher-profile-trigger__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  line-height: 1.2;
}
.teacher-profile-trigger__text strong {
  font-size: 0.88rem;
  color: var(--text);
}
.teacher-profile-trigger__text small {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}
.teacher-profile-trigger__caret {
  font-size: 0.7rem;
  color: var(--muted);
  margin-left: 0.15rem;
}
.teacher-profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  width: 300px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 1rem;
  z-index: 200;
}
.teacher-profile-menu:hover .teacher-profile-dropdown,
.teacher-profile-menu:focus-within .teacher-profile-dropdown {
  display: block;
}
.teacher-profile-dropdown__header {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.85rem;
}
.teacher-profile-dropdown__avatar {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.teacher-profile-dropdown__header strong {
  display: block;
  font-size: 0.95rem;
}
.teacher-profile-dropdown__header p {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.15rem 0 0;
}
.teacher-profile-dropdown__meta {
  list-style: none;
  padding: 0;
  margin: 0 0 0.85rem;
}
.teacher-profile-dropdown__meta li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
  padding: 0.35rem 0;
}
.teacher-profile-dropdown__meta span { color: var(--muted); }
.teacher-profile-dropdown__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.teacher-profile-dropdown__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.teacher-profile-dropdown__actions form { margin: 0; }
.teacher-sidebar__brand--compact h1 {
  font-size: 1.05rem;
}

.teacher-welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.25);
}
.teacher-welcome-banner h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin: 0.15rem 0;
  color: #fff;
}
.teacher-welcome-banner__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.teacher-welcome-banner__sub {
  font-size: 0.9rem;
  opacity: 0.9;
  margin: 0;
}
.teacher-welcome-banner__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.teacher-welcome-banner .btn-outline {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.35);
  color: #fff !important;
}
.teacher-welcome-banner .btn-outline:hover {
  background: rgba(255,255,255,0.25);
}

.teacher-home-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.teacher-stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--accent);
}
.teacher-stat-card--blue { border-top-color: #2563eb; }
.teacher-stat-card--purple { border-top-color: #7c3aed; }
.teacher-stat-card--green { border-top-color: #059669; }
.teacher-stat-card--amber { border-top-color: #d97706; }
.teacher-stat-card--red { border-top-color: #dc2626; }
.teacher-stat-card__value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
}
.teacher-stat-card__icon {
  display: block;
  font-size: 1.75rem;
  font-weight: 400;
  line-height: 1.1;
}
.teacher-stat-card__label {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
  margin-top: 0.25rem;
}

.teacher-home-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.teacher-home-card { margin: 0; }
.teacher-quick-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.teacher-quick-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.15rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.teacher-quick-link:hover {
  border-color: #bfdbfe;
  transform: translateY(-2px);
  color: inherit;
}
.teacher-quick-link span:first-child { font-size: 1.5rem; }
.teacher-quick-link strong { display: block; font-size: 0.95rem; }
.teacher-quick-link small { color: var(--muted); font-size: 0.78rem; }

.feedback-feed__item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.feedback-feed__item:last-child { border-bottom: none; }
.feedback-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0 1rem 1rem;
}
.feedback-feed__item--card {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.85);
  border-bottom: 1px solid var(--border);
}
.feedback-feed__message {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.feedback-feed__meta {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.feedback-feed__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.feedback-feed__type {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}
.feedback-feed__item p {
  font-size: 0.88rem;
  color: var(--text);
  margin: 0 0 0.25rem;
  line-height: 1.45;
}
.feedback-feed__item small { color: var(--muted); font-size: 0.78rem; }

.leave-request-card__dates { font-weight: 600; }
.leave-request-card__doc a { color: var(--accent); font-size: 0.85rem; }
.leave-request-card__remarks {
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: var(--canvas);
  border-radius: 8px;
  margin: 0.5rem 0;
}
.leave-request-card__meta { display: block; margin-top: 0.35rem; }
.leave-request-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.leave-review-form .field { margin-bottom: 0.5rem; }
.leave-review-form .field label { font-size: 0.78rem; }
.leave-btn-approve { background: #16a34a; border-color: #16a34a; }
.leave-btn-reject { color: #dc2626; border-color: #fecaca; }
.leave-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.leave-status-badge--pending { background: #fef3c7; color: #b45309; }
.leave-status-badge--approved { background: #dcfce7; color: #15803d; }
.leave-status-badge--rejected { background: #fee2e2; color: #b91c1c; }

.teacher-feedback-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}
.feedback-form .field { margin-bottom: 1rem; }

.teacher-profile-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.teacher-profile-hero__avatar {
  width: 4rem;
  height: 4rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}
.teacher-profile-hero h3 { font-size: 1.35rem; margin: 0 0 0.2rem; }
.teacher-profile-hero p { color: var(--muted); margin: 0 0 0.5rem; }
.teacher-profile-hero.portal-welcome-banner--parent,
.teacher-profile-hero.portal-welcome-banner--teacher,
.teacher-profile-hero.portal-welcome-banner--admin {
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.teacher-profile-hero.portal-welcome-banner--parent h3,
.teacher-profile-hero.portal-welcome-banner--teacher h3,
.teacher-profile-hero.portal-welcome-banner--admin h3 {
  color: #fff;
}
.teacher-profile-hero.portal-welcome-banner--parent p,
.teacher-profile-hero.portal-welcome-banner--teacher p,
.teacher-profile-hero.portal-welcome-banner--admin p {
  color: rgba(255, 255, 255, 0.9);
}
.teacher-profile-hero.portal-welcome-banner--parent .teacher-profile-hero__avatar,
.teacher-profile-hero.portal-welcome-banner--teacher .teacher-profile-hero__avatar,
.teacher-profile-hero.portal-welcome-banner--admin .teacher-profile-hero__avatar {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.teacher-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
.profile-detail-list {
  list-style: none;
  padding: 0;
}
.profile-detail-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.profile-detail-list li:last-child { border-bottom: none; }
.profile-detail-list span { color: var(--muted); }

.teacher-attendance-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.teacher-attendance-class-card {
  display: block;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.teacher-attendance-class-card:hover {
  border-color: #bfdbfe;
  transform: translateY(-2px);
  color: inherit;
}
.teacher-attendance-class-card--done { border-color: #a7f3d0; }
.teacher-attendance-class-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}
.teacher-attendance-class-card__meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.35rem 0 0.75rem;
}
.teacher-attendance-class-card__badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
}
.teacher-attendance-class-card--done .teacher-attendance-class-card__badge {
  background: #d1fae5;
  color: #047857;
}

.teacher-page-intro {
  color: var(--muted);
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}
.teacher-page-toolbar { margin-bottom: 1rem; }
.teacher-page-head { margin-bottom: 1rem; }

.teacher-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

@media (max-width: 1100px) {
  .teacher-home-stats { grid-template-columns: repeat(2, 1fr); }
  .teacher-home-grid { grid-template-columns: 1fr; }
  .teacher-quick-links { grid-template-columns: 1fr; }
  .teacher-feedback-layout { grid-template-columns: 1fr; }
  .teacher-profile-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .teacher-layout { flex-direction: column; }
  .teacher-sidebar { width: 100%; }
  .teacher-nav { flex-direction: row; flex-wrap: wrap; }
  .teacher-sidebar__footer { display: none; }
  .teacher-main { padding: 1.25rem; }
  .teacher-student-attendance-layout { grid-template-columns: 1fr; }
}

/* Teacher students table */
.teacher-students-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.teacher-students-search {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  min-width: 240px;
}
.teacher-students-search .form-input {
  min-width: 220px;
  flex: 1;
}
.teacher-students-toolbar__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--muted);
  font-size: 0.88rem;
}
.teacher-students-table-card {
  padding: 0;
  overflow: hidden;
}
.teacher-students-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 18rem);
  scroll-behavior: smooth;
}
.teacher-students-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.teacher-students-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface2);
}
.teacher-students-table th,
.teacher-students-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.teacher-students-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-weight: 700;
}
.teacher-students-table__row:hover {
  background: #f8fafc;
}
.teacher-students-table__name {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.teacher-students-table__name:hover {
  color: var(--accent);
}
.teacher-students-table__sub {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  margin-top: 0.15rem;
}
.teacher-students-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  text-decoration: none;
}
.teacher-students-avatar--large {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}
.teacher-students-table__mark {
  display: flex;
  gap: 0.35rem;
}
.attendance-pct {
  font-weight: 700;
}
.attendance-pct--good { color: #047857; }
.attendance-pct--warn { color: #b45309; }
.attendance-pct--low { color: #b91c1c; }
.attendance-pct--neutral { color: var(--muted); }
.student-status-pill,
.student-active-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  display: inline-block;
}
.student-status-pill--present { background: #d1fae5; color: #047857; }
.student-status-pill--absent { background: #fee2e2; color: #b91c1c; }
.student-status-pill--leave { background: #fef3c7; color: #b45309; }
.student-status-pill--pending { background: #f1f5f9; color: #64748b; }
.student-active-pill--active { background: #dbeafe; color: #1d4ed8; }
.student-active-pill--inactive { background: #f1f5f9; color: #64748b; }

/* Teacher student profile */
.teacher-profile-back {
  margin-bottom: 1rem;
}
.teacher-student-profile-hero {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.25rem;
}
.teacher-student-profile-hero__avatar {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 800;
  flex-shrink: 0;
}
.teacher-student-profile-hero__main {
  flex: 1;
}
.teacher-student-profile-hero__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.teacher-student-profile-hero h2 {
  margin: 0 0 0.25rem;
  font-size: 1.45rem;
}
.teacher-student-profile-hero p {
  margin: 0;
  color: var(--muted);
}
.teacher-student-profile-hero__status {
  margin: 0.75rem 0 0;
  font-weight: 600;
  color: var(--accent);
}
.teacher-student-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.teacher-student-profile-section {
  padding: 1rem 1.25rem 1.25rem;
}
.teacher-student-profile-section--wide {
  grid-column: 1 / -1;
}
.teacher-student-profile-section--actions .teacher-student-profile-actions {
  display: grid;
  gap: 0.65rem;
}
.teacher-profile-facts {
  display: grid;
  gap: 0;
  margin: 0;
}
.teacher-profile-facts > div {
  display: grid;
  grid-template-columns: 11rem 1fr;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.teacher-profile-facts > div:last-child {
  border-bottom: none;
}
.teacher-profile-facts dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}
.teacher-profile-facts dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
}
.teacher-student-summary-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.teacher-student-summary-stat {
  background: var(--surface2);
  border-radius: 12px;
  padding: 0.85rem;
  text-align: center;
}
.teacher-student-summary-stat__value {
  display: block;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text);
}
.teacher-student-summary-stat__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.teacher-student-profile-summary {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0 0 1rem;
}
.teacher-student-feedback-block h4 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
}
.teacher-student-attendance-side__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 1rem 0;
}
.teacher-student-attendance-side__stats div {
  background: var(--surface2);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font-size: 0.82rem;
}
.teacher-student-attendance-side__stats span {
  display: block;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.teacher-student-attendance-side__stats strong {
  font-size: 1rem;
}

.content-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
  align-items: center;
}
.content-item-actions .inline-form {
  display: inline;
  margin: 0;
}
.content-modified-label {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
}
.content-inline-form {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.content-edit-form {
  margin-top: 0.25rem;
}
.content-history-list {
  display: grid;
  gap: 0.75rem;
  padding: 0.25rem 0;
}
.content-history-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.content-history-item:last-child {
  border-bottom: none;
}
.content-history-item__head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.35rem;
}
.content-history-item p {
  margin: 0 0 0.35rem;
}
.analytics-trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  min-height: 180px;
  padding: 1rem 0.5rem 0.5rem;
}
.analytics-trend-bar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}
.analytics-trend-bar__fill {
  width: 100%;
  max-width: 2.5rem;
  min-height: 4px;
  background: linear-gradient(180deg, var(--accent), #5b8def);
  border-radius: 6px 6px 2px 2px;
  transition: height 0.2s ease;
}
.analytics-trend-bar span,
.analytics-trend-bar strong {
  font-size: 0.75rem;
  text-align: center;
}
.analytics-trend-bar strong {
  color: var(--text);
}

@media (max-width: 1100px) {
  .teacher-student-profile-grid { grid-template-columns: 1fr; }
  .teacher-student-summary-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .teacher-students-table th:nth-child(4),
  .teacher-students-table td:nth-child(4),
  .teacher-students-table th:nth-child(6),
  .teacher-students-table td:nth-child(6) {
    display: none;
  }
  .teacher-profile-facts > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

/* ══════════════════════════════════════════════════════════════
   Portal premium — teacher / admin / parent (matches auth login)
   ══════════════════════════════════════════════════════════════ */

.portal-premium {
  --portal-accent: #2563EB;
  --portal-accent-2: #4F46E5;
  --portal-accent-soft: rgba(37, 99, 235, 0.1);
  --portal-accent-glow: rgba(37, 99, 235, 0.22);
  --portal-sidebar-from: #0f172a;
  --portal-sidebar-to: #1e293b;
  position: relative;
  background: #f4f7fb;
  color: var(--text);
}
.portal-premium--admin {
  --portal-accent: #7C3AED;
  --portal-accent-2: #6D28D9;
  --portal-accent-soft: rgba(124, 58, 237, 0.1);
  --portal-accent-glow: rgba(124, 58, 237, 0.24);
  --portal-sidebar-from: #1e1033;
  --portal-sidebar-to: #312e81;
}
.portal-premium--parent {
  --portal-accent: #0891B2;
  --portal-accent-2: #0E7490;
  --portal-accent-soft: rgba(8, 145, 178, 0.1);
  --portal-accent-glow: rgba(8, 145, 178, 0.24);
  --portal-sidebar-from: #0c4a6e;
  --portal-sidebar-to: #164e63;
}
.portal-premium--teacher {
  --accent: #2563EB;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.1);
}

.portal-premium__bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 70% at 0% -20%, rgba(255,255,255,0.9), transparent 55%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 45%, #f8fafc 100%);
}
.portal-premium__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.portal-premium__orb--1 {
  width: 420px;
  height: 420px;
  top: -180px;
  right: -120px;
  background: var(--portal-accent);
  opacity: 0.08;
}
.portal-premium__orb--2 {
  width: 320px;
  height: 320px;
  bottom: -80px;
  left: -100px;
  background: #6366f1;
  opacity: 0.06;
}
.portal-premium__orb--3 {
  width: 240px;
  height: 240px;
  top: 35%;
  right: 18%;
  background: #0ea5e9;
  opacity: 0.05;
}

.portal-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  align-items: flex-start;
}

.sidebar.teacher-sidebar,
.sidebar.portal-sidebar {
  border-right: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.06);
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

body.portal-premium .sidebar.portal-sidebar,
body.portal-premium .sidebar.teacher-sidebar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.portal-premium .portal-sidebar,
.portal-premium .teacher-sidebar {
  box-shadow: 2px 0 16px rgba(15, 23, 42, 0.06);
}

.portal-premium .sidebar.teacher-sidebar .teacher-sidebar__brand h1,
.portal-premium .sidebar.portal-sidebar .sidebar-brand h1 {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.3;
}
.portal-premium .sidebar.teacher-sidebar .teacher-sidebar__brand p,
.portal-premium .sidebar.portal-sidebar .sidebar-brand p {
  color: var(--muted);
}

.portal-premium .sidebar.teacher-sidebar .sidebar-brand,
.portal-premium .sidebar.portal-sidebar .sidebar-brand,
.portal-premium .sidebar.teacher-sidebar .teacher-sidebar__brand {
  background: transparent;
  border-bottom: 1px solid var(--border);
}

.portal-premium .sidebar.teacher-sidebar .teacher-nav a,
.portal-premium .sidebar.portal-sidebar .portal-nav a {
  color: #475569;
  font-weight: 600;
}

.portal-premium .teacher-nav a.active,
.portal-premium .portal-nav a.active,
.admin-app .teacher-nav a.active,
.portal-premium .sidebar.teacher-sidebar .teacher-nav a.active,
.portal-premium .sidebar.portal-sidebar .portal-nav a.active {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  box-shadow: 0 6px 18px var(--portal-accent-glow);
  color: #fff;
}
.portal-premium .sidebar.teacher-sidebar .teacher-nav a:hover,
.portal-premium .sidebar.portal-sidebar .portal-nav a:hover,
body.portal-premium .teacher-sidebar .teacher-nav a:hover,
body.portal-premium .portal-sidebar .portal-nav a:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}
.portal-premium .sidebar.teacher-sidebar .teacher-nav a.active:hover,
.portal-premium .sidebar.portal-sidebar .portal-nav a.active:hover,
body.portal-premium .teacher-sidebar .teacher-nav a.active:hover,
body.portal-premium .portal-sidebar .portal-nav a.active:hover {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  color: #fff;
}

.portal-sidebar__brand {
  gap: 0.85rem !important;
}
.portal-sidebar__logo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 8px 20px var(--portal-accent-glow);
}
.portal-sidebar__logo--admin {
  background: linear-gradient(135deg, #7c3aed, #a855f7);
}
.portal-sidebar__logo--teacher {
  background: linear-gradient(135deg, #2563eb, #4f46e5);
}
.portal-sidebar__logo--parent {
  background: linear-gradient(135deg, #0891b2, #06b6d4);
}

.portal-premium .sidebar.teacher-sidebar__footer .portal-sidebar__code,
.portal-sidebar__footer .portal-sidebar__code,
.portal-premium .teacher-sidebar__code {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--portal-accent-soft);
  border: 1px solid var(--border);
  color: var(--portal-accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.portal-main {
  max-width: none;
  width: 100%;
  padding: 1.5rem 1.75rem 2.5rem;
}

.portal-topbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.35rem;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
  position: relative;
  z-index: 40;
  overflow: visible;
}
.portal-topbar__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--portal-accent);
}
.portal-topbar h2 {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}
.portal-topbar__meta {
  margin-top: 0.25rem !important;
}

.portal-profile-trigger {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(226, 232, 240, 0.9);
}
.portal-profile-trigger__avatar,
.portal-premium .teacher-profile-trigger__avatar {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
}
.portal-profile-dropdown {
  border-radius: 16px;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  z-index: 200;
}
.portal-chip {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  border: 1px solid var(--portal-accent-glow);
}

.portal-content {
  position: relative;
  z-index: 1;
  animation: portalFadeIn 0.35s ease;
}
@keyframes portalFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.portal-premium .card,
.portal-premium .teacher-stat-card,
.portal-premium .stat-card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}
.portal-premium .card-header {
  border-bottom-color: rgba(226, 232, 240, 0.85);
  margin-bottom: 1rem;
}
.portal-premium .card-header h3 {
  font-size: 1.02rem;
  font-weight: 700;
}
.portal-premium .card-header .count {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  font-weight: 700;
}

.portal-welcome-banner,
.portal-premium .teacher-welcome-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  border-radius: 20px;
  color: #fff;
  box-shadow: 0 12px 32px var(--portal-accent-glow);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.portal-welcome-banner--teacher,
.portal-premium .teacher-welcome-banner {
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 55%, #7c3aed 100%);
}
.portal-welcome-banner--admin {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 50%, #8b5cf6 100%);
}
.portal-welcome-banner--parent {
  background: linear-gradient(135deg, #0e7490 0%, #0891b2 50%, #06b6d4 100%);
  margin-top: 0;
}
.portal-welcome-banner h3,
.portal-premium .teacher-welcome-banner h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0.15rem 0;
  color: #fff;
  letter-spacing: -0.02em;
}
.portal-welcome-banner__label,
.portal-premium .teacher-welcome-banner__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.88;
  margin: 0;
}
.portal-welcome-banner__sub,
.portal-premium .teacher-welcome-banner__sub {
  font-size: 0.92rem;
  opacity: 0.92;
  margin: 0;
  line-height: 1.5;
}
.portal-welcome-banner__sub strong {
  color: #fff;
  font-weight: 700;
}
.portal-welcome-banner__actions,
.portal-premium .teacher-welcome-banner__actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.portal-welcome-banner .btn-outline,
.portal-premium .teacher-welcome-banner .btn-outline {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  color: #fff !important;
}
.portal-welcome-banner .btn-outline:hover,
.portal-premium .teacher-welcome-banner .btn-outline:hover {
  background: rgba(255, 255, 255, 0.24);
}

.portal-stat-grid {
  margin-bottom: 1.25rem;
}
.portal-stat-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.portal-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.portal-premium .teacher-stat-card__value {
  background: linear-gradient(135deg, var(--text), #334155);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.portal-premium .teacher-stat-card__icon {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  color: inherit;
}

.portal-quick-links,
.portal-premium .teacher-quick-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1.25rem;
}
.portal-quick-link,
.portal-premium .teacher-quick-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.portal-quick-link:hover,
.portal-premium .teacher-quick-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  border-color: var(--portal-accent-glow);
  color: inherit;
}
.portal-quick-link span:first-child,
.portal-premium .teacher-quick-link span:first-child {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  background: var(--portal-accent-soft);
  flex-shrink: 0;
}
.portal-quick-link strong,
.portal-premium .teacher-quick-link strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
}
.portal-quick-link small,
.portal-premium .teacher-quick-link small {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.portal-premium .teacher-page-intro {
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}

.portal-premium .teacher-page-toolbar,
.portal-premium .class-tab-bar {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  padding: 0.35rem;
  margin-bottom: 1rem;
}
.portal-premium .class-tab {
  border-radius: 10px;
  font-weight: 600;
}
.portal-premium .class-tab.active {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  color: #fff;
  box-shadow: 0 4px 12px var(--portal-accent-glow);
}

.portal-premium .teacher-students-table-card,
.portal-premium .teacher-soft-card,
.portal-premium .teacher-class-card {
  border-radius: 16px;
}
.portal-premium .teacher-students-table thead th {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  border-bottom: none;
}
.portal-premium .teacher-students-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.9);
}

.portal-premium .feedback-feed__item.feedback-feed__item--card,
.portal-premium .leave-feed__item,
.portal-premium .school-news-item {
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(248, 250, 252, 0.75);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}
.portal-premium .feedback-feed__type {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  font-weight: 700;
}

.portal-premium .form-input,
.portal-premium .form-select,
.portal-premium .form-textarea,
.portal-premium .field input,
.portal-premium .field select,
.portal-premium .field textarea {
  border-radius: 10px;
  border-color: #e2e8f0;
  background: rgba(255, 255, 255, 0.95);
}
.portal-premium .form-input:focus,
.portal-premium .form-select:focus,
.portal-premium .form-textarea:focus {
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 3px var(--portal-accent-soft);
}

.portal-premium .btn {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  border-radius: 10px;
  box-shadow: 0 4px 14px var(--portal-accent-glow);
  color: #fff !important;
}
.portal-premium .btn:hover {
  filter: brightness(1.03);
}
.portal-premium .btn-ghost {
  background: transparent;
  box-shadow: none;
  color: var(--portal-accent) !important;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
}
.portal-premium .btn-ghost:hover {
  background: var(--portal-accent-soft);
  filter: none;
  color: var(--portal-accent) !important;
}
.portal-premium .btn-outline {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: none;
  color: var(--muted) !important;
}
.portal-premium .btn-outline:hover {
  border-color: var(--portal-accent-glow);
  color: var(--text) !important;
}

.portal-premium .alert {
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.portal-premium .empty-state {
  padding: 2.5rem 1.25rem;
  border-radius: 16px;
  background: rgba(248, 250, 252, 0.7);
  border: 1px dashed #cbd5e1;
}
.portal-premium .empty-state .icon {
  font-size: 2.25rem;
  opacity: 0.65;
}

.portal-status-card,
.portal-premium .today-status-card {
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
  margin-top: 1rem;
}

.portal-premium .child-tab-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 14px;
  backdrop-filter: blur(10px);
}
.portal-premium .child-tab {
  border-radius: 10px;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.85rem;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.portal-premium .child-tab.active {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  color: #fff;
  box-shadow: 0 4px 12px var(--portal-accent-glow);
}
.portal-premium .child-tab small {
  display: block;
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 500;
}

.portal-premium .data-table {
  border-radius: 12px;
  overflow: hidden;
}
.portal-premium .data-table th {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

@media (max-width: 1100px) {
  .portal-quick-links,
  .portal-premium .teacher-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 768px) {
  .portal-main {
    padding: 1rem 1rem 2rem;
  }
  .portal-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-quick-links,
  .portal-premium .teacher-quick-links {
    grid-template-columns: 1fr;
  }
  .portal-welcome-banner,
  .portal-premium .teacher-welcome-banner {
    padding: 1.25rem;
  }
}

/* Parent fee feed */
.fee-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}
.fee-feed--compact {
  padding: 0;
}
.fee-feed__item {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.85);
}
.fee-feed__item--paid {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.fee-feed__item--unpaid {
  border-color: #fde68a;
  background: #fffbeb;
}
.fee-feed__item--overdue {
  border-color: #fecaca;
  background: #fef2f2;
}
.fee-feed__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.fee-feed__head strong {
  font-size: 0.98rem;
}
.fee-feed__amount {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
}
.fee-feed__meta,
.fee-feed__notes {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}
.fee-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.fee-status-pill--paid {
  background: #d1fae5;
  color: #065f46;
}
.fee-status-pill--unpaid {
  background: #fef3c7;
  color: #92400e;
}
.fee-status-pill--overdue {
  background: #fee2e2;
  color: #991b1b;
}

.leave-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0 1rem 1rem;
}
.leave-feed__item {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.85);
}
.leave-feed__item--approved {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.leave-feed__item--pending {
  border-color: #fde68a;
  background: #fffbeb;
}
.leave-feed__item--rejected {
  border-color: #fecaca;
  background: #fef2f2;
}
.leave-feed__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.leave-feed__title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.leave-feed__title strong {
  font-size: 0.98rem;
  line-height: 1.35;
}
.leave-feed__type {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
}
.leave-feed__reason,
.leave-feed__doc,
.leave-feed__remarks {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text);
}
.leave-feed__remarks {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.55);
}
.leave-feed__doc a {
  color: var(--accent);
  font-size: 0.85rem;
}
.leave-feed__meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.exam-feed {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0 1rem 1rem;
}
.exam-feed--compact {
  padding: 0 1rem 1rem;
}
.exam-feed__item {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.85);
}
.exam-feed__item--today {
  border-color: #a7f3d0;
  background: #ecfdf5;
}
.exam-feed__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.exam-feed__head strong {
  font-size: 0.98rem;
}
.exam-feed__date {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.exam-feed__meta,
.exam-feed__notes {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}
.exam-timing-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.exam-timing-pill--today {
  background: #d1fae5;
  color: #065f46;
}
.exam-timing-pill--upcoming {
  background: #dbeafe;
  color: #1e40af;
}

/* ── Admin portal nav groups + mobile sidebar ── */
.portal-nav__group {
  margin: 0.35rem 0 0.05rem;
  padding: 0.35rem 0.85rem 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.portal-nav__group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.portal-premium .portal-nav .portal-nav__group {
  flex-shrink: 0;
}
.portal-setup-checklist {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}
.portal-setup-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}
.portal-setup-check > span {
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
}
.portal-setup-check strong {
  display: block;
  font-size: 0.9rem;
}
.portal-setup-check small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 0.1rem;
}
.portal-setup-check--done {
  background: var(--success-soft);
  border-color: #a7f3d0;
}
.portal-setup-check--done > span {
  color: var(--success);
}
.portal-quick-links.portal-quick-links--compact,
.portal-premium .teacher-quick-links.portal-quick-links--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
  gap: 0.65rem;
  padding: 0 1rem 1rem;
}
.portal-quick-links--compact .portal-quick-link,
.portal-quick-links--compact .teacher-quick-link {
  align-items: center;
  min-height: 4.5rem;
  padding: 0.85rem 0.9rem;
}
.portal-quick-links--compact .portal-quick-link > div,
.portal-quick-links--compact .teacher-quick-link > div {
  min-width: 0;
  line-height: 1.35;
}
.portal-quick-links--compact .portal-quick-link strong,
.portal-quick-links--compact .teacher-quick-link strong {
  line-height: 1.25;
}
.portal-quick-links--compact .portal-quick-link small,
.portal-quick-links--compact .teacher-quick-link small {
  margin-top: 0.1rem;
}
.portal-home-grid {
  margin-bottom: 1.25rem;
}
.portal-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 1.15rem;
  cursor: pointer;
  flex-shrink: 0;
}
.portal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 40;
}
.portal-topbar {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  overflow: visible;
}
.portal-topbar__titles {
  flex: 1;
  min-width: 0;
}
.portal-topbar__actions {
  margin-left: auto;
}

@media (max-width: 900px) {
  .portal-menu-btn {
    display: inline-flex;
  }
  .portal-layout .portal-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(18rem, 86vw);
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
  }
  .portal-layout.portal-layout--nav-open .portal-sidebar {
    transform: translateX(0);
  }
  .portal-layout.portal-layout--nav-open .portal-backdrop {
    display: block;
  }
  .portal-layout .portal-main {
    width: 100%;
    padding: 1rem 1rem 2rem;
  }
}

/* ── Accessibility: skip link + setup progress ── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.75rem;
  z-index: 1000;
  padding: 0.5rem 0.85rem;
  background: #fff;
  color: var(--accent);
  border-radius: 8px;
  border: 1px solid var(--border);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus {
  left: 0.75rem;
}
.setup-progress {
  margin-top: 0.5rem;
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  max-width: 280px;
}
.setup-progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2563eb, #0ea5e9);
  transition: width 0.25s ease;
}

/* ── Super admin school onboard ── */
.auth-premium--super {
  --auth-accent: #0F766E;
  --auth-accent-soft: rgba(15, 118, 110, 0.1);
  --auth-accent-border: rgba(15, 118, 110, 0.22);
}

.auth-premium__shell--super {
  max-width: 1180px;
}

.super-onboard__grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  flex: 1;
}

@media (max-width: 900px) {
  .super-onboard__grid {
    grid-template-columns: 1fr;
  }
}

.super-onboard__hero {
  position: sticky;
  top: 1rem;
  padding: 1.5rem 1.35rem;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,250,252,0.9));
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

@media (max-width: 900px) {
  .super-onboard__hero {
    position: static;
  }
}

.super-onboard__hero-icon {
  width: 72px;
  height: 72px;
  margin-bottom: 1rem;
  color: var(--auth-accent);
}

.super-onboard__hero-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.super-onboard__hero-title {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: #0F172A;
}

.super-onboard__hero-sub {
  margin: 0 0 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: #64748B;
}

.super-onboard__checklist {
  list-style: none;
  margin: 0 0 1.15rem;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}

.super-onboard__checklist li {
  position: relative;
  padding-left: 1.45rem;
  font-size: 0.86rem;
  color: #334155;
  line-height: 1.45;
}

.super-onboard__checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: var(--auth-accent-soft);
  color: var(--auth-accent);
  font-size: 0.68rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.super-onboard__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.super-onboard__trust-item {
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
}

.super-onboard__main {
  min-width: 0;
}

.super-onboard__card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 22px;
  padding: 1.5rem 1.5rem 1.25rem;
  box-shadow: 0 16px 48px rgba(15, 23, 42, 0.07);
}

.super-onboard__card--success {
  max-width: 640px;
  margin: 0 auto;
}

.super-onboard__card-head {
  margin-bottom: 1.15rem;
}

.super-onboard__title {
  margin: 0 0 0.35rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0F172A;
}

.super-onboard__subtitle {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748B;
}

.super-onboard__req {
  color: #DC2626;
  font-weight: 700;
}

.super-onboard__steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 1.35rem;
  padding: 0.65rem 0.85rem;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
}

.super-onboard__step {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
  color: #94A3B8;
  transition: color 0.2s;
}

.super-onboard__step--active {
  color: var(--auth-accent);
}

.super-onboard__step-num {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 800;
  background: #E2E8F0;
  color: #64748B;
  flex-shrink: 0;
  transition: background 0.2s, color 0.2s;
}

.super-onboard__step--active .super-onboard__step-num {
  background: var(--auth-accent);
  color: #fff;
}

.super-onboard__step-label {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.super-onboard__step-line {
  flex: 0 0 1.25rem;
  height: 2px;
  background: #E2E8F0;
  margin: 0 0.25rem;
}

@media (max-width: 520px) {
  .super-onboard__step-label {
    display: none;
  }
  .super-onboard__step {
    justify-content: center;
  }
}

.super-onboard__alert-hint {
  margin: 0.5rem 0 0;
  font-size: 0.88rem;
}

.super-onboard__section {
  padding: 1.15rem 1.1rem 0.25rem;
  margin-bottom: 1rem;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  background: #FAFBFC;
  scroll-margin-top: 1rem;
}

.super-onboard__section-head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid #E2E8F0;
}

.super-onboard__section-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 12px;
  background: var(--auth-accent-soft);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.super-onboard__section-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0F172A;
}

.super-onboard__section-desc {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #64748B;
}

.super-onboard__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 0.85rem;
}

@media (max-width: 640px) {
  .super-onboard__row {
    grid-template-columns: 1fr;
  }
}

.super-onboard__form .auth-field {
  margin-bottom: 0.9rem;
}

.super-onboard__toggle-pw {
  border: none;
  background: transparent;
  color: var(--auth-accent);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
  flex-shrink: 0;
}

.super-onboard__toggle-pw:hover {
  text-decoration: underline;
}

.super-onboard__pw-meter {
  margin-top: 0.4rem;
  height: 4px;
  border-radius: 999px;
  background: #E2E8F0;
  overflow: hidden;
}

.super-onboard__pw-meter .super-onboard__pw-bar {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: #DC2626;
  transition: width 0.2s, background 0.2s;
}

.super-onboard__pw-meter[data-strength="1"] .super-onboard__pw-bar { width: 25%; background: #DC2626; }
.super-onboard__pw-meter[data-strength="2"] .super-onboard__pw-bar { width: 50%; background: #F59E0B; }
.super-onboard__pw-meter[data-strength="3"] .super-onboard__pw-bar { width: 75%; background: #0EA5E9; }
.super-onboard__pw-meter[data-strength="4"] .super-onboard__pw-bar { width: 100%; background: #059669; }

.super-onboard__date-hint {
  margin-top: -0.35rem;
  margin-bottom: 0.5rem;
}

.super-onboard__date-hint--error {
  color: #DC2626;
  font-weight: 600;
}

.super-onboard__actions {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

.super-onboard__actions-note {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #94A3B8;
  text-align: center;
}

.super-onboard__actions-note a {
  color: var(--auth-accent);
  font-weight: 600;
}

.super-onboard__submit[disabled] {
  opacity: 0.75;
  cursor: wait;
}

.super-onboard__footer-link {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.88rem;
  color: #64748B;
}

.super-onboard__footer-link--center {
  margin-top: 1rem;
}

.super-onboard__footer-link a {
  color: var(--auth-accent);
  font-weight: 700;
}

.super-onboard__success-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: #ECFDF5;
  border: 1px solid #BBF7D0;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 700;
}

.super-onboard__success-icon {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  background: #059669;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
}

.super-onboard__credentials {
  margin: 1.15rem 0;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  overflow: hidden;
  background: #F8FAFC;
}

.super-onboard__cred-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #E2E8F0;
}

.super-onboard__cred-row:last-child {
  border-bottom: none;
}

@media (max-width: 520px) {
  .super-onboard__cred-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }
}

.super-onboard__cred-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748B;
}

.super-onboard__cred-value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.super-onboard__cred-value code {
  flex: 1;
  min-width: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0F172A;
  word-break: break-all;
}

.super-onboard__copy {
  flex-shrink: 0;
  border: 1px solid #CBD5E1;
  background: #fff;
  color: #334155;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.super-onboard__copy:hover {
  border-color: var(--auth-accent);
  color: var(--auth-accent);
}

.super-onboard__next-steps {
  margin: 1.15rem 0;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #F0FDFA;
  border: 1px solid #CCFBF1;
}

.super-onboard__next-title {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0F766E;
}

.super-onboard__next-list {
  margin: 0;
  padding-left: 1.2rem;
  color: #334155;
  font-size: 0.86rem;
  line-height: 1.6;
}

.super-onboard__success-actions {
  display: grid;
  gap: 0.65rem;
}

.super-onboard__secondary-btn {
  width: 100%;
  text-align: center;
  justify-content: center;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .super-onboard__step,
  .super-onboard__step-num,
  .super-onboard__pw-meter .super-onboard__pw-bar,
  .super-onboard__copy {
    transition: none;
  }
}

/* ── Admin portal production polish ── */
.portal-nav a > .portal-nav__svg,
.teacher-nav a > .portal-nav__svg {
  width: 1.1rem;
  height: 1.1rem;
  flex-shrink: 0;
  opacity: 0.88;
}

.portal-quick-link__icon .portal-nav__svg,
.portal-quick-link > .portal-nav__svg {
  width: 1.35rem;
  height: 1.35rem;
  padding: 0.45rem;
  border-radius: 10px;
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  box-sizing: content-box;
}

.portal-profile-menu--open .teacher-profile-dropdown,
.portal-profile-menu--open .portal-profile-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.portal-readiness-card {
  margin-bottom: 1.25rem;
  padding: 0;
  overflow: hidden;
  border-color: rgba(124, 58, 237, 0.15);
}

.portal-readiness-card__hero {
  border: none;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(139, 92, 246, 0.04));
  padding: 1.25rem 1.35rem;
}

.portal-readiness-card__ring {
  flex-shrink: 0;
}

.portal-readiness-card__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
}

.portal-readiness-card__title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.portal-readiness-card__sub {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: #64748b;
}

.portal-readiness-card__cta {
  width: auto;
  margin-top: 0.85rem;
}

.portal-reminder {
  margin-bottom: 0.75rem;
}

.portal-reminder-overflow {
  margin-bottom: 1.25rem;
}

.portal-stat-card {
  position: relative;
  padding-top: 0.25rem;
}

.portal-stat-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.35rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.65);
  color: inherit;
  opacity: 0.85;
}

.portal-stat-card__icon svg {
  width: 1.1rem;
  height: 1.1rem;
}

.portal-setup-check__mark {
  font-weight: 700;
  color: var(--muted);
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
}

.portal-setup-check--done .portal-setup-check__mark {
  color: var(--success);
}

.portal-section-head {
  margin: 0.5rem 0 0.85rem;
}

.portal-section-head__title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}

.portal-section-head__sub {
  margin: 0;
  font-size: 0.84rem;
  color: #64748b;
}

/* Setup wizard — portal premium (light sidebar, matches admin portal) */
.portal-premium--setup .portal-layout--setup {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  min-height: 100vh;
  gap: 0;
}

.portal-premium--setup .portal-sidebar--setup {
  display: flex;
  flex-direction: column;
  width: 17.5rem;
  min-width: 17.5rem;
  max-width: 17.5rem;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 2px 0 20px rgba(15, 23, 42, 0.06);
}

.portal-premium--setup .portal-sidebar--setup .sidebar-brand h1 {
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.35;
  word-break: break-word;
}

.portal-premium--setup .portal-sidebar--setup .sidebar-brand p {
  color: var(--muted);
}

.portal-premium--setup .portal-sidebar--setup .sidebar-brand {
  border-bottom: 1px solid var(--border);
  padding: 1rem 1rem 0.85rem;
}

.portal-premium--setup .portal-wizard-nav {
  flex: 1;
  padding: 0.65rem 0.75rem 1rem;
  overflow-y: auto;
}

.portal-premium--setup .portal-wizard-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.58rem 0.7rem;
  margin-bottom: 0.15rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.portal-premium--setup .portal-wizard-nav a:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.portal-premium--setup .portal-wizard-nav a.active {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  box-shadow: 0 6px 18px var(--portal-accent-glow);
  color: #fff;
}

.portal-premium--setup .portal-wizard-nav a.done {
  color: #334155;
}

.portal-premium--setup .portal-wizard-nav__back {
  margin-bottom: 0.65rem !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  color: #64748b !important;
  border-bottom: 1px solid var(--border) !important;
  border-radius: 0 !important;
  padding: 0.35rem 0.7rem 0.75rem !important;
}

.portal-premium--setup .portal-wizard-nav__back:hover {
  color: var(--portal-accent) !important;
  background: var(--portal-accent-soft) !important;
}

.portal-premium--setup .portal-wizard-nav__num {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: #e2e8f0;
  color: #64748b;
  flex-shrink: 0;
}

.portal-premium--setup .portal-wizard-nav a.active .portal-wizard-nav__num {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.portal-premium--setup .portal-wizard-nav a.done .portal-wizard-nav__num {
  background: #d1fae5;
  color: #059669;
}

.portal-premium--setup .portal-sidebar__footer--setup {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.85);
  flex-shrink: 0;
}

.portal-premium--setup .portal-wizard-progress__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 0.4rem;
}

.portal-premium--setup .portal-wizard-progress__track {
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.portal-premium--setup .portal-wizard-progress__bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c3aed, #a855f7);
  transition: width 0.25s ease;
}

.portal-premium--setup .portal-main {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 1.15rem 1.5rem 2rem;
  margin-left: 0;
}

.portal-premium--setup .portal-content {
  max-width: 1120px;
}

.portal-topbar--setup {
  margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
  .portal-premium--setup .portal-menu-btn {
    display: inline-flex;
  }

  .portal-premium--setup .portal-sidebar--setup {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
    width: min(18rem, 86vw);
    min-width: 0;
    max-width: none;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.35);
  }

  .portal-premium--setup.portal-layout--nav-open .portal-sidebar--setup,
  .portal-layout--setup.portal-layout--nav-open .portal-sidebar--setup {
    transform: translateX(0);
  }

  .portal-premium--setup .portal-layout--nav-open .portal-backdrop,
  .portal-layout--setup.portal-layout--nav-open .portal-backdrop {
    display: block;
  }

  .portal-premium--setup .portal-main {
    width: 100%;
    padding: 1rem 1rem 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-premium--setup .portal-wizard-progress__bar,
  .portal-premium--setup .portal-sidebar--setup {
    transition: none;
  }
}

/* Setup resume — return to wizard from main portal */
.portal-setup-resume {
  display: block;
  margin: 0 0.75rem 0.85rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(139, 92, 246, 0.08));
  border: 1px solid rgba(124, 58, 237, 0.22);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-setup-resume:hover {
  border-color: rgba(124, 58, 237, 0.4);
  box-shadow: 0 6px 18px rgba(124, 58, 237, 0.12);
}

.portal-setup-resume__badge {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
  margin-bottom: 0.25rem;
}

.portal-setup-resume__title {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
}

.portal-setup-resume__step {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.portal-nav__wizard-link {
  border: 1px dashed rgba(124, 58, 237, 0.25);
}

.portal-setup-banner {
  margin-bottom: 1rem;
}

.portal-setup-banner a {
  font-weight: 700;
  color: var(--portal-accent);
}

.portal-credentials {
  margin-bottom: 1.25rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  border: 1px solid #bbf7d0;
  background: linear-gradient(180deg, #f0fdf4 0%, #ecfdf5 100%);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.06);
}

.portal-credentials__head {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.portal-credentials__icon {
  font-size: 1.35rem;
  line-height: 1;
  margin-top: 0.1rem;
}

.portal-credentials__title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  font-weight: 800;
  color: #065f46;
  letter-spacing: -0.02em;
}

.portal-credentials__sub {
  margin: 0;
  font-size: 0.86rem;
  color: #047857;
  line-height: 1.45;
}

.portal-credentials__rows {
  display: grid;
  gap: 0.65rem;
}

.portal-credentials__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d1fae5;
}

.portal-credentials__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-credentials__value {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.portal-credentials__value code {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
  word-break: break-all;
}

.portal-credentials__copy {
  flex-shrink: 0;
  border: 1px solid #a7f3d0;
  background: #fff;
  color: #047857;
  border-radius: 8px;
  padding: 0.3rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.portal-credentials__copy:hover {
  background: #ecfdf5;
}

.portal-credentials__note {
  margin: 0.85rem 0 0;
  font-size: 0.8rem;
  color: #047857;
  line-height: 1.45;
}

.admin-card-actions__reset {
  border: none;
  background: transparent;
  color: #0891b2;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.admin-card-actions__reset:hover {
  text-decoration: underline;
}

/* Super admin platform portal */
.portal-premium--super {
  --portal-accent: #0EA5E9;
  --portal-accent-2: #0284C7;
  --portal-accent-soft: rgba(14, 165, 233, 0.1);
  --portal-accent-glow: rgba(14, 165, 233, 0.24);
  --portal-sidebar-from: #0c4a6e;
  --portal-sidebar-to: #164e63;
}
.portal-sidebar__logo--super { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.portal-profile-trigger__avatar--super { background: linear-gradient(135deg, #0ea5e9, #0369a1); }
.portal-welcome-banner--super {
  background: linear-gradient(135deg, #0369a1 0%, #0ea5e9 52%, #38bdf8 100%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
}
.portal-premium--super .super-portal-content {
  max-width: 1280px;
}
.portal-premium--super .super-portal-topbar {
  margin-bottom: 0.25rem;
}
.portal-premium--super .teacher-stat-card.super-stat-tile {
  border-top-width: 4px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
}
.portal-premium--super .super-stat-tile__icon {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  opacity: 1;
}
.portal-premium--super .teacher-stat-card--red .super-stat-tile__icon { background: #fee2e2; color: #dc2626; }
.portal-premium--super .teacher-stat-card--amber .super-stat-tile__icon { background: #fef3c7; color: #d97706; }
.portal-premium--super .teacher-stat-card--green .super-stat-tile__icon { background: #d1fae5; color: #059669; }
.portal-premium--super .teacher-stat-card--blue .super-stat-tile__icon { background: #dbeafe; color: #2563eb; }
.portal-premium--super .teacher-stat-card--purple .super-stat-tile__icon { background: #ede9fe; color: #7c3aed; }
.portal-premium--super .super-stat-tile--alert {
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.12), 0 8px 24px rgba(220, 38, 38, 0.08);
}
.portal-premium--super .super-stat-tile__meta {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.4;
}
.portal-premium--super .super-home-stats {
  display: grid;
  gap: 1rem;
  margin-bottom: 0;
}
.portal-premium--super .super-home-stats--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.portal-premium--super .super-home-stats--ops {
  margin-bottom: 1.25rem;
}
.portal-premium--super .super-dashboard-section {
  margin-bottom: 1.5rem;
}
.portal-premium--super .super-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}
.portal-premium--super .super-section-head h4 {
  margin: 0 0 0.15rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}
.portal-premium--super .super-section-head p {
  margin: 0;
  font-size: 0.86rem;
  color: #64748b;
}
.portal-premium--super .super-section-head__link {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--portal-accent);
  text-decoration: none;
}
.portal-premium--super .super-section-head__link:hover { text-decoration: underline; }
.portal-premium--super .super-alert-stack {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
}
.portal-premium--super .super-status-banner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  flex-wrap: wrap;
}
.portal-premium--super .super-status-banner__icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}
.portal-premium--super .super-status-banner strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
}
.portal-premium--super .super-status-banner p {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
}
.portal-premium--super .super-status-banner--danger {
  background: #fef2f2;
  border-color: #fecaca;
}
.portal-premium--super .super-status-banner--info {
  background: #eff6ff;
  border-color: #bfdbfe;
}
.portal-premium--super .super-status-banner--warn {
  background: #fffbeb;
  border-color: #fde68a;
}
.portal-premium--super .super-health-pill {
  display: inline-flex;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}
.portal-premium--super .super-health-pill--up { background: #d1fae5; color: #047857; }
.portal-premium--super .super-health-pill--down { background: #fee2e2; color: #b91c1c; }
.portal-premium--super .super-quick-links {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.portal-premium--super .super-quick-link strong {
  display: block;
  font-size: 0.92rem;
  color: #0f172a;
}
.portal-premium--super .super-quick-link small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.78rem;
  color: #64748b;
}
.portal-premium--super .super-quick-link__icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--portal-accent-soft);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.portal-premium--super .super-ops-hero { margin-bottom: 1.25rem; }
.portal-premium--super .super-ops-panels { margin-top: 0; }
.portal-premium--super .super-panel {
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.85rem;
  align-content: start;
}
.portal-premium--super .super-panel--wide { grid-column: 1 / -1; }
.portal-premium--super .super-panel__head h4 { margin: 0 0 0.25rem; font-size: 0.98rem; font-weight: 800; }
.portal-premium--super .super-panel__head .meta { margin: 0; }
.portal-premium--super .super-empty-state {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
}
.portal-premium--super .super-empty-state__icon {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #047857;
  font-weight: 800;
  margin-bottom: 0.5rem;
}
.portal-premium--super .super-empty-state p { margin: 0.15rem 0 0; }
.portal-premium--super .super-breakdown-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.portal-premium--super .super-breakdown-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.portal-premium--super .super-breakdown-list__role {
  font-weight: 700;
  color: #0f172a;
  font-size: 0.88rem;
}
.portal-premium--super .super-breakdown-list__count {
  font-weight: 800;
  color: #dc2626;
  font-size: 0.9rem;
}
.portal-premium--super .super-checklist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.portal-premium--super .super-checklist li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.portal-premium--super .super-checklist li > span {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 999px;
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  font-size: 0.78rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.portal-premium--super .super-checklist strong {
  display: block;
  font-size: 0.88rem;
  color: #0f172a;
}
.portal-premium--super .super-checklist p {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}
.portal-premium--super .super-code {
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: #f1f5f9;
  font-size: 0.82rem;
}
.portal-premium--super .super-table-wrap { border-radius: 12px; overflow: hidden; border: 1px solid var(--border); }
.portal-premium--super .super-table__actions-col { text-align: right; white-space: nowrap; }

/* Super admin sidebar navigation */
.portal-premium--super .super-portal-sidebar {
  width: 280px;
}
.portal-premium--super .super-portal-sidebar__brand {
  padding: 1.2rem 1.15rem 1rem;
}
.portal-premium--super .super-portal-sidebar__cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.85rem 0.85rem 0.35rem;
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  text-decoration: none;
  border: 1px dashed rgba(14, 165, 233, 0.35);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(2, 132, 199, 0.04));
  color: #0f172a;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.portal-premium--super .super-portal-sidebar__cta:hover {
  background: var(--portal-accent-soft);
  border-color: rgba(14, 165, 233, 0.5);
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.12);
}
.portal-premium--super .super-portal-sidebar__cta--active {
  border-style: solid;
  border-color: rgba(14, 165, 233, 0.45);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.14), rgba(2, 132, 199, 0.08));
  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.14);
}
.portal-premium--super .super-portal-sidebar__cta-icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}
.portal-premium--super .super-portal-sidebar__cta-icon .portal-nav__svg {
  width: 1.1rem;
  height: 1.1rem;
}
.portal-premium--super .super-portal-sidebar__cta-text strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.portal-premium--super .super-portal-sidebar__cta-text small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.74rem;
  color: #64748b;
}
.portal-premium--super .super-portal-nav {
  padding-top: 0.55rem;
  gap: 0.2rem;
}
.portal-premium--super .super-portal-nav .portal-nav__group {
  margin-top: 0.65rem;
  padding: 0.55rem 0.85rem 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: #94a3b8;
  border-top-color: rgba(148, 163, 184, 0.28);
}
.portal-premium--super .super-portal-nav .portal-nav__group:first-child {
  margin-top: 0;
  padding-top: 0;
}
.portal-premium--super .super-portal-nav a {
  position: relative;
  gap: 0.75rem;
  padding: 0.68rem 0.85rem 0.68rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 11px;
}
.portal-premium--super .super-portal-nav a::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 50%;
  width: 3px;
  height: 0;
  border-radius: 999px;
  background: var(--portal-accent);
  transform: translateY(-50%);
  transition: height 0.15s ease;
}
.portal-premium--super .super-portal-nav a.active::before {
  height: 1.35rem;
}
.portal-premium--super .super-portal-nav a .teacher-nav__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
  transition: background 0.15s ease, color 0.15s ease;
}
.portal-premium--super .super-portal-nav a .portal-nav__svg {
  width: 1.05rem;
  height: 1.05rem;
  opacity: 1;
}
.portal-premium--super .super-portal-nav a:hover .teacher-nav__icon {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}
.portal-premium--super .super-portal-nav a.active .teacher-nav__icon {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.portal-premium--super .super-portal-sidebar__footer {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.15rem 1.2rem;
  border-top: 1px solid var(--border);
}
.portal-premium--super .super-portal-sidebar__operator {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}
.portal-premium--super .super-portal-sidebar__operator-avatar {
  width: 2.1rem;
  height: 2.1rem;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.portal-premium--super .super-portal-sidebar__operator-text {
  min-width: 0;
}
.portal-premium--super .super-portal-sidebar__operator-text strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-premium--super .super-portal-sidebar__operator-text small {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.74rem;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.portal-premium--super .super-portal-sidebar__footer .portal-sidebar__code {
  align-self: flex-start;
}
.super-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.super-stat-grid--compact { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.super-stat-card { padding: 1rem 1.1rem; }
.super-stat-card__label {
  margin: 0 0 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.super-stat-card__value {
  margin: 0;
  font-size: 1.65rem;
  font-weight: 800;
  color: #0f172a;
}
.super-stat-card__meta { margin: 0.35rem 0 0; font-size: 0.8rem; color: #64748b; }
.super-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.super-page-head__eyebrow { margin: 0 0 0.25rem; font-size: 0.8rem; color: #64748b; }
.super-page-head__eyebrow a { color: var(--portal-accent); text-decoration: none; font-weight: 600; }
.super-page-head__title { margin: 0 0 0.35rem; font-size: 1.35rem; font-weight: 800; color: #0f172a; }
.super-page-head__sub {
  margin: 0;
  color: #64748b;
  font-size: 0.92rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.super-page-head__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.super-filter-card, .super-form-card { margin-bottom: 1rem; padding: 1rem 1.1rem; }
.super-form-card--narrow { max-width: 520px; }
.super-filter-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: flex-end; }
.super-filter-field { flex: 1 1 160px; min-width: 0; }
.super-table-card { padding: 0; overflow: hidden; }
.super-badge {
  display: inline-flex;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #e2e8f0;
  color: #475569;
}
.super-badge--success { background: #d1fae5; color: #047857; }
.super-badge--danger { background: #fee2e2; color: #b91c1c; }
.super-badge--info { background: #dbeafe; color: #1d4ed8; }
.super-badge--warn { background: #fef3c7; color: #b45309; }
.super-empty-row { text-align: center; color: #64748b; padding: 2rem 1rem !important; }
.super-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--border);
}
.super-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}
.super-detail-card { padding: 1rem 1.1rem; }
.super-detail-card h4 { margin: 0 0 0.75rem; font-size: 0.95rem; font-weight: 800; }
.super-detail-list { display: grid; gap: 0.55rem; margin: 0; }
.super-detail-list > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.5rem;
}
.super-detail-list dt {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}
.super-detail-list dd { margin: 0; font-size: 0.9rem; }
.super-action-form { display: grid; gap: 0.65rem; }
.super-action-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}
.btn-danger { background: #dc2626; color: #fff; border-color: #dc2626; }
.super-audit-mini { list-style: none; margin: 0 0 0.85rem; padding: 0; display: grid; gap: 0.55rem; }
.super-audit-mini li { display: grid; gap: 0.1rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--border); }

.super-context-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(14, 165, 233, 0.28);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(2, 132, 199, 0.06));
}
.super-context-banner__content { display: flex; gap: 0.75rem; align-items: flex-start; }
.super-context-banner__icon { font-size: 1.2rem; line-height: 1; margin-top: 0.1rem; }
.super-context-banner__title { margin: 0 0 0.2rem; font-size: 0.92rem; color: #0f172a; }
.super-context-banner__sub { margin: 0; font-size: 0.8rem; color: #475569; }
.super-context-banner__actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.super-manage-form { display: inline; }

.super-support-stats { margin-bottom: 1rem; }
.super-support-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
}
.super-support-card { display: grid; gap: 0.85rem; align-content: start; }
.super-support-card--wide { grid-column: 1 / -1; }
.super-support-card__head h4 { margin: 0 0 0.35rem; }
.super-support-card__head .meta { margin: 0; }
.super-support-admin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}
.super-support-admin {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}
.super-support-admin:last-child { border-bottom: 0; padding-bottom: 0; }
.super-support-admin__info { display: grid; gap: 0.15rem; min-width: 0; }
.super-support-admin__info strong { font-size: 0.92rem; color: #0f172a; }
.super-support-inline-form { margin: 0; }
.super-support-setup-status {
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
}
.super-support-setup-status p { margin: 0; display: grid; gap: 0.15rem; }
.super-support-action { margin-top: 0.25rem; padding-top: 0.75rem; border-top: 1px dashed var(--border); }
.super-support-flags { display: grid; gap: 0.65rem; }
.super-support-flag {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  background: #fff;
}
.super-support-flag input { margin-top: 0.2rem; }
.super-support-flag span { display: grid; gap: 0.1rem; }
.super-support-flag strong { font-size: 0.88rem; color: #0f172a; }
.super-support-flag small { color: #64748b; font-size: 0.78rem; line-height: 1.35; }
.super-support-blockers {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.super-support-blockers li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  border: 1px solid var(--border);
}
.super-support-blockers__item--blocker { background: #fef2f2; border-color: #fecaca; }
.super-support-blockers__item--warn { background: #fffbeb; border-color: #fde68a; }
.super-support-blockers p { margin: 0.15rem 0 0; }

.super-table { width: 100%; border-collapse: collapse; }
.super-table th, .super-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.super-table th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.super-table__actions { display: flex; gap: 0.35rem; flex-wrap: wrap; justify-content: flex-end; }
.super-role-guide {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.45rem;
  color: #475569;
  font-size: 0.88rem;
}
.super-maintenance-banner { margin-bottom: 1rem; }
.super-ops-alerts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
}
.super-ops-alerts li {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  display: grid;
  gap: 0.25rem;
}
.super-ops-alerts li > div {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.super-ops-alerts__item--high { background: #fef2f2; border-color: #fecaca; }
.super-ops-alerts__item--medium { background: #fffbeb; border-color: #fde68a; }
.super-form-card input, .super-form-card select, .super-form-card textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
  font: inherit;
}

.portal-premium--super .super-page-head {
  padding: 1.1rem 1.25rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}
.portal-premium--super .super-page-head__title {
  font-size: 1.25rem;
}
.portal-premium--super .super-filter-card,
.portal-premium--super .super-table-card {
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

/* Super admin — production filters, search, tables */
.portal-premium--super .super-filter-card {
  padding: 1.1rem 1.2rem 1.15rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.95);
}
.portal-premium--super .super-filter-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}
.portal-premium--super .super-filter-card__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}
.portal-premium--super .super-filter-card__hint {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #64748b;
}
.portal-premium--super .super-filter-card .auth-field {
  margin-bottom: 0;
}
.portal-premium--super .super-filter-card .auth-field label,
.portal-premium--super .super-form-card .auth-field label,
.portal-premium--super .super-action-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}
.portal-premium--super .super-input,
.portal-premium--super .super-filter-card input,
.portal-premium--super .super-filter-card select,
.portal-premium--super .super-form-card input,
.portal-premium--super .super-form-card select,
.portal-premium--super .super-form-card textarea,
.portal-premium--super .super-action-form textarea {
  width: 100%;
  padding: 0.68rem 0.85rem;
  border: 1px solid #dbe3ee;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.96);
  font: inherit;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.portal-premium--super .super-input::placeholder {
  color: #94a3b8;
}
.portal-premium--super .super-input:focus,
.portal-premium--super .super-filter-card input:focus,
.portal-premium--super .super-filter-card select:focus,
.portal-premium--super .super-form-card input:focus,
.portal-premium--super .super-form-card select:focus,
.portal-premium--super .super-form-card textarea:focus,
.portal-premium--super .super-action-form textarea:focus {
  outline: none;
  border-color: var(--portal-accent);
  box-shadow: 0 0 0 3px var(--portal-accent-soft);
}
.portal-premium--super .super-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.portal-premium--super .super-search__icon {
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}
.portal-premium--super .super-search__icon svg {
  width: 1rem;
  height: 1rem;
}
.portal-premium--super .super-search .super-input {
  flex: 1;
  min-width: 0;
}
.portal-premium--super .super-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.portal-premium--super .super-filter-field--search {
  flex: 2 1 220px;
}
.portal-premium--super .super-role-guide-card {
  margin-top: 1rem;
}

/* Clickable school stat cards + roster tabs */
.portal-premium--super .super-stat-card--link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
}
.portal-premium--super .super-stat-card--link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.35);
}
.portal-premium--super .super-stat-card--link:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--portal-accent-soft);
  border-color: var(--portal-accent);
}
.portal-premium--super .super-stat-card__meta {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--portal-accent);
}
.portal-premium--super .super-stat-card--static {
  opacity: 0.92;
}
.portal-premium--super .super-roster-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
  padding: 0.35rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}
.portal-premium--super .super-roster-tabs a {
  padding: 0.55rem 0.9rem;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  color: #475569;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.portal-premium--super .super-roster-tabs a:hover {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}
.portal-premium--super .super-roster-tabs a.active {
  background: linear-gradient(135deg, var(--portal-accent), var(--portal-accent-2));
  color: #fff;
  box-shadow: 0 6px 16px var(--portal-accent-glow);
}
.portal-premium--super .super-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}
.portal-premium--super .super-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--portal-accent-soft);
  border: 1px solid rgba(14, 165, 233, 0.2);
  color: #0369a1;
  font-size: 0.78rem;
  font-weight: 700;
}
.portal-premium--super .super-filter-chip__clear {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--portal-accent);
  text-decoration: none;
  margin-left: auto;
}
.portal-premium--super .super-filter-chip__clear:hover {
  text-decoration: underline;
}
.portal-premium--super .super-date-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.portal-premium--super .super-date-presets a {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  border: 1px solid #dbe3ee;
  background: #f8fafc;
  color: #475569;
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
}
.portal-premium--super .super-date-presets a:hover {
  border-color: var(--portal-accent);
  color: var(--portal-accent);
  background: var(--portal-accent-soft);
}
.portal-premium--super .super-table-card {
  border-radius: 16px;
  overflow: hidden;
}
.portal-premium--super .super-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.75);
  flex-wrap: wrap;
}
.portal-premium--super .super-table-toolbar__count {
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}
.portal-premium--super .super-table-toolbar__meta {
  font-size: 0.8rem;
  color: #64748b;
}
.portal-premium--super .super-table-card .table-wrap,
.portal-premium--super .super-table-card .super-table-wrap {
  overflow: auto;
  max-height: calc(100vh - 17rem);
  scroll-behavior: smooth;
}
.portal-premium--super .super-table-card .data-table,
.portal-premium--super .super-table-card .super-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.portal-premium--super .super-table-card .data-table thead,
.portal-premium--super .super-table-card .super-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
}
.portal-premium--super .super-table-card .data-table th,
.portal-premium--super .super-table-card .super-table th {
  padding: 0.72rem 0.9rem;
  text-align: left;
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: none;
  white-space: nowrap;
}
.portal-premium--super .super-table-card .data-table td,
.portal-premium--super .super-table-card .super-table td {
  padding: 0.78rem 0.9rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.85);
  vertical-align: middle;
}
.portal-premium--super .super-table-card .data-table tbody tr:hover,
.portal-premium--super .super-table-card .super-table tbody tr:hover {
  background: rgba(248, 250, 252, 0.92);
}
.portal-premium--super .super-table-card .data-table tbody tr:last-child td,
.portal-premium--super .super-table-card .super-table tbody tr:last-child td {
  border-bottom: none;
}
.portal-premium--super .super-schools-table td strong {
  display: block;
  font-weight: 700;
  color: #0f172a;
}
.portal-premium--super .super-schools-table .super-table__location {
  display: block;
  color: #475569;
  font-size: 0.86rem;
}
.portal-premium--super .super-schools-table .super-table__num {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: #334155;
}
.portal-premium--super .super-schools-table .super-table__email {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  color: #64748b;
}
.portal-premium--super .super-code {
  display: inline-flex;
  padding: 0.18rem 0.5rem;
  border-radius: 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.03em;
}
.portal-premium--super .super-empty-row {
  padding: 0 !important;
  border: none !important;
}
.portal-premium--super .super-empty-state--table {
  padding: 2.5rem 1.25rem;
  text-align: center;
}
.portal-premium--super .super-empty-state--table h5 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}
.portal-premium--super .super-empty-state--table p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: #64748b;
}
.portal-premium--super .super-empty-state--table .super-empty-state__actions {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.portal-premium--super .super-pagination .meta {
  font-size: 0.86rem;
  color: #64748b;
  font-weight: 600;
}
.portal-premium--super .super-page-head__actions {
  align-items: center;
}
.portal-premium--super .super-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.portal-premium--super .super-detail-card__subhead {
  margin: 1rem 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.portal-premium--super .super-detail-list-plain {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.portal-premium--super .super-detail-list-plain li {
  padding: 0.55rem 0.7rem;
  border-radius: 9px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
  color: #334155;
}
.portal-premium--super .super-flag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.portal-premium--super .super-flag-list li {
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #475569;
}
.portal-premium--super .super-flag-list li.super-flag--on {
  background: #d1fae5;
  color: #047857;
}
.portal-premium--super .super-flag-list li.super-flag--off {
  background: #fef3c7;
  color: #b45309;
}
.portal-premium--super .super-detail-list a {
  color: var(--portal-accent);
  text-decoration: none;
  font-weight: 600;
}
.portal-premium--super .super-detail-list a:hover {
  text-decoration: underline;
}
.portal-premium--super .super-action-form--danger {
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fef2f2;
}
.portal-premium--super .super-table__actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.portal-premium--super .super-table__actions form {
  margin: 0;
  display: inline;
}

@media (max-width: 1100px) {
  .portal-premium--super .super-home-stats--3,
  .portal-premium--super .super-quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  .portal-premium--super .super-home-stats--3,
  .portal-premium--super .super-quick-links {
    grid-template-columns: 1fr;
  }
  .portal-premium--super .super-status-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .portal-premium--super .super-filter-row {
    flex-direction: column;
    align-items: stretch;
  }
  .portal-premium--super .super-filter-field {
    flex: 1 1 100%;
  }
  .portal-premium--super .super-filter-row .super-filter-actions {
    align-self: stretch;
    justify-content: stretch;
  }
  .portal-premium--super .super-filter-row .super-filter-actions .btn {
    flex: 1;
  }
  .portal-premium--super .super-page-head__actions {
    width: 100%;
  }
  .portal-premium--super .super-action-bar {
    width: 100%;
  }
  .portal-premium--super .super-action-bar .btn,
  .portal-premium--super .super-action-bar form {
    flex: 1 1 auto;
  }
}

/* Super admin — platform settings */
.portal-premium--super .super-platform-hero {
  margin-bottom: 1.25rem;
}
.portal-premium--super .super-platform-status-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.portal-premium--super .super-platform-status {
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.45rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}
.portal-premium--super .super-platform-status__label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}
.portal-premium--super .super-platform-status__value {
  font-size: 0.95rem;
  color: #0f172a;
}
.portal-premium--super .super-platform-status__value--meta {
  font-size: 0.82rem;
  font-weight: 700;
}
.portal-premium--super .super-platform-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.85fr);
}
.portal-premium--super .super-platform-form {
  display: grid;
  gap: 1rem;
}
.portal-premium--super .super-platform-section {
  padding: 1.1rem 1.15rem;
  display: grid;
  gap: 0.85rem;
}
.portal-premium--super .super-platform-section__head {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}
.portal-premium--super .super-platform-section__head h4 {
  margin: 0 0 0.2rem;
  font-size: 0.98rem;
  font-weight: 800;
}
.portal-premium--super .super-platform-section__head .meta {
  margin: 0;
}
.portal-premium--super .super-platform-section__icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #ecfeff;
  font-size: 1rem;
  flex-shrink: 0;
}
.portal-premium--super .super-platform-field {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #64748b;
}
.portal-premium--super .super-input--narrow {
  max-width: 8rem;
}
.portal-premium--super .super-platform-toggle {
  padding: 0.75rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}
.portal-premium--super .super-platform-toggle--danger {
  border-color: #fecaca;
  background: #fff5f5;
}
.portal-premium--super .super-platform-form__actions {
  display: flex;
  justify-content: flex-start;
}
.portal-premium--super .super-platform-aside {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.portal-premium--super .super-platform-guide {
  padding: 1.1rem 1.15rem;
}
.portal-premium--super .super-platform-guide h4 {
  margin: 0 0 0.75rem;
  font-size: 0.98rem;
  font-weight: 800;
}
.portal-premium--super .super-platform-guide__list {
  margin: 0;
}
.portal-premium--super .super-platform-module-list {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.portal-premium--super .super-platform-guide__link {
  width: 100%;
  text-align: center;
}
@media (max-width: 1100px) {
  .portal-premium--super .super-platform-status-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .portal-premium--super .super-platform-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .portal-premium--super .super-platform-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

