:root {
  --primary: #1558d6;
  --primary-dark: #0b327f;
  --secondary: #39c9ff;
  --accent: #ff8a2b;
  --bg: #f4f8ff;
  --card: #ffffff;
  --text: #14213d;
  --muted: #667085;
  --border: #dbe5f4;
  --success: #147a43;
  --danger: #b42318;
  --warning: #9a6700;
  --shadow: 0 24px 70px rgba(18, 62, 140, .14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 9%, rgba(57, 201, 255, .20), transparent 25%),
    radial-gradient(circle at 92% 15%, rgba(21, 88, 214, .15), transparent 28%),
    linear-gradient(180deg, #f7fbff 0%, #edf5ff 55%, #ffffff 100%);
}
body::before,
body::after {
  content: "";
  position: fixed;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  filter: blur(75px);
  opacity: .24;
  pointer-events: none;
  z-index: -1;
}
body::before { top: 12%; right: -120px; background: #57d4ff; }
body::after { bottom: -100px; left: -90px; background: #3d69ee; }

a { color: var(--primary); text-decoration: none; }
button, input, select { font-family: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(219, 229, 244, .86);
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px);
  box-shadow: 0 7px 28px rgba(17, 55, 119, .05);
}
.topbar-inner {
  width: min(1180px, 92%);
  min-height: 76px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-dark);
}
.brand-logo-wrap {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 3px solid #fff;
  border-radius: 19px;
  background: linear-gradient(145deg, #fff, #eaf4ff);
  box-shadow: 0 8px 24px rgba(21, 88, 214, .19);
}
.brand img { width: 100%; height: 100%; object-fit: cover; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 27px; line-height: 1; }
.brand-copy small { color: var(--muted); font-size: 12px; font-weight: 700; }
.topbar-link {
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, .78);
  color: var(--primary-dark);
  font-weight: 800;
}

.page-shell { width: min(1180px, 92%); margin: 38px auto; }
.hero {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  align-items: center;
  gap: 48px;
  min-height: 68vh;
}
.hero-copy h1 {
  margin: 0 0 14px;
  font-size: clamp(52px, 8vw, 92px);
  line-height: .95;
  color: var(--primary-dark);
  text-shadow: 0 8px 35px rgba(21, 88, 214, .10);
}
.hero-copy p { max-width: 680px; margin: 0; font-size: 21px; line-height: 1.95; color: var(--muted); }
.hero-image { position: relative; text-align: center; }
.hero-image::before {
  content: "";
  position: absolute;
  inset: 12% 9%;
  border-radius: 44% 56% 51% 49%;
  background: linear-gradient(145deg, rgba(57, 201, 255, .38), rgba(21, 88, 214, .22));
  filter: blur(5px);
  transform: rotate(-7deg);
}
.hero-image img {
  position: relative;
  width: min(100%, 470px);
  border: 8px solid rgba(255, 255, 255, .88);
  border-radius: 42px;
  box-shadow: var(--shadow);
}
.actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 47px;
  border: 0;
  border-radius: 13px;
  padding: 13px 22px;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #3878ef);
  box-shadow: 0 12px 26px rgba(21, 88, 214, .24);
}
.btn-primary:hover { box-shadow: 0 16px 30px rgba(21, 88, 214, .30); }
.btn-outline { color: var(--primary); background: #fff; border: 1px solid var(--primary); }
.btn-success { background: #16864b; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-danger { background: #c62828; color: #fff; }
.btn-small { min-height: auto; padding: 8px 11px; font-size: 13px; }

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(219, 229, 244, .94);
  border-radius: 25px;
  padding: 30px;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow);
}
.card h1, .card h2 { color: var(--primary-dark); margin-top: 0; }

.auth-layout {
  display: grid;
  grid-template-columns: minmax(300px, .82fr) minmax(420px, 1.18fr);
  align-items: stretch;
  gap: 24px;
  width: min(990px, 100%);
  margin: 22px auto 50px;
}
.auth-showcase {
  position: relative;
  overflow: hidden;
  min-height: 580px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 20% 20%, rgba(82, 215, 255, .62), transparent 28%),
    linear-gradient(150deg, #0d3c9a 0%, #1558d6 50%, #2b8be9 100%);
  box-shadow: var(--shadow);
}
.auth-showcase::before,
.auth-showcase::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 50%;
}
.auth-showcase::before { width: 260px; height: 260px; left: -110px; top: -90px; }
.auth-showcase::after { width: 330px; height: 330px; right: -170px; bottom: -160px; }
.showcase-tag {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  font-size: 13px;
  font-weight: 800;
}
.showcase-content { position: relative; z-index: 2; width: 100%; }
.showcase-content img {
  width: min(100%, 285px);
  display: block;
  margin: 0 auto 18px;
  border: 5px solid rgba(255,255,255,.20);
  border-radius: 30px;
  box-shadow: 0 24px 42px rgba(4, 32, 93, .26);
}
.showcase-content h2 { margin: 0 0 10px; color: #fff; font-size: 28px; }
.showcase-content p { margin: 0; color: rgba(255,255,255,.86); line-height: 1.85; }
.showcase-pills { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px; }
.showcase-pills span { padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.13); font-size: 12px; font-weight: 700; }

.auth-card { width: 100%; margin: 0; padding: clamp(26px, 4vw, 42px); }
.auth-card::before {
  content: "{}";
  position: absolute;
  left: 22px;
  top: 14px;
  font-size: 76px;
  font-weight: 900;
  color: rgba(21, 88, 214, .055);
  direction: ltr;
}
.auth-heading { position: relative; z-index: 1; margin-bottom: 24px; }
.auth-eyebrow { color: var(--primary); font-size: 13px; font-weight: 900; letter-spacing: .2px; }
.auth-heading h1 { margin: 7px 0 9px; font-size: clamp(27px, 4vw, 37px); }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.75; }
.auth-card form { position: relative; z-index: 1; }
.auth-footer-note { margin: 20px 0 0; text-align: center; color: var(--muted); }
.auth-footer-note a { font-weight: 900; }
.auth-submit { width: 100%; margin-top: 4px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-group { margin-bottom: 17px; }
.form-grid .form-group { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 8px; color: #263653; font-weight: 800; }
input, select {
  width: 100%;
  min-height: 49px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--text);
  outline: none;
  font-size: 16px;
  transition: border .2s, box-shadow .2s, background .2s;
}
input:hover, select:hover { background: #fff; border-color: #bdcee7; }
input:focus, select:focus { background: #fff; border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(56,199,255,.16); }
.help { color: var(--muted); font-size: 13px; margin-top: 6px; line-height: 1.7; }

.errors { padding: 14px 18px; margin-bottom: 18px; border: 1px solid #f5c2bd; border-radius: 13px; background: #fff2f0; color: var(--danger); line-height: 1.8; }
.alert { padding: 14px 18px; margin-bottom: 18px; border-radius: 13px; font-weight: 700; }
.alert-success { background: #eaf8ef; color: var(--success); }
.alert-danger { background: #fff0ee; color: var(--danger); }
.alert-warning { background: #fff8df; color: var(--warning); }
.alert-info { background: #eef6ff; color: var(--primary-dark); }

.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 22px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: 0 12px 35px rgba(16,52,117,.07); }
.stat strong { display: block; font-size: 31px; color: var(--primary-dark); }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 18px; background: #fff; box-shadow: 0 12px 35px rgba(16,52,117,.06); }
table { width: 100%; min-width: 900px; border-collapse: collapse; }
th, td { padding: 13px 12px; border-bottom: 1px solid #edf1f7; text-align: right; vertical-align: middle; }
th { color: var(--primary-dark); background: #f3f7fd; }
.status { display: inline-block; padding: 6px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.status-pending { background: #fff3cd; color: #7a5a00; }
.status-approved { background: #dff6e8; color: #126a3c; }
.status-rejected { background: #fde5e2; color: #9f2118; }
.status-suspended { background: #eceff4; color: #475467; }
.filters { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; margin-bottom: 16px; }
.student-welcome { display: grid; grid-template-columns: 1fr 260px; gap: 28px; align-items: center; }
.student-welcome img { width: 100%; border-radius: 24px; box-shadow: 0 15px 35px rgba(21,88,214,.16); }
.profile-list { display: grid; gap: 10px; margin-top: 18px; }
.profile-item { padding: 12px 14px; border-radius: 10px; background: #f6f9fe; }
.footer { padding: 30px 15px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; width: min(690px, 100%); }
  .auth-showcase { min-height: 420px; }
  .showcase-content img { width: min(62%, 260px); }
}
@media (max-width: 800px) {
  .hero, .student-welcome { grid-template-columns: 1fr; }
  .hero-image { order: -1; }
  .form-grid, .stats, .filters { grid-template-columns: 1fr; }
  .dashboard-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  .page-shell { width: min(94%, 1180px); margin-top: 24px; }
  .topbar-inner { min-height: 68px; }
  .brand-logo-wrap { width: 49px; height: 49px; border-radius: 15px; }
  .brand-copy strong { font-size: 23px; }
  .brand-copy small { display: none; }
  .topbar-link { padding: 8px 11px; font-size: 13px; }
  .auth-showcase { min-height: 370px; padding: 25px; }
  .showcase-content img { width: min(68%, 225px); }
  .auth-card { padding: 25px 20px; border-radius: 21px; }
  .card { padding: 23px 19px; }
}

/* ===== Kodo v1.2: videos and subscriptions ===== */
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--text);
  outline: none;
  font: inherit;
  resize: vertical;
  transition: border .2s, box-shadow .2s, background .2s;
}
textarea:hover { background: #fff; border-color: #bdcee7; }
textarea:focus { background: #fff; border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(56,199,255,.16); }

.topbar-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.compact-actions { margin-top: 0; gap: 8px; align-items: center; }
.table-actions { min-width: 360px; }
.table-subtext { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.stats-five { grid-template-columns: repeat(5, 1fr); }
.stat-highlight {
  border-color: rgba(57, 201, 255, .55);
  background: linear-gradient(145deg, #f7fdff, #e9f7ff);
}
.admin-form-card { width: min(850px, 100%); margin-inline: auto; }
.field-help { display: block; margin-top: 7px; color: var(--muted); line-height: 1.7; }
.option-row { display: flex; gap: 18px; flex-wrap: wrap; }
.check-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: #f8fbff;
  cursor: pointer;
}
.check-option input { width: 19px; min-height: auto; height: 19px; margin: 0; }
.video-table-title { display: flex; align-items: center; gap: 12px; min-width: 300px; }
.video-table-title img { width: 95px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.video-table-title div { display: grid; gap: 7px; }
.video-table-title a { font-size: 12px; font-weight: 800; }

.access-card { width: min(980px, 100%); margin-inline: auto; }
.access-summary {
  display: grid;
  grid-template-columns: minmax(260px, .75fr) minmax(300px, 1.25fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 28px;
}
.access-note {
  display: flex;
  align-items: center;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef7ff, #f8fbff);
  color: var(--primary-dark);
  line-height: 1.9;
  font-weight: 700;
}
.video-access-list { display: grid; gap: 12px; margin: 16px 0 24px; }
.video-access-item {
  display: grid;
  grid-template-columns: 24px 118px 1fr;
  align-items: center;
  gap: 13px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: transform .2s, border .2s, box-shadow .2s;
}
.video-access-item:hover { transform: translateY(-1px); border-color: #a8c4ea; box-shadow: 0 10px 24px rgba(16,52,117,.07); }
.video-access-item > input { width: 19px; min-height: auto; height: 19px; margin: 0; }
.video-access-item > img { width: 118px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 11px; }
.video-access-copy { display: grid; gap: 6px; }
.video-access-copy span { color: var(--muted); font-size: 13px; }
.video-access-item.is-disabled { opacity: .62; background: #f6f7f9; }

.dashboard-kicker { color: var(--primary); font-size: 13px; font-weight: 900; }
.student-dashboard-head {
  padding: 28px;
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(81, 220, 255, .38), transparent 28%),
    linear-gradient(135deg, #0c3e9a, #1558d6 55%, #2686eb);
  box-shadow: var(--shadow);
}
.student-dashboard-head h1 { margin: 7px 0 8px; font-size: clamp(30px, 5vw, 46px); }
.student-dashboard-head p { margin: 0; color: rgba(255,255,255,.85); }
.student-dashboard-head .dashboard-kicker { color: #bfefff; }
.student-mini-profile {
  min-width: 220px;
  padding: 16px 18px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
}
.student-mini-profile strong, .student-mini-profile span { display: block; }
.student-mini-profile span { margin-top: 6px; color: rgba(255,255,255,.78); font-size: 13px; }
.student-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0 34px; }
.student-stats > div {
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 17px;
  background: rgba(255,255,255,.93);
  box-shadow: 0 10px 30px rgba(16,52,117,.06);
}
.student-stats span { color: var(--muted); font-size: 13px; }
.student-stats strong { display: block; margin-top: 5px; color: var(--primary-dark); font-size: 28px; }
.lessons-section { margin-top: 12px; }
.section-title-row { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.section-title-row h2 { margin: 6px 0 0; color: var(--primary-dark); font-size: 30px; }
.section-note { color: var(--muted); font-size: 13px; }
.lessons-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lesson-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(16,52,117,.08);
  transition: transform .2s, box-shadow .2s;
}
.lesson-card.is-unlocked:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(16,52,117,.14); }
.lesson-card.is-locked { background: #f7f9fc; }
.lesson-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #dce7f5; }
.lesson-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lesson-card.is-locked .lesson-thumb img { filter: grayscale(.65) brightness(.72); }
.lesson-number, .lesson-free-badge, .lesson-state-icon { position: absolute; z-index: 2; }
.lesson-number {
  top: 11px;
  right: 11px;
  min-width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: rgba(8, 40, 94, .85);
  font-weight: 900;
}
.lesson-free-badge {
  top: 11px;
  left: 11px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #fff;
  background: #16864b;
  font-size: 12px;
  font-weight: 900;
}
.lesson-state-icon {
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 4px solid rgba(255,255,255,.8);
  border-radius: 50%;
  color: #fff;
  background: rgba(21,88,214,.88);
  font-size: 22px;
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
}
.lesson-card.is-locked .lesson-state-icon { background: rgba(32,45,66,.78); font-size: 19px; }
.lesson-content { padding: 19px; }
.lesson-meta { color: var(--primary); font-size: 12px; font-weight: 900; }
.lesson-content h3 { margin: 8px 0 9px; color: var(--primary-dark); line-height: 1.55; font-size: 19px; }
.lesson-content p { min-height: 46px; margin: 0 0 15px; color: var(--muted); line-height: 1.75; font-size: 13px; }
.lesson-button { width: 100%; margin-top: 13px; }
.btn-locked { color: #667085; background: #e5e9ef; cursor: not-allowed; }
.btn-locked:hover { transform: none; }
.student-empty { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 24px; }
.student-empty img { width: 180px; border-radius: 24px; }
.empty-state { color: var(--muted); line-height: 1.8; }

.watch-heading h1 { margin: 7px 0 5px; }
.watch-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow);
}
.video-player { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #071329; }
.video-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.watch-description { padding: 26px 28px; }
.watch-description h2 { margin: 0 0 10px; color: var(--primary-dark); }
.watch-description p { margin: 0; color: var(--muted); line-height: 2; }

@media (max-width: 1050px) {
  .stats-five { grid-template-columns: repeat(3, 1fr); }
  .lessons-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .student-stats { grid-template-columns: 1fr; }
  .section-title-row { align-items: flex-start; flex-direction: column; }
  .access-summary { grid-template-columns: 1fr; }
  .stats-five { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .lessons-grid { grid-template-columns: 1fr; }
  .video-access-item { grid-template-columns: 22px 88px 1fr; }
  .video-access-item > img { width: 88px; }
  .student-empty { grid-template-columns: 1fr; text-align: center; }
  .student-empty img { margin: auto; }
  .topbar-nav { gap: 5px; }
  .topbar-nav .topbar-link { padding: 7px 8px; }
}
@media (max-width: 460px) {
  .stats-five { grid-template-columns: 1fr; }
  .video-access-item { grid-template-columns: 22px 1fr; }
  .video-access-item > img { display: none; }
  .student-mini-profile { min-width: 100%; }
}

/* ===== Kodo v1.3: quizzes and question bank ===== */
.stats-six { grid-template-columns: repeat(6, 1fr); }
.quiz-table-actions { min-width: 330px; }
.content-access-block + .content-access-block {
  margin-top: 34px;
  padding-top: 34px;
  border-top: 1px dashed #cbd9ed;
}
.quiz-access-list { display: grid; gap: 12px; margin: 16px 0 24px; }
.quiz-access-item {
  display: grid;
  grid-template-columns: 24px 58px 1fr;
  align-items: center;
  gap: 13px;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  cursor: pointer;
  transition: transform .2s, border .2s, box-shadow .2s;
}
.quiz-access-item:hover { transform: translateY(-1px); border-color: #a8c4ea; box-shadow: 0 10px 24px rgba(16,52,117,.07); }
.quiz-access-item > input { width: 19px; min-height: auto; height: 19px; margin: 0; }
.quiz-access-item.is-disabled { opacity: .62; background: #f6f7f9; }
.quiz-access-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, var(--primary), #5d8df4);
  font-size: 27px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(21,88,214,.18);
}
.admin-question-list { display: grid; gap: 14px; }
.admin-question-card {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 15px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fff, #f8fbff);
}
.question-index {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}
.admin-question-copy { display: grid; gap: 7px; }
.admin-question-copy strong { color: var(--primary-dark); line-height: 1.75; }
.admin-question-copy span { color: var(--success); font-size: 13px; }
.admin-question-copy small { color: var(--muted); line-height: 1.65; }
.question-empty { display: grid; grid-template-columns: 160px 1fr; align-items: center; gap: 24px; }
.question-empty img { width: 160px; border-radius: 24px; }
.question-form-card { width: min(900px, 100%); }
.question-options-editor {
  margin: 22px 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: #f7fbff;
}
.question-options-editor h2 { margin: 0 0 15px; font-size: 20px; }
.option-editor-row {
  display: grid;
  grid-template-columns: 58px 1fr;
  align-items: center;
  gap: 11px;
  margin-bottom: 11px;
}
.correct-choice {
  display: grid;
  place-items: center;
  margin: 0;
  cursor: pointer;
}
.correct-choice input { position: absolute; opacity: 0; pointer-events: none; }
.correct-choice span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #bfd0e8;
  border-radius: 14px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 900;
  transition: .2s;
}
.correct-choice input:checked + span {
  border-color: #16864b;
  color: #fff;
  background: #16864b;
  box-shadow: 0 8px 20px rgba(22,134,75,.2);
}
.student-stats-four { grid-template-columns: repeat(4, 1fr); }
.student-stats small { display: block; margin-top: 4px; color: var(--muted); }
.quizzes-section { margin-top: 54px; }
.quiz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.quiz-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 21px;
  background: #fff;
  box-shadow: 0 16px 42px rgba(16,52,117,.08);
  transition: transform .2s, box-shadow .2s;
}
.quiz-card.is-unlocked:hover { transform: translateY(-4px); box-shadow: 0 22px 46px rgba(16,52,117,.14); }
.quiz-card.is-locked { background: #f7f9fc; }
.quiz-card-top {
  position: relative;
  min-height: 145px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 20%, rgba(83,220,255,.55), transparent 28%),
    linear-gradient(135deg, #0d3d96, #1558d6 58%, #2f90ee);
}
.quiz-card.is-locked .quiz-card-top { filter: grayscale(.45); opacity: .8; }
.quiz-card-top::after {
  content: "{}";
  position: absolute;
  left: 16px;
  bottom: -18px;
  color: rgba(255,255,255,.13);
  font-size: 88px;
  font-weight: 900;
  direction: ltr;
}
.quiz-icon {
  position: relative;
  z-index: 2;
  width: 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border: 5px solid rgba(255,255,255,.85);
  border-radius: 24px;
  color: var(--primary-dark);
  background: #fff;
  font-size: 42px;
  font-weight: 900;
  box-shadow: 0 15px 35px rgba(0,0,0,.18);
}
.quiz-number {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: rgba(6,33,83,.75);
  font-weight: 900;
}
.quiz-card-top .lesson-free-badge { z-index: 3; }
.quiz-lock { position: absolute; left: 50%; bottom: 9px; z-index: 3; transform: translateX(-50%); font-size: 21px; }
.quiz-card-content { padding: 20px; }
.quiz-card-content h3 { margin: 8px 0 9px; color: var(--primary-dark); line-height: 1.55; font-size: 19px; }
.quiz-card-content p { min-height: 68px; margin: 0 0 14px; color: var(--muted); line-height: 1.75; font-size: 13px; }
.quiz-best-result {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 11px;
  color: #0d4d2d;
  background: #eaf8f0;
  font-size: 13px;
}
.quiz-history-note {
  margin: 0 0 18px;
  padding: 14px 17px;
  border: 1px solid #cfe0f6;
  border-radius: 15px;
  background: #f4f9ff;
  color: var(--primary-dark);
}
.quiz-taking-card { width: min(950px, 100%); margin-inline: auto; }
.quiz-instructions {
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #eef7ff, #f9fcff);
}
.quiz-instructions p { margin: 8px 0 0; color: var(--muted); line-height: 1.9; }
.quiz-question-stack { display: grid; gap: 18px; }
.quiz-question-card {
  min-width: 0;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
}
.quiz-question-card legend {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 0 0 15px;
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.7;
}
.quiz-question-card legend span {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--primary);
  font-size: 15px;
}
.answer-options { display: grid; gap: 10px; }
.answer-option {
  display: grid;
  grid-template-columns: 22px 40px 1fr;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid #dce6f4;
  border-radius: 14px;
  background: #fbfdff;
  cursor: pointer;
  transition: .2s;
}
.answer-option:hover { border-color: #9ebce7; background: #f3f8ff; transform: translateX(-2px); }
.answer-option input { width: 19px; height: 19px; min-height: auto; margin: 0; }
.answer-letter {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--primary-dark);
  background: #eaf2ff;
  font-weight: 900;
}
.answer-option:has(input:checked) { border-color: var(--primary); background: #edf4ff; box-shadow: 0 0 0 3px rgba(21,88,214,.08); }
.answer-option:has(input:checked) .answer-letter { color: #fff; background: var(--primary); }
.quiz-submit { width: 100%; margin-top: 24px; min-height: 55px; }
.result-hero {
  display: grid;
  grid-template-columns: 190px 1fr;
  align-items: center;
  gap: 28px;
  padding: 30px;
  border-radius: 27px;
  color: #fff;
  box-shadow: var(--shadow);
}
.result-hero.excellent { background: linear-gradient(135deg, #0c7844, #19a45f); }
.result-hero.good { background: linear-gradient(135deg, #0c4aa0, #237fe5); }
.result-hero.needs-work { background: linear-gradient(135deg, #a55a00, #e68a12); }
.result-hero img { width: 190px; border: 6px solid rgba(255,255,255,.28); border-radius: 26px; }
.result-hero span { color: rgba(255,255,255,.8); font-weight: 800; }
.result-hero h1 { display: inline-block; margin: 7px 12px 7px 0; font-size: clamp(38px, 7vw, 70px); }
.result-hero strong { font-size: 28px; }
.result-hero p { margin: 0; font-size: 17px; }
.result-actions { justify-content: center; margin: 22px 0 45px; }
.result-review { margin-top: 20px; }
.result-answer-list { display: grid; gap: 16px; }
.result-answer-card {
  padding: 22px;
  border: 1px solid var(--border);
  border-right: 6px solid #16864b;
  border-radius: 19px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16,52,117,.06);
}
.result-answer-card.wrong { border-right-color: #c62828; }
.result-question-title { display: flex; align-items: flex-start; gap: 11px; }
.result-question-title span {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}
.result-question-title h3 { margin: 3px 0 16px; color: var(--primary-dark); line-height: 1.7; }
.result-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 9px;
  padding: 12px 14px;
  border-radius: 13px;
  background: #f5f8fc;
}
.result-choice em { margin-inline-start: auto; font-style: normal; font-weight: 900; }
.result-answer-card.correct .selected-choice em { color: #16864b; }
.result-answer-card.wrong .selected-choice em { color: #c62828; }
.correct-choice-result { color: #0d5f35; background: #eaf8f0; }
.answer-explanation {
  margin-top: 12px;
  padding: 13px 15px;
  border-radius: 13px;
  color: #6a4a00;
  background: #fff8df;
  line-height: 1.8;
}

@media (max-width: 1120px) {
  .stats-six { grid-template-columns: repeat(3, 1fr); }
  .student-stats-four { grid-template-columns: repeat(2, 1fr); }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .admin-question-card { grid-template-columns: 42px 1fr; }
  .admin-question-card > .actions { grid-column: 1 / -1; }
  .question-empty, .result-hero { grid-template-columns: 1fr; text-align: center; }
  .question-empty img, .result-hero img { margin: auto; }
  .quiz-grid { grid-template-columns: 1fr; }
  .quiz-question-card { padding: 17px; }
}
@media (max-width: 520px) {
  .stats-six, .student-stats-four { grid-template-columns: 1fr; }
  .quiz-access-item { grid-template-columns: 22px 48px 1fr; }
  .quiz-access-icon { width: 46px; height: 46px; }
  .answer-option { grid-template-columns: 20px 34px 1fr; padding: 11px; }
  .answer-letter { width: 32px; height: 32px; }
  .result-choice em { width: 100%; margin: 4px 0 0; }
}


/* ===== Kodo v1.4: mascot-led questions and optional hints ===== */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.kodo-question-card {
  padding: 0 22px 22px;
  overflow: hidden;
  border-color: #cddcf1;
  background: linear-gradient(180deg, #f5f9ff 0, #fff 210px);
  box-shadow: 0 13px 34px rgba(16, 52, 117, .075);
}
.kodo-question-row {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  margin: 0 -4px 20px;
  padding-top: 18px;
}
.kodo-question-mascot {
  position: relative;
  display: grid;
  justify-items: center;
  align-self: start;
}
.kodo-question-mascot img {
  width: 108px;
  height: 108px;
  object-fit: cover;
  object-position: center;
  border: 5px solid #fff;
  border-radius: 28px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(16, 52, 117, .16);
}
.kodo-question-mascot span {
  position: relative;
  z-index: 2;
  margin-top: -11px;
  padding: 5px 13px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #2589eb);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 7px 15px rgba(21, 88, 214, .25);
}
.kodo-speech-bubble {
  position: relative;
  min-height: 130px;
  padding: 19px 20px;
  border: 2px solid #cfe0f7;
  border-radius: 23px 23px 7px 23px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(16, 52, 117, .07);
}
.kodo-speech-bubble::before {
  content: '';
  position: absolute;
  right: -16px;
  bottom: 21px;
  width: 28px;
  height: 28px;
  border-right: 2px solid #cfe0f7;
  border-bottom: 2px solid #cfe0f7;
  background: #fff;
  transform: rotate(-45deg);
}
.kodo-speech-heading {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  color: var(--primary);
  font-size: 13px;
}
.question-number-pill {
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--primary);
  font-weight: 900;
}
.kodo-speech-bubble h2 {
  position: relative;
  z-index: 1;
  margin: 11px 0 13px;
  color: var(--primary-dark);
  font-size: clamp(18px, 2.5vw, 23px);
  line-height: 1.75;
}
.kodo-hint-button {
  position: relative;
  z-index: 1;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #f0c153;
  border-radius: 12px;
  color: #7a4b00;
  background: linear-gradient(135deg, #fff9db, #fff2ae);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition: .2s;
}
.kodo-hint-button:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(188, 129, 0, .15); }
.kodo-hint-button.is-used { border-color: #a8d7bd; color: #0d683b; background: #eaf8f0; }
.kodo-hint-box {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 13px;
  padding: 12px 14px;
  border: 1px dashed #e5af28;
  border-radius: 15px;
  color: #5a4200;
  background: #fffaf0;
  animation: kodoHintIn .28s ease both;
}
.kodo-hint-box[hidden] { display: none !important; }
.kodo-hint-box img { width: 52px; height: 52px; object-fit: cover; border-radius: 14px; }
.kodo-hint-box strong { color: #8a5900; }
.kodo-hint-box p { margin: 4px 0 0; line-height: 1.75; }
.kodo-thinking-note {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 13px;
}
.hint-used-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: 999px;
  color: #765000;
  background: #fff4c7;
  font-size: 12px;
  font-weight: 800;
}
.admin-hint-preview { color: #8a5900 !important; }
@keyframes kodoHintIn {
  from { opacity: 0; transform: translateY(-6px) scale(.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 650px) {
  .kodo-question-card { padding: 0 14px 17px; }
  .kodo-question-row { grid-template-columns: 70px minmax(0, 1fr); gap: 9px; }
  .kodo-question-mascot img { width: 67px; height: 67px; border-width: 3px; border-radius: 19px; }
  .kodo-question-mascot span { margin-top: -7px; padding: 3px 9px; font-size: 10px; }
  .kodo-speech-bubble { min-height: 0; padding: 14px; border-radius: 18px 18px 6px 18px; }
  .kodo-speech-bubble::before { right: -10px; bottom: 18px; width: 18px; height: 18px; }
  .kodo-speech-bubble h2 { margin-top: 8px; font-size: 17px; }
  .kodo-hint-box { grid-template-columns: 40px 1fr; padding: 10px; }
  .kodo-hint-box img { width: 40px; height: 40px; }
}
