/* ==========================================================================
   Thầy Đạt Chứng Khoán — one stylesheet for the whole site.
   Tokens come from the design system (Homepage v2 / Khóa học / Môn học).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Ink and accent */
  --navy: oklch(0.27 0.09 262);          /* headings, brand, dark bands */
  --navy-hover: oklch(0.22 0.08 262);
  --navy-deep: oklch(0.22 0.07 262);     /* footer */
  --blue: oklch(0.53 0.19 260);          /* the one enrollment accent */
  --blue-hover: oklch(0.47 0.18 260);
  --blue-link-hover: oklch(0.45 0.18 260);
  --blue-soft: oklch(0.95 0.03 260);     /* number discs, selected option */
  --blue-3mr: oklch(0.8 0.1 255);        /* 3MR figures on dark */

  /* Text */
  --text: oklch(0.24 0.03 262);
  --text-2: oklch(0.38 0.03 262);
  --muted: oklch(0.42 0.03 262);
  --muted-2: oklch(0.45 0.03 262);
  --muted-3: oklch(0.5 0.03 262);

  /* Text on dark */
  --on-dark: #fff;
  --on-dark-1: oklch(0.96 0.02 260);
  --on-dark-2: oklch(0.9 0.03 262);
  --on-dark-3: oklch(0.86 0.03 262);
  --on-dark-4: oklch(0.85 0.04 262);

  /* Surfaces */
  --white: #fff;
  --tint: oklch(0.965 0.012 255);        /* hero, risk note, info panels */
  --tint-2: oklch(0.975 0.008 255);      /* alternating sections */
  --field-bg: oklch(0.97 0.008 255);

  /* Lines */
  --line: oklch(0.92 0.01 262);
  --line-2: oklch(0.9 0.015 262);
  --line-field: oklch(0.88 0.02 262);
  --line-btn: oklch(0.85 0.03 262);
  --line-strong: oklch(0.75 0.02 262);

  --error: oklch(0.45 0.16 350);

  /* Shadows */
  --shadow-card: 0 10px 30px -14px oklch(0.27 0.09 262 / 0.25);
  --shadow-item: 0 8px 26px -14px oklch(0.27 0.09 262 / 0.28);
  --shadow-panel: 0 18px 44px -16px oklch(0.27 0.09 262 / 0.3);
  --shadow-float: 0 18px 40px -12px oklch(0.27 0.09 262 / 0.28);
  --shadow-book: 0 14px 30px -14px oklch(0.27 0.09 262 / 0.4);

  /* Type */
  --font: 'Be Vietnam Pro', system-ui, sans-serif;
  --fs-body: 17px;
  --lh-body: 1.7;

  /* Shape and layout */
  --radius-btn: 4px;
  --radius: 6px;
  --gutter: clamp(20px, 5vw, 72px);
  --section-y: clamp(56px, 8vw, 104px);
  --max: 1200px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--text);
  background: var(--white);
  font-feature-settings: 'tnum' 1;
  text-wrap: pretty;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { color: var(--navy); margin: 0; }
p { margin: 0; }
a { color: var(--blue); }
a:hover { color: var(--blue-link-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
::selection { background: var(--blue-soft); }
[hidden] { display: none !important; }

.container { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.bg-tint-2 { background: var(--tint-2); }
.center { text-align: center; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: var(--radius-btn);
}
.skip-link:focus { left: 8px; color: #fff; }

/* ---------- Type roles ---------- */
.eyebrow {
  margin: 0 0 12px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--blue);
}
.eyebrow-lg { font-size: 13px; letter-spacing: 0.12em; margin-bottom: 18px; }
.label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--muted-2);
}
.display {
  font-weight: 800; line-height: 1.12; letter-spacing: -0.02em;
  font-size: clamp(34px, 5vw, 64px);
}
.h2 {
  font-weight: 700; line-height: 1.25;
  font-size: clamp(26px, 3vw, 36px);
}
.lead { font-size: 18px; color: var(--muted); }
.body-muted { color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 14px 22px;
  border: 0; border-radius: var(--radius-btn);
  font-family: inherit; font-weight: 600; font-size: 13px; letter-spacing: 0.06em;
  line-height: 1.3; text-align: center; text-decoration: none; cursor: pointer;
  transition: background-color .15s, box-shadow .15s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-hover); color: #fff; }
.btn-primary:active { background: var(--navy); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-hover); color: #fff; }
.btn-outline { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line-btn); }
.btn-outline:hover { color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--blue); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--blue-soft); color: var(--navy); }
.btn-sm { min-height: 44px; padding: 12px 18px; font-size: 12px; letter-spacing: 0.08em; }
.btn-lg { min-height: 52px; padding: 16px 26px; font-size: 14px; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Navigation (identical on every page) ---------- */
.site-header {
  background: #fff;
  box-shadow: 0 1px 0 var(--line);
  position: relative; z-index: 10;
}
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px clamp(16px, 3vw, 36px);
  padding: 16px var(--gutter);
}
.brand {
  display: flex; flex-direction: column; line-height: 1;
  text-decoration: none; color: var(--navy); margin-right: auto;
}
.brand:hover { color: var(--navy); }
.brand-name { font-weight: 800; font-size: 20px; letter-spacing: 0.02em; white-space: nowrap; }
.brand-sub { font-weight: 600; font-size: 10px; letter-spacing: 0.28em; color: var(--blue); margin-top: 4px; }
.nav-links {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: clamp(16px, 2vw, 28px);
  font-size: 13px; font-weight: 600; letter-spacing: 0.06em; white-space: nowrap;
}
.nav-links a { color: var(--navy); text-decoration: none; display: inline-block; padding: 10px 0; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--blue); }
.nav-cta { white-space: nowrap; }
.nav-toggle { display: none; }

@media (max-width: 999px) {
  .nav-toggle { display: inline-flex; order: 2; }
  .nav-cta { order: 3; }
  .nav-links {
    order: 4; flex-basis: 100%;
    flex-direction: column; gap: 0;
    font-size: 14px;
    border-top: 1px solid var(--line);
    padding-top: 4px;
  }
  .nav-links a { display: block; padding: 12px 0; }
  .js .nav-links:not(.is-open) { display: none; }
}
@media (max-width: 420px) {
  .site-nav { gap: 10px; }
  .nav-cta { padding: 12px 12px; }
  .nav-toggle { padding: 12px 12px; }
}

/* ---------- Footer (identical on every page) ---------- */
.site-footer {
  background: var(--navy-deep); color: var(--on-dark-3);
  padding: 40px var(--gutter) 48px;
  font-size: 14.5px; line-height: 1.7;
}
.footer-grid {
  max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px 48px;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--on-dark-1); }

/* ---------- Home: hero ---------- */
.hero { background: var(--tint); overflow: hidden; }
.hero-inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) 0;
  display: flex; flex-wrap: wrap-reverse; align-items: center;
  gap: 32px clamp(32px, 5vw, 72px);
}
.hero-copy { flex: 1 1 440px; min-width: 0; padding-bottom: clamp(32px, 4vw, 64px); }
.hero h1 { max-width: 14ch; }
.hero-accent {
  color: var(--blue);
  text-decoration: underline; text-decoration-thickness: 4px; text-underline-offset: 8px;
}
.hero .btn-row { margin-top: 32px; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 12px 32px; margin-top: 36px;
  font-size: 14px; line-height: 1.5; color: var(--muted);
}
.hero-facts strong { display: block; font-weight: 700; color: var(--navy); }
.hero-photo {
  flex: 1 1 360px; min-width: 0; position: relative;
  display: flex; justify-content: center; align-self: flex-start;
}
.hero-blob {
  position: absolute; width: 88%; aspect-ratio: 1; top: 6%; left: 6%;
  background: #fff;
  border-radius: 58% 42% 55% 45% / 45% 55% 45% 55%;
}
.hero-frame {
  position: relative; width: min(100%, 440px); aspect-ratio: 4 / 5;
  border-radius: 48% 52% 0 0 / 38% 42% 0 0; overflow: hidden;
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 22%; }

/* ---------- Home: media strip ---------- */
.media-band {
  background: var(--navy); color: #fff; text-align: center;
  padding: clamp(28px, 4vw, 44px) var(--gutter);
}
.media-band .eyebrow { color: var(--on-dark-4); letter-spacing: 0.16em; margin: 0; }
.media-logos {
  list-style: none; margin: 22px 0 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px clamp(24px, 4vw, 56px);
}
.media-logos img { width: 120px; height: 40px; object-fit: contain; opacity: 0.9; }
.media-logos .media-logo-color { width: auto; height: 48px; opacity: 1; border-radius: 4px; } /* full-colour logos (one cut from a studio photo) keep their own look */
.media-logos .media-logo-cover { height: 72px; } /* a journal cover: at 48px its title is unreadable */

/* ---------- Home: about ---------- */
.about {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 48px clamp(32px, 6vw, 88px);
}
.about-copy { flex: 1 1 380px; min-width: 0; }
.about-copy h2 { max-width: 20ch; }
.about-copy > p { margin-top: 18px; max-width: 48ch; color: var(--muted); }
.dash-list {
  margin: 20px 0 0; padding: 0; list-style: none;
  display: grid; gap: 10px; font-size: 16px; line-height: 1.5;
}
.dash-list li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; }
.dash-list li::before { content: '—'; color: var(--blue); font-weight: 700; }
.about-copy .btn { margin-top: 28px; }
.about-figure { flex: 1.2 1 420px; min-width: 0; margin: 0; }
.about-figure img {
  width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover;
  object-position: 50% 88%; /* keep the group, crop the ceiling */
  border-radius: var(--radius);
}

/* ---------- Home: programme cards ---------- */
.programs h2 { margin: 0 auto; max-width: 22ch; }
.programs .intro { margin: 14px auto 0; max-width: 52ch; color: var(--muted); }
.program-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px; margin-top: clamp(36px, 5vw, 56px);
  max-width: 1080px; margin-inline: auto;
}
.program-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 32px 28px; text-align: center;
}
.program-card .disc {
  width: 48px; height: 48px; margin: 0 auto; border-radius: 50%;
  background: var(--blue); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 16px;
}
.program-card h3 { margin-top: 18px; font-weight: 700; font-size: 19px; line-height: 1.4; }
.program-card p { margin-top: 10px; font-size: 15.5px; line-height: 1.65; color: var(--muted); }
.program-card .btn { margin-top: 20px; }
.program-card.is-featured {
  background: var(--blue); color: #fff;
  box-shadow: 0 18px 40px -14px oklch(0.53 0.19 260 / 0.55);
}
.program-card.is-featured h3 { color: #fff; }
.program-card.is-featured p { color: var(--on-dark-1); }
.program-card.is-featured .disc { background: #fff; color: var(--blue); }

/* ---------- Home: 3MR ---------- */
.principles { position: relative; overflow: hidden; color: #fff; }
.principles-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 40%;
}
.principles::after { content: ''; position: absolute; inset: 0; background: oklch(0.27 0.09 262 / 0.9); }
.principles-inner {
  position: relative; z-index: 1;
  max-width: 1080px; margin: 0 auto; text-align: center;
  padding: clamp(56px, 8vw, 96px) var(--gutter);
}
.principles h2 { color: #fff; }
.principles-inner > p { margin: 12px auto 0; max-width: 54ch; color: var(--on-dark-2); }
.principle-grid {
  list-style: none; margin: 40px 0 0; padding: 0; text-align: left;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
}
.principle {
  background: oklch(1 0 0 / 0.08); box-shadow: inset 0 0 0 1px oklch(1 0 0 / 0.18);
  border-radius: var(--radius); padding: 24px 22px;
}
.principle .en { font-weight: 800; font-size: 28px; line-height: 1.3; color: var(--blue-3mr); }
.principle h3 { margin-top: 8px; font-size: 17px; color: #fff; }
.principle p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--on-dark-2); }

/* ---------- Numbered modules + price card ---------- */
.offer { display: flex; flex-wrap: wrap; gap: 40px clamp(32px, 5vw, 72px); margin-top: 36px; align-items: flex-start; }
.module-list {
  flex: 2 1 480px; min-width: 0; list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px 36px;
}
.module-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: start; }
.num-disc {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-link-hover);
  display: grid; place-items: center; font-weight: 700; font-size: 15px;
}
.module-list strong { display: block; font-size: 16.5px; line-height: 1.4; color: var(--navy); }
.module-list span.desc { display: block; font-size: 14.5px; line-height: 1.55; margin-top: 4px; color: var(--muted-2); }

.price-card {
  flex: 1 1 300px; min-width: 0; max-width: 400px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-panel);
  padding: 28px;
}
.price { font-weight: 800; font-size: clamp(34px, 3.6vw, 42px); line-height: 1.15; margin-top: 6px; color: var(--navy); }
.price-note { font-size: 14.5px; line-height: 1.55; margin-top: 6px; color: var(--muted-2); }
.facts { display: grid; gap: 12px; margin: 22px 0 0; font-size: 15px; line-height: 1.5; }
.facts div { display: flex; justify-content: space-between; gap: 16px; }
.facts dt { color: var(--muted-2); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }
.price-card .btn-block { margin-top: 24px; min-height: 52px; font-size: 14px; }
.price-card .btn-pair { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.price-card .btn-pair .btn { flex: 1 1 150px; min-height: 46px; padding: 12px; white-space: nowrap; }
.price-card .risk-small { margin-top: 18px; font-size: 13.5px; line-height: 1.6; color: var(--muted-2); }

/* ---------- Home: books ---------- */
.book-grid {
  list-style: none; margin: 36px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 32px;
}
.book-cover {
  max-width: 240px; aspect-ratio: 2 / 3; border-radius: var(--radius-btn); overflow: hidden;
  box-shadow: var(--shadow-book); background: var(--tint);
}
.book-cover img { width: 100%; height: 100%; object-fit: cover; }
.book h3 { margin-top: 16px; font-size: 17px; line-height: 1.4; }
.book .byline { margin-top: 4px; font-size: 14.5px; color: var(--muted-2); }
.book-price { display: flex; align-items: baseline; gap: 10px; margin-top: 10px; }
.book-price strong { font-weight: 800; font-size: 22px; color: var(--navy); }
.book-price s { font-size: 15px; color: var(--muted-3); }
.book .btn { margin-top: 14px; }

/* ---------- Home: testimonials + risk ---------- */
.testimonials h2 { margin: 0 auto; max-width: 22ch; }
.quote-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-top: 40px;
}
.quote {
  margin: 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 28px;
}
.quote-mark { font-weight: 800; font-size: 40px; line-height: 1; color: var(--blue); }
.quote blockquote { margin: 6px 0 0; font-size: 16.5px; line-height: 1.65; }
.quote figcaption { margin-top: 18px; font-size: 14px; line-height: 1.5; color: var(--muted-2); }
.quote figcaption strong { color: var(--navy); }
/* A quote with the student's photo */
.quote-photo {
  max-width: 880px; margin-inline: auto;
  display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 28px; align-items: center;
}
.quote-photo .portrait { border-radius: var(--radius); overflow: hidden; aspect-ratio: 1; }
.quote-photo .portrait img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.03); }
@media (max-width: 640px) {
  .quote-photo { grid-template-columns: minmax(0, 1fr); }
  .quote-photo .portrait { max-width: 220px; }
}

.risk-note { margin-top: 48px; background: var(--tint); border-radius: var(--radius); padding: 24px 28px; }
.risk-note h3 { font-size: 17px; }
.risk-note p { margin-top: 8px; font-size: 16px; line-height: 1.65; max-width: 80ch; }

/* ---------- Contact band ---------- */
.contact-band { background: var(--blue); color: #fff; padding: clamp(48px, 6vw, 72px) var(--gutter); }
.contact-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px;
}
.contact-band h2 { color: #fff; font-size: clamp(24px, 2.8vw, 32px); line-height: 1.25; }
.contact-band p { margin-top: 8px; color: var(--on-dark-1); }
.contact-band .btn { min-height: 52px; padding: 16px 22px; font-size: 14px; letter-spacing: 0.04em; }

/* ---------- Zalo QR popup (built by js/main.js, opens from any Zalo link) ---------- */
.zalo-dialog {
  width: min(360px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  padding: 0; border: 0; border-radius: var(--radius);
  background: #fff; color: var(--text); box-shadow: var(--shadow-panel);
}
.zalo-dialog::backdrop { background: oklch(0.22 0.07 262 / 0.6); }
.zalo-dialog-inner { padding: 24px; display: grid; gap: 16px; text-align: center; }
.zalo-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; }
.zalo-dialog h2 { font-size: 20px; line-height: 1.3; }
.zalo-close {
  width: 44px; height: 44px; flex: none; border: 0; border-radius: var(--radius-btn);
  background: var(--tint); color: var(--navy); font-family: inherit; font-size: 24px; line-height: 1; cursor: pointer;
}
.zalo-close:hover { background: var(--blue-soft); }
/* The QR photo has a white margin round the card, so clip to the card itself */
.zalo-dialog img { width: 100%; height: auto; clip-path: inset(2.2% 4% 2.4% 4% round 12px); margin: -2% 0; }
.zalo-dialog .btn { width: 100%; }

/* ---------- Course page ---------- */
.page-head { background: var(--tint); }
.page-head-inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(28px, 4vw, 44px);
}
.page-head h1 { font-size: clamp(34px, 4.6vw, 56px); max-width: 18ch; }
.page-head .lead { margin-top: 18px; max-width: 56ch; }
.tabs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
}
.tab {
  display: block; text-align: left; cursor: pointer; font-family: inherit;
  border: 0; border-radius: var(--radius); padding: 18px 20px; min-height: 44px;
  background: #fff; color: var(--navy); box-shadow: 0 8px 24px -14px oklch(0.27 0.09 262 / 0.3);
  text-decoration: none;
}
.tab:hover { color: var(--navy); box-shadow: 0 8px 24px -14px oklch(0.27 0.09 262 / 0.3), inset 0 0 0 1.5px var(--blue); }
.tab[aria-selected="true"] {
  background: var(--blue); color: #fff;
  box-shadow: 0 14px 30px -14px oklch(0.53 0.19 260 / 0.6);
}
.tab .t-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; opacity: 0.8; }
.tab .t-name { display: block; font-size: 17px; font-weight: 700; line-height: 1.35; margin-top: 4px; }
.tab .t-meta { display: block; font-size: 14px; line-height: 1.5; margin-top: 4px; opacity: 0.85; }

.syllabus {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) var(--gutter) clamp(56px, 8vw, 96px);
  display: flex; flex-wrap: wrap; gap: 40px clamp(32px, 5vw, 72px); align-items: flex-start;
}
.syllabus-main { flex: 2 1 520px; min-width: 0; }
.course-panel + .course-panel { margin-top: 72px; }
.js .course-panel + .course-panel { margin-top: 0; }
.course-panel .sub { margin-top: 6px; font-size: 16px; color: var(--muted-2); }
.course-intro { display: grid; gap: 18px; margin: 28px 0 0; }
.course-intro dd { margin: 6px 0 0; max-width: 64ch; }
.lessons-head { margin-top: 40px; }
.lessons { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.lesson {
  display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: start;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-item);
  padding: 22px 24px;
}
.lesson-num {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue-link-hover); line-height: 1;
}
.lesson-num small { font-size: 10px; font-weight: 600; letter-spacing: 0.08em; }
.lesson-num b { font-size: 19px; font-weight: 800; margin-top: 3px; }
.lesson h4 { font-weight: 700; font-size: 18px; line-height: 1.4; padding-top: 4px; }
.lesson ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.lesson ul li {
  display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px;
  font-size: 15.5px; line-height: 1.6; color: var(--text-2);
}
.lesson ul li::before { content: '–'; color: var(--blue); font-weight: 700; }
.lessons-note { margin-top: 16px; font-size: 15px; color: var(--muted-2); }
@media (max-width: 480px) {
  .lesson { grid-template-columns: 48px minmax(0, 1fr); gap: 14px; padding: 18px; }
  .lesson-num { width: 48px; height: 48px; }
}
.syllabus .price-card { position: sticky; top: 24px; }

/* ---------- Môn học page ---------- */
.login-wrap { background: var(--tint); flex: 1; }
.login-inner {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vw, 96px) var(--gutter);
  display: flex; flex-wrap: wrap; gap: 40px clamp(40px, 7vw, 112px); align-items: center;
}
.login-copy { flex: 1.2 1 420px; min-width: 0; }
.login-copy h1 { font-weight: 800; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.14; letter-spacing: -0.02em; max-width: 16ch; }
.login-copy .lead { margin-top: 18px; max-width: 48ch; }
.subject-mini { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; max-width: 520px; }
.subject-mini li {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; align-items: center;
  background: #fff; border-radius: var(--radius); padding: 16px 18px;
  box-shadow: 0 8px 24px -14px oklch(0.27 0.09 262 / 0.3);
}
.code-disc {
  width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 13px;
}
.subject-mini strong { display: block; font-size: 17px; color: var(--navy); }
.subject-mini span.meta { display: block; font-size: 14px; color: var(--muted-2); }

.form-card {
  flex: 1 1 340px; min-width: 0; max-width: 420px;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-panel);
  padding: 32px; display: grid; gap: 18px;
}
.form-card h2 { font-size: 24px; line-height: 1.3; }
.form-card .hint { margin-top: 6px; font-size: 14.5px; line-height: 1.55; color: var(--muted-2); }
.field { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--navy); }
.input {
  font-family: inherit; font-size: 16px; color: var(--text);
  padding: 12px 14px; min-height: 48px; width: 100%;
  border: 0; border-radius: var(--radius-btn);
  background: var(--field-bg); box-shadow: inset 0 0 0 1.5px var(--line-field);
}
.input:hover { box-shadow: inset 0 0 0 1.5px var(--line-btn); }
.input:focus { box-shadow: inset 0 0 0 2px var(--blue); outline: none; }
.form-error { font-size: 14px; color: var(--error); }
.form-card .btn { min-height: 52px; font-size: 14px; }
.form-card .small { font-size: 13.5px; line-height: 1.55; color: var(--muted-2); }

/* Sign in / sign up switch */
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: var(--radius); background: var(--tint);
}
.auth-tab {
  min-height: 44px; border: 0; border-radius: var(--radius-btn); cursor: pointer;
  font-family: inherit; font-size: 16px; font-weight: 700;
  background: transparent; color: var(--muted-2);
}
.auth-tab:hover { color: var(--navy); }
.auth-tab[aria-selected="true"] { background: #fff; color: var(--navy); box-shadow: 0 4px 12px -6px oklch(0.27 0.09 262 / 0.35); }
.auth-form { display: grid; gap: 18px; }
.auth-form .hint { margin-top: 0; }
.auth-message {
  background: var(--blue-soft); color: var(--navy); border-radius: var(--radius);
  padding: 14px 16px; font-size: 14.5px; line-height: 1.55;
}
.auth-message .link-btn { min-height: 36px; padding: 6px 0 0; }
.auth-title { font-size: 22px; line-height: 1.3; margin-bottom: 6px; }
.forgot-link { justify-self: center; }

.app-section {
  max-width: 1280px; width: 100%; margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) var(--gutter) clamp(56px, 7vw, 88px);
}
.user-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.user-bar .who { font-size: 14px; font-weight: 600; color: var(--navy); }
.subject-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 20px; margin-top: 36px; }
.subject-card {
  background: #fff; border-radius: var(--radius); box-shadow: 0 12px 32px -14px oklch(0.27 0.09 262 / 0.3);
  padding: 30px; display: flex; flex-direction: column; gap: 14px; align-items: flex-start;
}
.subject-card .code-disc { width: 52px; height: 52px; font-size: 14px; }
.subject-card h2 { font-size: 22px; line-height: 1.3; }
.subject-card p { font-size: 15.5px; line-height: 1.6; color: var(--muted); }
.subject-card .meta { font-size: 14px; color: var(--muted-2); }

.crumbs { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 14px; }
.link-btn {
  font-family: inherit; cursor: pointer; border: 0; background: none;
  padding: 10px 0; min-height: 44px; font-size: 14px; font-weight: 600; color: var(--blue);
}
.link-btn:hover { color: var(--blue-link-hover); }
.crumbs .sep { color: var(--muted-3); }
.subject-title { margin-top: 8px; font-weight: 800; font-size: clamp(28px, 3.6vw, 42px); line-height: 1.2; letter-spacing: -0.015em; }
.subject-layout { display: flex; flex-wrap: wrap; gap: 32px clamp(28px, 4vw, 56px); margin-top: 28px; align-items: flex-start; }
.chapter-nav { flex: 1 1 280px; min-width: 0; max-width: 380px; display: grid; gap: 8px; }
.chapter-btn {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; align-items: start;
  text-align: left; font-family: inherit; cursor: pointer; border: 0; border-radius: var(--radius);
  padding: 14px 16px; min-height: 44px;
  background: #fff; color: var(--navy); box-shadow: 0 6px 20px -14px oklch(0.27 0.09 262 / 0.35);
}
.chapter-btn:hover { box-shadow: 0 6px 20px -14px oklch(0.27 0.09 262 / 0.35), inset 0 0 0 1.5px var(--blue); }
.chapter-btn[aria-current="true"] { background: var(--blue); color: #fff; box-shadow: none; }
.chapter-btn .n { font-weight: 800; font-size: 15px; opacity: 0.85; }
.chapter-btn .t { display: block; font-weight: 600; font-size: 15px; line-height: 1.4; }
.chapter-btn .s { display: block; font-size: 13px; margin-top: 2px; opacity: 0.8; }

.side-book {
  margin-top: 20px; background: var(--tint); border-radius: var(--radius); padding: 18px;
  display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start;
}
.side-book .cover { width: 88px; aspect-ratio: 2 / 3; border-radius: 3px; overflow: hidden; box-shadow: 0 10px 22px -12px oklch(0.27 0.09 262 / 0.45); }
.side-book .cover img { width: 100%; height: 100%; object-fit: cover; }
.side-book .k { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; color: var(--blue); }
.side-book .title { font-weight: 700; font-size: 16px; line-height: 1.35; margin-top: 4px; color: var(--navy); }
.side-book .by { font-size: 13px; color: var(--muted-2); }
.side-book .book-price { margin-top: 6px; gap: 8px; }
.side-book .book-price strong { font-size: 18px; }
.side-book .book-price s { font-size: 13px; }
.side-book .btn { margin-top: 10px; padding: 10px 14px; }

.chapter-main { flex: 3 1 520px; min-width: 0; }
.chapter-main h2 { margin-top: 6px; font-size: clamp(22px, 2.6vw, 30px); line-height: 1.3; }
.chapter-main .summary { margin-top: 10px; max-width: 64ch; color: var(--muted); }
.slides-box {
  margin-top: 24px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
  background: var(--tint); border-radius: var(--radius); padding: 20px 22px;
}
.slides-box strong { display: block; font-size: 16px; color: var(--navy); }
.slides-box span { display: block; font-size: 14px; color: var(--muted-2); }
.quiz-head { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; justify-content: space-between; }
.quiz-head h3 { font-size: 20px; }
.quiz-head span { font-size: 14px; color: var(--muted-2); }
.quiz { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 16px; }
.question { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-item); padding: 22px 24px; }
.question fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.question legend { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 10px; padding: 0; width: 100%; }
.question legend .qn { font-weight: 800; color: var(--blue); }
.question legend .qt { font-weight: 600; font-size: 16.5px; line-height: 1.55; color: var(--navy); }
.options { display: grid; gap: 8px; margin-top: 14px; }
.option {
  display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  text-align: left; font-family: inherit; font-size: 15.5px; line-height: 1.5;
  cursor: pointer; border: 0; border-radius: var(--radius-btn); padding: 12px 14px; min-height: 44px;
  color: var(--navy); background: var(--tint-2); box-shadow: inset 0 0 0 1.5px var(--line-2);
}
.option:hover:not(:disabled) { box-shadow: inset 0 0 0 1.5px var(--blue); }
.option .l { font-weight: 700; }
.option .tag { font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; }
.option.is-selected { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); }
.option.is-correct { background: var(--blue); color: #fff; box-shadow: none; }
.option.is-wrong { background: #fff; color: var(--muted-2); text-decoration: line-through; box-shadow: inset 0 0 0 1.5px var(--line-strong); }
.option:disabled { cursor: default; }
.explain { margin-top: 12px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.quiz-actions { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.quiz-actions .score { font-weight: 700; font-size: 18px; color: var(--navy); }
.quiz-actions .saved { font-size: 13.5px; color: var(--muted-2); }
.quiz-actions .msg { font-size: 14px; color: var(--muted-2); }
.subject-title.flush { margin-top: 0; }
.user-actions { align-items: center; }
.chapter-list { display: grid; gap: 8px; }

/* ---------- Quản trị (quan-tri.html) ---------- */
.btn-danger { background: #fff; color: var(--error); box-shadow: inset 0 0 0 1.5px color-mix(in oklch, var(--error) 45%, #fff); }
.btn-danger:hover { color: var(--error); box-shadow: inset 0 0 0 1.5px var(--error); }
.btn-square { min-width: 44px; padding-inline: 0; font-size: 16px; }
.btn:disabled { opacity: 0.45; cursor: default; }
textarea.input { min-height: 0; resize: vertical; line-height: 1.55; }
input[type="file"].input { padding: 10px; }

.admin-gate {
  margin-top: 28px; background: var(--tint); border-radius: var(--radius);
  padding: 22px 24px; color: var(--navy); max-width: 70ch;
}
.admin-flash {
  position: sticky; top: 12px; z-index: 5;
  margin-top: 20px; padding: 12px 16px; border-radius: var(--radius);
  background: var(--blue-soft); color: var(--navy); font-size: 15px; font-weight: 600;
  box-shadow: var(--shadow-item);
}
.admin-flash.is-error { background: #fff; color: var(--error); box-shadow: inset 0 0 0 1.5px var(--error), var(--shadow-item); }
.admin-crumbs { margin-top: 20px; }
.admin-h2 { font-size: 20px; line-height: 1.3; margin-top: 40px; }
.admin-h3 { font-size: 17px; line-height: 1.3; margin-bottom: 14px; }
.admin-panel {
  margin-top: 28px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-item); padding: 24px;
}
.admin-panel > .admin-h2:first-child { margin-top: 0; margin-bottom: 14px; }
.admin-panel > .body-muted { margin-bottom: 14px; font-size: 15px; }
.admin-form { display: grid; gap: 16px; }
.admin-grid-2 { display: grid; grid-template-columns: minmax(0, 180px) minmax(0, 1fr); gap: 16px; }
@media (max-width: 560px) { .admin-grid-2 { grid-template-columns: minmax(0, 1fr); } }

.admin-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.admin-empty { color: var(--muted-2); background: var(--tint); border-radius: var(--radius); padding: 18px 20px; }
.admin-row {
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-item); padding: 16px 18px;
}
.admin-row.is-editing { display: block; padding: 22px; }
.admin-row .code-disc { font-size: 12px; }
.admin-row-main { min-width: 0; display: grid; gap: 4px; }
.admin-row-main strong { color: var(--navy); font-size: 16.5px; line-height: 1.45; }
.admin-row-main .desc { font-size: 14.5px; line-height: 1.55; color: var(--muted); }
.admin-row-main .meta { font-size: 14px; color: var(--muted-2); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
@media (max-width: 760px) {
  .admin-row { grid-template-columns: 44px minmax(0, 1fr); }
  .admin-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
.admin-question { align-items: start; }
.admin-answers { list-style: none; margin: 6px 0 2px; padding: 0; display: grid; gap: 2px; font-size: 15px; line-height: 1.5; color: var(--text-2); }
.admin-answers .is-correct { color: var(--navy); font-weight: 600; }
.admin-answers .tag { color: var(--blue); font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; }

.admin-options { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.admin-options legend { padding: 0; margin-bottom: 4px; }
.admin-option { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: end; }
.admin-correct {
  display: flex; align-items: center; gap: 6px; min-height: 48px;
  font-size: 14px; font-weight: 600; color: var(--navy); cursor: pointer;
}
.admin-correct input { width: 20px; height: 20px; accent-color: var(--blue); }

/* Bulk import (quan-tri.html, subject level) */
.bulk-preview { margin-top: 18px; display: grid; gap: 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.bulk-preview > strong { color: var(--navy); }
.bulk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 15px; }
.bulk-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.bulk-list .meta { color: var(--muted-2); font-size: 14px; }
.bulk-tag {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; padding: 2px 8px; border-radius: 999px;
  background: var(--tint); color: var(--muted-2);
}
.bulk-tag.is-new { background: var(--blue-soft); color: var(--blue-link-hover); }
.bulk-errors {
  background: #fff; color: var(--error); border-radius: var(--radius);
  box-shadow: inset 0 0 0 1.5px color-mix(in oklch, var(--error) 45%, #fff);
  padding: 14px 16px; font-size: 14.5px;
}
.bulk-errors ul { margin: 8px 0 0; padding-left: 20px; }
.bulk-table-wrap { overflow-x: auto; }
.bulk-table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 560px; }
.bulk-table th {
  text-align: left; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--muted-2);
  padding: 8px 10px; border-bottom: 1px solid var(--line);
}
.bulk-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bulk-table td strong { display: block; color: var(--navy); word-break: break-word; }
.bulk-table td .meta { font-size: 13px; color: var(--muted-2); }
.bulk-target { display: grid; gap: 8px; min-width: 240px; }
.bulk-target .input { min-height: 44px; font-size: 15px; padding: 8px 10px; }
.bulk-status { color: var(--muted-2); min-width: 120px; }
.bulk-table tr.is-dup td { background: color-mix(in oklch, var(--error) 6%, #fff); }

/* ---------- Class lists (mon-hoc.html locked subjects, quan-tri.html roster) ---------- */
.subject-card.is-locked { background: var(--tint-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.subject-card.is-locked h2 { color: var(--text-2); }
.subject-card .lock-note { font-size: 14.5px; color: var(--text-2); background: #fff; border-radius: var(--radius); padding: 10px 14px; }
.roster-table { min-width: 720px; }
.roster-table tr.is-expired td { color: var(--muted-3); }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; border-bottom: 1px solid var(--line); }
.admin-tab {
  font-family: inherit; cursor: pointer; border: 0; background: none; min-height: 44px; padding: 10px 14px;
  font-size: 14px; font-weight: 700; letter-spacing: 0.04em; color: var(--muted-2); border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.admin-tab[aria-selected="true"] { color: var(--navy); border-bottom-color: var(--blue); }
.admin-tab:hover { color: var(--navy); }
.admin-filter { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 20px; margin-top: 18px; }
.admin-filter .field { min-width: min(280px, 100%); }
.order-badge {
  grid-column: 1; justify-self: start; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; line-height: 1.3;
  padding: 4px 8px; border-radius: var(--radius-btn); text-align: center; background: var(--tint); color: var(--navy);
}
.admin-row:has(.order-badge) { grid-template-columns: 120px minmax(0, 1fr) auto; }
.order-badge.is-paid { background: var(--blue-soft); color: var(--blue-link-hover); }
.order-badge.is-cancelled { background: #fff; color: var(--muted-3); box-shadow: inset 0 0 0 1px var(--line-2); }
@media (max-width: 760px) { .admin-row:has(.order-badge) { grid-template-columns: minmax(0, 1fr); } }
.admin-book { align-items: start; grid-template-columns: 60px minmax(0, 1fr); }
.admin-book-cover { width: 60px; height: auto; border-radius: 3px; box-shadow: var(--shadow-book); }
.admin-book .admin-form { margin-top: 12px; }
.admin-check { display: flex; align-items: center; gap: 8px; font-size: 15px; min-height: 44px; cursor: pointer; }
.admin-check input { width: 20px; height: 20px; accent-color: var(--blue); }

/* ---------- E-book store (sach.html) ---------- */
.store-lead { margin-top: 14px; max-width: 72ch; color: var(--muted); }
.store-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; margin-top: 32px; }
.store-card {
  background: #fff; border-radius: var(--radius); box-shadow: 0 12px 32px -14px oklch(0.27 0.09 262 / 0.3);
  padding: 24px; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 20px; align-items: start; scroll-margin-top: 90px;
}
.store-card.is-target { box-shadow: inset 0 0 0 2px var(--blue), 0 12px 32px -14px oklch(0.27 0.09 262 / 0.3); }
.store-cover img { width: 110px; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: var(--shadow-book); }
.store-body { display: grid; gap: 8px; justify-items: start; }
.store-body h2 { font-size: 20px; line-height: 1.3; }
.store-body .byline { font-size: 14px; color: var(--muted-2); }
.store-body p { font-size: 15px; line-height: 1.6; color: var(--muted); }
.store-body .book-price { margin-top: 2px; }
.store-status { font-size: 14px; font-weight: 600; color: var(--navy); }
.store-body .btn { margin-top: 6px; }
@media (max-width: 420px) { .store-card { grid-template-columns: minmax(0, 1fr); } }
.store-auth { display: flex; flex-wrap: wrap; gap: 24px 48px; margin-top: 48px; align-items: flex-start; }
.store-auth-copy { flex: 1 1 280px; max-width: 460px; }
.store-auth-copy .admin-h2 { margin-top: 0; }
.store-auth .auth-card { flex: 1 1 340px; max-width: 460px; }

.pay-layout { display: flex; flex-wrap: wrap; gap: 28px; align-items: flex-start; margin-top: 12px; }
.pay-card { flex: 1 1 360px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-item); padding: 28px; display: grid; gap: 16px; }
.pay-card .subject-title { margin-top: 0; font-size: clamp(24px, 3vw, 32px); }
.pay-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 18px; margin: 0; font-size: 15.5px; }
.pay-facts dt { color: var(--muted-2); }
.pay-facts dd { margin: 0; color: var(--text); word-break: break-word; }
.pay-code { font-size: 20px; letter-spacing: 0.08em; color: var(--blue-link-hover); }
.pay-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 15px; line-height: 1.6; color: var(--text-2); }
.pay-qr { flex: 0 1 340px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-item); padding: 10px; }
.pay-qr img { display: block; width: 100%; height: auto; }

.reader { background: var(--navy-deep); min-height: 80vh; padding: 0 0 48px; }
.reader-bar {
  position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px var(--gutter); background: var(--navy-deep); color: #fff; border-bottom: 1px solid oklch(1 0 0 / 0.12);
}
.reader-bar .btn-outline { color: #fff; box-shadow: inset 0 0 0 1.5px oklch(1 0 0 / 0.5); background: transparent; }
.reader-title { font-size: 16px; }
.reader-status { font-size: 14px; color: var(--on-dark-3); margin-left: auto; }
.reader-pages { display: grid; gap: 16px; justify-items: center; padding: 20px 12px 0; user-select: none; -webkit-user-select: none; }
.reader-page { position: relative; width: min(900px, 100%); background: #fff; box-shadow: 0 10px 30px -12px #0008; overflow: hidden; }
.reader-canvas { display: block; width: 100%; height: 100%; }
.reader-mark {
  position: absolute; inset: 0; pointer-events: none; display: flex; flex-direction: column; justify-content: space-around; align-items: center;
  transform: rotate(-28deg) scale(1.3); opacity: 0.13; color: var(--navy); font-weight: 700; font-size: clamp(12px, 2vw, 18px); white-space: nowrap;
}
.reader-num { position: absolute; right: 10px; bottom: 6px; font-size: 12px; color: var(--muted-3); pointer-events: none; }
@media print { .reader-pages { display: none; } }

/* ---------- Đăng ký khóa học (dang-ky.html) ---------- */
.reg-layout { display: flex; flex-wrap: wrap; gap: 32px clamp(28px, 4vw, 56px); margin-top: 32px; align-items: flex-start; }
.reg-main { flex: 1 1 520px; min-width: 0; }
.reg-side { flex: 1 1 340px; max-width: 460px; display: grid; gap: 18px; position: sticky; top: 24px; }
.reg-side .form-card { max-width: none; }
.reg-step { display: flex; align-items: center; gap: 12px; font-size: 20px; line-height: 1.3; margin: 32px 0 16px; }
.reg-main .reg-step:first-child, .reg-side .reg-step { margin-top: 0; }
.reg-num {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--navy); color: #fff; font-size: 15px; font-weight: 700;
}
.reg-courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; }
.reg-choice[aria-checked="true"] { background: var(--blue); color: #fff; box-shadow: 0 14px 30px -14px oklch(0.53 0.19 260 / 0.6); }
.reg-cohorts { display: grid; gap: 12px; }
.reg-cohort {
  display: grid; gap: 4px; text-align: left; cursor: pointer; font-family: inherit; font-size: 15px; line-height: 1.55;
  border: 0; border-radius: var(--radius); padding: 18px 20px; background: #fff; color: var(--text-2);
  box-shadow: var(--shadow-item);
}
.reg-cohort:hover:not(:disabled) { box-shadow: var(--shadow-item), inset 0 0 0 1.5px var(--blue); }
.reg-cohort[aria-checked="true"] { box-shadow: var(--shadow-item), inset 0 0 0 2px var(--blue); }
.reg-cohort:disabled { cursor: not-allowed; opacity: 0.6; }
.reg-cohort .meta { font-size: 14px; color: var(--muted-2); }
.reg-cohort-date { font-size: 17px; color: var(--navy); }
.reg-cohort-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin-top: 4px; color: var(--navy); }
.reg-seats { font-size: 14px; font-weight: 600; color: var(--blue-link-hover); }
.reg-seats.is-full { color: var(--muted-3); }
.reg-empty { background: var(--tint); border-radius: var(--radius); padding: 20px 22px; display: grid; gap: 12px; justify-items: start; font-size: 15.5px; }
.reg-auth-copy { font-size: 15px; margin-bottom: 14px; }
.reg-form { padding: 28px; }
.reg-form .pay-facts { font-size: 15px; }
.reg-terms, .reg-side .risk-small { font-size: 13.5px; line-height: 1.6; color: var(--muted-2); }
.reg-mine { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-top: 14px; }
.reg-mine-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-item); padding: 18px 20px; display: grid; gap: 6px; justify-items: start; }
.reg-mine-card .order-badge { grid-column: auto; }
.reg-mine-card strong { font-size: 17px; color: var(--navy); }
.reg-mine-card .meta { font-size: 14px; color: var(--muted-2); }
.reg-mine-card .btn { margin-top: 6px; }
@media (max-width: 960px) { .reg-side { position: static; max-width: none; } }
.admin-grid-fees { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.admin-export { margin-top: 14px; }

/* ---------- Điểm danh (mon-hoc.html, quan-tri.html) ---------- */
.attend-banners { display: grid; gap: 12px; margin-top: 24px; }
.attend-banners:empty { display: none; }
.attend-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  background: var(--blue-soft); border-radius: var(--radius); padding: 18px 22px; box-shadow: inset 0 0 0 1.5px var(--blue);
}
.attend-banner > div { display: grid; gap: 2px; font-size: 15.5px; color: var(--text-2); }
.attend-banner .eyebrow { margin: 0; color: var(--blue-link-hover); }
.attend-banner strong { color: var(--navy); font-size: 17px; }
.attend-banner.is-done { background: var(--tint); box-shadow: none; }
.chapter-main > .attend-banner { margin-bottom: 24px; }
.attend-time { font-variant-numeric: tabular-nums; color: var(--navy); }
.attend-box { margin-top: 16px; background: var(--blue-soft); border-radius: var(--radius); padding: 16px 20px; display: grid; gap: 8px; justify-items: start; font-size: 15.5px; line-height: 1.6; }
.attend-field { max-width: 200px; }
.attend-code { font-size: 22px; letter-spacing: 0.3em; text-align: center; font-variant-numeric: tabular-nums; }
.attend-ok { margin-top: 4px; font-size: 14.5px; font-weight: 600; color: var(--blue-link-hover); }
.attend-side { margin-top: 20px; }
.attend-side ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 14px; }
.attend-side li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: var(--radius-btn); background: #fff; color: var(--text-2); }
.attend-side li strong { color: var(--navy); }
.attend-side li.is-absent strong { color: var(--error); }
.attend-side li.is-open strong { color: var(--blue-link-hover); }

.attend-live {
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-bottom: 8px;
  background: var(--blue-soft); border-radius: var(--radius); padding: 20px 22px; box-shadow: inset 0 0 0 1.5px var(--blue);
}
.attend-live > div:first-child { flex: 1 1 260px; display: grid; gap: 4px; font-size: 15px; color: var(--text-2); }
.attend-live .eyebrow { margin: 0; color: var(--blue-link-hover); }
.attend-live strong { color: var(--navy); }
.attend-live-code { display: grid; justify-items: center; background: #fff; border-radius: var(--radius); padding: 8px 18px; }
.attend-live-code span { font-size: 11px; font-weight: 700; letter-spacing: 0.12em; color: var(--muted-2); }
.attend-live-code strong { font-size: 34px; letter-spacing: 0.15em; font-variant-numeric: tabular-nums; }
.attend-legend { margin-top: 18px; font-size: 14px; }
.attend-table { min-width: 0; }
.attend-table th.attend-col { text-align: center; white-space: nowrap; }
.attend-table th.attend-col span { display: block; }
.attend-table th .meta { font-size: 12px; font-weight: 500; color: var(--muted-2); }
.attend-del { min-height: 28px; padding: 0 6px; font-size: 16px; color: var(--muted-3); }
.attend-del:hover { color: var(--error); }
.attend-cell { text-align: center; padding: 6px !important; }
.attend-mark {
  width: 36px; height: 36px; border: 0; border-radius: var(--radius-btn); cursor: pointer; font-family: inherit;
  font-size: 15px; font-weight: 700; background: var(--tint); color: var(--muted-2);
}
.attend-mark.is-present { background: var(--blue-soft); color: var(--blue-link-hover); }
.attend-mark.is-excused { background: #fff; color: var(--navy); box-shadow: inset 0 0 0 1.5px var(--line-btn); }
.attend-mark.is-absent { background: #fff; color: var(--error); box-shadow: inset 0 0 0 1.5px color-mix(in oklch, var(--error) 35%, #fff); }
.attend-mark:hover { box-shadow: inset 0 0 0 2px var(--blue); }

.code-dialog {
  border: 0; border-radius: var(--radius); padding: clamp(28px, 5vw, 56px); width: min(720px, calc(100vw - 32px));
  text-align: center; display: grid; gap: 10px; justify-items: center; color: var(--navy);
}
.code-dialog::backdrop { background: oklch(0.27 0.09 262 / 0.75); }
.code-dialog .eyebrow { margin: 0; }
.code-dialog-chapter { font-size: 18px; color: var(--text-2); }
.code-dialog-label { margin-top: 12px; font-size: 14px; font-weight: 700; letter-spacing: 0.16em; color: var(--muted-2); }
.code-dialog-code { font-size: clamp(72px, 18vw, 160px); font-weight: 800; line-height: 1; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.code-dialog-time { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.code-dialog-help { font-size: 15px; color: var(--muted); max-width: 46ch; }
.attend-live .btn-row { flex-basis: 100%; }
.admin-form .hint { font-size: 14px; line-height: 1.55; color: var(--muted-2); }
/* Course registration statuses (dang-ky.html, quan-tri.html) */
.order-badge.is-registered { background: var(--tint); color: var(--navy); }
.order-badge.is-waitlist { background: #fff; color: var(--muted-2); box-shadow: inset 0 0 0 1px var(--line-btn); }
.order-badge.is-awaiting_payment { background: var(--blue); color: #fff; }
.admin-row.is-late .order-badge { background: #fff; color: var(--error); box-shadow: inset 0 0 0 1px var(--error); }
.admin-row.is-cancelled { opacity: 0.65; }
.reg-due { font-weight: 600; color: var(--navy) !important; }
.reg-late { color: var(--error); }
.admin-row.is-stacked { grid-template-columns: minmax(0, 1fr); }
.admin-row.is-stacked .admin-actions { justify-content: flex-start; }

/* Danh sách lớp: ô tìm nhanh và thanh phân trang (bảng chia 10 người mỗi trang). */
.roster-tools { align-items: center; margin-top: 20px; }
.roster-tools .input { max-width: 340px; flex: 1 1 220px; }
.roster-pager { align-items: center; justify-content: flex-start; margin-top: 14px; }
.pager-info { color: var(--muted-2); font-size: 14.5px; }
