:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-soft: #f0f5fa;
  --line: #dfe7ef;
  --text: #162f45;
  --muted: #667b8f;
  --blue: #0f6fb8;
  --blue-dark: #0a4778;
  --teal: #1aa7a1;
  --green: #1f9d66;
  --red: #f05b4f;
  --amber: #f4a313;
  --shadow: 0 10px 28px rgba(29, 54, 82, 0.08);
  --font-sans: "Nunito Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 238px minmax(240px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 68px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(216, 229, 239, 0.9);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
}

.brand,
.student-card,
.top-actions,
.top-icons,
.hero-actions,
.section-head,
.combo-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-actions,
.combo-actions {
  flex-wrap: wrap;
}

.brand {
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 8px;
  background: linear-gradient(145deg, var(--blue), var(--teal));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(18, 103, 168, 0.18);
}

.brand strong,
.brand small,
.profile-button span,
.student-card strong,
.student-card small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small,
.student-card small {
  color: var(--muted);
  font-size: 0.78rem;
}

.global-search {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted);
}

.global-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.top-icons {
  justify-content: center;
}

.mobile-nav {
  display: none;
}

.top-icons a,
.icon-button,
.profile-button {
  border: 0;
  color: #748293;
  background: transparent;
}

.top-icons a {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.top-icons a:hover,
.top-icons a.is-active {
  color: var(--blue);
  background: #e8f3fb;
}

.top-icons a::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 8px;
  border-radius: 6px;
  background: #102a43;
  color: #fff;
  font-size: 0.72rem;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.top-icons a:hover::after {
  opacity: 1;
}

.top-actions {
  justify-content: flex-end;
}

.activate-link,
.primary-btn,
.outline-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  white-space: nowrap;
}

.activate-link {
  color: var(--blue);
  background: transparent;
}

.activate-link.compact {
  background: #e8f3fb;
}

.primary-btn {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 12px 24px rgba(18, 103, 168, 0.24);
}

.outline-btn {
  color: var(--blue);
  background: #fff;
  border-color: rgba(18, 103, 168, 0.22);
}

.ghost-btn {
  color: var(--blue);
  background: #e8f3fb;
}

.full {
  width: 100%;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid #bcd8ef;
  border-radius: 999px;
}

.profile-button {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 210px;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 999px;
}

.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(145deg, #dff2ff, #b6d9f1);
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.avatar.large {
  width: 52px;
  height: 52px;
}

.app-shell {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 24px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 22px 24px 48px;
}

.sidebar,
.right-panel {
  position: sticky;
  top: 98px;
  align-self: start;
}

.sidebar {
  display: grid;
  gap: 20px;
}

.student-card,
.side-note,
.hero-dashboard,
.account-access,
.combo-card,
.lms-section,
.exam-section,
.admin-section,
.activation-card,
.support-card,
.mini-report,
.credential-card,
.pdf-paper,
.answer-sheet,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.student-card,
.side-note {
  padding: 14px;
}

.side-nav {
  display: grid;
  gap: 6px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 8px;
  color: #144d78;
  font-weight: 800;
}

.side-nav a:hover {
  background: #e8f3fb;
}

.side-nav a.is-active {
  color: var(--blue);
  background: #e8f3fb;
}

.side-note {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.side-note p {
  margin: 0;
}

.side-links {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.side-links h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.18rem;
}

.side-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  color: #144d78;
  font-weight: 800;
}

.side-links a svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 22px rgba(18, 103, 168, 0.18);
}

.content {
  display: grid;
  min-width: 0;
  gap: 22px;
}

section {
  scroll-margin-top: 96px;
}

.hero-dashboard {
  display: grid;
  grid-template-columns: minmax(320px, 1.02fr) minmax(340px, 0.98fr);
  gap: 24px;
  align-items: stretch;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(18, 103, 168, 0.08), rgba(19, 169, 153, 0.06)),
    rgba(255, 255, 255, 0.96);
}

.page-title {
  display: grid;
  gap: 10px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(18, 103, 168, 0.08), rgba(19, 169, 153, 0.06)),
    rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.page-title h1 {
  margin: 0;
  max-width: 18ch;
  color: var(--blue-dark);
  font-size: 2.35rem;
  line-height: 1.12;
}

.page-title p {
  margin: 0;
  max-width: 62ch;
  color: #49687d;
  line-height: 1.7;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.hero-copy {
  display: grid;
  align-content: center;
  gap: 14px;
}

.hero-copy h1,
.section-head h2,
.activation-card h2,
.support-card h2,
.mini-report h2 {
  margin: 0;
  color: var(--blue-dark);
}

.hero-copy h1 {
  max-width: 15ch;
  font-size: 2.42rem;
  line-height: 1.08;
}

.hero-copy p {
  margin: 0;
  color: #49687d;
  line-height: 1.75;
}

.map-home {
  display: grid;
  gap: 18px;
}

.map-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.map-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 64px;
  color: #7b8794;
  font-size: 1.08rem;
  font-weight: 900;
}

.map-tabs a.is-active {
  color: #fff;
  background: var(--blue);
}

.map-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 0.82fr) minmax(460px, 1.18fr);
  gap: 24px;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(18, 103, 168, 0.1), rgba(255, 255, 255, 0.2)),
    #f8fcff;
  box-shadow: var(--shadow);
}

.map-hero-copy {
  display: grid;
  align-content: center;
  gap: 16px;
  padding: 36px;
}

.map-hero-copy h1 {
  margin: 0;
  max-width: 14ch;
  color: var(--blue-dark);
  font-size: 3.15rem;
  line-height: 1.02;
}

.map-hero-copy p {
  margin: 0;
  max-width: 54ch;
  color: #49687d;
  line-height: 1.72;
}

.map-hero-art {
  position: relative;
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 360px;
  padding: 34px 42% 34px 34px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(4, 89, 145, 0.94), rgba(18, 167, 190, 0.76)),
    radial-gradient(
      circle at 20% 20%,
      rgba(255, 255, 255, 0.22),
      transparent 40%
    );
}

.map-hero-art span,
.map-hero-art small {
  position: relative;
  z-index: 1;
  font-weight: 900;
}

.map-hero-art strong {
  position: relative;
  z-index: 1;
  max-width: 8ch;
  font-size: 4.2rem;
  line-height: 0.96;
}

.map-hero-art img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 39%;
  height: 94%;
  object-fit: cover;
  object-position: center top;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.slider-dots span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #b9d6ea;
}

.slider-dots span.is-active {
  background: var(--blue);
}

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

.notice-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  box-shadow: var(--shadow);
}

.notice-card span,
.notice-card small {
  font-weight: 900;
  opacity: 0.9;
}

.notice-card strong {
  max-width: 18ch;
  font-size: 1.55rem;
  line-height: 1.12;
}

.notice-card.blue {
  background: linear-gradient(145deg, #1686c7, #084f86);
}

.notice-card.green {
  background: linear-gradient(145deg, #13a999, #08727d);
}

.notice-card.orange {
  background: linear-gradient(145deg, #f4a313, #c95f2b);
}

.course-banner {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: 8px;
  background:
    linear-gradient(
      90deg,
      rgba(255, 248, 230, 0.92),
      rgba(255, 255, 255, 0.62)
    ),
    linear-gradient(145deg, #f8ead0, #dbeef8);
}

.course-banner img {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 42%;
  height: 92%;
  object-fit: cover;
  object-position: center top;
  border-radius: 8px 0 0 0;
}

.banner-top,
.banner-body {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  max-width: 58%;
  padding: 26px;
}

.banner-top span,
.banner-body span {
  color: #b85d2f;
  font-weight: 900;
}

.banner-top strong {
  color: #ad3d22;
  font-size: 3rem;
  line-height: 0.98;
  text-transform: uppercase;
}

.banner-body strong {
  color: var(--blue);
  font-size: 2rem;
}

.banner-body small {
  color: var(--muted);
  font-weight: 800;
}

.section-head {
  justify-content: space-between;
  min-width: 0;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.status-pill,
.timer {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f3fb;
  font-weight: 900;
  white-space: nowrap;
}

.timer {
  color: #fff;
  background: var(--blue-dark);
  font-size: 1.15rem;
}

.account-access,
.lms-section,
.exam-section,
.admin-section {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.docs-grid,
.schedule-list {
  display: grid;
  gap: 14px;
}

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

.material-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
}

.material-browser,
.pdf-viewer-card,
.material-rules article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.material-browser,
.pdf-viewer-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 16px;
}

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

.material-table {
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.material-table div,
.material-table button {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) 140px 130px 130px 96px;
  min-width: 676px;
}

.material-table div {
  color: #fff;
  background: var(--blue-dark);
  font-weight: 900;
}

.material-table button {
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  background: #fff;
  text-align: left;
}

.material-table button.is-selected {
  background: #eef7fd;
  box-shadow: inset 3px 0 var(--blue);
}

.material-table button[data-access-state="locked"] {
  color: #53677a;
}

.material-table button:nth-child(odd) {
  background: #f3f8fc;
}

.material-table button.is-selected {
  background: #eef7fd;
}

.material-table button:last-child {
  border-bottom: 0;
}

.material-table span {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  overflow-wrap: anywhere;
  font-weight: 800;
}

.material-table span:last-child {
  border-right: 0;
}

.pdf-toolbar,
.pdf-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pdf-toolbar {
  color: var(--blue-dark);
}

.pdf-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.material-access-strip {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #d7e6f0;
  border-radius: 8px;
  background: #f5fbff;
}

.material-access-strip span {
  color: var(--blue-dark);
  font-weight: 900;
}

.material-access-strip small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.45;
}

.pdf-viewer-card.is-locked .material-access-strip {
  border-color: rgba(232, 91, 91, 0.24);
  background: #fff6f4;
}

.pdf-viewer-card.is-locked .material-access-strip span {
  color: var(--red);
}

.pdf-page-mock {
  position: relative;
  display: grid;
  gap: 14px;
  min-height: 360px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #cfdde8;
  border-radius: 8px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    repeating-linear-gradient(0deg, #eef4f8 0 1px, transparent 1px 38px);
}

.pdf-page-mock span {
  color: var(--blue);
  font-weight: 900;
  text-align: center;
}

.pdf-page-mock h3,
.pdf-page-mock p {
  margin: 0;
}

.pdf-page-mock h3 {
  color: var(--blue-dark);
  text-align: center;
}

.pdf-page-mock .watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 130%;
  color: rgba(15, 111, 184, 0.14);
  font-size: 1.1rem;
  font-weight: 900;
  text-align: center;
  transform: translate(-50%, -50%) rotate(-24deg);
}

.pdf-viewer-card.is-locked .pdf-page-mock {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 246, 244, 0.92)),
    #fff;
}

.pdf-viewer-card.is-locked .pdf-page-mock::after {
  content: "Cần kích hoạt";
  place-self: end;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--red);
  background: rgba(232, 91, 91, 0.1);
  font-weight: 900;
}

.material-rules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.material-rules article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px 10px;
  padding: 16px;
}

.material-rules svg {
  grid-row: span 2;
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
}

.material-rules strong {
  color: var(--blue-dark);
}

.material-rules span {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.profile-grid,
.learning-dashboard {
  display: grid;
  gap: 16px;
}

.profile-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  align-content: start;
}

.profile-card,
.continue-card,
.learning-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.profile-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
}

.profile-card.main {
  grid-column: 1 / -1;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  min-height: 118px;
}

.profile-card h2,
.profile-card p {
  margin: 0;
}

.profile-card h2,
.profile-card p,
.profile-card strong,
.profile-card small {
  min-width: 0;
}

.profile-card h2 {
  color: var(--blue-dark);
  font-size: 1.35rem;
  line-height: 1.2;
}

.profile-card p {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.profile-card span,
.profile-card small,
.learning-card small {
  color: var(--muted);
  font-weight: 800;
}

.profile-card strong,
.learning-card strong {
  color: var(--blue-dark);
  font-size: 1.55rem;
}

.profile-card.main strong {
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  color: #167349;
  background: #effaf4;
  font-size: 0.9rem;
  line-height: 1.2;
}

.profile-card:not(.main) strong {
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.profile-card small {
  line-height: 1.45;
}

.learning-dashboard {
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 0.7fr));
}

.continue-card,
.learning-card {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.continue-card h2,
.continue-card p,
.learning-card h3 {
  margin: 0;
}

.continue-card p {
  color: var(--muted);
  line-height: 1.65;
}

.progress-track {
  overflow: hidden;
  height: 12px;
  border-radius: 999px;
  background: #dbeaf4;
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.student-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 16px;
}

.student-welcome,
.activation-status,
.study-card,
.study-side article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.student-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 22px;
}

.student-welcome h1,
.student-welcome p,
.activation-status p,
.current-lesson h2,
.current-lesson p,
.study-card h2 {
  margin: 0;
}

.student-welcome h1 {
  color: var(--blue-dark);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.student-welcome p,
.activation-status p,
.current-lesson p {
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.65;
}

.welcome-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.activation-status {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 18px;
}

.activation-status span,
.progress-row span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.activation-status strong {
  color: var(--blue-dark);
  font-size: 1.7rem;
  line-height: 1;
}

.activation-status code {
  width: max-content;
  padding: 7px 10px;
  border-radius: 8px;
  color: var(--blue-dark);
  background: #eef6fc;
  font-weight: 900;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 16px;
}

.study-card {
  min-width: 0;
  padding: 18px;
}

.current-lesson {
  display: grid;
  grid-template-columns: minmax(180px, 0.34fr) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lesson-cover {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 238px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(10, 71, 120, 0.95), rgba(26, 167, 161, 0.82)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=900&q=80")
      center/cover;
  background-blend-mode: multiply;
}

.lesson-cover span,
.lesson-cover small {
  font-weight: 800;
}

.lesson-cover strong {
  font-size: 2.5rem;
  line-height: 0.95;
}

.lesson-content {
  display: grid;
  align-content: center;
  gap: 13px;
}

.lesson-content h2,
.study-card h2 {
  color: var(--blue-dark);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  line-height: 1.16;
}

.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.study-side {
  display: grid;
  gap: 12px;
}

.study-side article {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
}

.soft-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  color: var(--blue);
  background: #eef6fc;
}

.study-side strong,
.study-side small {
  display: block;
}

.study-side strong {
  color: var(--blue-dark);
  font-size: 1.25rem;
}

.study-side small {
  color: var(--muted);
  font-weight: 800;
}

.real-sections {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
}

.section-head.compact {
  align-items: start;
  margin-bottom: 12px;
}

.section-head.compact h2 {
  font-size: 1.28rem;
}

.lesson-list.clean,
.resource-list {
  display: grid;
  gap: 8px;
}

.lesson-list.clean div,
.resource-list div {
  display: grid;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 11px 12px;
  border: 1px solid #e5edf4;
  border-radius: 8px;
  background: #fbfdff;
}

.lesson-list.clean div {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.lesson-list.clean span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: var(--blue);
  background: #eef6fc;
  font-weight: 900;
}

.lesson-list.clean strong,
.resource-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--blue-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-list.clean small,
.resource-list span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.resource-list div {
  grid-template-columns: 34px minmax(0, 1fr) auto;
}

.resource-list svg {
  color: var(--blue);
}

.doc-card,
.schedule-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.doc-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 104px;
  padding: 16px;
}

.doc-card > svg {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.doc-card.is-locked > svg {
  background: var(--red);
}

.doc-card strong,
.doc-card span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.doc-card span,
.doc-card small {
  color: var(--muted);
}

.doc-card small {
  font-weight: 800;
}

.schedule-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 94px;
  padding: 16px;
}

.schedule-item div {
  display: grid;
  gap: 4px;
}

.schedule-item div span,
.schedule-item small {
  color: var(--muted);
  font-weight: 800;
}

.schedule-item div strong {
  color: var(--blue);
  font-size: 1.4rem;
}

.schedule-item h3 {
  margin: 0;
  color: var(--blue-dark);
}

.account-grid,
.combo-grid,
.kpi-grid,
.admin-grid {
  display: grid;
  gap: 16px;
}

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

.credential-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px;
}

.credential-card > svg {
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.credential-card.admin > svg {
  background: var(--green);
}

.credential-card div {
  min-width: 0;
}

.credential-card span,
.credential-card small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.84rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.combo-card {
  overflow: hidden;
}

.combo-card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(230px, 0.86fr) minmax(0, 1.14fr);
}

.combo-card.featured .combo-cover {
  min-height: 230px;
}

.combo-card.featured .combo-body {
  align-content: center;
  padding: 22px;
}

.combo-cover {
  display: grid;
  align-content: end;
  min-height: 190px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(0, 0, 0, 0.32)),
    var(--cover);
}

.combo-cover.physics {
  --cover: linear-gradient(145deg, #1976d2, #053c78);
}

.combo-cover.math {
  --cover: linear-gradient(145deg, #df4c4c, #7b1620);
}

.combo-cover.exam {
  --cover: linear-gradient(145deg, #13a999, #084b55);
}

.combo-cover span {
  font-weight: 900;
}

.combo-cover strong {
  font-size: 1.7rem;
  line-height: 1.05;
}

.combo-cover small {
  color: rgba(255, 255, 255, 0.82);
}

.combo-body {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
}

.combo-body h3,
.lesson-roadmap h3,
.admin-panel h3 {
  margin: 0;
  color: var(--blue-dark);
}

.combo-body p,
.admin-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.admin-console {
  gap: 22px;
}

.admin-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 58, 103, 0.96), rgba(18, 103, 168, 0.9)),
    var(--blue);
  box-shadow: var(--shadow);
}

.admin-hero h2,
.admin-hero p {
  margin: 0;
}

.admin-hero h2 {
  font-size: 2.05rem;
  line-height: 1.12;
}

.admin-hero p {
  max-width: 82ch;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.65;
}

.admin-hero .eyebrow {
  color: #7ff3e5;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.admin-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-module-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-module-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f3fb;
  font-size: 0.86rem;
  font-weight: 900;
  white-space: nowrap;
}

.admin-filters label {
  display: grid;
  gap: 6px;
}

.admin-filters span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

.admin-kpi-grid article {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-kpi-grid svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.admin-kpi-grid span,
.admin-kpi-grid small {
  color: var(--muted);
}

.admin-kpi-grid span {
  font-weight: 800;
}

.admin-kpi-grid strong {
  color: var(--blue-dark);
  font-size: 1.68rem;
  line-height: 1;
}

.admin-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.panel-head {
  display: grid;
  gap: 4px;
}

.panel-head h3 {
  margin: 0;
  color: var(--blue-dark);
}

.funnel-bars {
  display: grid;
  gap: 12px;
}

.funnel-bars div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
}

.funnel-bars div::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: var(--value);
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}

.funnel-bars span {
  color: var(--muted);
  font-weight: 900;
}

.funnel-bars strong {
  color: var(--blue-dark);
}

.task-list.strong strong {
  color: var(--red);
}

.admin-modules {
  display: grid;
  gap: 16px;
}

.admin-module-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.admin-module-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 224px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-module-card > svg {
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--teal));
}

.admin-module-card h3,
.admin-module-card p {
  margin: 0;
}

.admin-module-card h3 {
  color: var(--blue-dark);
  font-size: 1rem;
}

.admin-module-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.admin-module-card small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f3fb;
  font-weight: 900;
}

.admin-tables {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mini-table {
  display: grid;
  gap: 8px;
}

.mini-table div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.mini-table strong {
  min-width: 0;
  overflow: hidden;
  color: var(--blue-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-table span {
  color: var(--muted);
  font-weight: 800;
}

.mini-table small {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--blue);
  background: #e8f3fb;
  font-weight: 900;
}

.module-detail {
  gap: 18px;
}

.module-detail-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: center;
  padding: 22px;
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 58, 103, 0.96), rgba(18, 103, 168, 0.9)),
    var(--blue);
}

.module-detail-head h1,
.module-detail-head p {
  margin: 0;
}

.module-detail-head h1 {
  font-size: 2.15rem;
  line-height: 1.1;
}

.module-detail-head p {
  max-width: 82ch;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.65;
}

.module-detail-head .eyebrow {
  color: #7ff3e5;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
}

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

.admin-detail-grid article {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.admin-detail-grid svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
}

.admin-detail-grid span {
  color: var(--muted);
  font-weight: 800;
}

.admin-detail-grid strong {
  color: var(--blue-dark);
  font-size: 1.75rem;
  line-height: 1;
}

.admin-data-table {
  display: grid;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-data-table div {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  min-width: 760px;
}

.admin-data-table div:nth-child(even) {
  background: #f2f8fc;
}

.admin-data-table .session-log-row {
  background: #edf9f3;
  box-shadow: inset 3px 0 #1c9566;
}

.admin-data-table .session-log-row span:first-child {
  color: #167349;
}

.admin-data-table span {
  min-width: 0;
  padding: 12px;
  border-right: 1px solid var(--line);
  color: #345a76;
  font-weight: 800;
}

.admin-data-table span:last-child {
  border-right: 0;
}

.catalog-section {
  display: grid;
  gap: 16px;
}

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

.course-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.course-thumb {
  display: grid;
  align-content: end;
  gap: 6px;
  min-height: 154px;
  overflow: hidden;
  padding: 14px;
  color: #fff;
  background: var(--course-cover);
}

.course-thumb span,
.course-thumb small {
  font-weight: 900;
}

.course-thumb strong {
  font-size: 1.45rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.course-thumb.physics {
  --course-cover: linear-gradient(145deg, #82d6ff, #0f75bd 54%, #084170);
}

.course-thumb.math {
  --course-cover: linear-gradient(145deg, #ffd5db, #ed5b74 48%, #8f1f31);
}

.course-thumb.literature {
  --course-cover: linear-gradient(145deg, #fce8bb, #d19127 46%, #7a4a12);
}

.course-thumb.english {
  --course-cover: linear-gradient(145deg, #bfe8ff, #f28a22 56%, #07598a);
}

.course-thumb.exam {
  --course-cover: linear-gradient(145deg, #b8fff4, #16a394 48%, #064b55);
}

.course-thumb.science {
  --course-cover: linear-gradient(145deg, #d5f5c8, #4fb95c 48%, #126335);
}

.course-info {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.course-info h3 {
  margin: 0;
  color: var(--blue-dark);
  font-size: 1.1rem;
  line-height: 1.35;
}

.course-info span,
.course-info small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-weight: 800;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 6px;
}

.pagination span,
.pagination button {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #345a76;
  font-weight: 900;
}

.pagination span.is-active {
  border-color: var(--blue);
  color: var(--blue);
  background: #fff;
}

.book-grid,
.arena-layout {
  display: grid;
  gap: 18px;
}

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

.book-card,
.arena-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.book-card {
  overflow: hidden;
}

.book-cover {
  display: grid;
  align-content: end;
  gap: 8px;
  min-height: 230px;
  padding: 18px;
  color: #fff;
  background: linear-gradient(145deg, #dff6ff, #2b94cf 42%, #0b4f83);
}

.book-cover span {
  font-weight: 900;
}

.book-cover strong {
  font-size: 1.85rem;
  line-height: 1.08;
}

.book-card > div:last-child {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.book-card h3,
.book-card p {
  margin: 0;
}

.book-card p {
  color: var(--muted);
}

.arena-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
}

.arena-card {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 190px;
  padding: 20px;
  overflow: hidden;
}

.arena-card.main {
  grid-column: 1 / -1;
  align-content: end;
  min-height: 260px;
  color: #fff;
  background:
    linear-gradient(145deg, rgba(18, 103, 168, 0.96), rgba(13, 54, 103, 0.92)),
    #0d4f83;
}

.arena-card.main .hero-actions {
  flex-wrap: wrap;
}

.arena-card h2,
.arena-card p {
  margin: 0;
}

.arena-card strong {
  color: var(--blue);
  font-size: 2.4rem;
}

.arena-card.main strong {
  color: #fff;
}

.lms-layout,
.exam-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
}

.video-stage {
  position: relative;
  min-height: 380px;
  overflow: hidden;
  border-radius: 8px;
  background: #102a43;
}

.video-stage img {
  width: 100%;
  height: 100%;
  min-height: 380px;
  object-fit: cover;
  opacity: 0.82;
}

.video-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.68));
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 50%;
  color: var(--blue);
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
}

.video-caption {
  position: absolute;
  right: 20px;
  bottom: 20px;
  left: 20px;
  z-index: 2;
  display: grid;
  gap: 4px;
  color: #fff;
}

.video-caption span {
  color: #bfe6ff;
  font-weight: 900;
}

.video-caption strong {
  font-size: 1.35rem;
}

.lesson-roadmap {
  display: grid;
  align-content: start;
  gap: 10px;
}

.lesson-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
  text-align: left;
}

.lesson-row span {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 800;
}

.lesson-row strong {
  color: var(--muted);
  font-size: 0.8rem;
}

.lesson-row.is-open {
  border-color: rgba(31, 157, 102, 0.32);
  background: #effaf4;
}

.lesson-row.is-open svg {
  color: var(--green);
}

.lesson-row.is-locked svg {
  color: var(--red);
}

.exam-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.pdf-paper {
  min-height: 590px;
  padding: 30px;
  background: #fff;
}

.paper-head {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 2px solid #0d2f6f;
  text-align: center;
}

.paper-head span {
  color: #1e5ca9;
  font-weight: 800;
}

.pdf-paper h3 {
  margin: 18px 0;
  padding: 8px;
  color: #fff;
  background: #0d2f6f;
  text-align: center;
}

.pdf-paper p,
.pdf-paper li {
  font-size: 1.02rem;
  line-height: 1.75;
}

.answer-sheet {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
}

.answer-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: var(--muted);
}

.answer-head strong {
  color: #24567c;
  font-size: 2.8rem;
}

.answer-list {
  display: grid;
  max-height: 480px;
  overflow: auto;
}

.answer-line {
  display: grid;
  grid-template-columns: 64px repeat(4, minmax(0, 1fr));
  align-items: center;
  min-height: 52px;
  padding: 6px;
}

.answer-line:nth-child(even) {
  background: #eaf4fc;
}

.answer-line span {
  color: #24567c;
  font-weight: 800;
}

.answer-line button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid #aab8c4;
  border-radius: 50%;
  color: #8b98a4;
  background: #fff;
  font-weight: 900;
}

.answer-line button.is-selected {
  border-color: var(--blue);
  color: #fff;
  background: var(--blue);
}

.answer-sheet.is-submitted {
  border-color: rgba(31, 157, 102, 0.42);
}

.answer-sheet button:disabled,
.answer-sheet .short-answer-input:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.answer-sheet button:disabled.is-selected {
  opacity: 1;
}

.answer-sheet #submitExam:disabled {
  background: var(--green);
}

.exam-shell {
  display: grid;
  gap: 18px;
}

.exam-brief {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  align-items: stretch;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(
      135deg,
      rgba(239, 248, 252, 0.92),
      rgba(255, 255, 255, 0.96)
    ),
    #fff;
  box-shadow: var(--shadow);
}

.exam-brief h1,
.exam-brief p {
  margin: 0;
}

.exam-brief h1 {
  max-width: 900px;
  color: var(--blue-dark);
  font-size: 2.25rem;
  line-height: 1.08;
}

.exam-brief p {
  max-width: 86ch;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.65;
}

.exam-status-panel {
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 150px;
  padding: 16px;
  border: 1px solid rgba(15, 111, 184, 0.18);
  border-radius: 8px;
  background: #f4fbff;
}

.exam-status-panel span,
.exam-status-panel small {
  color: var(--muted);
  font-weight: 800;
}

.exam-status-panel strong {
  color: var(--blue-dark);
  font-size: 2.7rem;
  line-height: 1;
}

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

.exam-start-grid article {
  display: grid;
  gap: 7px;
  min-height: 124px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.exam-start-grid svg {
  width: 34px;
  height: 34px;
  padding: 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
}

.exam-start-grid span,
.exam-start-grid small {
  color: var(--muted);
  font-weight: 800;
}

.exam-start-grid strong {
  color: var(--blue-dark);
  font-size: 1.4rem;
}

.exam-room-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.exam-room-toolbar div:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.exam-room-toolbar strong {
  color: var(--blue-dark);
}

.exam-room-toolbar span {
  color: var(--muted);
  font-weight: 800;
}

.exam-actions,
.exam-mobile-tabs {
  display: flex;
  gap: 8px;
}

.exam-mobile-tabs {
  display: none;
}

.exam-room {
  align-items: start;
}

.exam-room .pdf-paper,
.exam-room .answer-sheet {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.paper-head small {
  color: var(--muted);
  font-weight: 800;
}

.paper-section-label {
  margin: 18px 0 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue-dark);
  font-weight: 900;
}

.question-card {
  padding: 14px;
  border: 1px solid #d7e3ee;
  border-radius: 8px;
  background: #fbfdff;
}

.question-card + .question-card {
  margin-top: 12px;
}

.question-card p {
  margin: 0 0 8px;
}

.statement-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.answer-sheet {
  position: sticky;
  top: 86px;
}

.answer-section {
  display: grid;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.answer-section-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--blue-dark);
}

.answer-section-title span {
  color: var(--muted);
  font-weight: 800;
}

.truefalse-grid,
.short-answer-list {
  display: grid;
  gap: 8px;
}

.tf-row {
  display: grid;
  grid-template-columns: 44px repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.tf-row span {
  color: var(--blue-dark);
  font-weight: 900;
}

.tf-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-weight: 900;
}

.tf-row button.is-selected {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.short-answer-list label {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.short-answer-list span {
  color: var(--blue-dark);
  font-weight: 900;
}

.exam-results {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr;
  gap: 14px;
}

.result-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.result-card h3,
.result-card p {
  margin: 0;
}

.result-card.score {
  color: #fff;
  background:
    linear-gradient(145deg, rgba(31, 157, 102, 0.96), rgba(15, 111, 184, 0.9)),
    var(--green);
}

.result-card.score .eyebrow,
.result-card.score small {
  color: rgba(255, 255, 255, 0.86);
}

.result-card.score strong {
  font-size: 3.7rem;
  line-height: 1;
}

.result-row,
.leaderboard div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.result-row:last-child,
.leaderboard div:last-child {
  border-bottom: 0;
}

.result-row span,
.leaderboard span,
.result-row small {
  color: var(--muted);
  font-weight: 800;
}

.leaderboard b {
  color: var(--blue);
}

.module-workbench {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

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

.settings-grid label {
  display: grid;
  gap: 6px;
  align-items: stretch;
}

.settings-grid label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.workbench-save {
  width: 100%;
  margin-top: 12px;
}

.flow-steps,
.builder-steps,
.exam-config-list,
.module-assurance {
  display: grid;
  gap: 10px;
}

.flow-steps div,
.builder-steps div,
.exam-config-list div {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 4px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
}

.flow-steps span,
.builder-steps span {
  display: grid;
  grid-row: span 2;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  font-weight: 900;
}

.flow-steps small,
.builder-steps small,
.exam-config-list span {
  color: var(--muted);
  font-weight: 800;
}

.builder-steps .is-done span {
  background: var(--green);
}

.module-assurance {
  margin: 0;
  padding: 0;
  list-style: none;
}

.module-assurance li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #345a76;
  font-weight: 800;
  line-height: 1.45;
}

.module-assurance svg {
  color: var(--green);
}

.admin-exam-console {
  gap: 18px;
}

.exam-admin-layout,
.exam-admin-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.84fr);
  gap: 14px;
}

.exam-builder,
.exam-config-card {
  align-content: start;
}

.exam-config-list div {
  grid-template-columns: 38px minmax(0, 1fr);
}

.exam-config-list svg {
  grid-row: span 2;
  color: var(--blue);
}

.exam-admin-table div {
  grid-template-columns: 150px 170px 140px 120px 130px 130px;
  min-width: 840px;
}

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

.kpi-grid article {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.kpi-grid span,
.kpi-grid small {
  color: var(--muted);
}

.kpi-grid strong {
  color: var(--blue-dark);
  font-size: 1.8rem;
}

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

.admin-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.admin-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #345a76;
  font-weight: 800;
}

.admin-panel .settings-grid label {
  display: grid;
  align-items: stretch;
}

.exam-status-panel .timer {
  min-height: 54px;
  padding: 0 18px;
  border-radius: 14px;
  color: #fff;
  font-size: 2.25rem;
  line-height: 1;
}

.code-box {
  padding: 14px;
  border-radius: 8px;
  color: var(--blue);
  background: #e8f3fb;
  font-size: 1.45rem;
  font-weight: 900;
  text-align: center;
}

.task-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.right-panel {
  display: grid;
  gap: 18px;
}

.activation-card,
.support-card,
.mini-report {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.main-activation {
  max-width: 560px;
}

input,
textarea,
select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbfd;
  color: var(--text);
  outline: 0;
}

input,
select {
  min-height: 44px;
  padding: 0 12px;
}

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

.mini-report div {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.mini-report span {
  color: var(--muted);
}

dialog {
  border: 0;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 28px 90px rgba(5, 24, 40, 0.34);
}

dialog::backdrop {
  background: rgba(8, 24, 38, 0.55);
  backdrop-filter: blur(6px);
}

.login-modal {
  width: min(460px, calc(100vw - 28px));
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.login-card {
  display: grid;
  gap: 14px;
  padding: 26px;
}

.login-card h2 {
  margin: 0;
  color: var(--blue-dark);
}

.role-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.role-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.role-tabs button.is-active {
  color: var(--blue);
  background: #fff;
  box-shadow: var(--shadow);
}

.hint-box {
  padding: 12px;
  border-radius: 8px;
  color: #345a76;
  background: #f2f8fc;
  font-weight: 800;
}

.login-card label {
  display: grid;
  gap: 6px;
}

.login-card label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 90;
  max-width: min(460px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #102a43;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 18px 40px rgba(5, 24, 40, 0.26);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 16px);
  transition: 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.referral-hero,
.referral-share-card,
.referral-kpi-grid article,
.referral-panel,
.referral-dashboard-banner {
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.referral-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 26px;
  overflow: hidden;
  padding: 30px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background:
    radial-gradient(circle at 88% 8%, rgba(102, 232, 212, 0.28), transparent 28%),
    linear-gradient(135deg, #074b83, #0d78b7 58%, #119a9a);
  box-shadow: 0 18px 40px rgba(18, 103, 168, 0.18);
}

.referral-hero::after {
  content: "";
  position: absolute;
  right: 19%;
  bottom: -74px;
  width: 210px;
  height: 210px;
  border: 24px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.referral-hero-copy,
.referral-wallet {
  position: relative;
  z-index: 1;
}

.referral-hero-copy {
  display: grid;
  gap: 12px;
}

.referral-hero .eyebrow {
  color: #8ef1df;
}

.referral-hero h1,
.referral-hero p,
.referral-panel h2,
.referral-share-card h2,
.referral-dashboard-banner h2,
.referral-dashboard-banner p {
  margin: 0;
}

.referral-hero h1 {
  max-width: 700px;
  font-size: clamp(2rem, 4vw, 3.1rem);
  line-height: 1.06;
}

.referral-hero p {
  max-width: 760px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

.referral-tier {
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.referral-tier svg {
  color: #8ef1df;
}

.referral-tier strong,
.referral-tier small {
  display: block;
}

.referral-tier small {
  margin-top: 2px;
  color: rgba(255, 255, 255, 0.72);
}

.referral-wallet {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 16px;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(14px);
}

.referral-wallet > span,
.referral-wallet small {
  color: rgba(255, 255, 255, 0.78);
}

.referral-wallet > strong {
  font-size: 2.15rem;
  line-height: 1.1;
}

.referral-wallet small {
  line-height: 1.55;
}

.referral-wallet div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.referral-share-card,
.referral-panel {
  padding: 20px;
  border-radius: 16px;
}

.referral-live-badge,
.privacy-note,
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
}

.referral-live-badge {
  padding: 8px 10px;
  color: #14734d;
  background: #e9f9f0;
}

.referral-live-badge svg,
.privacy-note svg {
  width: 16px;
  height: 16px;
}

.referral-code-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
}

.referral-link-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 13px;
  border: 1px solid #dce9f3;
  border-radius: 12px;
  background: #f8fbfe;
}

.referral-link-box label {
  min-width: 0;
}

.referral-link-box label span,
.referral-link-box label strong {
  display: block;
}

.referral-link-box label span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.referral-link-box label strong {
  overflow: hidden;
  color: var(--blue-dark);
  font-size: 0.92rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-btn {
  min-height: 38px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.share-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.share-row span {
  margin-right: 2px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.share-row button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #dce9f3;
  border-radius: 999px;
  color: #205d8a;
  background: #fff;
  font-weight: 800;
}

.share-row button:hover {
  border-color: #afd5ef;
  background: #f0f8fd;
}

.share-row svg {
  width: 16px;
  height: 16px;
}

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

.referral-kpi-grid article {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 2px 12px;
  align-items: center;
  min-height: 112px;
  padding: 15px;
  border-radius: 14px;
}

.referral-kpi-grid svg {
  grid-row: 1 / 4;
  width: 42px;
  height: 42px;
  padding: 10px;
  border-radius: 12px;
  color: var(--blue);
  background: #edf7fd;
}

.referral-kpi-grid span,
.referral-kpi-grid small {
  color: var(--muted);
  font-weight: 800;
}

.referral-kpi-grid span {
  font-size: 0.8rem;
}

.referral-kpi-grid strong {
  color: var(--blue-dark);
  font-size: 1.4rem;
}

.referral-kpi-grid small {
  font-size: 0.72rem;
}

.referral-main-grid,
.referral-lower-grid {
  display: grid;
  gap: 16px;
}

.referral-main-grid {
  grid-template-columns: minmax(0, 1fr) 300px;
}

.referral-lower-grid {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
}

.privacy-note {
  padding: 7px 9px;
  color: #39718f;
  background: #edf7fd;
}

.referral-table {
  display: grid;
  gap: 0;
  overflow-x: auto;
  margin-top: 4px;
}

.referral-table > div {
  display: grid;
  grid-template-columns: minmax(174px, 1.25fr) minmax(94px, 0.72fr) minmax(106px, 0.85fr) minmax(112px, 0.9fr) minmax(104px, 0.75fr);
  gap: 10px;
  align-items: center;
  min-width: 700px;
  padding: 13px 10px;
  border-bottom: 1px solid #e6eef4;
}

.referral-table > div:last-child {
  border-bottom: 0;
}

.referral-table span {
  min-width: 0;
  color: #45677f;
  font-size: 0.84rem;
}

.referral-table span strong,
.referral-table span small {
  display: block;
}

.referral-table span strong {
  overflow: hidden;
  color: var(--blue-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.referral-table span small {
  margin-top: 3px;
  color: var(--muted);
}

.referral-table-head span {
  color: #6b8293;
  font-size: 0.73rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-tag {
  padding: 6px 8px;
  white-space: nowrap;
}

.status-tag.approved {
  color: #14734d;
  background: #e9f9f0;
}

.status-tag.waiting {
  color: #9a6308;
  background: #fff5d8;
}

.status-tag.trial {
  color: #1769a7;
  background: #e9f5fd;
}

.status-tag.paid {
  color: #6460aa;
  background: #f0efff;
}

.referral-policy-card {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 95% 8%, rgba(95, 220, 204, 0.3), transparent 30%),
    linear-gradient(145deg, #123d60, #0b6680);
}

.policy-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.referral-policy-card .eyebrow {
  color: #8ef1df;
}

.referral-policy-card h2 {
  margin-top: 6px;
  font-size: 1.45rem;
  line-height: 1.2;
}

.referral-policy-card ul {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.referral-policy-card li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.85rem;
  line-height: 1.5;
}

.referral-policy-card li svg {
  width: 17px;
  height: 17px;
  color: #8ef1df;
}

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

.referral-flow div {
  display: grid;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  background: #f7fbfe;
}

.referral-flow span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
}

.referral-flow strong {
  color: var(--blue-dark);
  font-size: 0.9rem;
}

.referral-flow small {
  color: var(--muted);
  line-height: 1.55;
}

.payout-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.payout-summary {
  display: grid;
  gap: 0;
  border: 1px solid #e6eef4;
  border-radius: 12px;
}

.payout-summary div {
  padding: 11px 12px;
  border-bottom: 1px solid #e6eef4;
}

.payout-summary div:last-child {
  border-bottom: 0;
}

.payout-summary span,
.payout-summary strong {
  display: block;
}

.payout-summary span,
.payout-card > small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.payout-summary strong {
  margin-top: 4px;
  color: var(--blue-dark);
  font-size: 0.88rem;
}

.referral-dashboard-banner {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-color: #cde7f3;
  border-radius: 16px;
  background:
    radial-gradient(circle at 86% 0%, rgba(26, 167, 161, 0.16), transparent 30%),
    linear-gradient(135deg, #f8fcff, #f0f9fb);
}

.referral-dashboard-banner:hover {
  border-color: #9ed7e4;
  box-shadow: 0 16px 34px rgba(29, 93, 125, 0.12);
}

.referral-banner-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--teal));
}

.referral-dashboard-banner h2 {
  margin-top: 3px;
  color: var(--blue-dark);
  font-size: 1.12rem;
  line-height: 1.35;
}

.referral-dashboard-banner p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

.referral-banner-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 0.88rem;
  font-weight: 900;
  white-space: nowrap;
}

.referral-banner-cta svg {
  width: 17px;
  height: 17px;
}

.referral-profile-card {
  transition: 160ms ease;
}

.referral-profile-card:hover {
  border-color: #a9d8ec;
  transform: translateY(-2px);
}

body[data-mode="activated"] .lesson-row.is-locked {
  border-color: rgba(31, 157, 102, 0.32);
  background: #effaf4;
}

body[data-mode="activated"] .lesson-row.is-locked svg {
  color: var(--green);
}

body[data-mode="activated"] [data-lock].is-unlocked {
  border-color: rgba(31, 157, 102, 0.35);
}

body[data-mode="activated"] .outline-btn.is-unlocked {
  color: #167349;
  background: #effaf4;
}

body[data-mode="activated"] .material-table button.is-unlocked {
  background: #f3fbf7;
}

body[data-mode="activated"] .material-table button.is-unlocked span:last-child,
body[data-mode="activated"] .doc-card.is-unlocked small,
body[data-mode="activated"] .schedule-item.is-unlocked small,
body[data-mode="activated"] .lesson-row.is-unlocked strong {
  color: #167349;
}

body[data-mode="activated"] .doc-card.is-unlocked > svg {
  background: var(--green);
}

body[data-mode="activated"] .schedule-item.is-unlocked {
  background: #f7fcf9;
}

.primary-btn:disabled,
.outline-btn:disabled {
  cursor: default;
  opacity: 0.82;
}

@media (max-width: 1240px) {
  .app-topbar {
    grid-template-columns: 220px minmax(180px, 1fr) auto;
  }

  .top-actions {
    grid-column: 1 / -1;
  }

  .app-shell {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .right-panel {
    position: static;
    grid-column: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .combo-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

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

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

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

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

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

  .module-workbench,
  .exam-admin-layout,
  .exam-admin-columns {
    grid-template-columns: 1fr;
  }

  .admin-tables {
    grid-template-columns: 1fr;
  }

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

  .profile-card.main,
  .continue-card {
    grid-column: 1 / -1;
  }

  .referral-main-grid,
  .referral-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-topbar,
  .app-shell,
  .hero-dashboard,
  .lms-layout,
  .exam-layout {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    position: sticky;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    padding: 10px 14px;
  }

  .global-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .top-icons {
    display: none;
  }

  .top-actions {
    grid-column: 2;
    justify-content: flex-end;
    gap: 6px;
  }

  .activate-link {
    min-height: 38px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .profile-button {
    max-width: 44px;
    min-height: 38px;
    padding: 0;
  }

  .profile-button #profileLabel,
  .profile-button > svg {
    display: none;
  }

  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(216, 229, 239, 0.95);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 -10px 30px rgba(28, 53, 80, 0.1);
    backdrop-filter: blur(16px);
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 50px;
    padding: 5px 3px;
    border: 0;
    border-radius: 8px;
    color: #6d8091;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
  }

  .mobile-nav a.is-active {
    color: var(--blue-dark);
    background: #eef6fc;
  }

  .sidebar {
    display: none;
  }

  .app-shell {
    padding: 18px 16px 96px;
  }

  .exam-brief,
  .exam-room-toolbar {
    grid-template-columns: 1fr;
  }

  .exam-brief,
  .exam-room-toolbar {
    display: grid;
  }

  .exam-status-panel,
  .answer-sheet {
    position: static;
  }

  .exam-mobile-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
  }

  .exam-mobile-tabs button {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 48px;
    border: 0;
    border-radius: 7px;
    color: var(--muted);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 900;
  }

  .exam-mobile-tabs button.is-active {
    color: var(--blue-dark);
    background: #eef6fc;
  }

  .exam-pane {
    display: none;
  }

  .exam-pane.is-active {
    display: block;
  }

  .answer-sheet.exam-pane.is-active,
  .exam-results.exam-pane.is-active {
    display: grid;
  }

  .exam-results {
    grid-template-columns: 1fr;
  }

  .right-panel {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .map-hero,
  .notice-grid,
  .course-grid,
  .book-grid,
  .arena-layout,
  .material-layout,
  .material-rules {
    grid-template-columns: 1fr;
  }

  .student-overview,
  .dashboard-layout,
  .real-sections,
  .current-lesson {
    grid-template-columns: 1fr;
  }

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

  .welcome-actions {
    justify-content: flex-start;
  }

  .map-hero-copy h1 {
    max-width: none;
    font-size: 2.55rem;
  }

  .map-hero-art {
    padding-right: 38%;
  }

  .admin-hero,
  .module-detail-head,
  .admin-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-actions,
  .module-actions {
    justify-content: flex-start;
  }

  .admin-filters,
  .admin-kpi-grid,
  .admin-module-grid,
  .admin-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-copy h1 {
    max-width: none;
    font-size: 2.45rem;
  }

  .referral-hero {
    grid-template-columns: 1fr;
  }

  .referral-wallet {
    max-width: 420px;
  }

  .referral-code-layout {
    grid-template-columns: 1fr;
  }

  .referral-dashboard-banner {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .referral-banner-cta {
    grid-column: 2;
  }
}

@media (max-width: 640px) {
  .app-topbar {
    gap: 10px;
  }

  .mobile-nav {
    padding-inline: 6px;
  }

  .brand {
    justify-content: flex-start;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .top-actions {
    display: flex;
  }

  .top-actions .activate-link {
    width: 40px;
    padding: 0;
    font-size: 0;
  }

  .top-actions .activate-link svg {
    width: 20px;
    height: 20px;
  }

  .activate-link,
  .profile-button {
    min-height: 40px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .top-actions .icon-button,
  .top-actions .profile-button {
    display: none;
  }

  .profile-button {
    max-width: 40px;
    justify-content: center;
    padding: 0;
    color: var(--blue);
    background: #eef6fc;
    border-radius: 8px;
  }

  .profile-button #profileLabel,
  .profile-button > svg {
    display: none;
  }

  .profile-button .avatar {
    width: 32px;
    height: 32px;
  }

  .icon-button {
    width: 40px;
    height: 40px;
  }

  .app-shell {
    padding: 14px 14px 94px;
  }

  .content {
    gap: 18px;
  }

  .hero-dashboard,
  .map-hero-copy,
  .student-welcome,
  .activation-status,
  .study-card,
  .account-access,
  .lms-section,
  .exam-section,
  .admin-section,
  .page-title {
    padding: 16px;
  }

  .exam-brief {
    padding: 16px;
  }

  .exam-brief h1 {
    font-size: 1.82rem;
  }

  .exam-status-panel {
    min-height: 126px;
  }

  .exam-status-panel strong {
    font-size: 2.2rem;
  }

  .exam-start-grid,
  .exam-results {
    grid-template-columns: 1fr;
  }

  .exam-room-toolbar {
    padding: 12px;
  }

  .exam-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .exam-actions .outline-btn {
    width: 100%;
  }

  .material-filters,
  .pdf-actions {
    grid-template-columns: 1fr;
  }

  .material-table {
    gap: 10px;
    overflow: visible;
    border: 0;
  }

  .material-table div {
    display: none;
  }

  .material-table button {
    grid-template-columns: 1fr;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .material-table span {
    padding: 5px 12px;
    border-right: 0;
  }

  .material-table span:first-child {
    padding-top: 12px;
    color: var(--blue-dark);
    font-size: 1.02rem;
  }

  .material-table span:last-child {
    padding-bottom: 12px;
  }

  .pdf-actions {
    display: grid;
  }

  .pdf-paper {
    min-height: auto;
    padding: 16px;
  }

  .pdf-paper p,
  .pdf-paper li {
    font-size: 0.94rem;
    line-height: 1.65;
  }

  .answer-sheet {
    padding: 14px;
  }

  .answer-list {
    max-height: none;
  }

  .answer-line {
    grid-template-columns: 58px repeat(4, minmax(0, 1fr));
    min-height: 48px;
    padding: 5px;
  }

  .answer-line button {
    width: 34px;
    height: 34px;
  }

  .tf-row {
    grid-template-columns: 38px repeat(2, minmax(0, 1fr));
  }

  .short-answer-list label {
    grid-template-columns: 1fr;
  }

  .result-card.score strong {
    font-size: 3rem;
  }

  .result-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 10px;
    align-items: start;
  }

  .result-row small {
    grid-column: 1 / -1;
  }

  .map-tabs {
    grid-template-columns: 1fr;
  }

  .map-tabs a {
    min-height: 48px;
  }

  .map-hero {
    min-height: auto;
  }

  .map-hero-copy h1 {
    font-size: 2.28rem;
  }

  .map-hero-art {
    min-height: 282px;
    padding: 22px 42% 22px 18px;
  }

  .map-hero-art strong {
    font-size: 2.65rem;
  }

  .map-hero-art img {
    width: 42%;
  }

  .student-welcome h1 {
    font-size: 1.72rem;
  }

  .welcome-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .welcome-actions .primary-btn,
  .welcome-actions .outline-btn {
    width: 100%;
    min-width: 0;
  }

  .current-lesson {
    padding: 0;
  }

  .lesson-cover {
    min-height: 168px;
    border-radius: 8px 8px 0 0;
  }

  .lesson-content {
    padding: 16px;
  }

  .lesson-list.clean div {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .lesson-list.clean small {
    grid-column: 2;
  }

  .resource-list div {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .resource-list span {
    grid-column: 2;
  }

  .notice-card {
    min-height: 126px;
  }

  .course-thumb,
  .book-cover {
    min-height: 196px;
  }

  .course-thumb strong {
    font-size: 1.7rem;
  }

  .admin-filters,
  .admin-kpi-grid,
  .admin-module-grid,
  .admin-tables,
  .admin-detail-grid,
  .profile-grid,
  .learning-dashboard {
    grid-template-columns: 1fr;
  }

  .admin-hero h2,
  .module-detail-head h1 {
    font-size: 1.65rem;
  }

  .admin-kpi-grid article,
  .admin-module-card,
  .admin-detail-grid article {
    min-height: auto;
  }

  .module-actions .outline-btn {
    width: 100%;
  }

  .funnel-bars div {
    grid-template-columns: 1fr 62px;
  }

  .funnel-bars div::before {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .mini-table div {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .page-title h1 {
    font-size: 2rem;
  }

  .hero-copy h1 {
    font-size: 2.05rem;
  }

  .hero-copy p {
    font-size: 0.94rem;
    line-height: 1.62;
  }

  .hero-actions,
  .section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .referral-hero,
  .referral-share-card,
  .referral-panel {
    padding: 16px;
  }

  .referral-hero-copy,
  .referral-wallet,
  .referral-hero h1,
  .referral-hero p {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .referral-hero h1 {
    font-size: 2rem;
  }

  .referral-wallet > strong {
    font-size: 1.8rem;
  }

  .referral-tier {
    align-items: start;
    width: 100%;
  }

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

  .referral-kpi-grid article {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 2px 8px;
    min-height: 102px;
    padding: 12px;
  }

  .referral-kpi-grid svg {
    width: 34px;
    height: 34px;
    padding: 8px;
  }

  .referral-kpi-grid strong {
    font-size: 1.12rem;
  }

  .referral-link-box {
    grid-template-columns: 1fr;
  }

  .referral-link-box .compact-btn {
    width: 100%;
  }

  .share-row span {
    width: 100%;
  }

  .share-row button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .referral-table {
    gap: 10px;
    overflow: visible;
  }

  .referral-table-head {
    display: none !important;
  }

  .referral-table > div {
    grid-template-columns: 1fr 1fr;
    gap: 9px 12px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #e6eef4;
    border-radius: 12px;
    background: #fbfdff;
  }

  .referral-table > div span:first-child,
  .referral-table > div span:nth-child(5) {
    grid-column: 1 / -1;
  }

  .referral-flow {
    grid-template-columns: 1fr;
  }

  .referral-flow div {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 3px 8px;
  }

  .referral-flow span {
    grid-row: 1 / 3;
  }

  .referral-dashboard-banner {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 14px;
  }

  .referral-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .referral-dashboard-banner h2 {
    font-size: 1rem;
  }

  .referral-dashboard-banner p {
    grid-column: 1 / -1;
  }

  .course-banner {
    min-height: 275px;
  }

  .course-banner img {
    width: 48%;
    height: 78%;
  }

  .banner-top,
  .banner-body {
    max-width: 64%;
    padding: 18px;
  }

  .banner-top strong {
    font-size: 2rem;
  }

  .account-grid,
  .kpi-grid,
  .admin-grid,
  .docs-grid,
  .right-panel {
    grid-template-columns: 1fr;
  }

  .credential-card {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .credential-card > svg {
    width: 42px;
    height: 42px;
    padding: 10px;
  }

  .credential-card .outline-btn {
    min-height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .combo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .combo-card.featured {
    grid-column: auto;
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .combo-card.featured .combo-body {
    padding: 12px;
  }

  .combo-card.featured .combo-cover {
    min-height: 168px;
  }

  .combo-card {
    display: grid;
    grid-template-columns: 128px minmax(0, 1fr);
  }

  .combo-cover {
    min-height: 168px;
    padding: 12px;
  }

  .combo-cover strong {
    font-size: 1.12rem;
  }

  .combo-cover small {
    font-size: 0.72rem;
  }

  .combo-body {
    padding: 12px;
  }

  .combo-body h3 {
    font-size: 0.95rem;
  }

  .combo-body p {
    font-size: 0.82rem;
  }

  .combo-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .video-stage,
  .video-stage img {
    min-height: 260px;
  }

  .play-button {
    width: 62px;
    height: 62px;
  }

  .video-caption strong {
    font-size: 1rem;
  }

  .lesson-row {
    min-height: 58px;
  }

  .pdf-paper {
    min-height: auto;
    padding: 18px;
  }

  .pdf-paper p,
  .pdf-paper li {
    font-size: 0.92rem;
  }

  .answer-sheet {
    padding: 14px;
  }

  .answer-list {
    max-height: none;
  }

  .answer-line {
    grid-template-columns: 54px repeat(4, minmax(0, 1fr));
  }

  .answer-line button {
    width: 34px;
    height: 34px;
  }

  .doc-card {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .doc-card > svg {
    width: 42px;
    height: 42px;
    padding: 10px;
  }

  .doc-card small {
    grid-column: 2;
  }

  .schedule-item {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* Refined learning portal system */
:root {
  --bg: #f3f7ff;
  --surface-soft: #edf3fb;
  --line: #dbe5f2;
  --text: #183c61;
  --muted: #71849c;
  --blue: #0876c9;
  --blue-dark: #07508c;
  --teal: #00a8a8;
  --shadow: 0 10px 30px rgba(42, 76, 120, 0.07);
  --shadow-hover: 0 16px 34px rgba(42, 76, 120, 0.13);
}

body {
  background:
    radial-gradient(circle at 54% 0%, rgba(216, 230, 255, 0.74), transparent 38%),
    #f5f8fc;
}

.app-topbar {
  grid-template-columns: 238px minmax(260px, 1fr) auto auto;
  min-height: 60px;
  padding: 7px 28px;
  background: rgba(255, 255, 255, 0.94);
}

.brand-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 10px;
  background: linear-gradient(145deg, #0d83d6, #10a2ad);
}

.brand strong {
  color: #123b60;
  font-size: 0.94rem;
}

.brand small {
  font-size: 0.72rem;
}

.global-search {
  min-height: 40px;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #f0f5fb;
}

.top-icons {
  gap: 7px;
}

.top-icons a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.activate-link,
.primary-btn,
.outline-btn,
.ghost-btn {
  min-height: 40px;
  border-radius: 8px;
  font-size: 0.88rem;
}

.activate-link {
  color: #0068b7;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-width: 1px;
}

.profile-button {
  max-width: 190px;
  min-height: 40px;
  font-size: 0.88rem;
}

.admin-top-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 900;
}

.app-shell {
  grid-template-columns: 222px minmax(0, 1fr) 320px;
  gap: 20px;
  max-width: 1580px;
  padding: 18px 22px 54px;
}

.app-shell.is-focus,
.app-shell.is-admin {
  grid-template-columns: 238px minmax(0, 1fr);
  max-width: 1600px;
}

.sidebar,
.right-panel {
  top: 80px;
}

.sidebar {
  gap: 15px;
}

.sidebar-account {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 50px;
  padding: 5px 4px 10px;
  border-bottom: 1px solid var(--line);
  color: #145b95;
}

.sidebar-account > svg {
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), #2f9dde);
}

.sidebar-account strong,
.sidebar-account small {
  display: block;
}

.sidebar-account strong {
  font-size: 0.88rem;
}

.sidebar-account small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.side-nav {
  gap: 2px;
  padding-bottom: 14px;
}

.side-nav a {
  gap: 11px;
  min-height: 39px;
  padding: 0 7px;
  border-radius: 8px;
  color: #175e97;
  font-size: 0.82rem;
}

.side-nav a svg {
  width: 18px;
  height: 18px;
}

.side-nav a:hover,
.side-nav a.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1285d5, #0768ae);
}

.side-links {
  gap: 8px;
  padding-top: 0;
}

.side-links h3 {
  font-size: 0.98rem;
}

.side-links a {
  min-height: 36px;
  font-size: 0.76rem;
}

.side-links a svg {
  width: 28px;
  height: 28px;
  padding: 7px;
}

.content {
  gap: 18px;
}

.student-card,
.side-note,
.hero-dashboard,
.account-access,
.combo-card,
.lms-section,
.exam-section,
.admin-section,
.activation-card,
.support-card,
.mini-report,
.credential-card,
.pdf-paper,
.answer-sheet,
.admin-panel,
.student-welcome,
.activation-status,
.study-card,
.study-side article,
.profile-card,
.continue-card,
.learning-card,
.doc-card,
.schedule-item,
.course-card,
.book-card,
.arena-card {
  border-radius: 10px;
}

.map-home {
  gap: 12px;
}

.map-tabs {
  border-radius: 7px;
}

.map-tabs a {
  min-height: 48px;
  font-size: 0.88rem;
}

.map-tabs svg {
  width: 17px;
  height: 17px;
}

.map-hero {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 0;
  min-height: 270px;
  border: 0;
  border-radius: 10px;
  background: #e4f4ff;
}

.map-hero-copy {
  gap: 13px;
  padding: 27px;
  background:
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.74), transparent 38%),
    linear-gradient(135deg, #eef9ff, #c8eaff);
}

.map-hero-copy h1 {
  max-width: 12ch;
  color: #07508c;
  font-size: clamp(2rem, 3vw, 2.72rem);
  line-height: 1.02;
}

.map-hero-copy p {
  max-width: 44ch;
  font-size: 0.85rem;
  line-height: 1.58;
}

.map-hero-art {
  min-height: 270px;
  padding: 30px 42% 30px 28px;
  background:
    linear-gradient(90deg, rgba(1, 86, 163, 0.95), rgba(0, 178, 199, 0.76)),
    url("https://images.unsplash.com/photo-1509062522246-3755977927d7?auto=format&fit=crop&w=960&q=70")
      center/cover;
}

.map-hero-art strong {
  font-size: clamp(2.6rem, 4vw, 3.8rem);
}

.map-hero-art img {
  width: 41%;
  height: 94%;
}

.slider-dots {
  gap: 7px;
}

.slider-dots span {
  width: 9px;
  height: 9px;
}

.teacher-section,
.catalog-section {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.section-head.compact {
  margin: 0;
}

.section-head h2 {
  color: #1469ab;
  font-size: 1.18rem;
}

.eyebrow {
  color: #009c9f;
  font-size: 0.7rem;
}

.eyebrow svg {
  width: 15px;
  height: 15px;
  vertical-align: -3px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-style: italic;
}

.text-link svg {
  width: 15px;
  height: 15px;
}

.teacher-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.teacher-card {
  position: relative;
  min-height: 170px;
  overflow: hidden;
  border-radius: 10px;
  background: #075fc4;
}

.teacher-card::after {
  content: "";
  position: absolute;
  inset: 44% 0 0;
  background: linear-gradient(180deg, transparent, rgba(1, 32, 80, 0.9));
}

.teacher-card img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  object-position: center top;
  mix-blend-mode: screen;
}

.teacher-card div {
  position: absolute;
  right: 8px;
  bottom: 9px;
  left: 8px;
  z-index: 1;
  display: grid;
  gap: 2px;
  color: #fff;
  text-align: center;
}

.teacher-card strong {
  font-size: 0.7rem;
  line-height: 1.25;
}

.teacher-card small {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.66rem;
}

.home-learning-preview {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: 16px;
}

.home-learning-preview .current-lesson {
  grid-template-columns: 160px minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

.home-learning-preview .lesson-cover {
  min-height: 226px;
  border-radius: 0;
}

.home-learning-preview .lesson-content {
  gap: 10px;
  padding: 15px;
}

.home-learning-preview .lesson-content h2 {
  font-size: 1.32rem;
}

.home-learning-preview .lesson-content p {
  font-size: 0.8rem;
  line-height: 1.55;
}

.lesson-cta {
  width: max-content;
}

.roadmap-preview {
  padding: 15px;
}

.roadmap-preview .lesson-list.clean {
  margin-top: 12px;
}

.lesson-list.clean div,
.resource-list div {
  min-height: 48px;
  border-radius: 8px;
  background: #fbfdff;
}

.lesson-list.clean strong,
.lesson-list.clean small {
  font-size: 0.78rem;
}

.catalog-section {
  padding: 16px;
}

.course-grid {
  gap: 14px;
}

.course-card {
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.course-thumb {
  position: relative;
  min-height: 170px;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(2, 31, 73, 0.02), rgba(2, 31, 73, 0.76)),
    var(--course-cover) center/cover;
}

.course-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(145deg, rgba(19, 128, 212, 0.18), transparent 54%);
}

.course-thumb.physics {
  --course-cover: url("https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&w=600&q=82");
}

.course-thumb.math {
  --course-cover: url("https://images.unsplash.com/photo-1509228468518-180dd4864904?auto=format&fit=crop&w=600&q=82");
}

.course-thumb.literature {
  --course-cover: url("https://images.unsplash.com/photo-1455885666463-9a8c097c5159?auto=format&fit=crop&w=600&q=82");
}

.course-thumb.english {
  --course-cover: url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=600&q=82");
}

.course-thumb.exam {
  --course-cover: url("https://images.unsplash.com/photo-1434030216411-0b793f4b4173?auto=format&fit=crop&w=600&q=82");
}

.course-thumb.science {
  --course-cover: url("https://images.unsplash.com/photo-1532187863486-abf9dbad1b69?auto=format&fit=crop&w=600&q=82");
}

.course-thumb span,
.course-thumb small,
.course-thumb strong {
  position: relative;
}

.course-thumb strong {
  font-size: 1.15rem;
}

.course-info {
  gap: 7px;
  padding: 12px;
}

.course-info h3 {
  font-size: 0.9rem;
}

.course-info span,
.course-info small {
  font-size: 0.72rem;
}

.right-panel {
  gap: 14px;
}

.exam-countdown,
.right-activation-cta,
.mini-schedule {
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.exam-countdown {
  display: grid;
  gap: 11px;
  padding: 15px;
  background: linear-gradient(145deg, #ffe8b0, #f7a71b);
}

.exam-countdown .eyebrow {
  color: #9d5000;
}

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

.countdown-grid strong {
  display: grid;
  place-items: center;
  gap: 3px;
  min-height: 54px;
  border-radius: 10px;
  color: #d66300;
  background: rgba(255, 255, 255, 0.9);
  font-size: 1.3rem;
}

.countdown-grid small {
  color: #aa6900;
  font-size: 0.58rem;
}

.right-activation-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 51px;
  color: #fff;
  background: linear-gradient(135deg, #0877c6, #07548f);
  font-size: 0.9rem;
  font-weight: 900;
}

.support-card {
  gap: 9px;
  padding: 14px;
}

.support-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #1268a8;
}

.support-title svg {
  width: 19px;
  height: 19px;
}

.support-card h2 {
  font-size: 0.98rem;
}

.support-card input,
.support-card select,
.support-card textarea {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: #f0f4f9;
  font-size: 0.78rem;
}

.support-card textarea {
  min-height: 65px;
}

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

.mini-schedule {
  display: grid;
  gap: 7px;
  padding: 14px;
  background: #fff;
}

.mini-schedule a {
  display: grid;
  gap: 3px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.mini-schedule strong {
  color: #0b69ad;
  font-size: 0.77rem;
}

.mini-schedule small {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.page-title {
  padding: 20px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(218, 241, 255, 0.88), rgba(255, 255, 255, 0.95)),
    #fff;
}

.page-title h1 {
  color: #07508c;
  font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.page-title p {
  font-size: 0.9rem;
}

.combo-cover.physics {
  --cover:
    linear-gradient(180deg, rgba(8, 63, 129, 0.12), rgba(0, 32, 82, 0.8)),
    url("https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&w=800&q=82")
      center/cover;
}

.combo-cover.math {
  --cover:
    linear-gradient(180deg, rgba(144, 40, 50, 0.08), rgba(91, 14, 33, 0.8)),
    url("https://images.unsplash.com/photo-1509228468518-180dd4864904?auto=format&fit=crop&w=800&q=82")
      center/cover;
}

.combo-cover.exam {
  --cover:
    linear-gradient(180deg, rgba(4, 123, 132, 0.08), rgba(0, 65, 84, 0.8)),
    url("https://images.unsplash.com/photo-1434030216411-0b793f4b4173?auto=format&fit=crop&w=800&q=82")
      center/cover;
}

.book-cover {
  background:
    linear-gradient(180deg, rgba(1, 91, 160, 0.16), rgba(1, 47, 103, 0.82)),
    url("https://images.unsplash.com/photo-1516979187457-637abb4f9353?auto=format&fit=crop&w=600&q=82")
      center/cover;
}

.admin-topbar {
  border-bottom-color: #d7e3ef;
}

.is-admin .side-nav a.is-active,
.is-admin .side-nav a:hover {
  background: linear-gradient(135deg, #0a6db5, #064a7f);
}

.admin-section {
  border-radius: 10px;
}

.admin-hero,
.module-detail-head {
  border-radius: 10px;
  background: linear-gradient(135deg, #064c85, #0878c4);
}

@media (max-width: 1240px) {
  .app-topbar {
    grid-template-columns: 210px minmax(180px, 1fr) auto auto;
  }

  .top-actions {
    grid-column: auto;
  }

  .app-shell.is-student {
    grid-template-columns: 222px minmax(0, 1fr);
  }

  .right-panel {
    display: none;
  }

  .teacher-strip {
    gap: 11px;
  }

  .home-learning-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .app-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-shell,
  .app-shell.is-student,
  .app-shell.is-focus,
  .app-shell.is-admin {
    display: block;
    padding: 16px 16px 94px;
  }

  .teacher-strip {
    grid-template-columns: repeat(5, 148px);
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

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

@media (max-width: 640px) {
  .app-topbar {
    min-height: 56px;
    padding: 8px 12px;
  }

  .brand strong {
    font-size: 0.83rem;
  }

  .brand small {
    display: none;
  }

  .top-actions .activate-link {
    width: auto;
    min-height: 38px;
    padding: 0 9px;
    border-radius: 8px;
    background: #e8f3fb;
    font-size: 0.7rem;
  }

  .app-shell,
  .app-shell.is-student,
  .app-shell.is-focus,
  .app-shell.is-admin {
    padding: 12px 12px 86px;
  }

  .content {
    gap: 14px;
  }

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

  .map-tabs a {
    min-height: 43px;
    font-size: 0.74rem;
  }

  .map-hero {
    grid-template-columns: 1fr;
  }

  .map-hero-copy {
    gap: 10px;
    padding: 18px;
  }

  .map-hero-copy h1 {
    font-size: 2rem;
  }

  .map-hero-art {
    min-height: 190px;
    padding: 20px 42% 20px 18px;
  }

  .map-hero-art strong {
    font-size: 2.4rem;
  }

  .teacher-section,
  .catalog-section {
    padding: 13px;
  }

  .teacher-strip {
    grid-template-columns: repeat(5, 134px);
    gap: 10px;
  }

  .teacher-card,
  .teacher-card img {
    min-height: 150px;
    height: 150px;
  }

  .home-learning-preview .current-lesson {
    grid-template-columns: 1fr;
  }

  .home-learning-preview .lesson-cover {
    min-height: 148px;
  }

  .roadmap-preview {
    padding: 13px;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .course-thumb {
    min-height: 182px;
  }

  .pdf-page-mock {
    overflow: hidden;
  }

  .section-head h2 {
    font-size: 1.05rem;
  }
}

/* Portal homepage parity pass */
.student-topbar {
  grid-template-columns: 238px 220px minmax(0, 1fr) auto;
}

.student-topbar .global-search {
  width: 210px;
}

.student-topbar .top-icons {
  justify-self: center;
}

.app-shell.is-student:not(.is-focus) .content {
  gap: 20px;
}

.is-student .side-nav a {
  color: #12609c;
}

.is-student .side-nav a:hover,
.is-student .side-nav a.is-active {
  color: #12609c;
  background: rgba(220, 236, 250, 0.7);
}

.is-student .side-nav a svg {
  width: 22px;
  height: 22px;
  padding: 4px;
  border-radius: 6px;
  color: #fff;
  background: #268bd4;
}

.is-student .side-nav a:nth-child(2) svg {
  background: #ff7964;
}

.is-student .side-nav a:nth-child(3) svg {
  background: #7469ff;
}

.is-student .side-nav a:nth-child(4) svg {
  background: #ff8874;
}

.is-student .side-nav a:nth-child(5) svg {
  background: #2a92dd;
}

.is-student .side-nav a:nth-child(6) svg {
  background: #808997;
}

.is-student .side-nav a:nth-child(7) svg {
  background: #ffb632;
}

.learning-hero {
  display: block;
  min-height: 0;
}

.learning-hero .map-hero-copy {
  display: none;
}

.learning-hero .map-hero-art {
  min-height: 250px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(0, 79, 151, 0.98), rgba(0, 175, 202, 0.78)),
    url("https://images.unsplash.com/photo-1531482615713-2afd69097998?auto=format&fit=crop&w=1200&q=84")
      center/cover;
}

.wish-card {
  display: grid;
  gap: 12px;
  min-height: 330px;
  padding: 22px 16px 16px;
  overflow: hidden;
  border-radius: 10px;
  color: #fff;
  background:
    radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.18), transparent 22%),
    linear-gradient(150deg, #258fc8, #68cde5);
  box-shadow: var(--shadow);
  text-align: center;
}

.wish-card span {
  font-size: 1rem;
  font-weight: 800;
}

.wish-card strong {
  font-size: 1.56rem;
  line-height: 1.15;
}

.wish-card textarea {
  min-height: 105px;
  border: 6px solid rgba(255, 255, 255, 0.34);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.72rem;
}

.wish-card button,
.mobile-wish-card button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(180deg, #ffba28, #ec8e00);
  font-weight: 900;
  box-shadow: 0 4px 0 #c56f00;
}

.portal-course-group {
  display: grid;
  gap: 14px;
  padding: 16px 20px 18px;
  border: 1px solid #e2ebf4;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.portal-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.portal-group-head h2 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  font-size: 1.16rem;
  text-transform: uppercase;
}

.portal-group-head svg {
  width: 17px;
  height: 17px;
}

.portal-group-head a {
  color: #6b7e91;
  font-size: 0.78rem;
  font-style: italic;
}

.portal-group-head.coral h2 {
  color: #ef4d42;
}

.portal-group-head.green h2 {
  color: #00a35e;
}

.portal-group-head.blue h2 {
  color: #0c66a5;
}

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

.portal-course-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.portal-course-card h3,
.portal-course-card p {
  margin: 0;
}

.portal-course-card h3 {
  overflow: hidden;
  color: #175c91;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.42;
}

.portal-course-card p {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow: hidden;
  color: #2e638e;
  font-size: 0.7rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portal-course-card p svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  fill: currentColor;
}

.portal-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.portal-card-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  color: #17609a;
  background: #e9f4fb;
  font-size: 0.62rem;
  font-weight: 900;
  line-height: 1;
}

.portal-card-meta span:last-child {
  color: #167349;
  background: #e9f9f0;
}

.portal-cover {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 166px;
  padding: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(1, 35, 79, 0.58)),
    var(--portal-cover) center/cover;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.16),
    inset 0 -42px 70px rgba(0, 20, 55, 0.32);
  isolation: isolate;
}

.portal-cover::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  z-index: -1;
  background: rgba(255, 255, 255, 0.28);
}

.portal-cover::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -28px;
  width: 105px;
  height: 105px;
  z-index: -1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.13);
}

.portal-cover > * {
  position: relative;
}

.portal-cover span,
.portal-cover small {
  width: max-content;
  max-width: 100%;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(2, 31, 66, 0.48);
  font-size: 0.58rem;
  font-weight: 900;
  text-transform: uppercase;
}

.portal-cover strong {
  max-width: 9ch;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.28);
  font-size: 1.55rem;
  line-height: 0.95;
}

.portal-cover.physics {
  --portal-cover: url("https://images.unsplash.com/photo-1532094349884-543bc11b234d?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.math {
  --portal-cover: url("https://images.unsplash.com/photo-1509228468518-180dd4864904?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.literature,
.portal-cover.book-literature {
  --portal-cover: url("https://images.unsplash.com/photo-1516979187457-637abb4f9353?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.science {
  --portal-cover: url("https://images.unsplash.com/photo-1532187863486-abf9dbad1b69?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.chemistry,
.portal-cover.book-chemistry {
  --portal-cover: url("https://images.unsplash.com/photo-1532634993-15f421e42ec0?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.english,
.portal-cover.book-english {
  --portal-cover: url("https://images.unsplash.com/photo-1523240795612-9a054b0db644?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.exam,
.portal-cover.exam-blue,
.portal-cover.exam-red {
  --portal-cover: url("https://images.unsplash.com/photo-1434030216411-0b793f4b4173?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.book-math,
.portal-cover.book-physics,
.portal-cover.live {
  --portal-cover: url("https://images.unsplash.com/photo-1456513080510-7bf3a84b82f8?auto=format&fit=crop&w=500&q=82");
}

.portal-cover.math,
.portal-cover.exam-red,
.portal-cover.book-math {
  background-color: #b52d34;
  background-blend-mode: multiply;
}

.portal-cover.science,
.portal-cover.exam {
  background-color: #138659;
  background-blend-mode: multiply;
}

.portal-cover.chemistry,
.portal-cover.book-chemistry {
  background-color: #0996a5;
  background-blend-mode: multiply;
}

.portal-cover.english,
.portal-cover.book-english {
  background-color: #c54870;
  background-blend-mode: multiply;
}

.portal-cover.literature,
.portal-cover.book-literature {
  background-color: #a5752d;
  background-blend-mode: multiply;
}

.portal-cover.exam-blue,
.portal-cover.book-physics,
.portal-cover.live {
  background-color: #075fae;
  background-blend-mode: multiply;
}

.mobile-portal-intro {
  display: none;
}

.student-footer {
  padding: 28px max(28px, calc((100vw - 1384px) / 2)) 20px;
  color: #fff;
  background: #12649e;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.95fr 0.98fr 1fr;
  gap: 38px;
}

.footer-grid section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.footer-grid h2,
.footer-grid p {
  margin: 0;
}

.footer-grid h2 {
  margin-bottom: 6px;
  font-size: 1rem;
  text-transform: uppercase;
}

.footer-grid p,
.footer-grid a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.78rem;
  line-height: 1.55;
}

.footer-grid svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.footer-email {
  display: flex;
  align-items: center;
  max-width: 260px;
  padding-right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 6px;
}

.footer-email input {
  border: 0;
  color: #fff;
  background: transparent;
}

.footer-email input::placeholder {
  color: rgba(255, 255, 255, 0.82);
}

.footer-bottom {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  text-align: center;
}

.course-browse {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  padding: 8px 0 20px;
}

.course-categories,
.course-results {
  display: grid;
  align-content: start;
  align-items: start;
  gap: 12px;
}

.course-categories > a {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 12px;
  border-radius: 10px;
  color: #17609a;
  background: #eef2f7;
}

.course-categories > a span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: #0d639f;
  font-weight: 900;
}

.course-categories > a strong {
  font-size: 0.78rem;
  line-height: 1.35;
  text-transform: uppercase;
}

.combo-side-note {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid #dbe9f4;
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.combo-side-note svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 10px;
  color: #fff;
  background: #0d78bd;
}

.combo-side-note strong {
  color: var(--blue-dark);
  font-size: 1rem;
}

.combo-side-note small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.5;
}

.combo-results-head {
  display: grid;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid #dbe9f4;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(219, 241, 255, 0.86), rgba(255, 255, 255, 0.98)),
    #fff;
}

.combo-results-head h1,
.combo-results-head p {
  margin: 0;
}

.combo-results-head h1 {
  margin: 0 0 8px;
  color: #0f619d;
  font-size: 1.62rem;
  line-height: 1.18;
}

.combo-results-head p {
  max-width: 74ch;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.55;
}

.combo-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.combo-summary-strip article {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 2px 10px;
  align-items: center;
  min-height: 76px;
  padding: 12px;
  border: 1px solid #dbe9f4;
  border-radius: 10px;
  background: #fff;
}

.combo-summary-strip svg {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  padding: 8px;
  border-radius: 10px;
  color: #fff;
  background: #0d78bd;
}

.combo-summary-strip strong {
  color: var(--blue-dark);
  font-size: 0.9rem;
}

.combo-summary-strip span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.grade-chips,
.subject-tabs {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.grade-chips::-webkit-scrollbar,
.subject-tabs::-webkit-scrollbar {
  display: none;
}

.grade-chips button,
.subject-tabs button {
  min-width: 112px;
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  color: #657487;
  background: #eef2f7;
  font-weight: 800;
  white-space: nowrap;
}

.subject-tabs {
  border-bottom: 1px solid var(--line);
}

.subject-tabs button {
  min-width: 62px;
  min-height: 50px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
}

.subject-tabs button.is-active {
  border-bottom-color: #0b6baa;
  color: #0b6baa;
}

.browse-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 14px;
}

.portal-login-screen {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(430px, 1fr);
  gap: 0;
  min-height: 640px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: var(--shadow);
}

.portal-login-art {
  display: grid;
  align-content: center;
  gap: 30px;
  padding: 54px;
  color: #155d91;
  background:
    radial-gradient(circle at 20% 78%, rgba(125, 185, 255, 0.25), transparent 28%),
    linear-gradient(145deg, #f9fbff, #edf4ff);
}

.portal-login-art > span {
  font-size: 2.25rem;
  font-weight: 900;
}

.portal-login-art div {
  display: grid;
  gap: 16px;
  justify-items: start;
}

.portal-login-art svg {
  width: 150px;
  height: 150px;
  padding: 34px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #63a5df, #1764a5);
}

.portal-login-art strong {
  color: #3974a5;
  font-size: 1.55rem;
  line-height: 1.25;
}

.portal-login-art ul {
  display: grid;
  gap: 12px;
  max-width: 430px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-login-art li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  color: #345f83;
  font-weight: 800;
  line-height: 1.5;
}

.portal-login-art li svg {
  width: 18px;
  height: 18px;
  padding: 0;
  color: var(--green);
  background: transparent;
}

.portal-login-panel {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 34px 38px;
  border-left: 1px solid var(--line);
}

.auth-panel-head {
  display: grid;
  gap: 6px;
}

.auth-panel-head h1,
.auth-panel-head p {
  margin: 0;
}

.auth-panel-head h1 {
  color: #155d91;
  font-size: 1.6rem;
  line-height: 1.18;
}

.auth-panel-head p,
.portal-login-panel small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.portal-auth-grid {
  display: grid;
  gap: 12px;
}

.auth-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce8f3;
  border-radius: 10px;
  background: #fbfdff;
}

.primary-auth-card {
  background: #f3f8fc;
}

.auth-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.auth-card-head svg {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 10px;
  color: #fff;
  background: #0d78bd;
}

.auth-card-head strong,
.auth-card-head small {
  display: block;
}

.auth-card-head strong {
  color: var(--blue-dark);
  font-size: 1rem;
}

.auth-card-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.portal-login-panel label {
  display: grid;
  gap: 7px;
  color: #155d91;
  font-size: 0.8rem;
}

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

.portal-login-actions {
  display: grid;
  gap: 10px;
}

@media (min-width: 1360px) {
  .app-shell.is-student:not(.is-focus) {
    grid-template-columns: 286px 700px 294px;
    justify-content: start;
    max-width: 1440px;
    gap: 20px;
    padding-inline: 28px;
  }

  .app-shell.is-student:not(.is-focus) .right-panel {
    margin-left: 23px;
  }
}

@media (max-width: 980px) {
  .student-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .student-topbar .global-search {
    width: 100%;
  }

  .student-footer {
    padding: 24px 18px 92px;
  }

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

  .course-browse {
    grid-template-columns: 1fr;
  }

  .combo-summary-strip {
    grid-template-columns: 1fr;
  }

  .portal-login-screen {
    grid-template-columns: 1fr;
  }

  .portal-login-art {
    display: none;
  }

  .portal-login-panel {
    min-height: 520px;
    padding: 24px;
    border-left: 0;
  }

  .trial-signup-grid {
    grid-template-columns: 1fr;
  }

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

  .course-categories .section-head {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .student-topbar .global-search {
    display: none;
  }

  .student-topbar .top-actions {
    min-width: 0;
  }

  .student-topbar .top-actions .icon-button,
  .student-topbar .profile-button {
    display: none;
  }

  .student-topbar .top-actions .activate-link {
    white-space: nowrap;
  }

  .learning-hero .map-hero-art {
    min-height: 180px;
    padding: 18px 43% 18px 16px;
  }

  .learning-hero .map-hero-art strong {
    font-size: 2.35rem;
  }

  .learning-hero .map-hero-art img {
    width: 44%;
  }

  .slider-dots {
    display: none;
  }

  .mobile-portal-intro {
    display: grid;
    gap: 18px;
  }

  .mobile-activate-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    border-radius: 8px;
    color: #fff;
    background: #12639e;
    font-size: 0.9rem;
    font-weight: 900;
  }

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

  .mobile-shortcuts a {
    display: grid;
    place-items: center;
    gap: 7px;
    min-height: 78px;
    border-radius: 8px;
    color: #226a9f;
    background: #f0f2f5;
    font-size: 0.75rem;
    text-align: center;
  }

  .mobile-shortcuts svg {
    width: 26px;
    height: 26px;
  }

  .mobile-wish-card {
    display: grid;
    gap: 10px;
    min-height: 270px;
    padding: 18px;
    border-radius: 10px;
    color: #fff;
    background:
      radial-gradient(circle at 14% 10%, rgba(255, 255, 255, 0.2), transparent 24%),
      linear-gradient(150deg, #258fc8, #68cde5);
    text-align: center;
  }

  .mobile-wish-card strong {
    font-size: 1.4rem;
  }

  .mobile-wish-card textarea {
    min-height: 110px;
    border: 5px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.9);
  }

  .mobile-support-card {
    display: grid;
    gap: 10px;
  }

  .mobile-support-card h2 {
    margin: 0;
    color: #275e83;
    font-size: 1.05rem;
  }

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

  .mobile-support-grid input,
  .mobile-support-grid select,
  .mobile-support-grid textarea {
    min-height: 43px;
    border: 0;
    border-radius: 7px;
    background: #eef2f6;
    font-size: 0.76rem;
  }

  .mobile-support-grid input:nth-child(3),
  .mobile-support-grid textarea {
    grid-column: 1 / -1;
  }

  .mobile-support-grid textarea {
    min-height: 92px;
  }

  .teacher-section {
    padding: 13px 0 13px 13px;
  }

  .teacher-section .section-head {
    padding-right: 13px;
  }

  .teacher-strip {
    grid-template-columns: repeat(5, 120px);
  }

  .teacher-card,
  .teacher-card img {
    min-height: 164px;
    height: 164px;
  }

  .portal-course-group {
    gap: 11px;
    padding: 13px 14px 15px;
    border-radius: 0;
  }

  .portal-group-head h2 {
    font-size: 0.98rem;
  }

  .course-categories {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .course-categories::-webkit-scrollbar {
    display: none;
  }

  .course-categories .section-head,
  .course-categories .combo-side-note {
    display: none;
  }

  .course-categories > a {
    grid-template-columns: 32px minmax(0, 1fr);
    min-width: 152px;
    min-height: 58px;
    padding: 8px 10px;
  }

  .course-categories > a span {
    width: 32px;
    height: 32px;
  }

  .course-categories > a strong {
    font-size: 0.68rem;
  }

  .combo-results-head {
    padding: 15px;
  }

  .combo-results-head h1 {
    font-size: 1.55rem;
  }

  .combo-summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .combo-summary-strip article {
    grid-template-columns: 1fr;
    justify-items: center;
    min-height: 92px;
    padding: 10px 6px;
    text-align: center;
  }

  .combo-summary-strip svg {
    grid-row: auto;
    width: 32px;
    height: 32px;
    padding: 7px;
  }

  .combo-summary-strip strong {
    font-size: 0.76rem;
  }

  .combo-summary-strip span {
    font-size: 0.66rem;
    line-height: 1.3;
  }

  .portal-course-grid,
  .browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
  }

  .portal-cover {
    min-height: 182px;
  }

  .portal-course-card h3 {
    font-size: 0.78rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .course-browse {
    gap: 22px;
  }

  .portal-login-panel {
    min-height: 470px;
    padding: 24px 18px;
  }

  .course-categories {
    gap: 10px;
  }

  .course-categories > a {
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 64px;
    padding: 9px;
  }

  .course-categories > a span {
    width: 34px;
    height: 34px;
  }

  .course-categories > a strong {
    overflow: hidden;
    font-size: 0.7rem;
    text-overflow: ellipsis;
  }

  .grade-chips button {
    min-width: 96px;
    min-height: 40px;
  }

  .subject-tabs {
    gap: 6px;
  }

  .subject-tabs button {
    min-width: 58px;
    min-height: 42px;
    font-size: 0.78rem;
  }
}
