:root {
  /* Giáo trình Triết học Mác - Lênin Signature Palette */
  --indigo: #2E1470;
  --indigo-mid: #4A2C9B;
  --lavender: #B9A6DB;
  --lavender-soft: #DAD0EE;
  --crimson: #9E1414;
  --crimson-bright: #C81E22;

  /* Gold & Gamification */
  --gold: #F5A623;
  --gold-dark: #C27800;
  --flame: #FF6B2C;

  /* Semantic */
  --emerald: #00C47D;
  --emerald-dark: #008A58;
  --wrong: #E12D48;
  --wrong-dark: #A6172E;

  /* 4 Option Tiles */
  --opt-a: #2D6CB4;
  --opt-a-lip: #1A467A;
  --opt-b: #23919A;
  --opt-b-lip: #136067;
  --opt-c: #D98B00;
  --opt-c-lip: #9C6000;
  --opt-d: #B8283B;
  --opt-d-lip: #801524;

  /* Light Surfaces (Default) */
  --bg: #F7F4FC;
  --surface: #FFFFFF;
  --surface-variant: #EBE4F6;
  --on-bg: #1D1040;
  --on-surface: #1F1342;
  --on-surface-muted: #554978;
  --primary: #2E1470;
  --on-primary: #FFFFFF;
  --primary-container: #DAD0EE;
  --on-primary-container: #2E1470;
  --secondary-container: #FCE8E8;
  --on-secondary-container: #9E1414;
  --outline: #CBBEE5;
  --title-red: #9E1414;
  --quote-bg: #FFF8ED;
  --quote-text: #2E1470;

  --shadow-sm: 0 2px 10px rgba(46, 20, 112, 0.06);
  --shadow-md: 0 8px 24px rgba(46, 20, 112, 0.10);
  --shadow-lg: 0 14px 36px rgba(46, 20, 112, 0.16);

  --font-display: 'Plus Jakarta Sans', 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
}

body[data-theme="dark"] {
  --bg: #110926;
  --surface: #1B113B;
  --surface-variant: #2A1D54;
  --on-bg: #F6F2FC;
  --on-surface: #F6F2FC;
  --on-surface-muted: #C9BBE6;
  --primary: #B9A6DB;
  --on-primary: #1E0E4B;
  --primary-container: #331B73;
  --on-primary-container: #EDE6FA;
  --secondary-container: #472F00;
  --on-secondary-container: #FFDEA8;
  --outline: #513E82;
  --title-red: #FF6B6B;
  --quote-bg: #28194E;
  --quote-text: #FFF5E1;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 36px rgba(0, 0, 0, 0.45);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--on-bg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

button, input, select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* =========================================================
   SHELL & NAVIGATION
========================================================= */
.app-shell {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}

.nav-rail {
  display: none;
  width: 92px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid rgba(185, 166, 219, 0.28);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 8px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.nav-bottom {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--surface);
  border-top: 1px solid rgba(185, 166, 219, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 4px 8px env(safe-area-inset-bottom);
  z-index: 30;
  box-shadow: 0 -4px 18px rgba(46, 20, 112, 0.08);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 14px;
  color: var(--on-surface-muted);
  font-size: 12px;
  font-weight: 500;
  transition: transform 0.14s ease, color 0.16s ease;
  min-width: 64px;
  min-height: 48px;
}

.nav-item:active {
  transform: scale(0.95);
}

.nav-item-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 30px;
  border-radius: 999px;
  transition: background-color 0.2s ease;
}

.nav-item.active {
  color: var(--primary);
  font-weight: 700;
}

.nav-item.active .nav-item-pill {
  background: var(--primary-container);
}

.main-viewport {
  flex: 1;
  min-width: 0;
  padding-bottom: 84px;
}

.page-container {
  max-width: 840px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 768px) {
  .nav-rail {
    display: flex;
  }
  .nav-bottom {
    display: none;
  }
  .main-viewport {
    padding-bottom: 24px;
  }
  .page-container {
    padding: 20px 24px;
  }
}

/* =========================================================
   TYPOGRAPHY & SHARED CARDS
========================================================= */
.h-display {
  font-family: var(--font-display);
  font-weight: 800;
  margin: 0;
}

.h-title {
  font-family: var(--font-display);
  font-weight: 700;
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(185, 166, 219, 0.35);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

body[data-theme="dark"] .card {
  border-color: rgba(81, 62, 130, 0.65);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.14s ease, filter 0.16s ease, background-color 0.16s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
}

.btn-crimson {
  background: var(--crimson);
  color: #FFFFFF;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--outline);
  color: var(--on-surface);
}

.btn-danger-outline {
  background: transparent;
  border: 1.5px solid rgba(225, 45, 72, 0.6);
  color: var(--wrong);
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-variant);
  color: var(--on-surface);
  transition: transform 0.14s ease, background-color 0.16s ease;
}

.icon-btn:active {
  transform: scale(0.93);
}

.icon-btn.active {
  background: var(--primary-container);
  color: var(--primary);
}

/* =========================================================
   AVATAR
========================================================= */
.avatar-circle {
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-container);
  color: var(--primary);
  border: 2px solid var(--lavender);
  font-family: var(--font-display);
  font-weight: 800;
  flex-shrink: 0;
  user-select: none;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-picker-wrap {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}

.avatar-cam-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  border: 2px solid var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* =========================================================
   SPLASH & ONBOARDING (TEXTBOOK COVER STYLE)
========================================================= */
.textbook-screen {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  background: linear-gradient(180deg, #DCD0F2 0%, #FFFFFF 50%, #CBBBE8 100%);
}

body[data-theme="dark"] .textbook-screen {
  background: linear-gradient(180deg, #170B3B 0%, #2B1566 50%, #13092F 100%);
}

.textbook-waves-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.splash-content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.splash-ministry {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--indigo);
}

body[data-theme="dark"] .splash-ministry {
  color: #EAE2FC;
}

.splash-emblem {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(46, 20, 112, 0.08);
  border: 1.5px solid var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--title-red);
  margin: 14px 0 18px;
}

.ribbon-tag {
  display: inline-block;
  background: var(--lavender);
  color: var(--indigo);
  padding: 6px 22px;
  border-radius: 4px 18px 4px 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.04em;
}

body[data-theme="dark"] .ribbon-tag {
  background: rgba(185, 166, 219, 0.24);
  color: #EAE2FC;
}

.splash-title {
  margin: 12px 0 6px;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--title-red);
}

.splash-progress-track {
  width: 210px;
  height: 6px;
  border-radius: 999px;
  background: var(--lavender-soft);
  overflow: hidden;
  margin: 28px 0 10px;
}

body[data-theme="dark"] .splash-progress-track {
  background: rgba(255, 255, 255, 0.18);
}

.splash-progress-fill {
  height: 100%;
  width: 45%;
  border-radius: 999px;
  background: var(--title-red);
  animation: splashIndeterminate 1.15s ease-in-out infinite;
}

@keyframes splashIndeterminate {
  0% { transform: translateX(-110%); width: 45%; }
  50% { transform: translateX(45%); width: 65%; }
  100% { transform: translateX(220%); width: 45%; }
}

.onboarding-wrap {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 540px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.onboarding-card {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid rgba(185, 166, 219, 0.65);
  border-radius: 24px;
  padding: 22px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}

/* =========================================================
   FORM INPUTS
========================================================= */
.field-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--on-surface-muted);
}

.input-box {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 15px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input-box:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 20, 112, 0.12);
}

.input-box.error {
  border-color: var(--wrong);
}

.field-error-text {
  font-size: 12px;
  color: var(--wrong);
  font-weight: 600;
}

/* =========================================================
   HOME SCREEN
========================================================= */
.greeting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 2px 4px;
}

.quote-card {
  background: var(--quote-bg);
  border: 1.2px solid rgba(245, 166, 35, 0.65);
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quote-text {
  margin: 0;
  font-style: italic;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.5;
  color: var(--quote-text);
}

.hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  padding: 20px;
  border: 1.4px solid rgba(185, 166, 219, 0.85);
  background: linear-gradient(180deg, #E7DDF6 0%, #FFFFFF 55%, #DFD2F2 100%);
  box-shadow: var(--shadow-md);
}

body[data-theme="dark"] .hero-banner {
  background: linear-gradient(180deg, #21104F 0%, #2E176B 55%, #1A0D3F 100%);
  border-color: rgba(185, 166, 219, 0.45);
}

.hero-banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.featured-practice-card {
  border-radius: 22px;
  padding: 16px;
  border: 2px solid var(--indigo);
  background: linear-gradient(135deg, #EDE6FA 0%, #FFFFFF 55%, #E7DDF6 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  width: 100%;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.featured-practice-card:hover {
  transform: translateY(-2px);
}

body[data-theme="dark"] .featured-practice-card {
  background: linear-gradient(135deg, #331B73 0%, #1F114A 100%);
  border-color: rgba(185, 166, 219, 0.7);
}

.featured-info-card {
  border-radius: 22px;
  padding: 16px;
  border: 1.5px solid var(--outline);
  background: linear-gradient(135deg, #EDE6FA 0%, #FFFFFF 55%, #E7DDF6 100%);
  box-shadow: var(--shadow-md);
}

body[data-theme="dark"] .featured-info-card {
  background: linear-gradient(135deg, #331B73 0%, #1F114A 100%);
  border-color: rgba(185, 166, 219, 0.35);
}

.featured-inner-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #FAF8FF 60%, #F3EEFC 100%);
  border: 1px solid rgba(185, 166, 219, 0.55);
  box-shadow: 0 2px 8px rgba(46, 20, 112, 0.05);
}

body[data-theme="dark"] .featured-inner-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(185, 166, 219, 0.25);
}

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

@media (max-width: 520px) {
  .mode-grid-2 {
    grid-template-columns: 1fr;
  }
}

.mode-card {
  background: var(--surface);
  border: 1px solid rgba(185, 166, 219, 0.35);
  border-radius: 20px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.mode-card:hover {
  transform: translateY(-2px);
  border-color: var(--lavender);
}

.wide-mode-card {
  background: var(--surface);
  border: 1px solid rgba(185, 166, 219, 0.35);
  border-radius: 20px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  box-shadow: var(--shadow-sm);
  transition: transform 0.16s ease;
}

.wide-mode-card:hover {
  transform: translateY(-2px);
}

.mode-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.progress-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-variant);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.chapter-unit-btn {
  width: 100%;
  background: rgba(235, 228, 246, 0.5);
  border: 1px solid rgba(185, 166, 219, 0.45);
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  transition: background-color 0.16s ease, transform 0.14s ease;
}

body[data-theme="dark"] .chapter-unit-btn {
  background: rgba(42, 29, 84, 0.58);
}

.chapter-unit-btn:hover {
  background: var(--primary-container);
}

/* =========================================================
   QUIZ ARENA (TEXTBOOK BACKGROUND + 3D TILES)
========================================================= */
.arena-screen {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow-x: hidden;
  background: linear-gradient(180deg, #DAD0EE 0%, #EEE8F9 14%, #FFFFFF 30%, #FCFAFF 66%, #E5DCF5 85%, #CBB8E8 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

body[data-theme="dark"] .arena-screen {
  background: linear-gradient(180deg, #1D0D4A 0%, #391D82 55%, #140933 100%);
}

.arena-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 780px;
  padding: 12px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.arena-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--lavender);
  color: var(--indigo);
  font-weight: 700;
  font-size: 13px;
}

body[data-theme="dark"] .hud-pill {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(185, 166, 219, 0.35);
  color: #FFFFFF;
}

.arena-status-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--lavender);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--indigo);
}

body[data-theme="dark"] .arena-status-banner {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(185, 166, 219, 0.35);
  color: #FFFFFF;
}

.arena-status-banner.exam-lock {
  background: #FEF2F2;
  border-color: rgba(158, 20, 20, 0.45);
  color: var(--crimson);
}

body[data-theme="dark"] .arena-status-banner.exam-lock {
  background: rgba(158, 20, 20, 0.28);
  border-color: var(--wrong);
  color: #FFFFFF;
}

.timer-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-track {
  flex: 1;
  height: 9px;
  border-radius: 999px;
  background: rgba(46, 20, 112, 0.14);
  overflow: hidden;
}

body[data-theme="dark"] .timer-track {
  background: rgba(255, 255, 255, 0.16);
}

.timer-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.1s linear, background-color 0.2s ease;
}

.question-stage-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid var(--lavender);
  border-radius: 22px;
  padding: 20px 18px;
  box-shadow: var(--shadow-md);
}

body[data-theme="dark"] .question-stage-card {
  background: rgba(27, 17, 59, 0.92);
  border-color: rgba(185, 166, 219, 0.35);
}

.question-text {
  margin: 10px 0 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.48;
  color: var(--on-surface);
}

.options-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 11px;
}

@media (min-width: 680px) {
  .options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.option-tile {
  position: relative;
  width: 100%;
  min-height: 68px;
  border-radius: 16px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  color: #FFFFFF;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.38;
  transition: transform 0.12s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

.option-tile:not(:disabled):hover {
  transform: translateY(-2px);
}

.option-tile:not(:disabled):active {
  transform: translateY(2px);
}

.option-tile.opt-0 { background: var(--opt-a); box-shadow: 0 5px 0 var(--opt-a-lip); }
.option-tile.opt-1 { background: var(--opt-b); box-shadow: 0 5px 0 var(--opt-b-lip); }
.option-tile.opt-2 { background: var(--opt-c); box-shadow: 0 5px 0 var(--opt-c-lip); }
.option-tile.opt-3 { background: var(--opt-d); box-shadow: 0 5px 0 var(--opt-d-lip); }

.option-tile.is-correct {
  background: var(--emerald) !important;
  box-shadow: 0 5px 0 var(--emerald-dark), 0 0 0 3px #FFFFFF !important;
}

.option-tile.is-wrong {
  background: var(--wrong) !important;
  box-shadow: 0 5px 0 var(--wrong-dark), 0 0 0 3px #FFFFFF !important;
}

.option-tile.is-dimmed {
  opacity: 0.42;
}

.option-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  flex-shrink: 0;
}

.explanation-sheet {
  border-radius: 18px;
  padding: 15px 16px;
  background: var(--surface);
  border: 1.5px solid var(--lavender);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* =========================================================
   CHIPS & STATS & BANK
========================================================= */
.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.chip.selected {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

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

.kpi-tile {
  background: var(--surface);
  border: 1px solid rgba(185, 166, 219, 0.35);
  border-radius: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.goal-minutes-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.goal-minute-btn {
  min-height: 48px;
  border-radius: 14px;
  border: 1px solid var(--outline);
  background: var(--surface-variant);
  color: var(--on-surface);
  font-weight: 600;
  font-size: 14px;
}

.goal-minute-btn.selected {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
  font-weight: 700;
}

.study-days-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.study-day-btn {
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: var(--surface-variant);
  color: var(--on-surface-muted);
  font-weight: 600;
  font-size: 13px;
}

.study-day-btn.selected {
  background: var(--primary-container);
  border: 1.5px solid var(--primary);
  color: var(--primary);
  font-weight: 700;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--outline);
  transition: 0.2s;
  border-radius: 999px;
}

.slider::before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.switch input:checked + .slider {
  background-color: var(--primary);
}

.switch input:checked + .slider::before {
  transform: translateX(22px);
}

.switch.disabled {
  opacity: 0.56;
  pointer-events: none;
}

/* =========================================================
   MODALS, FIREWORKS & TOASTS
========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 9, 38, 0.62);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 60;
}

.modal-card {
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1.5px solid var(--lavender);
  border-radius: 24px;
  padding: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-card.wide {
  max-width: 740px;
}

.fireworks-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 50;
}

.toast-container {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: var(--indigo);
  color: #FFFFFF;
  padding: 10px 16px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
}


/* Local privacy note & explanation source */
.local-privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-variant);
  color: var(--on-surface-muted);
  font-size: 12px;
  line-height: 1.45;
}

.explanation-source {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(185, 166, 219, 0.45);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--primary);
}

/* Essay Review (Ôn luyện Tự luận) */
.essay-mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 640px) {
  .essay-mode-tabs {
    grid-template-columns: repeat(4, 1fr);
  }
}

.essay-mode-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.16s ease;
}

.essay-mode-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}

.essay-flashcard {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  padding: 22px 20px;
  border-radius: 22px;
  border: 2px solid var(--lavender);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.essay-flashcard.flipped {
  background: var(--quote-bg);
  border-color: var(--gold);
}

.cloze-paragraph {
  font-size: 15px;
  line-height: 1.85;
  color: var(--on-surface);
}

.cloze-blank {
  display: inline-flex;
  align-items: center;
  min-width: 96px;
  padding: 2px 10px;
  margin: 2px 4px;
  border-radius: 8px;
  border: 1.5px dashed var(--primary);
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  vertical-align: baseline;
}

.cloze-blank.correct {
  border-style: solid;
  border-color: var(--emerald);
  background: rgba(0, 196, 125, 0.16);
  color: var(--emerald-dark);
}

.cloze-blank.wrong {
  border-style: solid;
  border-color: var(--wrong);
  background: rgba(225, 45, 72, 0.14);
  color: var(--wrong);
}

.essay-textarea {
  width: 100%;
  min-height: 160px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
}

.essay-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.rubric-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-variant);
  cursor: pointer;
  font-size: 13.5px;
  line-height: 1.45;
}

.rubric-item input[type="checkbox"] {
  margin-top: 3px;
  width: 17px;
  height: 17px;
  accent-color: var(--emerald-dark);
  flex-shrink: 0;
}


/* Multi-format Essay Question Types */
.seq-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-variant);
  border: 1.5px solid var(--outline);
  font-size: 13.5px;
  line-height: 1.45;
}

.seq-controls {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.seq-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: var(--surface);
  color: var(--primary);
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.match-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-variant);
}

@media (min-width: 600px) {
  .match-row {
    grid-template-columns: 1fr 1.2fr;
    align-items: center;
    gap: 10px;
  }
}

.inline-blank-input {
  display: inline-block;
  min-width: 150px;
  padding: 4px 10px;
  margin: 2px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 13.5px;
  font-weight: 600;
}

.inline-blank-select {
  display: inline-block;
  padding: 4px 10px;
  margin: 2px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--primary);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 13.5px;
  font-weight: 600;
}

.likert-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--surface-variant);
}

.likert-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.likert-btn {
  padding: 6px 4px;
  border-radius: 8px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.likert-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}


/* Flashcard open/close animation & multiline answer */
@keyframes cardReveal {
  0% {
    opacity: 0.65;
    transform: perspective(900px) rotateX(12deg) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: perspective(900px) rotateX(0deg) scale(1);
  }
}

.essay-flashcard {
  animation: cardReveal 0.32s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}

.essay-flashcard-text {
  white-space: pre-line;
  line-height: 1.65;
}

/* Crossword Short Answer */
.cw-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.cw-cell {
  width: 28px;
  height: 32px;
  border-radius: 7px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--on-surface);
  text-transform: uppercase;
}

.cw-cell.hint {
  background: var(--primary-container);
  border-color: var(--primary);
  color: var(--primary);
}

.cw-cell.filled {
  background: rgba(0, 196, 125, 0.14);
  border-color: var(--emerald);
  color: var(--emerald-dark);
}

.cw-cell.space {
  width: 12px;
  border: none;
  background: transparent;
}

/* Auto-next 5s toggle pill in Arena HUD */
.autonext-pill {
  height: 44px;
  padding: 0 11px;
  border-radius: 14px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface-muted);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.16s ease;
}

.autonext-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}


/* Direct-input crossword letter/digit cells */
.cw-cell-input {
  width: 34px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 15px;
  text-align: center;
  text-transform: uppercase;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.cw-cell-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 20, 112, 0.14);
}

.cw-cell-input.hint {
  background: var(--primary-container);
  border-color: var(--primary);
  color: var(--primary);
}

.cw-cell-input.filled {
  background: rgba(0, 196, 125, 0.14);
  border-color: var(--emerald);
  color: var(--emerald-dark);
}


/* =========================================================
   POLIQ MODULES (Tracks, Lesson Explorer, Attendance, Feedback)
   ========================================================= */
.poliq-track-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 760px) {
  .poliq-track-grid { grid-template-columns: 1fr; }
}
.poliq-track-card {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}
.poliq-track-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.poliq-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.poliq-subtab {
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: var(--surface);
  color: var(--on-surface-muted);
  border: 1.5px solid rgba(185, 166, 219, 0.4);
  transition: all 0.15s ease;
}
.poliq-subtab:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.poliq-subtab.active {
  background: var(--primary);
  color: var(--on-primary);
  border-color: var(--primary);
}

.lesson-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
@media (max-width: 820px) {
  .lesson-layout { grid-template-columns: 1fr; }
}
.lesson-sidebar {
  background: var(--surface);
  border: 1px solid rgba(185, 166, 219, 0.35);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
  max-height: 75vh;
  overflow-y: auto;
}
.lesson-group-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--on-surface-muted);
  padding: 8px 8px 4px;
}
.lesson-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--on-surface);
  transition: background 0.15s ease, color 0.15s ease;
}
.lesson-item:hover {
  background: var(--surface-variant);
}
.lesson-item.active {
  background: var(--primary);
  color: var(--on-primary);
}
.lesson-num {
  width: 34px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface-variant);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.lesson-item.active .lesson-num {
  background: rgba(255, 255, 255, 0.2);
  color: var(--on-primary);
}

.lesson-stage {
  background: var(--surface);
  border: 1px solid rgba(185, 166, 219, 0.35);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.lesson-stage-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(185, 166, 219, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  background: var(--surface);
}
.lesson-rich-content {
  padding: 22px;
  background: #F8FAFC;
  color: #1E293B;
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.7;
}
.lesson-rich-content h1,
.lesson-rich-content h2,
.lesson-rich-content h3,
.lesson-rich-content h4 {
  font-family: var(--font-display);
}
.lesson-rich-content p,
.lesson-rich-content li,
.lesson-rich-content td,
.lesson-rich-content th,
.lesson-rich-content span,
.lesson-rich-content button {
  font-family: var(--font-body);
}
.lesson-rich-content i[class*="fa-"] {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900;
}
.lesson-rich-content ul,
.lesson-rich-content ol {
  list-style: none;
  padding-left: 0;
}
.lesson-rich-content ul.list-disc {
  list-style: disc;
  padding-left: 1.25rem;
}
.lesson-rich-content ol.list-decimal {
  list-style: decimal;
  padding-left: 1.25rem;
}
.lesson-rich-content > * + *,
.lesson-rich-content .space-y-6 > * + * {
  margin-top: 20px !important;
}
.lesson-rich-content .space-y-4 > * + * {
  margin-top: 14px !important;
}
.lesson-rich-content .space-y-3 > * + * {
  margin-top: 10px !important;
}
body[data-theme="dark"] .lesson-rich-content {
  background: var(--bg);
}
.lesson-rich-content table {
  width: 100%;
  border-collapse: collapse;
}
.lesson-rich-content th,
.lesson-rich-content td {
  border: 1px solid #CBD5E1;
  padding: 8px 12px;
}

.page-container {
  width: 100%;
  max-width: 840px;
  margin: 0 auto;
}
.page-container .page-container { padding: 0; max-width: 100%; }
.page-container .page-container .greeting-row { display: none; }

.lesson-rich-content button {
  padding: 7px 13px;
  border-radius: 10px;
  border: 1.5px solid var(--outline);
  background: var(--surface);
  color: var(--on-surface);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.lesson-rich-content button:hover {
  border-color: var(--primary);
  background: var(--surface-variant);
}
.lesson-rich-content .w-8.h-8,
.lesson-rich-content .w-7.h-7 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--primary-container);
  color: var(--primary);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}


/* =========================================================
   SECTION COLOR THEMES (ĐH: Red, CĐ: Blue, TC: Green)
   ========================================================= */
.theme-dai-hoc {
  --primary: #B91C1C;
  --on-primary: #FFFFFF;
  --primary-container: #FEE2E2;
  --on-primary-container: #991B1B;
  --outline: rgba(185, 28, 28, 0.28);
}
body[data-theme="dark"] .theme-dai-hoc {
  --primary: #F87171;
  --on-primary: #450A0A;
  --primary-container: rgba(185, 28, 28, 0.28);
  --on-primary-container: #FECACA;
  --outline: rgba(248, 113, 113, 0.35);
}

.theme-cao-dang {
  --primary: #1D4ED8;
  --on-primary: #FFFFFF;
  --primary-container: #DBEAFE;
  --on-primary-container: #1E40AF;
  --outline: rgba(29, 78, 216, 0.28);
}
body[data-theme="dark"] .theme-cao-dang {
  --primary: #60A5FA;
  --on-primary: #0F172A;
  --primary-container: rgba(29, 78, 216, 0.28);
  --on-primary-container: #BFDBFE;
  --outline: rgba(96, 165, 250, 0.35);
}

.theme-trung-cap {
  --primary: #059669;
  --on-primary: #FFFFFF;
  --primary-container: #D1FAE5;
  --on-primary-container: #065F46;
  --outline: rgba(5, 150, 105, 0.28);
}
body[data-theme="dark"] .theme-trung-cap {
  --primary: #34D399;
  --on-primary: #022C22;
  --primary-container: rgba(5, 150, 105, 0.28);
  --on-primary-container: #A7F3D0;
  --outline: rgba(52, 211, 153, 0.35);
}

/* Lesson Catalog Grid (Click to open content) */
.poliq-lesson-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.poliq-lesson-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 4px 2px;
}
.poliq-lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 640px) {
  .poliq-lesson-grid { grid-template-columns: 1fr; }
}
.poliq-lesson-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1.5px solid var(--outline);
  box-shadow: var(--shadow-sm);
  text-align: left;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.poliq-lesson-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.poliq-lesson-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
}

/* Enhanced Home Track Cards & Outline */
.poliq-track-card {
  position: relative;
  overflow: hidden;
  padding-top: 22px;
  border-width: 1.5px;
}
.poliq-track-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--track-accent, var(--primary));
}
.poliq-track-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  background: var(--track-accent, var(--primary));
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}
.poliq-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.poliq-mini-chip {
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-variant);
  color: var(--on-surface-muted);
}


/* =========================================================
   TEXTBOOK SHOWCASE & ENHANCED POLIQ SECTIONS
   ========================================================= */
.poliq-textbook-showcase {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
@media (max-width: 740px) {
  .poliq-textbook-showcase { grid-template-columns: 1fr; }
}
.poliq-book-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.poliq-book-frame {
  background: linear-gradient(180deg, #F8F5FD 0%, #FFFFFF 100%);
  border: 1.5px solid rgba(185, 166, 219, 0.45);
  border-radius: 18px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}
body[data-theme="dark"] .poliq-book-frame {
  background: var(--surface-variant);
}
.poliq-book-cover {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(46, 20, 112, 0.14);
  display: block;
}
.poliq-toc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.poliq-toc-block {
  padding: 13px 15px;
  border-radius: 14px;
  background: var(--surface);
  border: 1.5px solid rgba(185, 166, 219, 0.35);
  box-shadow: 0 2px 8px rgba(46, 20, 112, 0.04);
}
.poliq-toc-title {
  font-weight: 800;
  font-size: 13px;
  color: var(--on-surface);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.poliq-toc-sublist {
  margin: 8px 0 0;
  padding-left: 4px;
  list-style: none;
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: var(--on-surface-muted);
}
.poliq-value-card {
  padding: 13px 15px;
  border-radius: 14px;
  background: #FFFDF7;
  border: 1.5px solid rgba(245, 166, 35, 0.38);
  font-size: 13px;
  line-height: 1.55;
  color: var(--on-surface);
  box-shadow: 0 2px 8px rgba(245, 166, 35, 0.08);
}
body[data-theme="dark"] .poliq-value-card {
  background: var(--quote-bg);
}

.poliq-section-hero {
  border-radius: 20px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--primary-container) 0%, var(--surface) 75%);
  border: 1.5px solid var(--outline);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.poliq-lesson-card {
  border-left: 4px solid var(--primary);
}
.poliq-lesson-open-pill {
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.poliq-lesson-card:hover .poliq-lesson-open-pill {
  background: var(--primary);
  color: var(--on-primary);
}


/* =========================================================
   REFINED LESSON RICH CONTENT & VALUE GRID (v3.1.5)
   ========================================================= */
.poliq-value-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 640px) {
  .poliq-value-grid { grid-template-columns: 1fr; }
}


/* =========================================================
   CAO ĐẲNG: CONVERT GREEN/EMERALD/TEAL TO BLUE
   ========================================================= */
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-9"],
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-8"],
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-7"],
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-6"],
.theme-cao-dang .lesson-rich-content [class*="bg-green-9"],
.theme-cao-dang .lesson-rich-content [class*="bg-green-8"],
.theme-cao-dang .lesson-rich-content [class*="bg-green-7"],
.theme-cao-dang .lesson-rich-content [class*="bg-green-6"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-9"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-8"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-7"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-6"],
.theme-cao-dang .lesson-rich-content [class*="from-emerald-"],
.theme-cao-dang .lesson-rich-content [class*="from-green-"],
.theme-cao-dang .lesson-rich-content [class*="from-teal-"] {
  background: linear-gradient(135deg, #1E3A8A, #2563EB) !important;
  color: #FFFFFF !important;
}
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-50"],
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-100"],
.theme-cao-dang .lesson-rich-content [class*="bg-green-50"],
.theme-cao-dang .lesson-rich-content [class*="bg-green-100"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-50"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-100"] {
  background-color: #EFF6FF !important;
  background-image: none !important;
}
.theme-cao-dang .lesson-rich-content [class*="text-emerald-"],
.theme-cao-dang .lesson-rich-content [class*="text-green-"],
.theme-cao-dang .lesson-rich-content [class*="text-teal-"] {
  color: #1D4ED8 !important;
}
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-9"] [class*="text-"],
.theme-cao-dang .lesson-rich-content [class*="bg-emerald-8"] [class*="text-"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-9"] [class*="text-"],
.theme-cao-dang .lesson-rich-content [class*="bg-teal-8"] [class*="text-"],
.theme-cao-dang .lesson-rich-content [class*="from-emerald-"] [class*="text-"],
.theme-cao-dang .lesson-rich-content [class*="from-teal-"] [class*="text-"] {
  color: #FFFFFF !important;
}
.theme-cao-dang .lesson-rich-content [class*="border-emerald-"],
.theme-cao-dang .lesson-rich-content [class*="border-green-"],
.theme-cao-dang .lesson-rich-content [class*="border-teal-"] {
  border-color: #2563EB !important;
}
