:root {
  color-scheme: light;
  --bg: #f0fbff;
  --bg-accent: rgba(0, 191, 255, 0.2);
  --bg-gradient-end: #e7f8ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --surface-muted: rgba(255, 255, 255, 0.9);
  --panel: #ffffff;
  --panel-strong: #06394a;
  --ink: #231f20;
  --text: #231f20;
  --muted: #716978;
  --primary: #00bfff;
  --primary-dark: #008fc2;
  --accent: #00bfff;
  --success: #16835f;
  --danger: #c43d3d;
  --btn-action-danger: #c43d3d;
  --btn-action-danger-hover: #9f2f2f;
  --btn-action-success: #16835f;
  --btn-action-success-hover: #126b4d;
  --btn-action-edit: #008fc2;
  --btn-action-edit-hover: #006d94;
  --btn-action-warning: #b45309;
  --btn-action-warning-hover: #92400e;
  --border: #cdeefa;
  --shadow: 0 24px 60px rgba(0, 116, 155, 0.14);
  --link: #008fc2;
  --input-bg: #ffffff;
  --secondary-bg: rgba(0, 191, 255, 0.12);
  --secondary-text: #06394a;
  --secondary-bg-hover: rgba(0, 191, 255, 0.2);
  --overlay-light: rgba(0, 191, 255, 0.08);
  --overlay-light-strong: rgba(0, 191, 255, 0.12);
  --overlay-menu-icon: rgba(0, 191, 255, 0.14);
  --warning-text: #9a5b00;
  --demo-bg: #fff8e6;
  --demo-border: #e4b13f;
  --demo-text: #6b4c00;
  --error-bg: #fff1f1;
  --error-border: #ffd0d0;
  --control-bg: rgba(0, 191, 255, 0.04);
  --control-item-bg: #ffffff;
  --footer-surface: linear-gradient(180deg, #ffffff 0%, #f4fbff 100%);
  --footer-legal-bg: rgba(6, 57, 74, 0.04);
  --focus-ring: rgba(123, 47, 247, 0.12);
  --hero-gradient: linear-gradient(135deg, rgba(6, 57, 74, 0.96), rgba(0, 191, 255, 0.82));
  --on-strong: #ffffff;
  --on-strong-muted: rgba(255, 255, 255, 0.82);
  --badge-neutral-bg: #eef8fc;
  --badge-neutral-border: rgba(0, 143, 194, 0.24);
  --emphasis: #06394a;
  --stat-value: #06394a;
  --stat-card-bg: var(--surface);
  --session-border: rgba(0, 191, 255, 0.22);
  --session-student-bg: rgba(123, 47, 247, 0.08);
  --session-student-border: rgba(123, 47, 247, 0.2);
  --admin-menu-bg: rgba(0, 191, 255, 0.06);
  --readonly-bg: rgba(0, 191, 255, 0.05);
  --metric-card-shadow: 0 10px 24px rgba(0, 116, 155, 0.06);
  --notice-text: #6b4c00;
  --pill-text: #06394a;
  --running-slots-bg: rgba(0, 191, 255, 0.08);
}

[data-theme="dark"],
html.theme-dark {
  color-scheme: dark;
  --bg: #0b1624;
  --bg-accent: rgba(0, 191, 255, 0.14);
  --bg-gradient-end: #0f2438;
  --surface: #152a42;
  --surface-solid: #152a42;
  --surface-muted: #183048;
  --panel: #152a42;
  --panel-strong: #06394a;
  --ink: #e8f4fc;
  --text: #e8f4fc;
  --muted: #94a8bc;
  --primary: #38bdf8;
  --primary-dark: #7dd3fc;
  --accent: #00bfff;
  --success: #34d399;
  --danger: #f87171;
  --btn-action-danger: #dc2626;
  --btn-action-danger-hover: #b91c1c;
  --btn-action-success: #059669;
  --btn-action-success-hover: #047857;
  --btn-action-edit: #0891b2;
  --btn-action-edit-hover: #0e7490;
  --btn-action-warning: #d97706;
  --btn-action-warning-hover: #b45309;
  --border: rgba(56, 189, 248, 0.18);
  --shadow: 0 24px 60px rgba(0, 40, 80, 0.35);
  --link: #7dd3fc;
  --input-bg: #0f1e30;
  --secondary-bg: rgba(0, 191, 255, 0.1);
  --secondary-text: #e8f4fc;
  --secondary-bg-hover: rgba(0, 191, 255, 0.16);
  --overlay-light: rgba(0, 191, 255, 0.06);
  --overlay-light-strong: rgba(0, 191, 255, 0.1);
  --overlay-menu-icon: rgba(0, 191, 255, 0.12);
  --warning-text: #fbbf24;
  --demo-bg: rgba(251, 191, 36, 0.1);
  --demo-border: rgba(251, 191, 36, 0.28);
  --demo-text: #fde68a;
  --error-bg: rgba(248, 113, 113, 0.12);
  --error-border: rgba(248, 113, 113, 0.32);
  --control-bg: rgba(0, 191, 255, 0.05);
  --control-item-bg: #132338;
  --footer-surface: linear-gradient(180deg, #152a42 0%, #0b1624 100%);
  --footer-legal-bg: rgba(0, 191, 255, 0.06);
  --focus-ring: rgba(56, 189, 248, 0.22);
  --hero-gradient: linear-gradient(135deg, #06394a 0%, #0e3d5c 55%, rgba(0, 191, 255, 0.35) 100%);
  --on-strong: #ffffff;
  --on-strong-muted: rgba(255, 255, 255, 0.82);
  --badge-neutral-bg: rgba(0, 191, 255, 0.08);
  --badge-neutral-border: rgba(56, 189, 248, 0.22);
  --emphasis: #e8f4fc;
  --stat-value: #e8f4fc;
  --stat-card-bg: #152a42;
  --session-border: rgba(56, 189, 248, 0.2);
  --session-student-bg: rgba(0, 191, 255, 0.08);
  --session-student-border: rgba(56, 189, 248, 0.18);
  --admin-menu-bg: rgba(0, 191, 255, 0.08);
  --readonly-bg: rgba(0, 191, 255, 0.06);
  --metric-card-shadow: 0 10px 24px rgba(0, 60, 100, 0.25);
  --notice-text: #fde68a;
  --pill-text: #e8f4fc;
  --running-slots-bg: rgba(0, 191, 255, 0.08);
}

[data-theme="dark"] body,
html.theme-dark body,
[data-theme="dark"] body.admin-portal-mode,
html.theme-dark body.admin-portal-mode,
[data-theme="dark"] body.admin-console-dashboard-mode,
html.theme-dark body.admin-console-dashboard-mode,
[data-theme="dark"] body.super-admin-dashboard-mode,
html.theme-dark body.super-admin-dashboard-mode,
[data-theme="dark"] body.staff-dashboard-mode,
html.theme-dark body.staff-dashboard-mode {
  background:
    radial-gradient(circle at top left, var(--bg-accent), transparent 32rem),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-gradient-end) 100%) !important;
  color: var(--text);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, var(--bg-accent), transparent 32rem),
    linear-gradient(135deg, var(--bg) 0%, var(--bg-gradient-end) 100%);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  transition: background 0.25s ease, color 0.25s ease;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--link);
  font-weight: 800;
}

.app-shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
}

body.student-dashboard-mode .app-shell {
  width: min(980px, calc(100% - 32px));
}

body.staff-dashboard-mode .app-shell {
  width: min(1080px, calc(100% - 32px));
}

body.student-dashboard-mode .student-top-grid,
body.student-dashboard-mode .dashboard-grid {
  grid-template-columns: 1fr;
}

body.student-dashboard-mode .student-fee-grid {
  display: block;
}

body.student-dashboard-mode .student-payment-menu {
  align-items: flex-start;
}

body.student-dashboard-mode .topbar {
  align-items: center;
  gap: 14px 18px;
}

body.student-dashboard-mode .topbar-brand {
  align-items: center;
  flex: 1 1 auto;
  gap: 12px;
  min-width: 0;
}

body.student-dashboard-mode .topbar-brand > div {
  min-width: 0;
}

body.student-dashboard-mode .topbar-brand .eyebrow {
  margin: 0 0 4px;
}

body.student-dashboard-mode .topbar-brand h2 {
  line-height: 1.25;
  margin: 0;
}

body.student-dashboard-mode .topbar-side {
  align-items: center;
  flex: 0 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  margin-left: auto;
}

body.student-dashboard-mode .user-pill {
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  max-width: 100%;
  padding: 6px 10px 6px 12px;
}

body.student-dashboard-mode .user-pill .theme-toggle-button,
body.student-dashboard-mode .user-pill .home-page-button,
body.student-dashboard-mode .user-pill .button {
  align-items: center;
  display: inline-flex;
  flex-shrink: 0;
  min-height: 40px;
}

body.student-dashboard-mode .user-pill-name {
  line-height: 1.2;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Student / parent portal — fees, schedule, news */
.student-portal {
  display: grid;
  gap: 16px;
}

.student-portal-fee-alert {
  align-items: center;
  background: color-mix(in srgb, var(--warning, #c47d00) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warning, #c47d00) 35%, var(--border));
  border-radius: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 16px;
}

.student-portal-flash-stack {
  display: grid;
  gap: 12px;
}

.student-portal-flash-banner {
  margin: 0;
}

.student-portal-flash-stack .student-announcement-flash-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.student-portal-flash-stack .student-announcement-dismiss {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 1.25rem;
  line-height: 1;
  min-width: 36px;
  padding: 4px 10px;
}

.student-portal-alerts-bar {
  display: grid;
  gap: 8px;
}

.student-portal-alert-pill {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 10px;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
}

.student-portal-alert-pill:hover {
  border-color: color-mix(in srgb, var(--accent, #c9a227) 50%, var(--border));
}

.student-portal-alert-pill--schedule {
  background: color-mix(in srgb, #2563eb 10%, var(--surface));
  border-color: color-mix(in srgb, #2563eb 35%, var(--border));
}

.student-portal-alert-pill--news {
  background: color-mix(in srgb, var(--accent, #c9a227) 12%, var(--surface));
  border-color: color-mix(in srgb, var(--accent, #c9a227) 40%, var(--border));
}

.student-portal-alert-pill span:last-child {
  flex: 1;
  font-size: 0.88rem;
  line-height: 1.35;
}

.student-portal-alert-pill strong {
  font-weight: 700;
}

.student-portal-alert-dot {
  animation: student-portal-alert-pulse 1.8s ease-in-out infinite;
  background: #dc2626;
  border-radius: 50%;
  box-shadow: 0 0 0 3px color-mix(in srgb, #dc2626 25%, transparent);
  flex-shrink: 0;
  height: 10px;
  width: 10px;
}

.student-portal-alert-pill--schedule .student-portal-alert-dot {
  background: #2563eb;
  box-shadow: 0 0 0 3px color-mix(in srgb, #2563eb 25%, transparent);
}

.student-portal-alert-pill--news .student-portal-alert-dot {
  background: var(--accent, #c9a227);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent, #c9a227) 30%, transparent);
}

@keyframes student-portal-alert-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.75;
    transform: scale(0.92);
  }
}

.student-portal-header-top {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.student-portal-header-main {
  flex: 1;
  min-width: 0;
}

.student-portal-header h2 {
  margin: 0;
}

.student-portal-account,
.staff-portal-account {
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 6px 0 0;
}

.student-portal-account .portal-login-id-label,
.staff-portal-account .portal-login-id-label {
  color: var(--accent, #00bfff);
  font-weight: 800;
}

.student-portal-account .portal-login-id-value,
.staff-portal-account .portal-login-id-value {
  background: color-mix(in srgb, var(--accent, #00bfff) 14%, transparent);
  border-radius: 6px;
  color: var(--accent, #00bfff);
  font-size: 1.02em;
  font-weight: 800;
  margin-left: 0.2em;
  padding: 2px 8px;
}

.staff-portal-welcome {
  margin-bottom: 14px;
}

.staff-portal-welcome .eyebrow {
  margin-bottom: 8px;
}

.staff-portal-welcome .staff-portal-account {
  margin: 0 0 8px;
}

.staff-portal-greeting {
  font-size: clamp(1.55rem, 5vw, 2.15rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
}

.staff-panel-tab-title {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 6px;
}

.student-portal-due-pill {
  border-radius: 12px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--text) 6%, transparent);
  flex-shrink: 0;
  line-height: 1.2;
  min-width: 118px;
  padding: 10px 14px;
  text-align: right;
}

.student-portal-due-pill-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.student-portal-due-pill-amount {
  display: block;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-top: 4px;
}

.student-portal-due-pill.is-paid {
  background: color-mix(in srgb, var(--success, #2d8a4e) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--success, #2d8a4e) 35%, var(--border));
}

.student-portal-due-pill.is-paid .student-portal-due-pill-amount {
  color: var(--success, #2d8a4e);
}

.student-portal-due-pill.is-due {
  background: color-mix(in srgb, #dc2626 10%, var(--surface));
  border: 1px solid color-mix(in srgb, #dc2626 45%, var(--border));
  box-shadow: 0 2px 12px color-mix(in srgb, #dc2626 18%, transparent);
}

.student-portal-due-pill.is-due .student-portal-due-pill-label {
  color: color-mix(in srgb, #dc2626 75%, var(--text));
}

.student-portal-due-pill.is-due .student-portal-due-pill-amount {
  color: #dc2626;
}

.student-portal-also {
  line-height: 1.45;
  margin: 6px 0 0;
}

.student-portal-also-line {
  display: block;
  margin-top: 2px;
}

.student-portal-class-title {
  font-size: 1rem;
  margin: 0 0 4px;
}

.student-portal-meta {
  margin: 0;
}

.student-portal-nav {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-portal-nav-btn {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  font: inherit;
  gap: 6px;
  justify-content: center;
  min-height: 72px;
  padding: 12px 8px;
  position: relative;
}

.student-portal-nav-btn.is-active {
  border-color: var(--accent, #c9a227);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #c9a227) 40%, transparent);
}

.student-portal-nav-badge {
  background: var(--accent, #c9a227);
  border-radius: 999px;
  color: #1a1200;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  min-width: 1.25rem;
  padding: 3px 7px;
  position: absolute;
  right: 8px;
  top: 8px;
}

.student-portal-section h2 {
  margin-top: 0;
}

.student-portal-fee-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 12px 0 0;
  padding: 18px;
}

.student-portal-fee-card.is-paid .amount {
  color: var(--success, #2d8a4e);
}

.student-portal-fee-card .amount {
  color: #dc2626;
  display: block;
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.student-portal-fee-card.is-paid .amount {
  color: var(--success, #2d8a4e);
}

.student-portal-subsection {
  border-top: 1px solid var(--border);
  margin-top: 20px;
  padding-top: 16px;
}

.student-portal-subsection h3 {
  margin: 0 0 12px;
}

.student-portal-weekly-card {
  background: color-mix(in srgb, var(--accent, #c9a227) 8%, var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 12px 0 16px;
  padding: 16px;
}

.student-portal-weekly-card h3 {
  margin: 0 0 8px;
}

.student-portal-weekly-time {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 8px 0;
}

.student-portal-alert-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 14px 16px;
}

.student-portal-alert-card.is-warning {
  border-color: color-mix(in srgb, var(--warning, #c47d00) 45%, var(--border));
}

.student-portal-alert-card h3 {
  margin: 4px 0 6px;
}

.student-portal-news-list {
  display: grid;
  gap: 12px;
}

.student-portal-upcoming-classes {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, var(--panel));
}

.student-portal-upcoming-classes h3 {
  margin-top: 0;
  color: var(--text);
}

html.theme-dark .student-portal-upcoming-classes,
html[data-theme="dark"] .student-portal-upcoming-classes {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
}

html.theme-dark .student-portal-upcoming-classes .muted,
html[data-theme="dark"] .student-portal-upcoming-classes .muted {
  color: var(--muted);
}

html.theme-dark .student-portal-upcoming-classes .student-portal-schedule-item,
html[data-theme="dark"] .student-portal-upcoming-classes .student-portal-schedule-item {
  background: var(--surface-muted);
  border-color: var(--border);
}

html.theme-dark .student-portal-upcoming-classes .student-portal-schedule-class-tag,
html[data-theme="dark"] .student-portal-upcoming-classes .student-portal-schedule-class-tag {
  color: var(--text);
}

.student-portal-schedule-list {
  display: grid;
  gap: 12px;
}

.student-portal-news-item,
.student-portal-schedule-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}

.student-portal-news-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.student-portal-news-head h4 {
  margin: 4px 0 0;
}

.student-portal-schedule-item p {
  margin: 8px 0 0;
}

.student-portal-schedule-class-tag {
  color: var(--text);
  font-size: 0.95rem;
  margin: 6px 0 0;
}

.student-portal-schedule-class-tag strong {
  font-weight: 600;
}

.student-portal-weekly-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.student-portal-weekly-card--compact {
  margin: 0;
}

.student-portal-attendance-highlight {
  font-size: 1.5rem;
  margin: 0 0 12px;
}

.student-portal-performance {
  --perf-accent: var(--accent, #c9a227);
  --perf-pct: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.student-portal-performance::before {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--perf-accent) 22%, transparent),
    transparent 55%
  );
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.student-portal-performance > * {
  position: relative;
  z-index: 1;
}

.student-portal-performance--excellent {
  --perf-accent: var(--success, #2d8a4e);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--success, #2d8a4e) 14%, var(--surface)),
    var(--surface)
  );
  border-color: color-mix(in srgb, var(--success, #2d8a4e) 38%, var(--border));
}

.student-portal-performance--good {
  --perf-accent: var(--accent, #c9a227);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--accent, #c9a227) 14%, var(--surface)),
    var(--surface)
  );
  border-color: color-mix(in srgb, var(--accent, #c9a227) 38%, var(--border));
}

.student-portal-performance--fair {
  --perf-accent: var(--warning, #c47d00);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--warning, #c47d00) 12%, var(--surface)),
    var(--surface)
  );
  border-color: color-mix(in srgb, var(--warning, #c47d00) 35%, var(--border));
}

.student-portal-performance--focus {
  --perf-accent: #dc2626;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, #dc2626 10%, var(--surface)),
    var(--surface)
  );
  border-color: color-mix(in srgb, #dc2626 32%, var(--border));
}

.student-portal-performance--neutral {
  --perf-accent: var(--muted, #888);
}

.student-portal-performance-hero {
  align-items: center;
  display: flex;
  gap: 16px;
}

.student-portal-performance-ring {
  background: conic-gradient(
    var(--perf-accent) 0 calc(var(--perf-pct) * 1%),
    color-mix(in srgb, var(--border) 55%, transparent) calc(var(--perf-pct) * 1%) 100%
  );
  border-radius: 50%;
  flex-shrink: 0;
  height: 92px;
  padding: 6px;
  width: 92px;
}

.student-portal-performance-ring-inner {
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--border) 80%, transparent);
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.student-portal-performance-pct {
  color: var(--perf-accent);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.student-portal-performance-copy {
  flex: 1;
  min-width: 0;
}

.student-portal-performance-copy .eyebrow {
  margin-bottom: 6px;
}

.student-portal-performance-tier-badge {
  background: color-mix(in srgb, var(--perf-accent) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--perf-accent) 35%, var(--border));
  border-radius: 999px;
  color: var(--perf-accent);
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
  padding: 4px 12px;
  text-transform: uppercase;
}

.student-portal-performance-class {
  font-size: 0.9rem;
  font-weight: 600;
  margin: 0 0 6px;
}

.student-portal-performance-hint {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0;
  opacity: 0.9;
}

.student-portal-performance-basis {
  color: var(--muted, #666);
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 6px 0 0;
}

.student-portal-performance-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.student-portal-performance-stats article {
  backdrop-filter: blur(4px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--border) 90%, transparent);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  padding: 12px 14px;
}

.student-portal-performance-stat-head {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.student-portal-performance-stat-head span {
  color: var(--muted, #666);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.student-portal-performance-stat-head strong {
  color: var(--perf-accent);
  font-size: 1.2rem;
  font-weight: 800;
}

.student-portal-performance-bar {
  --bar-pct: 0;
  background: color-mix(in srgb, var(--border) 70%, transparent);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
}

.student-portal-performance-bar span {
  background: linear-gradient(90deg, var(--perf-accent), color-mix(in srgb, var(--perf-accent) 65%, #fff));
  border-radius: inherit;
  display: block;
  height: 100%;
  width: calc(var(--bar-pct) * 1%);
}

.student-portal-performance-stats small {
  color: var(--muted, #666);
  font-size: 0.76rem;
  line-height: 1.35;
}

.student-portal-performance-details {
  justify-self: stretch;
  margin-top: 2px;
}

@media (max-width: 520px) {
  .student-portal-performance-stats {
    grid-template-columns: 1fr;
  }

  .student-portal-performance-hero {
    align-items: flex-start;
  }
}

.student-portal-more {
  margin-top: 4px;
}

.student-portal-more-body {
  margin-top: 16px;
}

.student-portal-details {
  margin-top: 12px;
}

.student-portal-class-switch label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.student-portal-class-switch select {
  max-width: 100%;
  width: 100%;
}

.student-portal-fee-breakdown {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.student-portal-fee-breakdown li {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.student-portal-fee-breakdown li.is-due {
  border-color: color-mix(in srgb, var(--warning, #c47d00) 40%, var(--border));
}

.student-portal-fee-due-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 12px 0 16px;
  padding: 0;
}

.student-portal-fee-due-list li {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px 12px;
}

.student-portal-fee-due-list li.is-due {
  border-color: color-mix(in srgb, var(--warning, #c47d00) 35%, var(--border));
}

.student-portal-fee-due-list li.is-current {
  border-color: color-mix(in srgb, var(--accent, #c9a227) 40%, var(--border));
}

.student-portal-fee-due-list li.is-paid {
  opacity: 0.85;
}

.student-portal-fee-due-list li .small-note {
  display: block;
  margin-top: 2px;
}

.student-portal-fee-actions {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.demo-payment-breakdown ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.student-portal-ids-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}

.student-portal-ids-item {
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.student-portal-ids-item.is-active {
  border-color: color-mix(in srgb, var(--accent, #c9a227) 45%, var(--border));
  background: color-mix(in srgb, var(--accent, #c9a227) 8%, var(--surface));
}

.student-portal-ids-code {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1rem;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}

.student-portal-ids-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .student-portal-nav {
    grid-template-columns: 1fr;
  }

  .student-portal-nav-btn {
    flex-direction: row;
    justify-content: flex-start;
    min-height: 52px;
    padding: 12px 14px;
  }

  .student-portal-nav-badge {
    position: static;
    margin-left: auto;
  }
}

body.student-dashboard-mode .user-pill .role-badge {
  flex-shrink: 0;
}

body.staff-dashboard-mode .admin-page-stack {
  gap: 14px;
}

body.staff-dashboard-mode .admin-menu {
  justify-content: flex-start;
}

body.staff-dashboard-mode .attendance-toolbar {
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
}

body.staff-dashboard-mode .stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.staff-courses-panel {
  margin-bottom: 18px;
}

.compact-header {
  margin-bottom: 12px;
}

.staff-course-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.staff-course-card {
  align-items: center;
  background: var(--overlay-light);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  gap: 12px;
  padding: 12px;
}

.staff-course-card strong,
.staff-course-card small {
  display: block;
}

.staff-course-card small {
  color: var(--muted);
  line-height: 1.35;
  margin-top: 3px;
}

.staff-schedule-panel .staff-schedule-copy {
  margin: 0 0 16px;
}

.staff-schedule-summary {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.compact-stat {
  padding: 14px 16px;
}

.staff-schedule-table td small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.staff-schedule-unassigned td {
  background: rgba(255, 152, 0, 0.08);
}

.staff-schedule-filter {
  margin-bottom: 16px;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(160px, 1.2fr) minmax(180px, 1.4fr) auto;
}

.schedule-control-filter,
.category-control-filter {
  margin-top: 1rem;
  margin-bottom: 0.75rem;
}

.staff-allocation-filter {
  margin-bottom: 16px;
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(180px, 1.4fr) auto auto;
}

.home-page {
  display: grid;
  gap: 26px;
}

body.public-site-mode {
  background: var(--bg);
}

body.public-site-mode .app-shell,
#app.public-site-shell {
  margin: 0;
  max-width: none;
  padding: 0;
  width: 100%;
}

.public-site-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
}

.public-site-header {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

[data-theme="dark"] .public-site-header {
  background: rgba(18, 24, 38, 0.94);
}

.public-site-header-inner,
.public-site-footer-inner {
  margin: 0 auto;
  max-width: 1200px;
  padding: 0 20px;
  width: 100%;
}

.public-site-header-inner {
  padding-bottom: 14px;
  padding-top: 14px;
}

.public-site-header .home-nav,
.public-site-header .site-nav {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  position: static;
}

.public-site-body {
  flex: 1 1 auto;
  padding: 0 20px 48px;
  width: 100%;
}

.public-page-inner {
  display: grid;
  gap: 0;
  margin: 0 auto;
  max-width: 1100px;
  width: 100%;
}

.public-page-inner > .home-hero,
.public-page-inner > .home-stats-grid,
.public-page-inner > .home-section,
.public-page-inner > .public-page-hero-band {
  width: 100%;
}

.public-page-hero-band {
  margin-top: 24px;
}

.public-page-hero-band--single {
  grid-template-columns: 1fr;
}

.public-page-hero-band h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.08;
  margin: 0 0 12px;
}

.public-hero-highlight {
  align-self: stretch;
}

.public-hero-highlight .button-row {
  flex-direction: column;
  width: 100%;
}

.public-hero-actions {
  flex-wrap: wrap;
  margin-top: 18px;
}

.public-hero-actions .button {
  flex: 1 1 auto;
  min-width: 140px;
}

.public-form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: clamp(22px, 3vw, 32px);
  width: 100%;
}

.public-form-panel .legal-content,
.public-form-panel.legal-content {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.public-card-link {
  color: var(--primary-dark);
  font-weight: 800;
  text-decoration: none;
}

.public-card-link:hover {
  text-decoration: underline;
}

.home-section .home-contact-grid {
  margin-top: 0;
}

.public-site-footer {
  flex: 0 0 auto;
  margin-top: auto;
  width: 100%;
}

.public-site-footer-inner {
  padding-bottom: 0;
  padding-top: 0;
}

.public-site-footer .site-footer {
  border-radius: 0;
  box-shadow: none;
  width: 100%;
}

.public-site-footer .site-footer-inner {
  margin: 0 auto;
  max-width: 1200px;
  padding-left: 20px;
  padding-right: 20px;
}

.public-page-hero {
  margin-top: 24px;
  width: 100%;
}

.home-nav-links a.is-active,
.home-brand-link.is-active .eyebrow,
.home-brand-link.is-active h3 {
  color: var(--primary-dark);
}

.home-nav-links a.is-active {
  background: rgba(0, 191, 255, 0.12);
  border: 1px solid rgba(0, 191, 255, 0.28);
  border-radius: 999px;
  font-weight: 900;
  padding: 8px 12px;
}


.public-link-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.public-link-card {
  border: 1px solid var(--border);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
  width: 100%;
}

.public-link-card:hover {
  border-color: rgba(0, 191, 255, 0.45);
  transform: translateY(-2px);
}

.public-courses-fees {
  margin-top: 28px;
}

.public-courses-fees h2 {
  color: var(--panel-strong);
  font-size: 1.35rem;
  margin: 0 0 14px;
}

.course-fee-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.course-fee-card span {
  color: var(--primary-dark);
  font-weight: 800;
}

.site-nav {
  position: sticky;
  top: 12px;
  z-index: 30;
}

body.public-site-mode .site-nav {
  position: static;
  top: auto;
}

.home-brand-link {
  color: inherit;
  text-decoration: none;
}

.home-brand-link:hover {
  opacity: 0.92;
}

.home-nav {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 20px;
}

.home-nav-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.public-hero-student-login,
.public-hero-actions--extra {
  margin-top: 12px;
  width: 100%;
}

.public-hero-highlight .public-hero-student-login + .button-row,
.public-hero-highlight .button-row + .public-hero-student-login {
  margin-top: 12px;
}

.public-hero-student-login .student-login-button {
  width: 100%;
}

.button.student-login-button {
  background: linear-gradient(135deg, #7b2ff7 0%, #00bfff 58%, #008fc2 100%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 143, 194, 0.34);
  color: #ffffff;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 12px 22px;
  white-space: nowrap;
}

.button.student-login-button:hover {
  background: linear-gradient(135deg, #6920d6 0%, #00bfff 45%, #007aa8 100%);
  box-shadow: 0 16px 32px rgba(0, 143, 194, 0.42);
  color: #ffffff;
  transform: translateY(-2px);
}

.button.student-login-button span {
  color: #ffffff;
  font-weight: 800;
  text-transform: none;
}

.button.student-login-button .menu-icon {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.38);
  color: #ffffff;
}

.button.student-login-button:hover .menu-icon {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.home-card.student-login-card {
  background: linear-gradient(145deg, rgba(123, 47, 247, 0.14), rgba(0, 191, 255, 0.18));
  border: 2px solid rgba(0, 191, 255, 0.42);
  box-shadow: 0 16px 36px rgba(0, 143, 194, 0.16);
}

.home-card.student-login-card strong {
  color: var(--primary-dark);
}

.home-card.student-login-card:hover {
  border-color: rgba(123, 47, 247, 0.55);
  transform: translateY(-3px);
}

.home-nav-links a {
  color: var(--panel-strong);
  text-decoration: none;
}

.home-nav-links a,
.home-nav-links .button,
.menu-tab,
.topbar h2,
.student-payment-menu .eyebrow,
#toggleDetails {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.simple-login-page,
.login-layout {
  align-content: start;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.login-home-action {
  margin-bottom: 4px;
}

.login-card-header {
  flex-shrink: 0;
  margin-bottom: 20px;
  width: 100%;
}

.login-card-header-with-theme {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.login-card-header-with-theme .theme-toggle-button {
  flex-shrink: 0;
}

.login-card-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  width: 100%;
}

.portal-login-links {
  font-size: 13px;
  line-height: 1.5;
  margin: 14px 0 0;
  text-align: center;
}

.portal-login-links a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.portal-login-links a:hover {
  text-decoration: underline;
}

.portal-test-hint {
  font-size: 13px;
  margin: 0 0 10px;
}

.login-back-home {
  align-self: flex-start;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: none;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  padding: 8px 14px;
  width: auto;
}

.login-back-home:hover {
  background: rgba(0, 191, 255, 0.08);
  border-color: rgba(0, 191, 255, 0.35);
}

.user-pill .home-page-button {
  white-space: nowrap;
}

.menu-icon {
  align-items: center;
  background: var(--overlay-menu-icon);
  border: 1px solid rgba(0, 191, 255, 0.28);
  border-radius: 999px;
  color: var(--primary-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  min-width: 24px;
}

.menu-tab.active .menu-icon,
.button .menu-icon {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.32);
  color: currentColor;
}

.home-hero {
  align-items: center;
  background: var(--hero-gradient);
  border-radius: 32px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.55fr);
  padding: clamp(28px, 5vw, 64px);
}

.home-hero.home-hero-stacked {
  gap: clamp(20px, 3vw, 32px);
  grid-template-columns: 1fr;
  overflow: hidden;
  padding: clamp(28px, 4.5vw, 48px) clamp(20px, 4vw, 40px);
  position: relative;
}

.home-hero.home-hero-stacked::before {
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(255, 255, 255, 0.22), transparent 68%),
    radial-gradient(circle at 12% 88%, rgba(123, 47, 247, 0.18), transparent 42%),
    radial-gradient(circle at 88% 78%, rgba(0, 191, 255, 0.2), transparent 38%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.home-hero.home-hero-stacked > * {
  position: relative;
  z-index: 1;
}

.home-hero-intro {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0;
  justify-content: center;
  margin: 0 auto;
  max-width: 46rem;
  padding: clamp(4px, 1vw, 12px) 0 clamp(6px, 1.5vw, 16px);
  text-align: center;
  width: 100%;
}

.home-hero-badge {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  color: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  justify-content: center;
  letter-spacing: 0.14em;
  line-height: 1.35;
  margin: 0 auto 18px;
  max-width: min(100%, 34rem);
  padding: 9px 18px;
  text-align: center;
  text-transform: uppercase;
}

.home-hero-badge span {
  display: block;
}

.home-hero-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 800;
  gap: 0.08em;
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0 auto 16px;
  max-width: 100%;
  text-align: center;
  text-shadow: 0 10px 32px rgba(0, 0, 0, 0.22);
}

.home-hero-headline-main {
  color: #ffffff;
  display: block;
}

.home-hero-headline-accent {
  background: linear-gradient(90deg, #ffffff 0%, #b8f4ff 48%, #7bdcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
}

.home-hero-ornament {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 0 auto 18px;
  width: min(100%, 280px);
}

.home-hero-ornament-line {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55));
  border-radius: 999px;
  flex: 1;
  height: 1px;
  min-width: 48px;
}

.home-hero-ornament-line:last-child {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.55), transparent);
}

.home-hero-ornament-gem {
  background: linear-gradient(135deg, #ffffff, #7bdcff);
  border-radius: 2px;
  box-shadow: 0 0 14px rgba(123, 220, 255, 0.65);
  flex-shrink: 0;
  height: 8px;
  transform: rotate(45deg);
  width: 8px;
}

.home-hero-tagline {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.65;
  margin: 0 auto;
  max-width: 36rem;
  text-align: center;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.home-hero-actions {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0;
  padding-top: clamp(14px, 2.5vw, 20px);
  width: 100%;
}

.home-hero-actions .button,
.home-hero-actions .student-login-button {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  min-height: 0;
  padding: 8px 16px;
}

.home-hero-actions .student-login-button {
  border-radius: 999px;
  font-size: 13px;
  padding: 8px 16px;
}

.home-hero-stacked .home-hero-secondary {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #ffffff;
}

.home-hero-stacked .home-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.home-hero:not(.home-hero-stacked) h1 {
  font-size: clamp(2.2rem, 5vw, 4.6rem);
  line-height: 1;
  margin: 0 0 18px;
}

.home-hero .hero-copy,
.home-hero .eyebrow {
  color: var(--on-strong-muted);
}

.home-hero-stacked .home-hero-intro .eyebrow {
  color: rgba(255, 255, 255, 0.95);
}

.home-hero-stacked .home-hero-slideshow {
  align-self: stretch;
  grid-column: 1 / -1;
  min-height: clamp(280px, 42vw, 420px);
  width: 100%;
}

.home-hero-stacked .slideshow-viewport,
.home-hero-stacked .slideshow-track,
.home-hero-stacked .slideshow-image {
  min-height: clamp(280px, 42vw, 420px);
}

.home-highlight-card,
.home-section,
.home-card {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: 26px;
  box-shadow: var(--shadow);
}

.home-highlight-card {
  color: var(--panel-strong);
  display: grid;
  gap: 10px;
  padding: 24px;
}

/* Home hero photo slideshow */
.home-hero-slideshow {
  border-radius: 26px;
  box-shadow: var(--shadow);
  isolation: isolate;
  min-height: 280px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slideshow-viewport {
  height: 100%;
  min-height: 280px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.slideshow-track {
  height: 100%;
  min-height: 280px;
  position: relative;
  width: 100%;
}

.slideshow-slide {
  height: 100%;
  inset: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  transition: opacity 0.65s ease;
  width: 100%;
}

.slideshow-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.slideshow-slide.is-fallback,
.slideshow-slide.is-fallback.is-active {
  background: linear-gradient(135deg, #7b2ff7 0%, #00bfff 58%, #008fc2 100%);
}

.slideshow-slide[data-theme="dance"].is-fallback {
  background: linear-gradient(135deg, #ff6b6b 0%, #7b2ff7 45%, #00bfff 100%);
}

.slideshow-slide[data-theme="yoga"].is-fallback {
  background: linear-gradient(135deg, #2ecc71 0%, #00bfff 55%, #008fc2 100%);
}

.slideshow-slide[data-theme="branches"].is-fallback {
  background: linear-gradient(135deg, #f7971e 0%, #00bfff 50%, #6920d6 100%);
}

.slideshow-image {
  display: block;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  width: 100%;
}

.slideshow-caption {
  background: linear-gradient(180deg, transparent 35%, rgba(8, 18, 32, 0.72) 100%);
  bottom: 0;
  box-sizing: border-box;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  left: 0;
  margin: 0;
  padding: 48px 18px 16px;
  position: absolute;
  right: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.slideshow-nav {
  align-items: center;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--panel-strong);
  cursor: pointer;
  display: grid;
  font-size: 1.5rem;
  height: 40px;
  line-height: 1;
  place-items: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  z-index: 3;
}

.slideshow-nav:hover {
  background: #ffffff;
  color: var(--accent);
}

.slideshow-prev {
  left: 12px;
}

.slideshow-next {
  right: 12px;
}

.slideshow-dots {
  bottom: 12px;
  display: flex;
  gap: 8px;
  justify-content: center;
  left: 0;
  position: absolute;
  right: 0;
  z-index: 3;
}

.slideshow-dot {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  cursor: pointer;
  height: 10px;
  padding: 0;
  width: 10px;
}

.slideshow-dot.is-active {
  background: #ffffff;
  transform: scale(1.15);
  width: 24px;
}

/* Super admin — home banner slideshow */
.home-slideshow-panel .home-slideshow-slide-list {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}

.home-slideshow-slide-row {
  align-items: flex-start;
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  display: grid;
  gap: 16px;
  grid-template-columns: 120px minmax(0, 1fr) auto;
  padding: 16px;
}

.home-slideshow-slide-preview {
  border-radius: 14px;
  overflow: hidden;
}

.home-slideshow-thumb {
  border-radius: 14px;
  display: block;
  height: 84px;
  object-fit: cover;
  width: 120px;
}

.home-slideshow-thumb-fallback {
  align-items: center;
  background: linear-gradient(135deg, rgba(6, 57, 74, 0.92), rgba(0, 191, 255, 0.75));
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  font-size: 12px;
  font-weight: 700;
  height: 84px;
  justify-content: center;
  text-align: center;
  width: 120px;
}

.home-slideshow-thumb-fallback[data-theme="dance"] {
  background: linear-gradient(135deg, #5b2a86, #c44d9a);
}

.home-slideshow-thumb-fallback[data-theme="yoga"] {
  background: linear-gradient(135deg, #0d6b52, #3ecf9a);
}

.home-slideshow-thumb-fallback[data-theme="branches"] {
  background: linear-gradient(135deg, #06394a, #49cbff);
}

.home-slideshow-slide-actions {
  align-items: stretch;
  flex-direction: column;
  flex-wrap: nowrap;
  min-width: 108px;
}

.home-slideshow-upload-box {
  background: var(--surface-muted);
  border: 1px dashed var(--border);
  border-radius: 18px;
  margin-top: 8px;
  padding: 18px;
}

@media (max-width: 900px) {
  .home-slideshow-slide-row {
    grid-template-columns: 1fr;
  }

  .home-slideshow-slide-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
  }

  .home-slideshow-thumb,
  .home-slideshow-thumb-fallback {
    width: 100%;
  }
}

/* Super admin — website inbox */
.inbox-toolbar {
  margin-bottom: 20px;
}

.inbox-card-list {
  display: grid;
  gap: 16px;
}

.inbox-card {
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

.inbox-card-head {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.inbox-meta {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.inbox-contact-line {
  margin: 0 0 10px;
}

.inbox-message {
  line-height: 1.55;
  margin: 0 0 14px;
  white-space: pre-wrap;
}

/* Super admin — database monitor */
.db-monitor-toolbar {
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.db-monitor-summary {
  margin-bottom: 24px;
}

.db-monitor-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.db-monitor-card {
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

.db-monitor-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.db-monitor-card-head h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.db-monitor-count {
  font-size: 1.75rem;
  line-height: 1;
}

.db-monitor-group-title {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin: 12px 0 6px;
  text-transform: uppercase;
}

.db-monitor-breakdown {
  list-style: none;
  margin: 0;
  padding: 0;
}

.db-monitor-breakdown li {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  font-size: 0.92rem;
  justify-content: space-between;
  padding: 8px 0;
}

.db-monitor-breakdown li:first-child {
  border-top: none;
}

.db-monitor-breakdown strong {
  font-variant-numeric: tabular-nums;
}

.ops-checklist-card {
  margin-bottom: 20px;
}

.ops-checklist {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.ops-check-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.ops-check-item.ops-check-ok {
  border-color: color-mix(in srgb, var(--success, #2d8a4e) 40%, var(--border));
}

.ops-check-item.ops-check-warn {
  border-color: color-mix(in srgb, var(--warning, #c47d00) 45%, var(--border));
}

.ops-check-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ops-check-badge {
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ops-check-action {
  display: inline-block;
  font-size: 0.8rem;
  margin-top: 8px;
}

.account-password-note {
  margin-bottom: 16px;
}

/* Super admin — brand colour settings */
.color-brand-settings-panel .color-input-row {
  align-items: center;
  display: flex;
  gap: 10px;
}

.color-brand-settings-panel .color-brand-hex {
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.color-brand-settings-panel .color-brand-picker {
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  height: 42px;
  padding: 2px;
  width: 52px;
}

.color-brand-custom-toggle {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 12px 0 16px;
}

.color-brand-zone-layout {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) 220px;
}

.color-brand-preview {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.color-brand-preview-hero {
  font-size: 0.85rem;
  padding: 14px;
}

.color-brand-preview-body {
  align-items: flex-start;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
}

.color-brand-preview-btn {
  border: none;
  border-radius: 999px;
  font-size: 0.82rem;
  padding: 8px 14px;
}

body.student-portal-mode {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-gradient-end) 100%);
}

@media (max-width: 900px) {
  .color-brand-zone-layout {
    grid-template-columns: 1fr;
  }
}

.home-highlight-card > span {
  color: var(--primary-dark);
  font-weight: 900;
  text-transform: uppercase;
}

.home-highlight-card strong {
  font-size: 2rem;
  line-height: 1.05;
}

.home-stats-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-stat {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 4px;
  padding: 22px;
  text-align: center;
}

.home-stat strong {
  color: var(--primary-dark);
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
}

.home-stat span {
  color: var(--muted);
  font-weight: 900;
  text-transform: uppercase;
}

.home-section {
  padding: clamp(22px, 4vw, 36px);
}

.home-section-copy {
  max-width: 980px;
}

.home-section h2 {
  color: var(--panel-strong);
  font-size: clamp(1.6rem, 3vw, 2.5rem);
  margin: 0 0 14px;
}

.home-section.split {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.home-card-grid,
.home-contact-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 18px;
}

.home-card {
  box-shadow: none;
  display: grid;
  gap: 8px;
  padding: 18px;
}

.home-card strong {
  color: var(--panel-strong);
  font-size: 1.05rem;
}

.home-card span {
  color: var(--muted);
  line-height: 1.55;
}

.course-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.course-pill-grid span {
  background: rgba(0, 191, 255, 0.12);
  border: 1px solid rgba(0, 191, 255, 0.28);
  border-radius: 999px;
  color: var(--panel-strong);
  font-weight: 900;
  padding: 10px 14px;
}

.review-card span {
  font-style: italic;
}

.public-google-reviews {
  margin-top: 8px;
}

.public-google-reviews-actions {
  justify-content: center;
  margin-top: 18px;
}

.public-google-reviews-actions .button {
  text-decoration: none;
}

.public-google-reviews-loading {
  margin: 8px 0 0;
  text-align: center;
}

.google-reviews-summary {
  color: var(--panel-strong);
  font-size: 1.05rem;
  margin: 0 0 16px;
  text-align: center;
}

.google-reviews-summary strong {
  color: var(--accent);
  font-size: 1.35rem;
}

.review-card-live {
  gap: 12px;
}

.review-card-head {
  align-items: center;
  display: flex;
  gap: 12px;
}

.review-card-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.review-card-meta strong {
  font-size: 0.98rem;
}

.review-card-sub {
  align-items: center;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.82rem;
  gap: 8px;
}

.review-card-stars {
  color: #f5a623;
  letter-spacing: 0.04em;
}

.review-card-time {
  color: var(--muted);
}

.review-card-photo {
  border-radius: 999px;
  flex-shrink: 0;
  height: 40px;
  object-fit: cover;
  width: 40px;
}

.review-card-photo-fallback {
  align-items: center;
  background: rgba(0, 191, 255, 0.16);
  color: var(--panel-strong);
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
}

.review-card-text {
  color: var(--muted);
  font-style: italic;
  line-height: 1.55;
}

.site-footer {
  background: var(--panel-strong);
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: #ffffff;
  overflow: hidden;
  width: 100%;
}

.site-footer-inner {
  display: grid;
  gap: 28px;
  padding: 32px 28px 22px;
}

.site-footer-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
}

.site-footer-brand {
  align-items: center;
  display: flex;
  flex-direction: column;
  text-align: center;
}

.site-footer-logo {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
  width: 100%;
}

.site-footer-logo strong {
  color: #ffffff;
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.site-footer-logo span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
}

.site-footer-tagline {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  margin: 14px auto 0;
  max-width: 42ch;
}

.social-media-heading {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 18px 0 10px;
  text-transform: uppercase;
}

.social-media-heading--footer-bar {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  margin: 0;
}

.social-media-heading--footer-contact {
  margin: 14px 0 8px;
  text-align: left;
}

.social-media-links--footer-contact {
  margin-top: 4px;
}

.social-media-links--footer-contact .social-media-links-row {
  gap: 8px;
  justify-content: flex-start;
}

.social-media-links-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.social-media-links-contact {
  margin-top: 18px;
  width: 100%;
}

.social-media-settings-preview {
  margin-top: 14px;
}

.social-media-settings-preview .social-media-links-row {
  justify-content: flex-start;
}

.social-media-settings-panel .payment-gateway-status-card {
  margin-bottom: 8px;
}


.social-media-links-admin-preview .social-link {
  background: var(--overlay-light);
  border-color: var(--border);
  color: var(--panel-strong);
}

.social-media-links-admin-preview .social-link:hover {
  color: var(--panel-strong);
}

.social-media-links-contact .social-media-links-row {
  justify-content: center;
}

.social-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  gap: 8px;
  height: 44px;
  justify-content: center;
  min-width: 44px;
  padding: 0 14px 0 10px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.social-link svg {
  flex-shrink: 0;
  height: 22px;
  width: 22px;
}

.social-link-label {
  font-size: 0.82rem;
  font-weight: 700;
}

.social-link:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  transform: translateY(-2px);
}

.social-link-whatsapp:hover {
  background: rgba(37, 211, 102, 0.28);
  border-color: rgba(37, 211, 102, 0.55);
}

.social-link-facebook:hover {
  background: rgba(24, 119, 242, 0.32);
  border-color: rgba(24, 119, 242, 0.55);
}

.social-link-instagram:hover {
  background: rgba(225, 48, 108, 0.28);
  border-color: rgba(225, 48, 108, 0.55);
}

.social-link-youtube:hover {
  background: rgba(255, 0, 0, 0.28);
  border-color: rgba(255, 0, 0, 0.55);
}

.social-link--footer-bar {
  border: none;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
  height: 52px;
  min-width: 52px;
  padding: 0;
  width: 52px;
}

.social-link--footer-contact {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  height: 36px;
  min-width: 36px;
  width: 36px;
}

.social-link--footer-bar .social-link-label,
.social-link--footer-contact .social-link-label {
  clip: rect(0, 0, 0, 0);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.social-link--footer-bar svg {
  height: 26px;
  width: 26px;
}

.social-link--footer-contact svg {
  height: 18px;
  width: 18px;
}

.social-link--footer-bar.social-link-whatsapp {
  background: #25d366;
  color: #ffffff;
}

.social-link--footer-bar.social-link-facebook {
  background: #1877f2;
  color: #ffffff;
}

.social-link--footer-bar.social-link-instagram {
  background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af);
  color: #ffffff;
}

.social-link--footer-bar.social-link-youtube {
  background: #ff0000;
  color: #ffffff;
}

.social-link--footer-bar:hover,
.social-link--footer-contact:hover {
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  color: #ffffff;
  filter: brightness(1.06);
  transform: translateY(-2px);
}

.site-footer-col-contact .site-footer-contact {
  margin-bottom: 0;
}

@media (max-width: 520px) {
  .social-link:not(.social-link--footer-bar) .social-link-label {
    clip: rect(0, 0, 0, 0);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
  }

  .social-link:not(.social-link--footer-bar) {
    min-width: 44px;
    padding: 0;
    width: 44px;
  }

  .social-link--footer-bar:not(.social-link--footer-contact) {
    height: 48px;
    min-width: 48px;
    width: 48px;
  }

  .social-link--footer-contact {
    height: 34px;
    min-width: 34px;
    width: 34px;
  }

  .social-media-links--footer-contact .social-media-links-row {
    justify-content: flex-start;
  }
}

.site-footer-col h4 {
  color: #ffffff;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.site-footer-col nav,
.site-footer-contact {
  display: grid;
  gap: 10px;
}

.site-footer-col a,
.site-footer-contact a,
.site-footer-contact span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  text-decoration: none;
}

.site-footer-col a:hover,
.site-footer-contact a:hover {
  color: #ffffff;
}

.site-footer-contact {
  font-style: normal;
}

.site-footer-bottom {
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: space-between;
  padding-top: 18px;
}

.site-footer-bottom p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.88rem;
  margin: 0;
}

.site-footer-note {
  font-size: 0.82rem !important;
}

.page-with-footer {
  display: flex;
  flex-direction: column;
  gap: 32px;
  min-height: calc(100vh - 64px);
}

.page-with-footer-content {
  flex: 1;
}

.legal-page {
  gap: 28px;
}

.legal-page-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.public-legal-panel {
  margin-top: 20px;
  width: 100%;
}

.legal-content h1 {
  margin-top: 6px;
}

.legal-updated {
  margin-bottom: 24px;
}

.legal-section + .legal-section {
  border-top: 1px solid var(--border);
  margin-top: 22px;
  padding-top: 22px;
}

.legal-section h2 {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.legal-section p {
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.home-footer {
  align-items: center;
  background: var(--panel-strong);
  border-radius: 26px;
  color: #ffffff;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 24px;
}

.home-footer div {
  display: grid;
  gap: 6px;
}

.home-footer span,
.home-footer a {
  color: rgba(255, 255, 255, 0.78);
}

.home-footer-links {
  display: flex !important;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: flex-end;
}

.simple-login-page {
  align-items: center;
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: center;
}

.simple-login-card {
  display: flex;
  flex-direction: column;
  max-width: 440px;
  width: 100%;
}

.simple-login-card .login-card-header {
  margin-bottom: 16px;
}

.simple-login-card-main {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
}

.simple-login-card .brand {
  margin-bottom: 20px;
}

.student-register-prompt {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  text-align: center;
}

.student-register-prompt-label {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 0;
  text-transform: uppercase;
}

.student-register-button {
  font-weight: 800;
}

.student-register-hint {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.simple-login-card h2 {
  font-size: 36px;
  margin-bottom: 8px;
}

.simple-login-card .demo-box {
  text-align: center;
}

.post-payment-card {
  display: grid;
  gap: 14px;
}

.post-payment-summary {
  background: linear-gradient(135deg, var(--panel-strong), var(--primary-dark));
  margin: 0;
}

.small-note {
  font-size: 0.86rem;
  margin: 0;
  text-align: center;
}

.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
  gap: 28px;
  align-items: stretch;
  min-height: calc(100dvh - 64px);
  height: calc(100dvh - 64px);
}

.hero-card,
.login-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.stat-card {
  background: var(--stat-card-bg);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 44px;
  position: relative;
}

.hero-card::after {
  background: linear-gradient(135deg, rgba(0, 191, 255, 0.18), rgba(0, 143, 194, 0.14));
  border-radius: 999px;
  content: "";
  height: 340px;
  position: absolute;
  right: -90px;
  top: -120px;
  width: 340px;
}

.brand {
  align-items: center;
  display: flex;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-mark {
  align-items: center;
  background: var(--panel-strong);
  border-radius: 18px;
  color: var(--accent);
  display: grid;
  font-size: 28px;
  font-weight: 800;
  height: 58px;
  place-items: center;
  width: 58px;
}

.brand-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 12px;
  line-height: 0;
  overflow: hidden;
}

.brand-logo-surface-dark {
  background: #0b1624;
}

.brand-logo-surface-footer {
  background: transparent;
}

.brand-logo-frame-topbar,
[data-theme="dark"] .brand-logo-frame-topbar {
  background: transparent;
}

[data-theme="dark"] .brand-logo-frame:not(.brand-logo-surface-light):not(.brand-logo-frame-topbar) {
  background: #0b1624;
}

.brand-logo-link {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-logo-mark,
.brand-logo-frame-mark .brand-logo {
  height: 52px;
  width: auto;
  max-width: 120px;
  object-fit: cover;
  object-position: left center;
}

.brand-logo-login,
.brand-logo-frame-login .brand-logo {
  height: 56px;
  width: auto;
  max-width: min(100%, 280px);
}

.simple-login-card .brand-logo-login,
.simple-login-card .brand-logo-frame-login .brand-logo {
  height: 80px;
  max-width: min(100%, 340px);
}

.brand-login-banner {
  align-items: flex-start;
  align-self: flex-start;
  flex-direction: row;
  justify-content: flex-start;
  margin-bottom: 20px;
  width: 100%;
}

.brand-login-banner .brand-logo-frame {
  justify-content: flex-start;
  margin-inline: 0;
}

.brand-login-banner .brand-logo {
  object-position: left center;
}

.brand-logo-nav,
.brand-logo-frame-nav .brand-logo {
  height: 54px;
  width: auto;
  max-width: min(320px, 78vw);
}

.brand-logo-topbar,
.brand-logo-frame-topbar .brand-logo {
  height: 42px;
  object-fit: contain;
  object-position: left center;
  width: auto;
  max-width: 200px;
}

/* Light logo asset is narrower (638×200 vs 800×200) — scale up to match dark mode size */
[data-theme="light"] .brand-logo-topbar,
[data-theme="light"] .brand-logo-frame-topbar .brand-logo {
  height: 53px;
  max-width: 224px;
}

.brand-logo-hero,
.brand-logo-frame-hero .brand-logo,
.brand-logo-hero-home,
.brand-logo-frame-hero-home .brand-logo {
  height: 72px;
  width: auto;
  max-width: min(100%, 320px);
}

.home-hero-brand {
  margin-bottom: 14px;
}

.home-hero-brand .brand-logo-frame {
  border-radius: 14px;
}

.demo-payment-brand {
  margin-bottom: 12px;
}

.demo-payment-brand .brand-logo-frame {
  width: 100%;
}

.demo-payment-brand .brand-logo {
  margin: 0 auto;
}

.brand-logo-frame-footer {
  display: inline-flex;
  justify-content: center;
  margin-inline: auto;
}

.brand-logo-footer,
.brand-logo-frame-footer .brand-logo {
  display: block;
  height: auto;
  margin-inline: auto;
  max-height: 120px;
  width: auto;
  max-width: min(100%, 240px);
}

.brand-with-logo {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.brand-with-logo.brand-login,
.brand-with-logo {
  margin-bottom: 8px;
}

/* Admin login left panel — logo anchored to the left of the banner */
.login-layout .hero-card .brand-hero-banner,
.brand-hero-banner {
  align-items: flex-start;
  align-self: flex-start;
  flex-direction: row;
  justify-content: flex-start;
  width: 100%;
}

.brand-hero-banner .brand-logo-frame {
  justify-content: flex-start;
  margin-inline: 0;
}

.brand-hero-banner .brand-logo,
.brand-logo-frame-hero .brand-logo {
  object-position: left center;
}

.topbar-brand {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.topbar-brand .brand-logo-frame {
  flex-shrink: 0;
}

.home-brand-link.brand {
  align-items: center;
  display: inline-flex;
  flex-direction: row;
  gap: 0;
  text-decoration: none;
}

.site-footer-logo .brand-logo-frame {
  margin: 0 auto 8px;
}

.eyebrow {
  color: var(--primary-dark);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-size: clamp(42px, 6vw, 74px);
  letter-spacing: -0.06em;
  line-height: 0.95;
  margin-bottom: 20px;
  max-width: 780px;
}

h2 {
  font-size: 28px;
  letter-spacing: -0.03em;
}

h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.hero-copy {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
  max-width: 640px;
  position: relative;
  z-index: 1;
}

.feature-grid,
.stats-grid,
.dashboard-grid,
.actions-grid {
  display: grid;
  gap: 16px;
}

.feature-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: relative;
  z-index: 1;
}

.feature {
  background: rgba(0, 191, 255, 0.06);
  border-radius: 18px;
  padding: 18px;
}

.feature strong {
  display: block;
  margin-bottom: 6px;
}

.feature span,
.muted {
  color: var(--muted);
}

.login-card {
  align-self: center;
  padding: 32px;
}

/* Admin login — right panel matches left banner height */
.login-layout .hero-card,
.login-layout .login-card {
  height: 100%;
  min-height: 0;
}

.login-layout .login-card {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.form-group {
  margin-bottom: 18px;
}

label {
  color: var(--muted);
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

input,
textarea,
select {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  outline: 0;
  padding: 13px 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.button {
  align-items: center;
  background: var(--primary);
  border-radius: 14px;
  color: white;
  display: inline-flex;
  font-weight: 800;
  gap: 8px;
  justify-content: center;
  padding: 13px 18px;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.button.secondary {
  background: var(--secondary-bg);
  color: var(--secondary-text);
}

.button.secondary:hover {
  background: var(--secondary-bg-hover);
}

.button.full {
  width: 100%;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.demo-box {
  background: var(--demo-bg);
  border: 1px dashed var(--demo-border);
  border-radius: 18px;
  color: var(--demo-text);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 22px;
  padding: 16px;
}

.error {
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 14px;
  color: var(--danger);
  display: none;
  font-weight: 700;
  margin-bottom: 16px;
  padding: 12px;
}

.topbar {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 24px;
}

.topbar-brand,
.topbar .brand {
  align-items: center;
  display: flex;
  gap: 14px;
  min-width: 0;
}

.topbar-side {
  align-items: flex-end;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-left: auto;
}

.session-status {
  align-items: center;
  background: var(--overlay-light);
  border: 1px solid var(--session-border);
  border-radius: 999px;
  display: inline-flex;
  gap: 8px;
  padding: 6px 12px;
}

.session-status-student {
  background: var(--session-student-bg);
  border-color: var(--session-student-border);
}

.session-status-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.session-timer {
  color: var(--emphasis);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.session-timer.session-timer-warning {
  color: var(--warning-text);
}

.user-pill {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 8px 8px 8px 14px;
}

.user-pill-name {
  font-weight: 700;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.session-notice {
  background: var(--overlay-light-strong);
  border: 1px solid var(--session-border);
  border-radius: 16px;
  color: var(--emphasis);
  display: none;
  font-weight: 700;
  left: 50%;
  margin: 12px auto 0;
  max-width: min(720px, calc(100% - 24px));
  padding: 12px 16px;
  position: fixed;
  top: 12px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  z-index: 40;
}

.session-notice.is-visible {
  display: block;
}

.session-notice-warning {
  background: rgba(255, 152, 0, 0.14);
  border-color: rgba(255, 152, 0, 0.35);
  color: var(--warning-text);
}

.session-notice-info {
  background: var(--overlay-light-strong);
  border-color: rgba(0, 191, 255, 0.28);
}

.login-card button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.72;
}

.role-badge,
.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  text-transform: uppercase;
}

.role-badge {
  background: rgba(123, 47, 247, 0.1);
  color: var(--primary-dark);
}

.username-badge {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.status-badge.paid {
  background: rgba(22, 131, 95, 0.12);
  color: var(--success);
}

.status-badge.pending {
  background: rgba(196, 61, 61, 0.12);
  color: var(--danger);
}

.status-badge.submitted {
  background: var(--danger);
  color: #ffffff;
}

.status-badge.admin-approved {
  background: var(--success);
  color: #ffffff;
}

.status-badge.approved {
  background: var(--success);
  color: #ffffff;
}

.status-badge.present {
  background: var(--success);
  color: #ffffff;
}

.status-badge.absent {
  background: var(--danger);
  color: #ffffff;
}

.status-badge.not-marked {
  background: var(--badge-neutral-bg);
  border: 1px solid var(--badge-neutral-border);
  color: var(--primary-dark);
}

.stats-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  margin-bottom: 18px;
}

.stats-grid.super-admin-stats {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

body.super-admin-dashboard-mode .app-shell,
body.admin-console-dashboard-mode .app-shell {
  width: min(1480px, calc(100% - 32px));
}

body.super-admin-dashboard-mode .admin-page-stack,
body.admin-console-dashboard-mode .admin-page-stack {
  gap: 18px;
}

.admin-console-shell {
  display: grid;
  gap: 0;
}

.admin-console-topbar {
  margin-bottom: 20px;
}

.admin-console-footer {
  margin-top: 24px;
}

.admin-console-footer .super-admin-footer-top {
  padding-top: 0;
}

.staff-schedule-console {
  margin-top: 4px;
}

.staff-schedule-branch-label {
  margin: 0 0 16px;
}

.super-admin-shell {
  display: grid;
  gap: 0;
}

.super-admin-topbar {
  margin-bottom: 20px;
}

.permission-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-bottom: 18px;
}

@media (min-width: 640px) {
  .permission-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.permission-role-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  margin-bottom: 18px;
  padding: 18px;
}

.permission-toggle {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  gap: 12px;
  margin-bottom: 0;
  min-height: 48px;
  padding: 12px 14px;
  width: 100%;
}

.permission-toggle input[type="checkbox"] {
  accent-color: var(--primary);
  flex-shrink: 0;
  height: 20px;
  margin: 0;
  min-height: 20px;
  min-width: 20px;
  padding: 0;
  width: 20px;
}

.permission-toggle span {
  color: var(--text);
  flex: 1 1 auto;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  min-width: 0;
  word-break: break-word;
}

[data-theme="dark"] .permission-toggle {
  background: var(--control-item-bg);
}

[data-theme="dark"] .permission-toggle span {
  color: var(--text);
}

body.super-admin-dashboard-mode .permission-role-card,
body.admin-console-dashboard-mode .permission-role-card {
  overflow: visible;
}

@media (max-width: 768px) {
  body.super-admin-dashboard-mode .permission-role-card,
  body.admin-console-dashboard-mode .permission-role-card {
    padding: 14px;
  }

  body.super-admin-dashboard-mode .permission-toggle,
  body.admin-console-dashboard-mode .permission-toggle {
    gap: 14px;
    min-height: 52px;
    padding: 14px 16px;
  }

  body.super-admin-dashboard-mode .permission-toggle span,
  body.admin-console-dashboard-mode .permission-toggle span {
    font-size: 1rem;
  }

  body.super-admin-dashboard-mode #rolePermissionsForm .button,
  body.admin-console-dashboard-mode #rolePermissionsForm .button {
    width: 100%;
  }
}

.super-admin-menu {
  flex-wrap: wrap;
  overflow-x: auto;
}

.super-admin-menu .menu-tab {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-menu.console-menu-five-parts,
.admin-menu.super-admin-menu-five-parts {
  display: grid;
  flex-wrap: nowrap;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
  overflow: visible;
  padding: 12px 14px;
}

.admin-menu-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px 10px;
}

.admin-menu-group-label {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.35;
  margin: 0;
  padding: 0 4px 8px;
  text-transform: uppercase;
}

.admin-menu-group-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-menu-group-tabs .menu-tab {
  align-items: center;
  display: inline-flex;
  font-size: 0.8rem;
  gap: 8px;
  justify-content: flex-start;
  line-height: 1.3;
  padding: 8px 10px;
  text-align: left;
  white-space: normal;
  width: 100%;
}

.console-menu-five-parts .menu-tab .menu-icon,
.super-admin-menu-five-parts .menu-tab .menu-icon {
  flex-shrink: 0;
  font-size: 11px;
  height: 22px;
  min-width: 22px;
}

.console-menu-five-parts .menu-tab-badge,
.super-admin-menu-five-parts .menu-tab-badge {
  margin-left: auto;
}

@media (max-width: 1200px) {
  .admin-menu.console-menu-five-parts,
  .admin-menu.super-admin-menu-five-parts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .admin-menu.console-menu-five-parts,
  .admin-menu.super-admin-menu-five-parts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .admin-menu.console-menu-five-parts,
  .admin-menu.super-admin-menu-five-parts {
    grid-template-columns: 1fr;
  }

  .admin-menu-group-tabs .menu-tab {
    font-size: 0.86rem;
    padding: 10px 12px;
  }
}

.super-admin-workspace-bar {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  margin-bottom: 18px;
}

.super-admin-footer {
  background: var(--footer-surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
  overflow: hidden;
  padding: 18px 0 0;
}

.super-admin-footer-top {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  padding: 22px 24px 0;
}

.super-admin-footer-active {
  background: var(--overlay-light);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px 20px;
}

.super-admin-footer-active h3 {
  font-size: 1.35rem;
  margin: 6px 0 8px;
}

.super-admin-footer-hint {
  margin: 0;
}

.super-admin-footer-metrics {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.super-admin-footer-metric {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--metric-card-shadow);
  display: grid;
  gap: 8px;
  padding: 14px 16px;
}

.super-admin-footer-metric span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.super-admin-footer-metric strong {
  color: var(--stat-value);
  font-size: 1.35rem;
}

.super-admin-footer-section {
  padding: 0 24px;
}

.super-admin-footer-section-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.super-admin-footer-links {
  flex-wrap: wrap;
  margin-bottom: 0;
  overflow-x: auto;
}

.super-admin-footer-links .menu-tab {
  flex: 0 0 auto;
  font-size: 0.82rem;
  padding: 10px 14px;
  white-space: nowrap;
}

a.menu-tab {
  color: inherit;
  text-decoration: none;
}

.super-admin-footer-legal {
  background: var(--footer-legal-bg);
  border-top: 1px solid rgba(0, 143, 194, 0.12);
  padding-bottom: 18px;
  padding-top: 18px;
}

.super-admin-footer-bottom {
  align-items: center;
  background: linear-gradient(135deg, var(--panel-strong), #0a4d63);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  justify-content: space-between;
  padding: 16px 24px;
}

.super-admin-footer-bottom-main {
  display: grid;
  gap: 8px;
}

.super-admin-footer-bottom p,
.super-admin-footer-user {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.86rem;
  margin: 0;
}

.super-admin-footer-user strong {
  color: #ffffff;
}

.super-admin-footer-badge {
  background: rgba(0, 191, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 6px 12px;
  text-transform: uppercase;
  width: fit-content;
}

.super-admin-legal-page .super-admin-footer {
  margin-top: 8px;
}

.stat-card {
  padding: 20px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-weight: 700;
  margin-bottom: 8px;
  white-space: nowrap;
}

.stat-card strong {
  color: var(--stat-value);
  display: block;
  font-size: 30px;
}

.amount-success {
  color: var(--success) !important;
}

.amount-danger {
  color: var(--danger) !important;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.8fr);
}

.admin-page-stack {
  display: grid;
  gap: 18px;
}

.admin-tools-panel {
  box-shadow: var(--shadow);
}

.student-top-grid {
  align-items: stretch;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  margin-bottom: 18px;
}

.student-payment-menu {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  overflow: hidden;
  padding: 22px 24px;
  position: relative;
}

.student-payment-menu::after {
  color: rgba(0, 143, 194, 0.12);
  content: attr(data-instrument);
  font-size: clamp(92px, 13vw, 160px);
  line-height: 1;
  pointer-events: none;
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%) rotate(-8deg);
  z-index: 0;
}

.student-payment-menu > * {
  position: relative;
  z-index: 1;
}

.student-payment-menu h2 {
  margin-bottom: 6px;
}

.student-class-summary {
  display: grid;
  gap: 5px;
  margin-top: 10px;
}

.student-class-summary span {
  color: var(--muted);
  font-size: 0.92rem;
}

.student-class-summary strong {
  color: var(--ink);
}

.details-panel {
  margin-top: 18px;
}

.panel {
  padding: 24px;
}

.panel-header {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.button-row,
.table-actions {
  display: flex;
  gap: 8px;
}

.button-row {
  flex-wrap: wrap;
}

.table-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.table-actions .edit-student,
.table-actions .remove-application,
.table-actions .admin-approve,
.table-actions .mark-paid {
  border-radius: 10px;
  font-size: 0.72rem;
  padding: 5px 7px;
}

.admin-menu {
  background: var(--admin-menu-bg);
  border-radius: 18px;
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  padding: 8px;
}

.menu-tab {
  background: transparent;
  border-radius: 12px;
  color: var(--muted);
  font-weight: 800;
  padding: 11px 16px;
}

.menu-tab.active {
  background: var(--panel-strong);
  color: #ffffff;
}

.filter-bar {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) auto;
  margin-bottom: 16px;
}

.smart-filter-bar {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) auto auto;
  margin-bottom: 16px;
}

.attendance-toolbar {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 170px minmax(260px, 1fr) 230px;
  margin-bottom: 12px;
}

.attendance-toolbar .form-group {
  margin-bottom: 0;
  max-width: none;
}

.attendance-toolbar select,
.attendance-toolbar input {
  min-height: 42px;
  width: 100%;
}

.attendance-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 18px;
}

.overall-performance-badge {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: 22px;
  box-shadow: var(--shadow);
  color: #ffffff;
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
  padding: 22px;
}

.overall-performance-badge span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.overall-performance-badge strong {
  font-size: clamp(2.5rem, 5vw, 4rem);
  line-height: 1;
}

.overall-performance-badge small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.95rem;
}

.overall-performance-badge.compact {
  margin-bottom: 0;
}

.attendance-month-status {
  display: grid;
  gap: 3px;
  min-width: 130px;
}

.attendance-month-status strong {
  color: var(--emphasis);
}

.attendance-month-status span {
  color: var(--muted);
  font-size: 0.86rem;
}

.attendance-date-warning {
  display: block;
  font-size: 0.76rem;
  margin-top: 6px;
}

.running-slots-panel {
  background: var(--running-slots-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: grid;
  gap: 10px;
  margin: 12px 0 16px;
  padding: 14px;
}

.running-slots-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.running-slots-list span {
  background: var(--control-item-bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--pill-text);
  font-size: 0.84rem;
  font-weight: 800;
  padding: 7px 10px;
}

.smart-filter-bar .form-group {
  margin-bottom: 0;
}

.audit-log-filter-bar {
  grid-template-columns: repeat(3, minmax(140px, 1fr)) minmax(180px, 1.5fr) auto;
}

.status-overview {
  display: grid;
  gap: 18px;
}

.status-summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.status-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-month-filter {
  grid-template-columns: minmax(220px, 280px) 1fr;
}

.control-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-card {
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px;
}

.control-card.full {
  grid-column: 1 / -1;
}

.inline-control-form {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 14px;
}

.control-list {
  display: grid;
  gap: 10px;
}

.control-list-item {
  align-items: center;
  background: var(--control-item-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 10px;
}

.branch-fee-mode-list .control-list-item {
  flex-wrap: wrap;
}

.branch-fee-mode-info {
  display: grid;
  gap: 2px;
}

.branch-fee-mode-select {
  min-width: 108px;
}

.account-control-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.account-detail-stack {
  display: block;
  min-width: 160px;
  white-space: normal;
}

.account-detail-stack div {
  display: block;
  line-height: 1.5;
}

.account-detail-stack strong {
  color: var(--ink);
}

.account-detail-stack div:not(:first-child) {
  color: var(--muted);
}

.account-action-stack {
  display: grid;
  gap: 5px;
  min-width: 88px;
}

.account-action-stack .button {
  font-size: 0.76rem;
  padding: 6px 8px;
  width: 100%;
}

.allocation-pill {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 320px;
}

.allocation-pill .button {
  font-size: 0.76rem;
  padding: 6px 8px;
}

.edit-control-item,
.remove-control-item,
.edit-category,
.remove-category,
.edit-batch,
.remove-batch {
  font-size: 0.76rem;
  padding: 6px 8px;
}

.compact-form {
  margin-bottom: 18px;
}

.list-note {
  margin-bottom: 16px;
}

.empty-state {
  background: var(--readonly-bg);
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  font-weight: 700;
  padding: 24px;
  text-align: center;
}

.monthly-history {
  margin-bottom: 22px;
}


.pagination-bar {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 14px 0;
}

.pagination-bar.compact {
  margin-top: 8px;
}

.pagination-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pagination-actions label {
  margin: 0;
}

.pagination-actions select {
  min-width: 84px;
  width: auto;
}

.table-wrap {
  overflow-x: auto;
}

.audit-log-table-wrap {
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.audit-log-table th,
.audit-log-table td {
  vertical-align: top;
  white-space: normal;
}

.audit-log-table th {
  white-space: nowrap;
}

.audit-log-details-cell {
  max-width: min(36vw, 280px);
  min-width: 120px;
}

.audit-log-entity-cell {
  max-width: 140px;
  word-break: break-word;
}

.audit-log-details {
  line-height: 1.45;
  word-break: break-word;
}

.audit-log-details-line {
  display: block;
}

.audit-log-details-line + .audit-log-details-line {
  margin-top: 6px;
}

.audit-log-detail-item {
  display: inline;
  font-size: 0.88rem;
}

.audit-log-detail-item strong {
  color: var(--panel-strong);
  font-weight: 800;
}

.audit-log-detail-item::after {
  content: " · ";
  opacity: 0.65;
}

.audit-log-detail-item:last-child::after {
  content: "";
}

[data-theme="dark"] .audit-log-detail-item strong {
  color: var(--text);
}

@media (max-width: 768px) {
  .audit-log-details-cell {
    max-width: 100%;
    min-width: 0;
  }

  .audit-log-table th:nth-child(3),
  .audit-log-table td:nth-child(3),
  .audit-log-table th:nth-child(7),
  .audit-log-table td:nth-child(7) {
    font-size: 0.82rem;
  }

  .audit-log-detail-item {
    display: block;
    margin-bottom: 4px;
  }

  .audit-log-detail-item::after {
    content: "";
  }
}

table {
  border-collapse: collapse;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 14px 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.actions-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.registration-form {
  background: var(--control-bg);
  border: 1px solid var(--border);
  border-radius: 22px;
  margin-bottom: 24px;
  padding: 20px;
}

.registration-page-wrap {
  margin: 0 auto;
  max-width: 900px;
  padding: 8px 0 32px;
  width: 100%;
}

.registration-page {
  max-width: 900px;
  margin: 0 auto;
}

.public-form-page .contact-page-info {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.contact-page-info {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 24px;
}

.contact-page-quick {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 20px;
}

.contact-branch-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 4px;
}

.branch-location-card {
  gap: 10px;
}

.branch-location-card strong {
  line-height: 1.35;
}

.branch-map-link {
  align-self: flex-start;
  color: var(--accent);
  display: inline-flex;
  font-weight: 700;
  margin-top: 2px;
  text-decoration: none;
}

.branch-map-link:hover {
  text-decoration: underline;
}

.contact-form textarea {
  min-height: 140px;
  resize: vertical;
  width: 100%;
}

.public-form-panel.contact-page .notice {
  background: rgba(0, 191, 255, 0.1);
  border: 1px solid rgba(0, 191, 255, 0.35);
  border-radius: 14px;
  color: var(--panel-strong);
  font-weight: 700;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.contact-page-info a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.contact-page-info a:hover {
  text-decoration: underline;
}

.public-page-hero-band .home-highlight-card.public-hero-highlight {
  min-width: 0;
  overflow: hidden;
}

.public-hero-highlight:has(.contact-hero-highlight) {
  gap: 16px;
  min-width: 0;
  overflow: hidden;
  padding: clamp(20px, 4vw, 28px);
}

.contact-hero-highlight {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
}

.contact-hero-label {
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.contact-hero-phone {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(0, 191, 255, 0.24);
  border-radius: 18px;
  box-sizing: border-box;
  color: var(--panel-strong);
  display: block;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
  padding: 14px 12px;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.contact-hero-phone:hover {
  background: rgba(0, 191, 255, 0.1);
  border-color: rgba(0, 191, 255, 0.45);
  color: var(--accent);
  text-decoration: none;
}

.contact-hero-phone-text {
  display: block;
  font-size: clamp(0.82rem, 3.6vw, 1.35rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  width: 100%;
}

.contact-hero-meta {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 10px;
  max-width: 100%;
}

.contact-hero-meta a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.contact-hero-meta a:hover {
  text-decoration: underline;
}

.contact-hero-meta-sep {
  margin: 0 6px;
  opacity: 0.65;
}

.contact-hero-actions {
  margin-top: 6px;
  padding-top: 4px;
}

.contact-hero-actions .button {
  justify-content: center;
  min-height: 46px;
}

.contact-quick-card {
  display: grid;
  gap: 8px;
}

.contact-quick-value {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.4;
}

.contact-quick-link {
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.contact-quick-link:hover {
  text-decoration: underline;
}

.contact-quick-action {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.contact-quick-action:hover {
  text-decoration: underline;
}

.contact-quick-hint {
  font-size: 13px;
}

.teach-form textarea {
  min-height: 96px;
  resize: vertical;
  width: 100%;
}

.public-form-panel.teach-page .notice,
.teach-page .notice {
  background: rgba(123, 47, 247, 0.1);
  border: 1px solid rgba(123, 47, 247, 0.35);
  border-radius: 14px;
  color: var(--panel-strong);
  font-weight: 700;
  margin-bottom: 16px;
  padding: 14px 16px;
}

.form-section-title {
  background: rgba(123, 47, 247, 0.08);
  border-radius: 16px;
  margin-bottom: 18px;
  padding: 14px;
}

.form-section-title strong,
.form-section-title span {
  display: block;
}

.form-section-title span {
  color: var(--muted);
  margin-top: 4px;
}

.required-note {
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 18px;
}

label span,
.terms-box span {
  color: var(--danger);
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.radio-row label,
.terms-box label {
  align-items: center;
  color: var(--text);
  display: inline-flex;
  gap: 8px;
  margin: 0;
}

.radio-row input,
.terms-box input {
  width: auto;
}

.form-grid,
.readonly-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terms-box {
  background: var(--demo-bg);
  border: 1px solid var(--demo-border);
  border-radius: 18px;
  color: var(--demo-text);
  line-height: 1.55;
  margin-bottom: 18px;
  padding: 16px;
}

.terms-box p {
  margin: 8px 0 12px;
}

.terms-agree-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  cursor: pointer;
}

.terms-agree-label input:disabled {
  cursor: not-allowed;
}

#openRegistrationTermsBtn {
  margin-top: 0.5rem;
}

body.registration-terms-modal-open {
  overflow: hidden;
}

.registration-terms-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.55);
}

.registration-terms-overlay[hidden] {
  display: none;
}

.registration-terms-modal {
  width: min(560px, 100%);
  max-height: min(90vh, 720px);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem 1.35rem;
  border-radius: 16px;
  background: var(--panel, #fff);
  border: 1px solid var(--border);
  box-shadow: var(--shadow, 0 20px 50px rgba(15, 23, 42, 0.2));
}

.registration-terms-modal h2 {
  margin: 0;
  font-size: 1.25rem;
}

.registration-terms-body {
  flex: 1;
  min-height: 200px;
  max-height: min(52vh, 420px);
  overflow-y: auto;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.registration-terms-list {
  margin: 0;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.registration-terms-list li + li {
  margin-top: 0.65rem;
}

.registration-terms-status {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  min-height: 2.5rem;
}

.registration-terms-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.registration-terms-actions .button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

html[data-theme="dark"] .registration-terms-modal,
html.theme-dark .registration-terms-modal {
  background: var(--panel);
}

.action-card {
  background: var(--readonly-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  color: inherit;
  text-align: left;
  padding: 16px;
  width: 100%;
}

.action-card.tool-shortcut:hover {
  background: var(--overlay-light-strong);
}

.action-card strong {
  display: block;
  margin-bottom: 6px;
}

.readonly-grid {
  margin-top: 18px;
}

.readonly-field {
  background: var(--readonly-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.readonly-field span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.readonly-field strong {
  display: block;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.payment-card {
  background: linear-gradient(135deg, #06394a, #00bfff);
  border-radius: 22px;
  color: #fff;
  padding: 22px;
}

.payment-card p {
  color: rgba(255, 255, 255, 0.78);
}

.payment-card .amount {
  display: block;
  font-size: 38px;
  font-weight: 900;
  letter-spacing: -0.05em;
  margin-bottom: 12px;
}

.payment-cycle-box {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
  padding: 14px;
}

.payment-cycle-box span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}

.payment-cycle-box strong {
  color: #ffffff;
}

.payment-cycle-box small {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.4;
}

.notice {
  background: var(--overlay-light-strong);
  border: 1px solid var(--session-border);
  border-radius: 16px;
  color: var(--notice-text);
  line-height: 1.55;
  margin-top: 16px;
  padding: 14px;
}

.forgot-login-button {
  margin-top: 10px;
}

.forgot-login-panel {
  margin-top: 12px;
}

.login-attempt-count {
  display: block;
  margin-bottom: 12px;
  margin-top: -4px;
}

.forgot-login-message {
  display: none;
  margin-bottom: 14px;
  margin-top: 0;
}

.hidden,
[hidden] {
  display: none !important;
}

@media (max-width: 920px) {
  .login-layout,
  .dashboard-grid,
  .stats-grid,
  .stats-grid.super-admin-stats,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  .login-layout {
    height: auto;
    min-height: calc(100dvh - 64px);
  }

  .login-layout .hero-card,
  .login-layout .login-card {
    height: auto;
  }

  .hero-card {
    min-height: auto;
    padding: 30px;
  }

  .topbar,
  .panel-header,
  .student-payment-menu {
    align-items: stretch;
    flex-direction: column;
  }

  body.student-dashboard-mode .topbar-side {
    align-items: center;
    flex-direction: column;
    gap: 10px;
    margin-left: 0;
    width: 100%;
  }

  body.student-dashboard-mode .user-pill {
    justify-content: center;
    width: 100%;
  }

  .topbar-side {
    align-items: stretch;
    margin-left: 0;
    width: 100%;
  }

  .session-status {
    justify-content: center;
    width: 100%;
  }

  .user-pill {
    justify-content: center;
    width: 100%;
  }

  .student-top-grid {
    grid-template-columns: 1fr;
  }

  .filter-bar,
  .smart-filter-bar {
    grid-template-columns: 1fr;
  }

  .home-nav,
  .home-section.split {
    align-items: stretch;
    flex-direction: column;
  }

  .home-nav-links {
    justify-content: flex-start;
  }

  .home-hero-stacked .home-hero-slideshow,
  .home-hero-stacked .slideshow-viewport,
  .home-hero-stacked .slideshow-track,
  .home-hero-stacked .slideshow-image {
    min-height: 220px;
  }

  .home-hero,
  .public-page-hero-band,
  .home-stats-grid,
  .home-card-grid,
  .home-contact-grid,
  .public-link-grid,
  .course-fee-grid,
  .contact-page-info {
    grid-template-columns: 1fr;
  }

  .public-page-hero-band {
    margin-top: 16px;
  }

  .public-site-header-inner,
  .public-site-footer-inner,
  .public-site-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .home-nav {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .home-nav-links {
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
    width: 100%;
  }

  .student-login-button.full {
    width: 100%;
  }

  .home-nav-links a,
  .home-nav-links .button {
    flex: 0 0 auto;
  }

  .public-page-intro {
    flex-direction: column;
  }

  .public-page-back {
    width: 100%;
  }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .super-admin-footer-top,
  .super-admin-workspace-bar,
  .super-admin-footer-metrics {
    grid-template-columns: 1fr;
  }

  .super-admin-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .home-footer-links {
    justify-content: flex-start;
  }

  .attendance-toolbar {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .attendance-summary-grid {
    grid-template-columns: 1fr;
  }

  .status-summary-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .control-grid,
  .inline-control-form,
  .account-control-grid {
    grid-template-columns: 1fr;
  }

  .pagination-bar {
    align-items: stretch;
    flex-direction: column;
  }

  body.staff-dashboard-mode .app-shell {
    width: min(100% - 24px, 1080px);
  }

  body.staff-dashboard-mode .attendance-toolbar {
    grid-template-columns: 1fr;
  }

  body.staff-dashboard-mode .stats-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    padding-bottom: 4px;
  }

  body.staff-dashboard-mode .admin-menu {
    overflow-x: auto;
    padding: 6px;
  }

  body.staff-dashboard-mode .menu-tab {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 560px) {
  .app-shell:not(.public-site-shell) {
    width: min(100% - 20px, 1440px);
    padding: 16px 0;
  }

  body.public-site-mode .app-shell,
  #app.public-site-shell {
    padding: 0;
    width: 100%;
  }

  body.student-dashboard-mode .app-shell {
    width: min(100% - 16px, 980px);
  }

  body.student-dashboard-mode .student-payment-menu,
  body.student-dashboard-mode .panel,
  body.student-dashboard-mode .payment-card {
    border-radius: 18px;
    padding: 18px;
  }

  body.student-dashboard-mode .student-class-summary span {
    font-size: 0.86rem;
  }

  body.staff-dashboard-mode .app-shell {
    width: min(100% - 10px, 1080px);
    padding: 10px 0;
  }

  body.staff-dashboard-mode .panel,
  body.staff-dashboard-mode .stat-card,
  body.staff-dashboard-mode .control-card {
    border-radius: 16px;
    padding: 14px;
  }

  body.staff-dashboard-mode .topbar {
    gap: 8px;
    padding: 0;
  }

  body.staff-dashboard-mode .brand-logo-topbar,
  body.staff-dashboard-mode .brand-logo-frame-topbar .brand-logo {
    height: 36px;
    max-width: 160px;
  }

  body.staff-dashboard-mode .topbar h2 {
    font-size: 1.05rem;
  }

  body.staff-dashboard-mode .stats-grid {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  body.staff-dashboard-mode .stat-card {
    min-width: 0;
    padding: 10px 8px;
  }

  body.staff-dashboard-mode .stat-card span {
    font-size: 11px;
    line-height: 1.25;
    white-space: normal;
  }

  body.staff-dashboard-mode .stat-card strong {
    font-size: 22px;
  }

  body.staff-dashboard-mode .attendance-table-wrap {
    overflow: visible;
  }

  body.staff-dashboard-mode .management-table,
  body.staff-dashboard-mode .management-table thead,
  body.staff-dashboard-mode .management-table tbody,
  body.staff-dashboard-mode .management-table tr,
  body.staff-dashboard-mode .management-table td,
  body.staff-dashboard-mode .attendance-table,
  body.staff-dashboard-mode .attendance-table thead,
  body.staff-dashboard-mode .attendance-table tbody,
  body.staff-dashboard-mode .attendance-table tr,
  body.staff-dashboard-mode .attendance-table td {
    display: block;
    width: 100%;
  }

  body.staff-dashboard-mode .management-table thead,
  body.staff-dashboard-mode .attendance-table thead {
    display: none;
  }

  body.staff-dashboard-mode .management-table tr,
  body.staff-dashboard-mode .attendance-table tr {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: 16px;
    margin-bottom: 12px;
    padding: 10px;
  }

  body.staff-dashboard-mode .management-table td,
  body.staff-dashboard-mode .attendance-table td {
    align-items: flex-start;
    border-bottom: 0;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 8px 4px;
    white-space: normal;
  }

  body.staff-dashboard-mode .management-table td::before,
  body.staff-dashboard-mode .attendance-table td::before {
    color: var(--muted);
    content: attr(data-label);
    flex: 0 0 92px;
    font-size: 0.78rem;
    font-weight: 800;
  }

  body.staff-dashboard-mode .management-table .status-badge,
  body.staff-dashboard-mode .attendance-table .status-badge {
    justify-content: center;
    min-width: 94px;
  }

  body.staff-dashboard-mode .attendance-month-status {
    min-width: 0;
    text-align: right;
  }

  body.staff-dashboard-mode .table-actions {
    align-items: stretch;
    flex-direction: column;
  }

  body.staff-dashboard-mode .mark-attendance {
    width: 100%;
  }

  .actions-grid {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .readonly-grid {
    grid-template-columns: 1fr;
  }

  .user-pill {
    align-items: stretch;
    border-radius: 18px;
    flex-direction: column;
  }

  body.student-dashboard-mode .topbar-side {
    gap: 8px;
  }

  body.student-dashboard-mode .user-pill {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  body.student-dashboard-mode .user-pill-name {
    max-width: min(100%, 200px);
    text-align: center;
    white-space: nowrap;
  }
}

.theme-toggle-button {
  white-space: nowrap;
}

.theme-toggle-button .theme-toggle-icon {
  font-size: 1rem;
  line-height: 1;
}

.theme-toggle-floating-wrap {
  bottom: 22px;
  position: fixed;
  right: 22px;
  z-index: 60;
}

.theme-toggle-floating-wrap .theme-toggle-button {
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.theme-toggle-compact .theme-toggle-label {
  display: none;
}

@media (max-width: 720px) {
  .theme-toggle-floating-wrap {
    bottom: 16px;
    right: 16px;
  }

  .theme-toggle-floating-wrap .theme-toggle-label {
    display: none;
  }
}

html.theme-dark h1,
html.theme-dark h2,
html.theme-dark h3,
html.theme-dark p,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] p {
  color: var(--text);
}

html.theme-dark .eyebrow,
html[data-theme="dark"] .eyebrow {
  color: var(--primary-dark);
}

html.theme-dark label,
html.theme-dark .muted,
html.theme-dark .feature span,
html.theme-dark .readonly-field span,
html[data-theme="dark"] label,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .feature span,
html[data-theme="dark"] .readonly-field span {
  color: var(--muted);
}

html.theme-dark .control-card,
html.theme-dark .control-list-item,
html.theme-dark .registration-form,
html.theme-dark .permission-role-card,
html.theme-dark .user-pill,
html.theme-dark .action-card,
html.theme-dark .readonly-field,
html[data-theme="dark"] .control-card,
html[data-theme="dark"] .control-list-item,
html[data-theme="dark"] .registration-form,
html[data-theme="dark"] .permission-role-card,
html[data-theme="dark"] .user-pill,
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .readonly-field {
  background: var(--surface-solid);
  border-color: var(--border);
  box-shadow: var(--metric-card-shadow);
  color: var(--text);
}

html.theme-dark .control-card,
html.theme-dark .registration-form,
html.theme-dark .action-card,
html.theme-dark .readonly-field,
html.theme-dark .super-admin-footer-active,
html[data-theme="dark"] .control-card,
html[data-theme="dark"] .registration-form,
html[data-theme="dark"] .action-card,
html[data-theme="dark"] .readonly-field,
html[data-theme="dark"] .super-admin-footer-active {
  background: var(--control-item-bg);
}

html.theme-dark input::placeholder,
html.theme-dark textarea::placeholder,
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7a94a8;
}

html.theme-dark .admin-menu,
html.theme-dark .super-admin-footer,
html[data-theme="dark"] .admin-menu,
html[data-theme="dark"] .super-admin-footer {
  background: var(--admin-menu-bg);
  border-color: var(--border);
  color: var(--text);
}

html.theme-dark table td,
html[data-theme="dark"] table td {
  color: var(--text);
}

html.theme-dark .account-detail-stack strong,
html[data-theme="dark"] .account-detail-stack strong {
  color: var(--text);
}

html.theme-dark .session-notice,
html.theme-dark .session-notice-info,
html[data-theme="dark"] .session-notice,
html[data-theme="dark"] .session-notice-info {
  background: var(--overlay-light-strong);
  border-color: var(--session-border);
  color: var(--text);
}

html.theme-dark .error,
html.theme-dark .notice,
html[data-theme="dark"] .error,
html[data-theme="dark"] .notice {
  background: var(--error-bg);
  border-color: var(--error-border);
  color: var(--text);
}

html.theme-dark body.staff-dashboard-mode .management-table tr,
html.theme-dark body.staff-dashboard-mode .attendance-table tr,
html[data-theme="dark"] body.staff-dashboard-mode .management-table tr,
html[data-theme="dark"] body.staff-dashboard-mode .attendance-table tr {
  background: var(--surface-solid);
}

html.theme-dark .status-badge.not-marked,
html[data-theme="dark"] .status-badge.not-marked {
  background: var(--badge-neutral-bg);
  border: 1px solid var(--badge-neutral-border);
  color: var(--muted);
}

[data-theme="dark"] .topbar h2,
[data-theme="dark"] .panel-header h2,
[data-theme="dark"] .super-admin-footer-active h3 {
  color: var(--text);
}

[data-theme="dark"] .session-status {
  background: var(--overlay-light);
  border-color: var(--border);
}

[data-theme="dark"] .session-status-label {
  color: var(--muted);
}

[data-theme="dark"] .session-timer {
  color: var(--text);
}

[data-theme="dark"] .stat-card span,
[data-theme="dark"] .super-admin-footer-metric span {
  color: var(--muted);
}

[data-theme="dark"] .stat-card strong,
[data-theme="dark"] .super-admin-footer-metric strong {
  color: var(--text);
}

[data-theme="dark"] .role-badge {
  background: var(--badge-neutral-bg);
  color: var(--text);
  border: 1px solid var(--badge-neutral-border);
}

[data-theme="dark"] .hero-card::after {
  background: radial-gradient(circle, rgba(0, 191, 255, 0.12), transparent 70%);
}

[data-theme="dark"] .hero-card,
[data-theme="dark"] .login-card,
[data-theme="dark"] .panel,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .admin-modal,
[data-theme="dark"] .control-card,
[data-theme="dark"] .control-list-item,
[data-theme="dark"] .registration-form,
[data-theme="dark"] .permission-role-card,
[data-theme="dark"] .user-pill {
  background: var(--surface-solid);
  border-color: var(--border);
  box-shadow: var(--metric-card-shadow);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--input-bg);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .button.secondary {
  background: var(--secondary-bg);
  border: 1px solid var(--border);
  color: var(--text);
}

[data-theme="dark"] .button.secondary:hover {
  background: var(--secondary-bg-hover);
}

/* Admin action buttons — after .button.secondary so colors win in light + dark */
.button.remove-account,
.button.remove-allocation,
.button.remove-application,
.button.remove-batch,
.button.remove-category,
.button.remove-control-item,
.button.secondary.remove-account,
.button.secondary.remove-allocation,
.button.secondary.remove-application,
.button.secondary.remove-batch,
.button.secondary.remove-category,
.button.secondary.remove-control-item,
.button.secondary.delete-announcement,
.button.secondary.inbox-delete,
.button.secondary.mark-attendance[data-status="absent"],
html.theme-dark .button.secondary.remove-account,
html.theme-dark .button.secondary.remove-allocation,
html.theme-dark .button.secondary.remove-application,
html.theme-dark .button.secondary.remove-batch,
html.theme-dark .button.secondary.remove-category,
html.theme-dark .button.secondary.remove-control-item,
html.theme-dark .button.secondary.delete-announcement,
html.theme-dark .button.secondary.inbox-delete,
html.theme-dark .button.secondary.mark-attendance[data-status="absent"],
[data-theme="dark"] .button.secondary.remove-account,
[data-theme="dark"] .button.secondary.remove-allocation,
[data-theme="dark"] .button.secondary.remove-application,
[data-theme="dark"] .button.secondary.remove-batch,
[data-theme="dark"] .button.secondary.remove-category,
[data-theme="dark"] .button.secondary.remove-control-item,
[data-theme="dark"] .button.secondary.delete-announcement,
[data-theme="dark"] .button.secondary.inbox-delete,
[data-theme="dark"] .button.secondary.mark-attendance[data-status="absent"] {
  background: var(--btn-action-danger);
  border-color: transparent;
  color: #ffffff;
}

.button.remove-account:hover,
.button.remove-allocation:hover,
.button.remove-application:hover,
.button.remove-batch:hover,
.button.remove-category:hover,
.button.remove-control-item:hover,
.button.secondary.remove-account:hover,
.button.secondary.remove-allocation:hover,
.button.secondary.remove-application:hover,
.button.secondary.remove-batch:hover,
.button.secondary.remove-category:hover,
.button.secondary.remove-control-item:hover,
.button.secondary.delete-announcement:hover,
.button.secondary.inbox-delete:hover,
.button.secondary.mark-attendance[data-status="absent"]:hover,
html.theme-dark .button.secondary.remove-account:hover,
html.theme-dark .button.secondary.remove-allocation:hover,
html.theme-dark .button.secondary.remove-application:hover,
html.theme-dark .button.secondary.remove-batch:hover,
html.theme-dark .button.secondary.remove-category:hover,
html.theme-dark .button.secondary.remove-control-item:hover,
html.theme-dark .button.secondary.delete-announcement:hover,
html.theme-dark .button.secondary.inbox-delete:hover,
html.theme-dark .button.secondary.mark-attendance[data-status="absent"]:hover,
[data-theme="dark"] .button.secondary.remove-account:hover,
[data-theme="dark"] .button.secondary.remove-allocation:hover,
[data-theme="dark"] .button.secondary.remove-application:hover,
[data-theme="dark"] .button.secondary.remove-batch:hover,
[data-theme="dark"] .button.secondary.remove-category:hover,
[data-theme="dark"] .button.secondary.remove-control-item:hover,
[data-theme="dark"] .button.secondary.delete-announcement:hover,
[data-theme="dark"] .button.secondary.inbox-delete:hover,
[data-theme="dark"] .button.secondary.mark-attendance[data-status="absent"]:hover {
  background: var(--btn-action-danger-hover);
  color: #ffffff;
}

.button.secondary.admin-approve,
.button.secondary.mark-paid,
.button.secondary.mark-attendance[data-status="present"],
.button.secondary.toggle-announcement[data-active="1"],
html.theme-dark .button.secondary.admin-approve,
html.theme-dark .button.secondary.mark-paid,
html.theme-dark .button.secondary.mark-attendance[data-status="present"],
html.theme-dark .button.secondary.toggle-announcement[data-active="1"],
[data-theme="dark"] .button.secondary.admin-approve,
[data-theme="dark"] .button.secondary.mark-paid,
[data-theme="dark"] .button.secondary.mark-attendance[data-status="present"],
[data-theme="dark"] .button.secondary.toggle-announcement[data-active="1"] {
  background: var(--btn-action-success);
  border-color: transparent;
  color: #ffffff;
}

.button.secondary.admin-approve:hover,
.button.secondary.mark-paid:hover,
.button.secondary.mark-attendance[data-status="present"]:hover,
.button.secondary.toggle-announcement[data-active="1"]:hover,
html.theme-dark .button.secondary.admin-approve:hover,
html.theme-dark .button.secondary.mark-paid:hover,
html.theme-dark .button.secondary.mark-attendance[data-status="present"]:hover,
html.theme-dark .button.secondary.toggle-announcement[data-active="1"]:hover,
[data-theme="dark"] .button.secondary.admin-approve:hover,
[data-theme="dark"] .button.secondary.mark-paid:hover,
[data-theme="dark"] .button.secondary.mark-attendance[data-status="present"]:hover,
[data-theme="dark"] .button.secondary.toggle-announcement[data-active="1"]:hover {
  background: var(--btn-action-success-hover);
  color: #ffffff;
}

.button.secondary.edit-student,
.button.secondary.edit-category,
.button.secondary.edit-batch,
.button.secondary.edit-control-item,
.button.secondary.edit-account-password,
.button.secondary.edit-account-username,
.button.secondary.print-payment-receipt,
html.theme-dark .button.secondary.edit-student,
html.theme-dark .button.secondary.edit-category,
html.theme-dark .button.secondary.edit-batch,
html.theme-dark .button.secondary.edit-control-item,
html.theme-dark .button.secondary.edit-account-password,
html.theme-dark .button.secondary.edit-account-username,
html.theme-dark .button.secondary.print-payment-receipt,
[data-theme="dark"] .button.secondary.edit-student,
[data-theme="dark"] .button.secondary.edit-category,
[data-theme="dark"] .button.secondary.edit-batch,
[data-theme="dark"] .button.secondary.edit-control-item,
[data-theme="dark"] .button.secondary.edit-account-password,
[data-theme="dark"] .button.secondary.edit-account-username,
[data-theme="dark"] .button.secondary.print-payment-receipt {
  background: var(--btn-action-edit);
  border-color: transparent;
  color: #ffffff;
}

.button.secondary.edit-student:hover,
.button.secondary.edit-category:hover,
.button.secondary.edit-batch:hover,
.button.secondary.edit-control-item:hover,
.button.secondary.edit-account-password:hover,
.button.secondary.edit-account-username:hover,
.button.secondary.print-payment-receipt:hover,
html.theme-dark .button.secondary.edit-student:hover,
html.theme-dark .button.secondary.edit-category:hover,
html.theme-dark .button.secondary.edit-batch:hover,
html.theme-dark .button.secondary.edit-control-item:hover,
html.theme-dark .button.secondary.edit-account-password:hover,
html.theme-dark .button.secondary.edit-account-username:hover,
html.theme-dark .button.secondary.print-payment-receipt:hover,
[data-theme="dark"] .button.secondary.edit-student:hover,
[data-theme="dark"] .button.secondary.edit-category:hover,
[data-theme="dark"] .button.secondary.edit-batch:hover,
[data-theme="dark"] .button.secondary.edit-control-item:hover,
[data-theme="dark"] .button.secondary.edit-account-password:hover,
[data-theme="dark"] .button.secondary.edit-account-username:hover,
[data-theme="dark"] .button.secondary.print-payment-receipt:hover {
  background: var(--btn-action-edit-hover);
  color: #ffffff;
}

.button.secondary.toggle-announcement[data-active="0"],
html.theme-dark .button.secondary.toggle-announcement[data-active="0"],
[data-theme="dark"] .button.secondary.toggle-announcement[data-active="0"] {
  background: var(--btn-action-warning);
  border-color: transparent;
  color: #ffffff;
}

.button.secondary.toggle-announcement[data-active="0"]:hover,
html.theme-dark .button.secondary.toggle-announcement[data-active="0"]:hover,
[data-theme="dark"] .button.secondary.toggle-announcement[data-active="0"]:hover {
  background: var(--btn-action-warning-hover);
  color: #ffffff;
}

.button.secondary.remove-account:disabled,
.button.secondary.remove-application:disabled,
.button.secondary.admin-approve:disabled,
.button.secondary.mark-paid:disabled,
.button.secondary.mark-attendance:disabled,
.button.secondary.edit-student:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

[data-theme="dark"] .topbar,
[data-theme="dark"] .super-admin-menu {
  background: transparent;
}

[data-theme="dark"] .menu-tab {
  background: transparent;
  border-color: var(--border);
  color: var(--muted);
}

[data-theme="dark"] .menu-tab.active {
  background: var(--secondary-bg);
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .table-wrap {
  background: var(--surface-solid);
  border-color: var(--border);
}

[data-theme="dark"] table th {
  background: #0f2438;
  color: var(--muted);
}

[data-theme="dark"] table td {
  border-color: var(--border);
}

[data-theme="dark"] .admin-toast {
  background: #183552;
  border-color: var(--border);
  color: var(--text);
}

[data-theme="dark"] .username-badge,
[data-theme="dark"] .user-pill-name {
  color: var(--text);
}

[data-theme="dark"] .readonly-field strong,
[data-theme="dark"] .action-card strong {
  color: var(--text);
}

[data-theme="dark"] .staff-schedule-unassigned td {
  background: rgba(255, 179, 71, 0.14);
}

[data-theme="dark"] .session-notice-info {
  border-color: var(--session-border);
  color: var(--emphasis);
}

[data-theme="dark"] .menu-tab.active .menu-icon {
  background: rgba(0, 191, 255, 0.18);
  border-color: rgba(56, 189, 248, 0.28);
  color: #ffffff;
}

/* Public site + student portal (excludes admin/staff dashboards) */
body.public-site-mode {
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body.public-site-mode .public-nav-top {
  align-items: center;
  display: flex;
  flex: 1 1 auto;
  gap: 12px;
  justify-content: space-between;
  min-width: 0;
  width: 100%;
}

body.public-site-mode .public-nav-toggle {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--panel-strong);
  cursor: pointer;
  display: none;
  flex: 0 0 auto;
  font: inherit;
  font-weight: 800;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
}

body.public-site-mode .public-nav-toggle-bars {
  display: grid;
  gap: 5px;
  width: 20px;
}

body.public-site-mode .public-nav-toggle-bars span {
  background: currentColor;
  border-radius: 999px;
  display: block;
  height: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
  width: 100%;
}

body.public-site-mode .public-nav-toggle.is-open .public-nav-toggle-bars span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

body.public-site-mode .public-nav-toggle.is-open .public-nav-toggle-bars span:nth-child(2) {
  opacity: 0;
}

body.public-site-mode .public-nav-toggle.is-open .public-nav-toggle-bars span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

body.public-site-mode .home-nav.public-mobile-nav {
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
}

body.public-site-mode .home-brand-link.brand {
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

body.public-site-mode .home-brand-link .brand-logo-frame {
  display: inline-flex;
  line-height: 0;
}

@media (min-width: 901px) {
  body.public-site-mode .home-nav.public-mobile-nav {
    flex-wrap: nowrap;
    gap: 20px;
  }

  body.public-site-mode .public-nav-top {
    flex: 0 0 auto;
    width: auto;
  }

  body.public-site-mode .public-nav-links {
    align-items: center;
    border-top: 0;
    display: flex !important;
    flex: 0 1 auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-start;
    margin-top: 0;
    padding-top: 0;
    width: auto;
  }

  body.public-site-mode .public-nav-links a {
    min-height: 0;
    padding: 8px 12px;
    width: auto;
  }
}

body.public-site-mode .home-hero .button-row,
body.public-site-mode .public-page-hero .button-row,
body.public-site-mode .public-hero-actions {
  align-items: stretch;
  flex-direction: column;
  width: 100%;
}

body.public-site-mode .home-hero-stacked .home-hero-actions {
  align-items: center;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

body.public-site-mode .home-hero .button,
body.public-site-mode .public-page-hero .button,
body.public-site-mode .public-hero-actions .button,
body.public-site-mode .public-hero-actions .student-login-button {
  justify-content: center;
  min-height: 48px;
  width: 100%;
}

body.public-site-mode .home-hero-stacked .home-hero-actions .button,
body.public-site-mode .home-hero-stacked .home-hero-actions .student-login-button {
  min-height: 0;
  width: auto;
}

body.public-site-mode .public-form-panel .registration-form .button,
body.public-site-mode .public-form-panel .button.full {
  min-height: 48px;
  width: 100%;
}

body.public-site-mode .public-form-panel input,
body.public-site-mode .public-form-panel select,
body.public-site-mode .public-form-panel textarea {
  font-size: 16px;
  min-height: 48px;
}

body.public-site-mode .public-form-panel textarea {
  min-height: 120px;
}

body.public-site-mode .public-link-card,
body.public-site-mode .home-card.public-link-card {
  min-height: 48px;
  text-align: left;
  width: 100%;
}

body[data-page="student"]:not(.student-dashboard-mode) .simple-login-page,
body[data-page="student"]:not(.student-dashboard-mode) .page-with-footer-content.simple-login-page {
  min-height: 100dvh;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

body[data-page="student"]:not(.student-dashboard-mode) .simple-login-card {
  border-radius: 22px;
  margin: 0 auto;
  max-width: 100%;
  padding: clamp(20px, 5vw, 28px);
  width: min(100%, 420px);
}

body[data-page="student"]:not(.student-dashboard-mode) .simple-login-card h2 {
  font-size: clamp(1.6rem, 7vw, 2.2rem);
}

body[data-page="student"]:not(.student-dashboard-mode) .simple-login-card input,
body[data-page="student"]:not(.student-dashboard-mode) .simple-login-card .button {
  font-size: 16px;
  min-height: 48px;
}

body[data-page="student"]:not(.student-dashboard-mode) .page-with-footer-content {
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

body[data-page="student"]:not(.student-dashboard-mode) .post-payment-card {
  width: min(100%, 420px);
}

@media (max-width: 900px) {
  body.public-site-mode .public-site-header-inner {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  body.public-site-mode .public-site-body {
    padding-bottom: max(40px, env(safe-area-inset-bottom));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  body.public-site-mode .public-nav-toggle {
    display: inline-flex;
  }

  body.public-site-mode .home-nav.public-mobile-nav {
    flex-direction: column;
    gap: 0;
  }

  body.public-site-mode .public-nav-links {
    border-top: 1px solid var(--border);
    display: none;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    width: 100%;
  }

  body.public-site-mode .public-nav-links.is-open {
    display: flex;
  }

  body.public-site-mode .public-nav-links a {
    border-radius: 14px;
    font-size: 1rem;
    min-height: 48px;
    padding: 12px 14px;
    width: 100%;
  }

  body.public-site-mode .home-brand-link {
    min-width: 0;
  }

  body.public-site-mode .home-brand-link h3 {
    font-size: 1.05rem;
  }

  body.public-site-mode .home-hero,
  body.public-site-mode .public-page-hero,
  body.public-site-mode .public-page-hero-band {
    border-radius: 24px;
    gap: 20px;
    grid-template-columns: 1fr;
    margin-top: 16px;
    padding: clamp(20px, 5vw, 32px);
  }

  body.public-site-mode .home-hero:not(.home-hero-stacked) h1,
  body.public-site-mode .public-page-hero-band h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    line-height: 1.1;
  }

  body.public-site-mode .home-hero-stacked .home-hero-headline {
    font-size: clamp(1.75rem, 7vw, 2.35rem);
    line-height: 1.05;
  }

  body.public-site-mode .home-hero-badge {
    font-size: 10px;
    letter-spacing: 0.1em;
    padding: 8px 14px;
  }

  body.public-site-mode .home-hero-tagline {
    font-size: 15px;
    line-height: 1.6;
  }

  body.public-site-mode .home-highlight-card strong {
    font-size: clamp(1.35rem, 5vw, 1.75rem);
  }

  body.public-site-mode .home-stats-grid,
  body.public-site-mode .home-card-grid,
  body.public-site-mode .home-contact-grid,
  body.public-site-mode .public-link-grid,
  body.public-site-mode .course-fee-grid,
  body.public-site-mode .contact-page-info,
  body.public-site-mode .contact-page-quick {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  body.public-site-mode .contact-branch-grid {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  .contact-hero-phone {
    padding: 12px 10px;
  }

  .contact-hero-phone-text {
    font-size: clamp(0.78rem, 4.2vw, 1.2rem);
    letter-spacing: 0.03em;
  }

  .public-hero-highlight:has(.contact-hero-highlight) {
    padding: 18px 14px;
  }

  body.public-site-mode .home-section {
    border-radius: 22px;
    padding: clamp(18px, 4vw, 28px);
  }

  body.public-site-mode .home-section.split {
    align-items: stretch;
    flex-direction: column;
    gap: 16px;
  }

  body.public-site-mode .home-section.split > .button {
    width: 100%;
  }

  body.public-site-mode .public-form-panel {
    border-radius: 22px;
    padding: clamp(18px, 4vw, 24px);
  }

  body.public-site-mode .public-form-panel .form-grid,
  body.public-site-mode .public-form-panel .readonly-grid {
    gap: 14px;
    grid-template-columns: 1fr;
  }

  body.public-site-mode .form-section-title {
    flex-direction: column;
    gap: 6px;
  }

  body.public-site-mode .course-pill-grid span {
    font-size: 0.9rem;
    padding: 10px 12px;
  }

  body.public-site-mode .public-site-footer .site-footer-grid {
    gap: 20px;
    grid-template-columns: 1fr;
  }

  body.public-site-mode .public-site-footer .site-footer-inner {
    padding: 24px 18px 18px;
  }

  body.public-site-mode .public-site-footer .site-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

.student-announcement-stack {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.student-announcement-flash {
  animation: student-announcement-pulse 2.4s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(123, 47, 247, 0.92), rgba(0, 191, 255, 0.9));
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0, 143, 194, 0.28);
  color: #ffffff;
  padding: clamp(18px, 4vw, 24px);
}

.student-staff-flash {
  animation: student-announcement-pulse 2.4s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(16, 122, 87, 0.94), rgba(34, 197, 94, 0.9));
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(16, 122, 87, 0.28);
  color: #ffffff;
  padding: clamp(18px, 4vw, 24px);
}

.student-staff-flash .eyebrow,
.student-staff-flash h2,
.student-staff-flash p {
  color: #ffffff;
}

.student-staff-flash h2 {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  margin: 4px 0 10px;
}

.staff-slot-reschedule td {
  background: rgba(245, 158, 11, 0.06);
}

html.theme-dark .staff-slot-reschedule td,
html[data-theme="dark"] .staff-slot-reschedule td {
  background: rgba(245, 158, 11, 0.1);
}

.staff-class-activity-panel {
  margin: 1rem 0 1.25rem;
}

.staff-class-activity-pagination {
  margin: 0 0 0.85rem;
}

.staff-class-activity-panel .staff-class-activity-pagination:last-child {
  margin: 0.85rem 0 0;
}

.student-class-schedule-row.student-class-schedule-took-class td {
  background: rgba(34, 197, 94, 0.05);
}

.student-class-schedule-row.student-class-schedule-on-leave td {
  background: rgba(239, 68, 68, 0.04);
}

.student-class-schedule-panel .student-class-schedule-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.student-class-schedule-panel .student-class-schedule-summary strong {
  color: var(--accent, #b45309);
}

.student-class-schedule-row.student-class-schedule-completed td {
  background: rgba(34, 197, 94, 0.05);
}

.student-class-schedule-row.student-class-schedule-cancelled td {
  background: rgba(239, 68, 68, 0.04);
}

.student-class-schedule-row.student-class-schedule-rescheduled td {
  background: rgba(245, 158, 11, 0.05);
}

.student-class-schedule-panel .table-wrap {
  overflow-x: auto;
}

.student-class-schedule-panel th.schedule-date-col,
.student-class-schedule-panel td.schedule-date-cell {
  font-size: 0.8rem;
  line-height: 1.25;
  white-space: nowrap;
  width: 1%;
  padding-left: 10px;
  padding-right: 10px;
  color: var(--muted);
  font-weight: 600;
}

.student-class-schedule-panel td.schedule-date-cell {
  color: var(--text);
}

.student-class-schedule-panel .schedule-date-empty {
  font-size: 0.85rem;
}

.student-class-schedule-panel th.schedule-status-col,
.student-class-schedule-panel td.schedule-status-cell {
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
  padding-right: 12px;
}

.student-class-schedule-panel .schedule-status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  padding: 5px 9px;
  text-transform: none;
  white-space: nowrap;
}

.student-class-schedule-panel td[data-label="Class"] strong {
  font-size: 0.92rem;
  display: block;
  line-height: 1.3;
}

.student-class-schedule-panel td[data-label="Details"] small {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
  max-width: 220px;
}

@media (max-width: 720px) {
  .student-class-schedule-panel table,
  .student-class-schedule-panel thead,
  .student-class-schedule-panel tbody,
  .student-class-schedule-panel th,
  .student-class-schedule-panel td,
  .student-class-schedule-panel tr {
    display: block;
    width: 100%;
  }

  .student-class-schedule-panel thead {
    display: none;
  }

  .student-class-schedule-panel tr {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
  }

  .student-class-schedule-panel td {
    border: none;
    padding: 4px 0;
    text-align: left;
    white-space: normal;
  }

  .student-class-schedule-panel td::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--muted);
  }

  .student-class-schedule-panel td.schedule-date-cell {
    font-size: 0.85rem;
    display: inline-block;
    width: auto;
    margin-right: 14px;
  }

  .student-class-schedule-panel td.schedule-date-cell::before {
    display: inline;
    margin-right: 4px;
  }

  .student-class-schedule-panel td.schedule-status-cell {
    display: block;
    margin: 6px 0;
  }

  .student-class-schedule-panel td.schedule-status-cell::before {
    display: none;
  }

  .student-class-schedule-panel td[data-label="Details"] small {
    max-width: none;
  }
}

.student-class-pending-banner {
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: linear-gradient(135deg, rgba(255, 247, 230, 0.95), rgba(255, 255, 255, 0.98));
  margin-bottom: 1rem;
}

.student-class-pending-banner h2 {
  color: #b45309;
}

html.theme-dark .student-class-pending-banner,
html[data-theme="dark"] .student-class-pending-banner {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(135deg, rgba(68, 48, 10, 0.55), rgba(24, 24, 27, 0.95));
}

html.theme-dark .student-class-pending-banner h2,
html[data-theme="dark"] .student-class-pending-banner h2 {
  color: #fbbf24;
}

.schedule-reschedule-flash {
  animation: student-announcement-pulse 2.4s ease-in-out infinite;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.94), rgba(245, 158, 11, 0.92));
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(217, 119, 6, 0.28);
  color: #ffffff;
  padding: clamp(18px, 4vw, 24px);
}

.schedule-reschedule-flash .schedule-notice-class-line,
.schedule-reschedule-flash .schedule-notice-detail {
  color: #ffffff;
}

.schedule-reschedule-flash .schedule-notice-class-line {
  font-size: clamp(0.95rem, 3.2vw, 1.08rem);
  line-height: 1.35;
  margin: 0 0 8px;
}

.schedule-reschedule-flash .schedule-notice-class-line strong {
  font-weight: 800;
}

.schedule-notice-kind {
  font-size: 0.92rem;
  font-weight: 800;
  margin: 0 0 6px;
}

.schedule-notice-kind--leave {
  color: #b91c1c;
  font-size: 0.98rem;
  font-weight: 800;
}

.schedule-reschedule-flash .schedule-notice-kind--leave {
  background: #dc2626;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(127, 29, 29, 0.55);
  color: #ffffff;
  display: inline-block;
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  text-shadow: none;
}

.schedule-notice-kind--info {
  color: var(--accent, #00bfff);
}

.schedule-reschedule-flash .schedule-notice-kind--info {
  color: #e0f2fe;
}

.schedule-notice-detail {
  line-height: 1.45;
  margin: 0;
}

.schedule-notice-card-main {
  flex: 1;
  min-width: 0;
}

.student-portal-news-item.schedule-reschedule-flash .schedule-notice-kind--leave {
  background: color-mix(in srgb, #dc2626 14%, transparent);
  border-radius: 8px;
  color: #b91c1c;
  display: inline-block;
  font-size: 1rem;
  padding: 5px 12px;
}

.student-portal-news-item.schedule-reschedule-flash .schedule-notice-class-line,
.student-portal-news-item.schedule-reschedule-flash .schedule-notice-detail {
  color: var(--text);
}

.class-changes-hero h3 {
  margin: 0.25rem 0 0.5rem;
}

.class-changes-hero .muted {
  margin: 0;
}

.class-change-form-grid {
  align-items: end;
}

.class-changes-list-panel .table-actions {
  flex-wrap: wrap;
  gap: 0.35rem;
}

.control-card.class-list-compact {
  padding: 0.75rem 1rem;
  margin-bottom: 0.65rem;
}

.admin-class-list-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.85rem;
}

.admin-class-list-toolbar-row .form-group {
  margin: 0;
  min-width: 0;
}

.admin-class-list-field-date {
  flex: 0 1 auto;
}

.admin-class-list-field-date input[type="date"] {
  min-width: 10.5rem;
  max-width: 100%;
}

.admin-class-list-field-branch {
  flex: 1 1 10rem;
  min-width: 8rem;
  max-width: 14rem;
}

.admin-class-list-field-branch select,
.admin-class-list-field-branch input {
  width: 100%;
}

.admin-class-list-quick-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
  padding-bottom: 0.15rem;
}

.admin-class-list-quick-inline .button {
  padding: 0.35rem 0.65rem;
  font-size: 0.82rem;
}

.admin-class-list-overview-head {
  margin-bottom: 0.5rem;
}

.admin-class-list-overview-head h3 {
  margin: 0 0 0.2rem;
  font-size: 1rem;
}

.admin-class-list-overview-head .muted {
  margin: 0;
  font-size: 0.85rem;
}

.admin-class-list-date-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.65rem 1rem;
}

.admin-class-list-date-group h4 {
  margin: 0 0 0.35rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-class-list-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.admin-class-list-date-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.25;
}

.admin-class-list-date-chip.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.admin-class-list-date-chip-label {
  font-weight: 600;
}

.admin-class-list-date-chip-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.admin-class-list-summary {
  margin-bottom: 0.65rem;
}

.admin-class-list-detail-head {
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.admin-class-list-detail-head .eyebrow.class-list-detail-eyebrow {
  margin: 0;
}

.admin-class-list-detail-sub {
  margin: 0.15rem 0 0;
  font-size: 0.85rem;
}

@media (max-width: 640px) {
  .admin-class-list-quick-inline {
    margin-left: 0;
    width: 100%;
  }
}

.admin-class-change-guide {
  margin-bottom: 1rem;
}

.admin-class-change-steps {
  margin: 0.5rem 0 0.75rem;
  padding-left: 1.25rem;
  line-height: 1.55;
}

.admin-class-change-steps li + li {
  margin-top: 0.45rem;
}

.leave-reschedule-panel .form-group-wide {
  grid-column: 1 / -1;
}

.admin-leave-reschedule-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.registration-section-title {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.5rem;
}

.registration-section-lead {
  margin: 0 0 1rem;
}

.registration-course-section[hidden],
.registration-course-prompt[hidden] {
  display: none !important;
}

.registration-course-prompt {
  margin: 0.75rem 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  background: var(--readonly-bg);
  border: 1px dashed var(--border);
}

.registration-fee-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.06));
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: 16px;
  margin: 1rem 0 0.5rem;
  padding: 1rem 1.25rem;
}

.registration-fee-amount {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0.25rem 0 0.5rem;
}

.registration-fee-stack {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0.5rem;
}

.registration-fee-card-monthly {
  background: var(--surface);
}

.registration-payment-total {
  display: grid;
  gap: 0.25rem;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  border: 2px solid rgba(37, 99, 235, 0.35);
  background: var(--panel);
}

.registration-payment-total strong {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

.registration-offer-banner {
  margin: 0.75rem 0 0;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
}

.registration-offer-banner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}

.registration-offer-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.2);
  color: #047857;
}

.registration-offer-badge.upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #1d4ed8;
}

.registration-offer-badge.ended {
  background: rgba(100, 116, 139, 0.15);
  color: var(--muted);
}

.registration-fee-policy-form .registration-fee-offer-fields {
  margin: 0.75rem 0 1rem;
  padding: 1rem;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: var(--surface);
}

.fee-struck {
  text-decoration: line-through;
  opacity: 0.65;
  margin-right: 0.35rem;
}

.fee-free {
  color: #047857;
  font-weight: 800;
}

.post-payment-breakdown {
  display: grid;
  gap: 0.5rem;
  margin: 1rem 0;
  padding: 1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.post-payment-breakdown .payment-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.post-payment-breakdown .payment-line-total {
  padding-top: 0.5rem;
  margin-top: 0.25rem;
  border-top: 1px solid var(--border);
  font-weight: 700;
}

.registration-contact-section {
  margin-top: 0.5rem;
}

.staff-self-attendance-panel {
  margin-top: 1rem;
}

.staff-self-attendance-panel .staff-reschedule-dates {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent, #b45309);
}

.staff-self-attendance-panel .staff-reschedule-message {
  display: block;
  margin-top: 0.35rem;
  line-height: 1.45;
  white-space: normal;
}

.staff-self-attendance-panel td[data-label="Class"] strong,
.staff-self-attendance-panel td[data-label="Time / details"] strong {
  display: block;
}

.staff-self-attendance-panel td[data-label="Class"] small,
.staff-self-attendance-panel td[data-label="Time / details"] small {
  display: block;
  margin-top: 0.15rem;
}

.staff-self-attendance-panel .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.staff-class-attendance-admin,
.staff-upcoming-leave-admin {
  margin-bottom: 1.25rem;
}

.staff-upcoming-leave-admin .table-actions {
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
}

.staff-upcoming-leave-admin .table-actions .button {
  font-size: 0.72rem;
  padding: 6px 9px;
  white-space: nowrap;
}

.admin-leave-workflow-toolbar {
  margin-bottom: 1rem;
}

.admin-leave-workflow-toolbar-grid {
  align-items: end;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-leave-workflow-toolbar-note {
  margin: 10px 0 0;
}

.staff-class-attendance-admin .table-actions {
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.45rem;
}

.staff-class-attendance-admin .table-actions .button {
  font-size: 0.72rem;
  padding: 6px 9px;
  white-space: nowrap;
}

.staff-class-attendance-admin td:last-child {
  min-width: min(100%, 300px);
  white-space: nowrap;
}

body.staff-dashboard-mode .staff-topbar {
  margin-bottom: 18px;
}

body.staff-dashboard-mode .staff-topbar-brand {
  align-items: center;
  min-width: 0;
}

body.staff-dashboard-mode .staff-topbar-brand-copy {
  min-width: 0;
}

body.staff-dashboard-mode .staff-topbar-heading {
  line-height: 1.25;
  margin: 0;
}

body.staff-dashboard-mode .staff-topbar-title-short {
  display: none;
  font-size: 1rem;
  font-weight: 800;
}

body.staff-dashboard-mode .staff-topbar-mobile-actions {
  align-items: center;
  display: none;
  flex: 0 0 auto;
  gap: 8px;
}

body.staff-dashboard-mode .staff-topbar-session-row {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  width: 100%;
}

body.staff-dashboard-mode .staff-user-pill-desktop {
  display: flex;
}

body.staff-dashboard-mode .staff-logout-button-desktop {
  flex-shrink: 0;
}

@media (min-width: 769px) {
  body.staff-dashboard-mode .staff-topbar {
    align-items: flex-start;
    background: transparent;
    border: none;
    border-radius: 0;
    flex-direction: row;
    justify-content: space-between;
    padding: 0;
  }

  body.staff-dashboard-mode .staff-topbar-side {
    align-items: flex-end;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    width: auto;
  }

  body.staff-dashboard-mode .staff-topbar-session-row {
    justify-content: flex-end;
    width: auto;
  }

  body.staff-dashboard-mode .staff-session-status {
    width: auto;
  }
}

/* Staff portal — mobile-first touch layout */
@media (max-width: 768px) {
  body.staff-dashboard-mode {
    overflow-x: hidden;
  }

  body.staff-dashboard-mode .app-shell,
  body.staff-dashboard-mode .admin-console-shell {
    width: min(100% - 16px, 1080px);
    padding: 12px 0 20px;
  }

  body.staff-dashboard-mode .admin-page-stack {
    gap: 12px;
  }

  body.staff-dashboard-mode .staff-topbar {
    align-items: stretch;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 12px;
  }

  body.staff-dashboard-mode .staff-topbar-brand {
    gap: 10px;
    width: 100%;
  }

  body.staff-dashboard-mode .staff-topbar-brand .brand-logo-topbar,
  body.staff-dashboard-mode .staff-topbar-brand .brand-logo-frame-topbar .brand-logo {
    flex-shrink: 0;
    height: 34px;
    max-width: 110px;
    object-fit: contain;
  }

  body.staff-dashboard-mode .staff-topbar-eyebrow {
    display: none;
  }

  body.staff-dashboard-mode .staff-topbar-title-full {
    display: none;
  }

  body.staff-dashboard-mode .staff-topbar-title-short {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.staff-dashboard-mode .staff-topbar-heading .menu-icon {
    display: none;
  }

  body.staff-dashboard-mode .staff-topbar-side {
    align-items: stretch;
    gap: 0;
    margin-left: 0;
    width: 100%;
  }

  body.staff-dashboard-mode .staff-topbar-session-row {
    gap: 8px;
    justify-content: space-between;
    width: 100%;
  }

  body.staff-dashboard-mode .staff-session-status {
    border-radius: 12px;
    flex: 1 1 auto;
    justify-content: space-between;
    min-height: 44px;
    min-width: 0;
    padding: 8px 12px;
  }

  body.staff-dashboard-mode .staff-session-status .session-status-label {
    font-size: 10px;
  }

  body.staff-dashboard-mode .staff-session-status .session-timer {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.staff-dashboard-mode .staff-topbar-mobile-actions {
    display: flex;
    flex-shrink: 0;
  }

  body.staff-dashboard-mode .staff-topbar-mobile-actions .theme-toggle-button {
    min-height: 44px;
    min-width: 44px;
    padding: 8px 10px;
  }

  body.staff-dashboard-mode .staff-logout-button {
    min-height: 44px;
    padding: 8px 14px;
    white-space: nowrap;
  }

  body.staff-dashboard-mode .staff-user-pill-desktop {
    display: none;
  }

  body.staff-dashboard-mode .stats-grid {
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  body.staff-dashboard-mode .stat-card {
    min-height: 72px;
    padding: 12px 10px;
  }

  body.staff-dashboard-mode .stat-card span {
    font-size: 0.72rem;
    line-height: 1.3;
    white-space: normal;
  }

  body.staff-dashboard-mode .stat-card strong {
    font-size: 1.35rem;
  }

  body.staff-dashboard-mode .attendance-toolbar {
    gap: 12px;
    grid-template-columns: 1fr;
  }

  body.staff-dashboard-mode .attendance-toolbar .form-group {
    width: 100%;
  }

  body.staff-dashboard-mode .attendance-toolbar select,
  body.staff-dashboard-mode .attendance-toolbar input {
    font-size: 16px;
    min-height: 44px;
  }

  body.staff-dashboard-mode .staff-course-grid {
    grid-template-columns: 1fr;
  }

  body.staff-dashboard-mode .staff-course-card {
    padding: 12px;
  }

  body.staff-dashboard-mode .student-announcement-stack {
    gap: 10px;
  }

  body.staff-dashboard-mode .student-announcement-stack article,
  body.staff-dashboard-mode .student-announcement-stack .announcement-card {
    padding: 12px 14px;
  }

  body.staff-dashboard-mode .panel,
  body.staff-dashboard-mode .control-card,
  body.staff-dashboard-mode .details-panel {
    border-radius: 16px;
    padding: 14px;
  }

  body.staff-dashboard-mode .panel h2,
  body.staff-dashboard-mode .control-card h3 {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  body.staff-dashboard-mode .student-class-schedule-summary {
    gap: 0.65rem 1rem;
  }

  body.staff-dashboard-mode .pagination-bar,
  body.staff-dashboard-mode .staff-class-activity-pagination,
  body.staff-dashboard-mode .staff-student-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  body.staff-dashboard-mode .pagination-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  body.staff-dashboard-mode .pagination-actions .button,
  body.staff-dashboard-mode .pagination-actions select {
    min-height: 44px;
    width: 100%;
  }

  body.staff-dashboard-mode .pagination-actions .muted {
    text-align: center;
  }

  body.staff-dashboard-mode .staff-attendance-table-wrap,
  body.staff-dashboard-mode .attendance-table-wrap {
    overflow: visible;
  }

  body.staff-dashboard-mode .staff-attendance-table,
  body.staff-dashboard-mode .staff-attendance-table thead,
  body.staff-dashboard-mode .staff-attendance-table tbody,
  body.staff-dashboard-mode .staff-attendance-table tr,
  body.staff-dashboard-mode .staff-attendance-table th,
  body.staff-dashboard-mode .staff-attendance-table td,
  body.staff-dashboard-mode .attendance-table,
  body.staff-dashboard-mode .attendance-table thead,
  body.staff-dashboard-mode .attendance-table tbody,
  body.staff-dashboard-mode .attendance-table tr,
  body.staff-dashboard-mode .attendance-table th,
  body.staff-dashboard-mode .attendance-table td {
    display: block;
    width: 100%;
  }

  body.staff-dashboard-mode .staff-attendance-table thead,
  body.staff-dashboard-mode .attendance-table thead {
    display: none;
  }

  body.staff-dashboard-mode .staff-attendance-table tr,
  body.staff-dashboard-mode .attendance-table tr {
    background: var(--card, rgba(255, 255, 255, 0.78));
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 12px;
    padding: 12px;
  }

  body.staff-dashboard-mode .staff-slot-reschedule {
    border-left: 3px solid rgba(245, 158, 11, 0.85);
  }

  body.staff-dashboard-mode .staff-attendance-table td,
  body.staff-dashboard-mode .attendance-table td {
    align-items: flex-start;
    border: none;
    display: flex;
    gap: 10px;
    justify-content: space-between;
    padding: 8px 0;
    text-align: right;
    white-space: normal;
  }

  body.staff-dashboard-mode .staff-attendance-table td::before,
  body.staff-dashboard-mode .attendance-table td::before {
    color: var(--muted);
    content: attr(data-label);
    flex: 0 0 38%;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    text-transform: uppercase;
  }

  body.staff-dashboard-mode .staff-attendance-table td[data-label="Class"],
  body.staff-dashboard-mode .staff-attendance-table td[data-label="Time / details"],
  body.staff-dashboard-mode .staff-attendance-table td[data-label="Details"] {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  body.staff-dashboard-mode .staff-attendance-table td[data-label="Class"]::before,
  body.staff-dashboard-mode .staff-attendance-table td[data-label="Time / details"]::before,
  body.staff-dashboard-mode .staff-attendance-table td[data-label="Details"]::before {
    flex: none;
    margin-bottom: 4px;
  }

  body.staff-dashboard-mode .staff-attendance-table td[data-label="Action"],
  body.staff-dashboard-mode .attendance-table td[data-label="Action"] {
    flex-direction: column;
    align-items: stretch;
  }

  body.staff-dashboard-mode .staff-attendance-table td[data-label="Action"]::before,
  body.staff-dashboard-mode .attendance-table td[data-label="Action"]::before {
    margin-bottom: 6px;
  }

  body.staff-dashboard-mode .staff-attendance-table .table-actions,
  body.staff-dashboard-mode .attendance-table .table-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  body.staff-dashboard-mode .staff-attendance-table .table-actions .button,
  body.staff-dashboard-mode .attendance-table .table-actions .button,
  body.staff-dashboard-mode .mark-staff-self-attendance,
  body.staff-dashboard-mode .mark-attendance {
    justify-content: center;
    min-height: 44px;
    width: 100%;
  }

  body.staff-dashboard-mode .attendance-month-status {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    text-align: right;
  }

  body.staff-dashboard-mode .attendance-month-status span {
    font-size: 0.75rem;
    line-height: 1.35;
    white-space: normal;
  }

  body.staff-dashboard-mode .empty-state,
  body.staff-dashboard-mode .staff-student-attendance-hint {
    font-size: 0.92rem;
    line-height: 1.45;
    padding: 12px 0;
  }

  body.staff-dashboard-mode .student-class-schedule-panel td[data-label="Details"] small {
    max-width: none;
  }
}

@media (max-width: 480px) {
  body.staff-dashboard-mode .app-shell,
  body.staff-dashboard-mode .admin-console-shell {
    width: min(100% - 12px, 1080px);
    padding: 8px 0 16px;
  }

  body.staff-dashboard-mode .panel,
  body.staff-dashboard-mode .control-card,
  body.staff-dashboard-mode .details-panel {
    padding: 12px;
  }

  body.staff-dashboard-mode .staff-topbar {
    padding: 8px 10px;
  }

  body.staff-dashboard-mode .staff-topbar-brand .brand-logo-topbar,
  body.staff-dashboard-mode .staff-topbar-brand .brand-logo-frame-topbar .brand-logo {
    height: 30px;
    max-width: 96px;
  }

  body.staff-dashboard-mode .staff-topbar-title-short {
    font-size: 0.92rem;
  }

  body.staff-dashboard-mode .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.staff-dashboard-mode .brand-logo-topbar,
  body.staff-dashboard-mode .brand-logo-frame-topbar .brand-logo {
    height: 32px;
    max-width: 140px;
  }

  body.staff-dashboard-mode .staff-attendance-table td::before,
  body.staff-dashboard-mode .attendance-table td::before {
    flex-basis: 42%;
    font-size: 0.68rem;
  }
}

.menu-tab {
  position: relative;
}

.menu-tab-has-alert:not(.active) {
  border-color: rgba(217, 119, 6, 0.55);
  box-shadow: 0 0 0 1px rgba(217, 119, 6, 0.18);
}

.menu-tab-has-alert.active {
  border-color: rgba(217, 119, 6, 0.65);
}

.menu-tab-badge {
  align-items: center;
  background: #d97706;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  justify-content: center;
  line-height: 1;
  margin-left: 8px;
  min-height: 1.35rem;
  min-width: 1.35rem;
  padding: 0 0.35rem;
  vertical-align: middle;
}

.menu-tab.active .menu-tab-badge {
  background: #ffffff;
  color: #b45309;
}

.menu-tab-count-badge {
  background: var(--accent, #0284c7);
}

.menu-tab.active .menu-tab-count-badge {
  background: #ffffff;
  color: var(--accent, #0284c7);
}

.staff-student-comments-summary {
  margin-top: 0.75rem;
}

.staff-student-comments-empty {
  margin-top: 0.75rem;
}

.staff-student-comments-pagination {
  margin: 0.75rem 0;
}

.admin-notifications-panel .admin-staff-attendance-alerts {
  margin-top: 0.75rem;
}

.admin-notifications-actions {
  margin-top: 1rem;
}

.admin-staff-attendance-alerts {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.admin-staff-attendance-alerts .admin-alert {
  border-radius: 16px;
  padding: 14px 18px;
}

.admin-staff-attendance-alerts .admin-alert strong {
  display: block;
  margin-bottom: 10px;
}

.admin-staff-attendance-alerts .admin-alert p,
.admin-staff-attendance-alerts .admin-staff-alert-note {
  margin: 10px 0 0;
}

.admin-staff-alert-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-staff-alert-item {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.45);
}

.admin-staff-alert-name {
  font-weight: 700;
  line-height: 1.3;
}

.admin-staff-alert-batch {
  color: inherit;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.88;
  word-break: break-word;
}

.admin-staff-alert-more {
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.85;
  padding: 2px 4px 0;
}

.admin-alert-warning {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.14), rgba(245, 158, 11, 0.12));
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #92400e;
}

.admin-alert-info {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(59, 130, 246, 0.1));
  border: 1px solid rgba(37, 99, 235, 0.28);
  color: #1e3a8a;
}

.status-badge.not-marked {
  background: rgba(100, 116, 139, 0.16);
  color: #475569;
}

.attendance-flash-btn {
  white-space: nowrap;
}

.attendance-comment-textarea {
  line-height: 1.5;
  min-height: calc(1.5em * 3 + 1.1rem);
  height: calc(1.5em * 4 + 1.1rem);
  max-height: calc(1.5em * 5 + 1.1rem);
  overflow-y: auto;
  resize: none;
  width: 100%;
}

.student-announcement-flash .eyebrow,
.student-announcement-flash h2,
.student-announcement-flash p {
  color: #ffffff;
}

.student-announcement-flash h2 {
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  margin: 4px 0 10px;
}

.student-announcement-flash-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.student-announcement-dismiss {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  color: #ffffff;
  cursor: pointer;
  flex: 0 0 auto;
  font-size: 1.35rem;
  height: 40px;
  line-height: 1;
  min-width: 40px;
  padding: 0;
}

.student-announcement-dismiss:hover {
  background: rgba(255, 255, 255, 0.28);
}

@keyframes student-announcement-pulse {
  0%,
  100% {
    box-shadow: 0 18px 40px rgba(0, 143, 194, 0.28);
  }
  50% {
    box-shadow: 0 22px 48px rgba(123, 47, 247, 0.38);
  }
}

.student-announcements-panel .announcement-form {
  align-items: end;
  margin-top: 20px;
}

.student-announcements-panel .form-group-wide {
  grid-column: 1 / -1;
}

.student-announcements-panel .announcement-form-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.student-announcements-panel textarea {
  min-height: 110px;
  resize: vertical;
}

@media (max-width: 920px) {
  .student-announcements-panel .announcement-form,
  .student-announcements-panel .smart-filter-bar {
    grid-template-columns: 1fr;
  }

  .student-announcements-panel .form-group-wide,
  .student-announcements-panel .announcement-form-actions {
    grid-column: auto;
  }
}

@media (max-width: 480px) {
  body.public-site-mode .brand-logo-nav,
  body.public-site-mode .brand-logo-frame-nav .brand-logo {
    height: 44px;
    max-width: min(260px, 72vw);
  }

  body.public-site-mode .brand-logo-footer,
  body.public-site-mode .brand-logo-frame-footer .brand-logo {
    max-height: 104px;
    max-width: min(100%, 200px);
  }

  body.public-site-mode .home-stat {
    padding: 16px;
  }

  body.public-site-mode .home-stat strong {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  body.public-site-mode .public-nav-toggle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.public-site-mode .public-nav-toggle {
    padding: 12px;
  }
}

.payment-gateway-status-card {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--control-bg);
}

.payment-gateway-status-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.payment-gateway-status-meta strong {
  color: var(--emphasis);
}

.demo-payment-banner {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  border-color: rgba(0, 191, 255, 0.35);
  background: rgba(0, 191, 255, 0.08);
}

.demo-payment-banner strong {
  color: var(--accent, #00bfff);
}

.demo-payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 57, 74, 0.42);
  backdrop-filter: blur(6px);
}

.demo-payment-modal {
  position: relative;
  width: min(520px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 24px;
  border-radius: 18px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.demo-payment-modal .eyebrow {
  color: var(--primary-dark);
}

.demo-payment-modal h2 {
  margin: 0 0 8px;
  color: var(--emphasis);
}

.demo-payment-modal .muted,
.demo-payment-modal .small-note {
  color: var(--muted);
}

.demo-payment-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.demo-payment-close:hover {
  color: var(--emphasis);
}

.demo-payment-summary {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: var(--control-bg);
  border: 1px solid var(--border);
}

.demo-payment-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.demo-payment-summary span {
  color: var(--muted);
  font-size: 0.85rem;
}

.demo-payment-summary strong {
  color: var(--emphasis);
}

.demo-payment-order-id {
  font-size: 0.78rem;
  word-break: break-all;
  text-align: right;
  color: var(--text);
}

.demo-payment-steps {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.demo-payment-steps li {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--control-item-bg);
  color: var(--text);
}

.demo-payment-steps li strong {
  color: var(--emphasis);
}

.demo-payment-steps li.is-done,
.demo-payment-steps li.is-active {
  border-color: rgba(0, 191, 255, 0.45);
  background: var(--overlay-light-strong);
}

.demo-payment-steps li > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--overlay-light-strong);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 0.85rem;
}

.demo-payment-steps li.is-done > span {
  background: rgba(22, 131, 95, 0.15);
  color: var(--success);
}

.demo-payment-steps li.is-active > span {
  background: rgba(0, 191, 255, 0.2);
  color: var(--primary-dark);
}

.demo-payment-steps small {
  display: block;
  color: var(--muted);
  margin-top: 2px;
}

.demo-payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.demo-pay-method {
  flex: 1 1 30%;
  min-width: 90px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}

.demo-pay-method:hover {
  background: var(--overlay-light);
  border-color: var(--primary);
}

.demo-pay-method.is-active {
  border-color: var(--primary);
  background: var(--overlay-light-strong);
  color: var(--emphasis);
}

.demo-payment-status {
  min-height: 1.25rem;
  margin-bottom: 12px;
  color: var(--muted);
  font-weight: 500;
}

.demo-payment-actions {
  display: grid;
  gap: 8px;
}

.demo-payment-modal code {
  font-size: 0.82em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--control-bg);
  color: var(--emphasis);
  border: 1px solid var(--border);
}

[data-theme="dark"] .demo-payment-overlay {
  background: rgba(0, 0, 0, 0.62);
}

[data-theme="dark"] .demo-payment-modal {
  background: var(--surface-solid);
  color: var(--text);
}

[data-theme="dark"] .demo-payment-modal h2,
[data-theme="dark"] .demo-payment-summary strong,
[data-theme="dark"] .demo-payment-steps li strong {
  color: var(--text);
}

[data-theme="dark"] .demo-payment-steps li.is-done > span {
  color: var(--success);
}

.admin-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 57, 74, 0.42);
  backdrop-filter: blur(6px);
}

.admin-modal {
  position: relative;
  width: min(460px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  padding: 24px;
  border-radius: 18px;
  color: var(--text);
  background: var(--surface-solid);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.admin-modal h2 {
  margin: 0 0 8px;
  color: var(--emphasis);
}

.admin-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.admin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.admin-modal .success {
  color: var(--success, #1f7a4d);
  margin: 0;
}

.admin-confirm-message {
  margin: 0 0 4px;
  line-height: 1.5;
  white-space: pre-line;
}

.admin-modal-wide {
  width: min(560px, 100%);
}

.admin-inline-notice {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.admin-inline-notice-error {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.admin-inline-notice-success {
  color: #047857;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

html[data-theme="dark"] .admin-inline-notice-error,
html.theme-dark .admin-inline-notice-error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.18);
}

html[data-theme="dark"] .admin-inline-notice-success,
html.theme-dark .admin-inline-notice-success {
  color: #a7f3d0;
  background: rgba(16, 185, 129, 0.18);
}

.admin-toast {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  color: var(--emphasis);
  display: none;
  font-weight: 600;
  left: 50%;
  max-width: min(520px, calc(100% - 24px));
  padding: 14px 18px;
  position: fixed;
  top: 16px;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  z-index: 1300;
}

.admin-toast.is-visible {
  display: block;
}

.admin-toast-success {
  border-color: rgba(31, 122, 77, 0.35);
  color: var(--success, #1f7a4d);
}

.admin-toast-error {
  border-color: rgba(191, 47, 47, 0.35);
  color: var(--danger, #bf2f2f);
}

.admin-success-modal {
  text-align: center;
}

.admin-success-icon {
  align-items: center;
  background: rgba(31, 122, 77, 0.12);
  border: 2px solid rgba(31, 122, 77, 0.35);
  border-radius: 999px;
  color: var(--success, #1f7a4d);
  display: inline-flex;
  font-size: 1.75rem;
  font-weight: 800;
  height: 56px;
  justify-content: center;
  margin: 0 auto 12px;
  width: 56px;
}

.admin-success-modal .admin-modal-actions {
  justify-content: center;
}

.admin-modal-overlay + .admin-modal-overlay {
  z-index: 1250;
}

.password-field-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.password-field-row input {
  flex: 1;
}

[data-theme="dark"] .admin-modal-overlay {
  background: rgba(0, 0, 0, 0.72);
}

[data-theme="dark"] .admin-modal h2 {
  color: var(--text);
}
