:root {
  --navy: #0b1c2d;
  --navy-mid: #143049;
  --navy-soft: #e8eef4;
  --gold: #b8954a;
  --gold-deep: #967536;
  --teal: #1f6f66;
  --white: #ffffff;
  --paper: #f4f2ee;
  --gray: #f4f2ee;
  --gray-line: #ddd8cf;
  --ink: #15202b;
  --muted: #5c6570;
  --success: #1f6f66;
  --success-bg: #e7f3f1;
  --error: #9b3a3a;
  --error-bg: #f7ecec;
  --warn: #8a6a24;
  --pink: var(--gold);
  --pink-deep: var(--gold-deep);
  --pink-soft: #f3ead6;
  --lavender: var(--teal);
  --lavender-deep: var(--navy-mid);
  --lavender-soft: var(--navy-soft);
  --shadow: 0 18px 40px rgba(11, 28, 45, 0.12);
  --shadow-sm: 0 8px 22px rgba(11, 28, 45, 0.08);
  --radius: 10px;
  --radius-sm: 8px;
  --sidebar: 260px;
  --font: "Source Sans 3", "Segoe UI", sans-serif;
  --display: "Libre Baskerville", Georgia, serif;
}

* { box-sizing: border-box; }
html { margin: 0; padding: 0; }
body { margin: 0; padding: 0; max-width: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
h1, h2, h3, h4, .brand-text { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 0 0 .45rem; }
h2 { font-size: clamp(1.4rem, 2.3vw, 2rem); margin: 0 0 .6rem; }
p { margin: 0 0 1rem; }
.muted { color: var(--muted); }
.mt-sm { margin-top: .6rem; }

.container { width: min(1140px, calc(100% - 32px)); margin-inline: auto; }
.section { padding: 80px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 42px; }
.eyebrow {
  color: var(--gold-deep);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .68rem;
  margin: 0 0 .45rem;
  font-family: var(--font);
}

.btn, button.btn, input[type="submit"].btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  border: 0; border-radius: 4px; padding: .78rem 1.3rem; font-weight: 650;
  font-family: inherit; cursor: pointer; letter-spacing: .02em;
  transition: background .2s, color .2s, box-shadow .2s, transform .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-mid); }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--gray-line); }
.btn-outline { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-danger { background: var(--error); color: #fff; }
.btn-sm { padding: .48rem .95rem; font-size: .9rem; }
.btn-block { width: 100%; }

.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-weight: 600; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 4px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); font-family: var(--display); font-size: .78rem; font-weight: 700;
  letter-spacing: .04em;
}
.brand-text { font-size: 1.12rem; }

.site-nav {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.96); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--gray-line);
  box-shadow: 0 1px 0 #b8954a33;
  overflow: visible;
}
.site-nav .container {
  width: min(1280px, calc(100% - 24px));
}
.nav-inner {
  display: flex; align-items: center; justify-content: flex-start;
  min-height: 80px; gap: 10px; position: relative;
  overflow: visible; flex-wrap: nowrap;
}
.nav-menu {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  justify-content: flex-end;
  margin-left: auto;
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  position: relative;
  z-index: 3;
}
.nav-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 11px;
  border-radius: 4px;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
  background: var(--navy);
}
.nav-login:nth-child(1) { background: var(--teal); color: #fff; }
.nav-login:nth-child(2) { background: var(--navy-mid); color: #fff; }
.nav-login:nth-child(3) { background: var(--navy); color: #fff; }
.nav-login-out { background: var(--error) !important; color: #fff !important; }
.nav-login:hover,
.nav-login.is-active {
  color: var(--navy);
  background: var(--gold);
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 14px;
  color: #3d4a57;
  font-family: var(--font);
  font-weight: 600;
  font-size: .92rem;
  letter-spacing: .03em;
  line-height: 1;
  white-space: nowrap;
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute; left: 14px; right: 14px; bottom: 6px;
  height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: center;
  transition: transform .22s ease;
}
.nav-link:hover { color: var(--navy); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link.is-active { color: var(--navy); }
.nav-link.is-active::after { transform: scaleX(1); background: var(--navy); }
.nav-toggle {
  display: none; background: #fff; border: 1px solid var(--gray-line);
  width: 42px; height: 42px; padding: 10px; cursor: pointer; border-radius: 4px;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); margin: 5px 0; transition: transform .2s, opacity .2s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    linear-gradient(115deg, rgba(11,28,45,.92), rgba(20,48,73,.72)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 80L80 0' stroke='%23ffffff12' stroke-width='1'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #0b1c2d, #1a3d4d);
  padding: 92px 0 80px;
}
.hero .muted { color: #c9d3dc; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); line-height: 1.18; color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.hero .btn-primary { background: var(--gold); color: var(--navy); }
.hero .btn-primary:hover { background: #d0b06a; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: #ffffff55; }
.hero-card {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; padding: 22px; backdrop-filter: blur(8px);
}
.hero-card + .hero-card { margin-top: 14px; }
.hero-card h3, .hero-card p { color: #e8eef4; }
.pill {
  display: inline-block; background: var(--navy-soft); color: var(--navy);
  border-radius: 3px; padding: .18rem .55rem; font-size: .75rem; font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase;
}
.hero .pill { background: rgba(184,149,74,.2); color: var(--gold); }
.blob { display: none; }

.cta-band {
  background: var(--navy); border-radius: 8px; padding: 40px 36px;
  display: flex; justify-content: space-between; align-items: center; gap: 20px; color: #fff;
}
.cta-band h2, .cta-band p { color: #fff; }
.cta-band .eyebrow { color: var(--gold); }
.cta-band .btn-primary { background: var(--gold); color: var(--navy); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card, .course-card, .stat-card, .feature-card, .teacher-card, .faq-item, .panel {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--gray-line);
}
.course-card, .feature-card, .teacher-card, .panel { padding: 20px; transition: transform .2s, box-shadow .2s; }
.course-card:hover, .feature-card:hover, .teacher-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.thumb {
  height: 156px; border-radius: 6px; margin-bottom: 14px;
  background: linear-gradient(135deg, #143049, #1f6f66);
  overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin: 8px 0; }

.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-card { padding: 24px; text-align: center; }
.stat-card strong { display: block; font-size: 2rem; color: var(--navy); font-family: var(--display); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.icon-bubble {
  width: 44px; height: 44px; border-radius: 4px; display: grid; place-items: center;
  background: var(--navy); color: var(--gold); margin-bottom: 12px; font-size: .85rem; font-weight: 700;
  letter-spacing: .04em; font-family: var(--font);
}

.teachers-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.avatar-lg { width: 84px; height: 84px; border-radius: 4px; object-fit: cover; margin-bottom: 10px; background: var(--navy-soft); }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.quote { padding: 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); border-top: 3px solid var(--gold); }

.faq-item { padding: 0; overflow: hidden; margin-bottom: 10px; }
.faq-item button {
  width: 100%; text-align: left; background: none; border: 0; padding: 18px 20px;
  font-weight: 700; font-family: inherit; cursor: pointer; color: var(--ink);
}
.faq-item .faq-body { display: none; padding: 0 20px 18px; color: var(--muted); }
.faq-item.open .faq-body { display: block; }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.form, .panel { padding: 24px; }
label { display: block; font-weight: 600; margin: 0 0 .4rem; }
input, select, textarea {
  width: 100%; padding: .78rem 1rem; border-radius: 4px; border: 1px solid var(--gray-line);
  font: inherit; background: #fff; color: var(--ink); margin-bottom: 14px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--navy-mid); border-color: var(--navy-mid); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.check input { width: auto; margin: 0; }
.help { font-size: .85rem; color: var(--muted); margin-top: -8px; margin-bottom: 12px; }
.form-error { color: var(--error); font-size: .88rem; margin: -8px 0 12px; }

.site-footer { background: var(--navy); margin-top: 56px; padding: 48px 0 16px; color: #c9d3dc; }
.site-footer .brand, .site-footer .brand-text { color: #fff; }
.site-footer h4 { color: #fff; margin: 0 0 10px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
.footer-grid a, .footer-grid p { display: block; color: #c9d3dc; margin: 0 0 .4rem; }
.footer-grid a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid #2a4258; margin-top: 28px; padding-top: 16px; color: #9aabba; font-size: .9rem; }

.auth-wrap {
  min-height: calc(100vh - 80px); display: grid; grid-template-columns: 1fr 1fr; padding: 0;
  background: var(--paper);
}
.student-auth .auth-side {
  background:
    linear-gradient(160deg, rgba(31,111,102,.94), rgba(11,28,45,.72)),
    var(--teal);
}
.student-auth .auth-side .eyebrow { color: #e8f4f2; }
.student-auth .btn-primary { background: var(--teal); }
.student-auth .btn-primary:hover { background: #185a53; }
.teacher-auth .auth-side {
  background:
    linear-gradient(160deg, rgba(20,48,73,.95), rgba(184,149,74,.45)),
    var(--navy-mid);
}
.teacher-auth .auth-side .eyebrow { color: var(--gold); }
.teacher-auth .btn-primary { background: var(--gold-deep); color: #fff; }
.teacher-auth .btn-primary:hover { background: var(--navy); }
.admin-auth .auth-side {
  background:
    linear-gradient(160deg, rgba(11,28,45,.98), rgba(11,28,45,.88)),
    #07131f;
}
.admin-auth .auth-card { border-top: 4px solid var(--gold); }
.admin-auth .btn-primary { background: var(--gold); color: var(--navy); }
.admin-auth .btn-primary:hover { background: #d4b36a; color: var(--navy); }

.auth-page-list {
  margin: 22px 0 0; padding: 0; list-style: none;
}
.auth-page-list li {
  color: #fff; padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,.18);
  font-weight: 600;
}
.auth-page-list.dark li { color: var(--ink); border-color: var(--gray-line); }

.teacher-login-body { background: #f3ead6; }
.admin-login-body { background: #07131f; }
.auth-solo {
  min-height: calc(100vh - 80px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px 48px;
}
.teacher-auth.auth-solo {
  background: linear-gradient(180deg, #143049 0 240px, #f3ead6 240px);
}
.admin-auth.auth-solo { background: #07131f; }
.auth-solo-head { text-align: center; color: #fff; max-width: 540px; margin-bottom: 18px; }
.auth-solo-head h1 { color: #fff; }
.auth-solo-head p { color: #d5dee6; }
.admin-card {
  background: #0f2235; color: #fff; border-top: 4px solid var(--gold);
}
.admin-card h1, .admin-card .eyebrow { color: var(--gold); }
.admin-card .lead, .admin-card .help, .admin-card label, .admin-card .auth-links p { color: #c9d3dc; }
.admin-card a { color: var(--gold); }
.admin-card .auth-page-list.dark li { color: #d5dee6; border-color: #2a4258; }
.auth-solo .auth-card { width: min(460px, 100%); }

.portal-hero { padding: 22px 24px; border-radius: 8px; margin-bottom: 8px; }
.student-hero { background: #e7f3f1; border-left: 4px solid var(--teal); }
.teacher-hero { background: #f3ead6; border-left: 4px solid var(--gold); }
.admin-hero { background: #0b1c2d; color: #fff; border-left: 4px solid var(--gold); }
.admin-hero h2, .admin-hero .eyebrow { color: #fff; }
.admin-hero .muted { color: #c9d3dc; }
.admin-hero .btn-outline { color: #fff; border-color: #fff; }
.portal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 12px 0 28px;
}
.portal-card {
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; padding: 16px 18px; border-radius: 8px;
  box-shadow: var(--shadow-sm); color: var(--ink);
  border: 1px solid var(--gray-line);
}
.portal-card:hover { border-color: var(--navy); color: var(--navy); }
.portal-card span { color: var(--muted); font-size: .92rem; }

.role-student .sidebar { background: #0f3d38; }
.role-student .side-nav a:hover,
.role-student .side-nav a.is-active { background: #185a53; border-left-color: #9fd8d1; }
.role-student .dash-top { border-top: 3px solid var(--teal); }
.role-teacher .sidebar { background: #143049; }
.role-teacher .dash-top { border-top: 3px solid var(--gold); }
.role-admin .sidebar { background: #07131f; }
.role-admin .dash-top { border-top: 3px solid var(--gold); }
.auth-side {
  background:
    linear-gradient(160deg, rgba(11,28,45,.94), rgba(31,111,102,.55)),
    var(--navy);
  color: #fff; display: flex; flex-direction: column; justify-content: center; padding: 56px 64px;
}
.auth-side .eyebrow { color: var(--gold); margin-bottom: 12px; }
.auth-side h2 {
  color: #fff; font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.25;
  margin: 0 0 14px; max-width: 420px;
}
.auth-side p { color: #c9d3dc; max-width: 400px; margin: 0; font-size: 1.02rem; }
.auth-main {
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: min(420px, 100%);
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 36px 32px;
  margin: 0;
}
.auth-card .brand { margin: 0 0 22px; }
.auth-card h1 {
  font-size: 1.55rem;
  line-height: 1.3;
  margin: 0 0 6px;
  color: var(--navy);
}
.auth-card .lead {
  color: var(--muted);
  font-size: .95rem;
  margin: 0 0 22px;
}
.auth-card .field { margin: 0 0 16px; }
.auth-card .field label {
  display: block;
  margin: 0 0 6px;
  font-weight: 600;
  font-size: .88rem;
  color: var(--navy);
}
.auth-card .field input {
  display: block;
  width: 100%;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #cfc8bc;
  border-radius: 6px;
  background: #fafaf8;
  font-size: 1rem;
  line-height: 46px;
}
.auth-card .field input:focus {
  background: #fff;
  border-color: var(--navy);
  outline: 2px solid #14304933;
}
.auth-card .auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 18px;
}
.auth-card .check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}
.auth-card .check input {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  flex: 0 0 16px;
  accent-color: var(--navy);
}
.auth-card .btn-block { height: 46px; margin-top: 2px; }
.auth-card .auth-links {
  margin: 16px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--gray-line);
  text-align: center;
  color: var(--muted);
  font-size: .92rem;
}
.auth-card .auth-links p { margin: 0 0 6px; }
.auth-card .help { margin: 10px 0 0; text-align: center; font-size: .8rem; }
.auth-role-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  background: var(--paper);
  border: 1px solid var(--gray-line);
  border-radius: 8px;
}
.auth-role-tabs a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  border-radius: 5px;
  font-weight: 700;
  font-size: .82rem;
  color: var(--muted);
}
.auth-role-tabs a:hover { color: var(--navy); background: #fff; }
.auth-role-tabs a.is-active {
  background: var(--navy);
  color: #fff;
}

.dash-body { background: #eef1f4; }
.dash-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #d5dee6; padding: 22px 14px;
  position: sticky; top: 0; height: 100vh; overflow: auto;
}
.sidebar .brand-mark { background: var(--gold); color: var(--navy); }
.sidebar .brand-text { color: #fff; }
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav .side-label {
  margin: 14px 8px 4px;
  padding: 0;
  color: var(--gold);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.side-nav .side-label:first-child { margin-top: 8px; }
.side-nav a {
  color: #d5dee6; font-weight: 600; padding: .72rem .9rem; border-radius: 4px;
}
.side-nav a:hover, .side-nav a.is-active { background: #1b334a; color: #fff; border-left: 3px solid var(--gold); padding-left: calc(.9rem - 3px); }
.side-nav .danger-link { color: #e2b4b4; margin-top: 14px; }
.dash-main { min-width: 0; }
.dash-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 24px; background: #fff; position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--gray-line);
}
.dash-top h1 { font-size: 1.4rem; margin: 0; }
.dash-top-actions { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; background: var(--paper); padding: 6px 12px 6px 6px; border-radius: 4px; border: 1px solid var(--gray-line); }
.user-chip img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; }
.user-chip span { display: block; font-size: .75rem; color: var(--muted); }
.icon-btn { position: relative; background: #fff; border: 1px solid var(--gray-line); border-radius: 4px; padding: 8px 10px; color: var(--navy); font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.badge-dot {
  position: absolute; top: -6px; right: -6px; background: var(--gold); color: var(--navy);
  border-radius: 999px; font-size: .7rem; padding: 1px 6px; font-weight: 800;
}
.dash-content { padding: 24px; }
.sidebar-backdrop { display: none; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.stat-mini { padding: 16px; background: #fff; border-radius: 8px; box-shadow: var(--shadow-sm); border-top: 3px solid var(--navy); }
.stat-mini span { color: var(--muted); font-size: .82rem; }
.stat-mini strong { display: block; font-size: 1.5rem; margin-top: 4px; color: var(--navy); }

.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; min-width: 640px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--gray-line); font-size: .94rem; }
th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; background: #faf9f7; }
.toolbar { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.search { display: flex; gap: 8px; flex-wrap: wrap; }
.search input, .search select { margin: 0; min-width: 180px; }

.badge { display: inline-block; border-radius: 3px; padding: .15rem .55rem; font-size: .72rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.badge-ok { background: var(--success-bg); color: var(--success); }
.badge-warn { background: #f6efd9; color: var(--warn); }
.badge-info { background: var(--navy-soft); color: var(--navy); }
.badge-pink { background: #f3ead6; color: var(--gold-deep); }

.alert { padding: 12px 16px; border-radius: 4px; margin-bottom: 16px; font-weight: 650; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--error-bg); color: var(--error); }
.empty {
  text-align: center; padding: 48px 16px; background: #fff; border-radius: var(--radius);
  color: var(--muted); box-shadow: var(--shadow-sm);
}

.progress { height: 8px; background: var(--navy-soft); border-radius: 2px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--teal); }

.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.page-link { padding: .4rem .75rem; border-radius: 4px; background: #fff; color: var(--ink); border: 1px solid var(--gray-line); }
.page-link.is-active { background: var(--navy); color: #fff; border-color: transparent; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(11,28,45,.45); display: none; place-items: center; z-index: 50; padding: 16px; }
.modal-backdrop.open { display: grid; }
.modal { background: #fff; border-radius: 8px; padding: 22px; width: min(520px, 100%); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 18px; }
.lesson-player { background: #111; border-radius: 6px; overflow: hidden; aspect-ratio: 16/9; }
.lesson-player iframe, .lesson-player video { width: 100%; height: 100%; border: 0; }
.lesson-list a { display: block; padding: 10px 12px; border-radius: 4px; color: var(--ink); }
.lesson-list a.is-active, .lesson-list a:hover { background: var(--navy-soft); color: var(--navy); }

.quiz-option { display: block; background: #fff; border: 1px solid var(--gray-line); border-radius: 4px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; }
.quiz-option:has(input:checked) { border-color: var(--navy); background: var(--navy-soft); }
.quiz-option input { width: auto; margin: 0 8px 0 0; }

.certificate {
  background: #fff; border: 12px solid var(--navy); padding: 48px; text-align: center;
  border-radius: 2px; box-shadow: var(--shadow); max-width: 900px; margin: 0 auto;
  outline: 1px solid var(--gold); outline-offset: -22px;
}
.certificate h1 { font-size: 2.4rem; color: var(--navy); }
.certificate .ornament { color: var(--gold-deep); letter-spacing: .4em; }

.toast-root { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: #fff; border-left: 4px solid var(--navy); padding: 12px 16px; border-radius: 4px;
  box-shadow: var(--shadow); min-width: 240px; animation: rise .25s ease;
}
.toast.error { border-left-color: var(--error); }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.chart-card { padding: 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.notice-list { display: flex; flex-direction: column; gap: 10px; }
.notice { background: #fff; border-radius: 6px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.notice.unread { border-left: 3px solid var(--gold); }

@media (max-width: 1024px) {
  .hero-grid, .cards, .features, .teachers-grid, .quotes, .contact-grid, .footer-grid,
  .grid-2, .grid-3, .split, .stats-row, .auth-wrap { grid-template-columns: 1fr 1fr; }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1280px) {
  .nav-toggle { display: block; margin-left: auto; }
  .nav-menu {
    display: none; position: absolute; left: 0; right: 0; top: 80px;
    background: #fff; border: 1px solid var(--gray-line); border-radius: 8px;
    padding: 8px; flex-direction: column; align-items: stretch;
    white-space: normal; box-shadow: var(--shadow);
    z-index: 45;
  }
  .nav-menu.open { display: flex; }
  .nav-link { justify-content: flex-start; height: 44px; padding: 0 14px; }
  .nav-link.is-active { background: var(--navy-soft); }
  .nav-actions { margin-left: 8px; }
}
@media (max-width: 720px) {
  .nav-login { padding: 0 8px; font-size: .72rem; }
  .brand-text { display: none; }
}
@media (max-width: 820px) {
  .dash-shell, .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { min-height: auto; padding: 36px 24px; }
  .sidebar {
    position: fixed; left: 0; top: 0; transform: translateX(-105%); transition: transform .25s; z-index: 60; width: min(280px, 86vw);
  }
  .sidebar.open { transform: none; }
  .sidebar-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(11,28,45,.45); z-index: 50; }
  .hero-grid, .cards, .features, .teachers-grid, .quotes, .contact-grid, .footer-grid,
  .grid-2, .grid-3, .split, .stats-row, .cta-band, .grid-6, .portal-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
  .dash-content { padding: 16px; }
}
@media print {
  .dash-top, .sidebar, .btn, .nav-toggle { display: none !important; }
  .dash-shell { display: block; }
  .certificate { box-shadow: none; }
}
