/* =========================================================
   MOCBT Academy Design System v2
   Premium · Modern · No gradients · Sky + Navy
   ========================================================= */

:root {
  --moc-sky: #0ea5e9;
  --moc-sky-dark: #0284c7;
  --moc-sky-soft: #e0f2fe;
  --moc-navy: #0b1f3a;
  --moc-navy-mid: #12263f;
  --moc-navy-soft: #1a3354;
  --moc-ink: #0f172a;
  --moc-muted: #64748b;
  --moc-line: #dbe3ef;
  --moc-bg: #edf2f7;
  --moc-surface: #ffffff;
  --moc-success: #059669;
  --moc-danger: #dc2626;
  --moc-warning: #d97706;
  --moc-radius: 18px;
  --moc-radius-sm: 12px;
  --moc-shadow: 0 12px 32px rgba(11, 31, 58, 0.09);
  --moc-shadow-sm: 0 4px 14px rgba(11, 31, 58, 0.06);
  --moc-font: "Plus Jakarta Sans", "DM Sans", system-ui, sans-serif;
  --moc-display: "Sora", "Outfit", "Plus Jakarta Sans", sans-serif;
  --moc-primary: var(--moc-sky);
  --moc-primary-dark: var(--moc-sky-dark);
  --moc-secondary: var(--moc-navy);
  --moc-border: var(--moc-line);

  /* Layout & spacing scale */
  --moc-container-max: 1200px;
  --moc-container-wide: 1280px;
  --moc-container-narrow: 860px;
  --moc-container-form: 640px;
  --moc-gutter: clamp(1rem, 2.5vw, 1.5rem);
  --moc-section-y: clamp(2rem, 4vw, 2.75rem);

  /* Typography scale */
  --moc-text-sm: 0.8125rem;
  --moc-text-base: 0.9375rem;
  --moc-text-lg: 1.0625rem;
  --moc-h1: clamp(1.75rem, 3.5vw, 2.35rem);
  --moc-h2: clamp(1.35rem, 2.2vw, 1.65rem);
  --moc-h3: clamp(1.1rem, 1.8vw, 1.25rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--moc-font);
  color: var(--moc-ink);
  background: var(--moc-bg);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--moc-sky-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--moc-sky); }

/* ========== CONTAINER SYSTEM ========== */
.moc-container {
  width: 100%;
  max-width: var(--moc-container-max);
  margin-inline: auto;
  padding-inline: var(--moc-gutter);
}
.moc-container-wide { max-width: var(--moc-container-wide); }
.moc-container-narrow { max-width: var(--moc-container-narrow); }
.moc-container-form { max-width: var(--moc-container-form); }

/* Public/student pages: cap Bootstrap container width on large screens */
@media (min-width: 576px) {
  .container:not(.container-fluid) {
    max-width: min(100% - 2rem, var(--moc-container-max));
  }
}

@keyframes mocRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes mocFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ========== BUTTONS ========== */
.btn { border-radius: var(--moc-radius-sm); font-weight: 600; }
.btn-moc {
  background: var(--moc-sky);
  border: 1px solid var(--moc-sky-dark);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: .65rem 1.15rem;
  font-size: var(--moc-text-base);
  box-shadow: 0 8px 18px rgba(2, 132, 199, 0.22);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-moc:hover {
  background: var(--moc-sky-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(2, 132, 199, 0.28);
}
.btn-moc:active { transform: none; opacity: .94; }
.btn-moc.is-loading, .btn-moc:disabled { opacity: .7; pointer-events: none; }
.btn-moc-outline {
  background: transparent;
  border: 2px solid rgba(255,255,255,.85);
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  padding: .65rem 1.15rem;
  font-size: var(--moc-text-base);
}
.btn-moc-outline:hover { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.btn-navy {
  background: var(--moc-navy);
  border: 1px solid var(--moc-navy);
  color: #fff;
  border-radius: 14px;
  font-weight: 700;
}
.btn-navy:hover { background: var(--moc-navy-mid); color: #fff; border-color: var(--moc-navy-mid); }
.btn-outline-secondary, .btn-outline-primary, .btn-outline-success, .btn-outline-danger {
  border-radius: 14px; font-weight: 600;
}

/* ========== FORMS ========== */
.form-control, .form-select {
  border-radius: 12px;
  border-color: var(--moc-line);
  padding: .7rem .95rem;
  box-shadow: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--moc-sky);
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}
.form-label { font-weight: 600; color: var(--moc-navy); font-size: .9rem; }
.input-group-text {
  border-radius: 12px 0 0 12px;
  background: #f8fafc;
  border-color: var(--moc-line);
}

/* ========== NAV / PUBLIC ========== */
.moc-navbar {
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid var(--moc-line);
  position: sticky; top: 0; z-index: 1030;
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgba(11,31,58,.04);
}
.moc-brand {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--moc-navy) !important;
  letter-spacing: -0.03em;
  display: flex; align-items: center; gap: .65rem;
}
.moc-brand img {
  height: auto; width: auto;
  max-height: 36px; max-width: min(160px, 42vw);
  object-fit: contain;
}
.moc-brand .brand-sub {
  display: block; font-size: .68rem; font-weight: 500;
  color: var(--moc-muted); letter-spacing: .02em;
}
.navbar-nav .nav-link {
  color: #334155 !important; font-weight: 600; font-size: .9rem;
  padding: .5rem .9rem !important; border-radius: 10px;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  color: var(--moc-sky-dark) !important;
  background: var(--moc-sky-soft);
}

/* ========== HERO ========== */
.moc-hero {
  position: relative;
  min-height: min(58vh, 460px);
  display: flex; align-items: center;
  background: var(--moc-navy);
  color: #fff;
  overflow: hidden;
}
.moc-hero::before {
  content: "";
  position: absolute; right: -100px; top: -80px;
  width: 380px; height: 380px; border-radius: 50%;
  background: rgba(14,165,233,.16);
  pointer-events: none;
}
.moc-hero::after {
  content: "";
  position: absolute; left: -70px; bottom: -120px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(14,165,233,.1);
  pointer-events: none;
}
.moc-hero-inner { position: relative; z-index: 1; max-width: 620px; padding: clamp(2.25rem, 5vw, 3rem) 0; }
.moc-hero .eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .16em;
  color: var(--moc-sky); margin-bottom: 1rem;
  background: rgba(14,165,233,.12); padding: .4rem .85rem; border-radius: 999px;
  border: 1px solid rgba(14,165,233,.28);
}
.moc-hero h1 {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: var(--moc-h1);
  letter-spacing: -0.04em;
  line-height: 1.12;
  margin-bottom: .85rem;
  animation: mocRise .55s ease both;
}
.moc-hero p {
  font-size: var(--moc-text-lg); color: rgba(255,255,255,.82);
  max-width: 32rem; margin-bottom: 1.35rem;
  animation: mocRise .55s ease .08s both;
}
.moc-hero .btn { animation: mocRise .55s ease .14s both; }

/* ========== SECTIONS / TYPE ========== */
.moc-section { padding: var(--moc-section-y) 0; }
.moc-section-title {
  font-family: var(--moc-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: .35rem;
  color: var(--moc-navy);
  font-size: var(--moc-h2);
}
.moc-section-sub { color: var(--moc-muted); margin-bottom: 1.35rem; max-width: 36rem; font-size: var(--moc-text-base); }

/* ========== CARDS ========== */
.moc-card, .stat-tile, .moc-course-card, .chart-box, .quick-action {
  background: var(--moc-surface);
  border: 1px solid var(--moc-line);
  border-radius: var(--moc-radius);
  box-shadow: var(--moc-shadow-sm);
}
.moc-card, .moc-course-card {
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.moc-card:hover, .moc-course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--moc-shadow);
  border-color: #c5d4e8;
}
.moc-course-card {
  overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
}
.moc-course-card img {
  width: 100%; height: 178px; object-fit: cover; background: #e2e8f0;
}
.moc-course-card .body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex; flex-direction: column; flex: 1;
}
.moc-course-card .meta { color: var(--moc-muted); font-size: .82rem; font-weight: 600; }
.moc-price { font-weight: 700; color: var(--moc-navy); font-family: var(--moc-display); }
.moc-price .old {
  text-decoration: line-through; color: var(--moc-muted);
  font-weight: 500; margin-right: .4rem; font-size: .9rem;
}
.moc-sale { color: var(--moc-danger); }

.stat-tile { padding: 1rem 1.1rem; height: 100%; }
.stat-tile .n {
  font-size: 1.45rem; font-weight: 700; font-family: var(--moc-display);
  color: var(--moc-navy); letter-spacing: -0.03em;
}
.stat-tile .l { color: var(--moc-muted); font-size: .84rem; margin-top: .2rem; font-weight: 600; }

.chart-box { padding: 1.25rem; }
.quick-action {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.1rem; color: inherit;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.quick-action:hover {
  border-color: var(--moc-sky); box-shadow: var(--moc-shadow-sm);
  color: inherit; transform: translateY(-2px);
}
.quick-action i {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem;
}

/* ========== AUTH ========== */
.moc-auth-body {
  background: var(--moc-navy);
  min-height: 100vh;
}
.moc-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.moc-auth-card {
  width: min(100%, 440px);
  background: #fff;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  padding: 2rem 1.75rem;
  animation: mocRise .45s ease both;
}
.moc-auth-card .auth-brand {
  font-family: var(--moc-display);
  font-weight: 700;
  color: var(--moc-navy);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.moc-auth-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .4rem;
  background: #f1f5f9;
  padding: .35rem;
  border-radius: 14px;
  margin-bottom: 1.25rem;
}
.moc-auth-tabs a {
  text-align: center;
  padding: .55rem .35rem;
  border-radius: 10px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--moc-muted);
}
.moc-auth-tabs a.is-active {
  background: #fff;
  color: var(--moc-navy);
  box-shadow: var(--moc-shadow-sm);
}

/* ========== FOOTER ========== */
.moc-footer {
  background: var(--moc-navy);
  color: #94a3b8;
  padding: clamp(2rem, 4vw, 2.5rem) 0 1.25rem;
  margin-top: clamp(1.5rem, 3vw, 2rem);
}
.moc-footer h6 { font-size: .95rem; }
.moc-footer a { color: #e2e8f0; }
.moc-footer a:hover { color: var(--moc-sky); }
.moc-footer h6 {
  color: #fff; font-family: var(--moc-display); font-weight: 600; margin-bottom: 1rem;
}

/* ========== STUDENT SHELL ========== */
.moc-student-top {
  background: var(--moc-navy) !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}
.moc-student-top .moc-brand,
.moc-student-top .navbar-nav .nav-link {
  color: #e2e8f0 !important;
}
.moc-student-top .navbar-nav .nav-link:hover,
.moc-student-top .navbar-nav .nav-link.active {
  color: #fff !important;
  background: rgba(14,165,233,.18);
}
.moc-student-top .btn-outline-secondary {
  border-color: rgba(148,163,184,.45);
  color: #e2e8f0;
}
.moc-student-top .btn-outline-secondary:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}

.moc-student-hero {
  background: var(--moc-navy);
  color: #fff;
  border-radius: 0 0 28px 28px;
  padding: 1.75rem 0 2rem;
  margin-bottom: -2.5rem;
  position: relative;
}
.moc-student-hero::after {
  content: "";
  position: absolute; right: 8%; top: 20%;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(14,165,233,.14);
  pointer-events: none;
}
.moc-student-hero h1 {
  font-family: var(--moc-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: clamp(1.55rem, 3vw, 2rem);
  margin: 0 0 .35rem;
}
.moc-student-hero p { color: #94a3b8; margin: 0; }
.moc-student-panel {
  position: relative; z-index: 2;
  margin-top: 1rem;
}

.moc-continue-card {
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: 18px;
  padding: 1.1rem 1.2rem;
  box-shadow: var(--moc-shadow);
  border-left: 4px solid var(--moc-sky);
  animation: mocRise .4s ease both;
}
.moc-continue-card .eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--moc-sky-dark); margin-bottom: .45rem;
}

.moc-kpi {
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: 16px;
  padding: .9rem 1rem;
  height: 100%;
  box-shadow: var(--moc-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease;
}
.moc-kpi:hover { transform: translateY(-2px); box-shadow: var(--moc-shadow); }
.moc-kpi .ico {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: .55rem; font-size: 1rem;
}
.moc-kpi .n {
  font-family: var(--moc-display); font-weight: 700;
  font-size: 1.35rem; color: var(--moc-navy); letter-spacing: -0.03em;
}
.moc-kpi .l { font-size: .8rem; font-weight: 600; color: var(--moc-muted); }

.moc-panel {
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: 18px;
  padding: 1.1rem 1.15rem;
  box-shadow: var(--moc-shadow-sm);
}
.moc-panel-title {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: 1rem;
  color: var(--moc-navy);
  margin-bottom: 1rem;
}

/* Student bottom nav */
.moc-student-body { padding-bottom: 0; }
.moc-student-bottom {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: #fff; border-top: 1px solid var(--moc-line);
  box-shadow: 0 -8px 24px rgba(15,23,42,.08);
  padding: .4rem .25rem calc(.4rem + env(safe-area-inset-bottom));
}
.moc-student-bottom a {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .15rem; text-decoration: none; color: #64748b; font-size: .65rem; font-weight: 700;
  min-height: 54px; border-radius: 12px;
}
.moc-student-bottom a i { font-size: 1.2rem; }
.moc-student-bottom a.is-active { color: var(--moc-navy); background: var(--moc-sky-soft); }
.moc-bottom-badge {
  position: absolute; top: 4px; right: calc(50% - 18px);
  min-width: 16px; height: 16px; border-radius: 99px;
  background: var(--moc-danger); color: #fff; font-size: .65rem;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
@media (max-width: 991.98px) {
  .moc-student-body { padding-bottom: 76px; }
  .moc-student-body .moc-footer { display: none; }
  .moc-student-body .moc-site-footer { margin-bottom: 0; }
}

/* ========== ADMIN ========== */
.admin-shell { display: flex; min-height: 100vh; background: var(--moc-bg); }
.admin-sidebar {
  width: 272px; background: var(--moc-navy); color: #94a3b8;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0;
}
.admin-sidebar .brand {
  padding: 1.4rem 1.25rem 1.15rem;
  font-family: var(--moc-display); font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(148,163,184,.12);
}
.admin-sidebar .brand small {
  display: block; font-weight: 500; font-size: .7rem; color: #64748b; margin-top: .3rem;
}
.admin-sidebar a {
  display: flex; align-items: center; gap: .6rem;
  color: #cbd5e1; padding: .62rem 1.25rem;
  border-left: 3px solid transparent; font-size: .9rem; font-weight: 500;
  transition: background .15s, color .15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(14,165,233,.14); color: #fff; border-left-color: var(--moc-sky);
}
.admin-sidebar .nav-label {
  padding: 1rem 1.25rem .35rem; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .12em; color: #64748b; font-weight: 700;
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--moc-line);
  padding: .95rem 1.5rem; display: flex; justify-content: space-between; align-items: center;
  position: sticky; top: 0; z-index: 20;
}
.admin-content { padding: 1.5rem; }
.admin-topbar-icon {
  position: relative;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--moc-line); border-radius: 12px;
  color: var(--moc-navy); background: #fff;
}
.admin-topbar-icon:hover { border-color: var(--moc-sky); color: var(--moc-sky-dark); }
.admin-topbar-icon .badge {
  position: absolute; top: -4px; right: -4px;
  font-size: .65rem; min-width: 16px; padding: 0 4px;
}
.admin-sidebar.show {
  position: fixed; inset: 0 auto 0 0; z-index: 1050; width: min(86vw, 300px);
  height: 100vh; overflow-y: auto; display: block !important;
  box-shadow: 10px 0 36px rgba(15,23,42,.3);
}
.admin-sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.48); z-index: 1045;
}
.admin-sidebar-backdrop.is-open { display: block; }

/* ========== LEARN ========== */
.learn-topbar {
  background: var(--moc-navy); color: #fff;
  padding: .9rem 0; position: sticky; top: 0; z-index: 50;
  border-bottom: 3px solid var(--moc-sky);
}
.learn-shell {
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  min-height: calc(100vh - 64px);
  background: var(--moc-bg);
}
.learn-sidebar {
  background: var(--moc-navy-mid); color: #e2e8f0;
  overflow-y: auto; max-height: calc(100vh - 64px);
  position: sticky; top: 64px; order: 2;
  border-left: 1px solid rgba(148,163,184,.12);
}
.learn-sidebar a {
  color: #cbd5e1; display: block; padding: .55rem .95rem; font-size: .88rem;
  border-radius: 10px; margin: 0 .5rem .2rem; transition: background .15s;
  font-weight: 500;
}
.learn-sidebar a.active, .learn-sidebar a:hover {
  background: rgba(14,165,233,.22); color: #fff;
}
.learn-content {
  padding: 1.35rem 1.5rem 2.5rem; background: #fff; min-width: 0; order: 1;
  border-right: 1px solid var(--moc-line);
}
.learn-video {
  background: #0b1220; border-radius: 16px; aspect-ratio: 16/9; overflow: hidden;
  box-shadow: var(--moc-shadow);
}
.learn-video iframe, .learn-video video { width: 100%; height: 100%; border: 0; display: block; }
.progress-bar-moc {
  height: 10px; background: #e2e8f0; border-radius: 99px; overflow: hidden;
}
.progress-bar-moc > span {
  display: block; height: 100%; background: var(--moc-sky); border-radius: 99px;
  transition: width .4s ease;
}
.lesson-html { line-height: 1.75; color: #334155; }
.lesson-html img { max-width: 100%; height: auto; border-radius: 10px; }
.learn-curriculum-btn { display: none; }

/* ========== COURSE DETAILS ========== */
.course-hero {
  background: var(--moc-navy);
  color: #fff;
  padding: clamp(1.5rem, 3vw, 2rem) 0 clamp(1.75rem, 3vw, 2.25rem);
  border-bottom: 3px solid var(--moc-sky);
}
.course-hero h1 {
  font-family: var(--moc-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: var(--moc-h1);
}
.course-breadcrumb a { color: #94a3b8; }
.course-breadcrumb .sep { margin: 0 .4rem; color: #64748b; }
.course-buy-card {
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 20px; padding: 1.35rem;
  box-shadow: var(--moc-shadow);
}
.course-sticky-cta {
  display: none;
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  background: #fff; border-top: 1px solid var(--moc-line);
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(15,23,42,.1);
}

/* ========== SUPPORT / CHAT ========== */
.moc-ticket-card {
  display: block; background: #fff; border: 1px solid var(--moc-line);
  border-radius: 16px; padding: 1rem 1.1rem; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.moc-ticket-card:hover { border-color: var(--moc-sky); box-shadow: var(--moc-shadow-sm); }
.moc-ticket-card.is-unread { border-color: #fbbf24; background: #fffbeb; }
.moc-status-pill {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: .28rem .6rem; border-radius: 999px; background: #e2e8f0; color: #334155;
}
.moc-status-pill.status-awaiting_admin { background: #e0f2fe; color: #0369a1; }
.moc-status-pill.status-awaiting_student { background: #fef3c7; color: #92400e; }
.moc-status-pill.status-open { background: #dbeafe; color: #1d4ed8; }
.moc-status-pill.status-resolved { background: #d1fae5; color: #047857; }
.moc-status-pill.status-closed { background: #f1f5f9; color: #64748b; }

.moc-chat-thread {
  background: #f8fafc; border: 1px solid var(--moc-line);
  border-radius: 16px; padding: 1rem; min-height: 320px; max-height: 62vh;
  overflow-y: auto; display: flex; flex-direction: column; gap: .85rem;
}
.moc-chat-row { display: flex; flex-direction: column; max-width: 85%; }
.moc-chat-row.mine { align-self: flex-end; align-items: flex-end; }
.moc-chat-row.theirs { align-self: flex-start; align-items: flex-start; }
.moc-chat-row.internal { align-self: stretch; max-width: 100%; }
.moc-chat-row.system { align-self: center; max-width: 90%; text-align: center; }
.moc-chat-meta { display: flex; align-items: center; gap: .5rem; margin-bottom: .35rem; }
.moc-chat-row.mine .moc-chat-meta { flex-direction: row-reverse; text-align: right; }
.moc-chat-meta .name { font-size: .85rem; font-weight: 700; color: #0f172a; }
.moc-chat-meta .role { font-size: .7rem; color: #64748b; text-transform: uppercase; letter-spacing: .04em; }
.moc-chat-bubble {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 16px 16px 16px 4px;
  padding: .75rem .9rem; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.moc-chat-row.mine .moc-chat-bubble {
  background: var(--moc-navy); color: #fff; border-color: var(--moc-navy); border-radius: 16px 16px 4px 16px;
}
.moc-chat-row.mine .moc-chat-bubble a { color: #7dd3fc; }
.moc-chat-bubble.internal { background: #fffbeb; border-color: #fcd34d; color: #78350f; border-radius: 10px; }
.moc-chat-row.system .moc-chat-bubble { background: transparent; border: 0; box-shadow: none; color: #64748b; font-size: .85rem; padding: .25rem; }
.moc-chat-bubble .body { line-height: 1.55; word-break: break-word; }
.moc-chat-bubble .time { font-size: .7rem; opacity: .7; margin-top: .45rem; }
.moc-chat-composer { position: sticky; bottom: 0; }

.admin-content:has(.moc-support-desk) {
  padding: 0; display: flex; flex-direction: column; min-height: calc(100vh - 64px);
}
.moc-support-desk {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(260px, 300px);
  flex: 1; min-height: calc(100vh - 64px);
  background: var(--moc-bg); border-top: 1px solid var(--moc-line);
}
.moc-support-list {
  background: #fff; border-right: 1px solid var(--moc-line);
  display: flex; flex-direction: column; min-height: 0;
}
.moc-support-list-head { padding: .9rem; border-bottom: 1px solid var(--moc-line); }
.moc-support-list-body { overflow-y: auto; flex: 1; }
.moc-support-list-item {
  display: block; padding: .85rem .9rem;
  border-bottom: 1px solid var(--moc-line);
  color: inherit; text-decoration: none; border-left: 3px solid transparent;
}
.moc-support-list-item:hover { background: #f8fafc; }
.moc-support-list-item.is-active { background: #e0f2fe; border-left-color: var(--moc-sky); }
.moc-support-list-item.is-unread { background: #fffbeb; }
.moc-support-chat {
  display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f8fafc;
}
.moc-support-chat-bar {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1rem; background: #fff; border-bottom: 1px solid var(--moc-line);
}
.moc-support-chat .moc-chat-thread {
  flex: 1; max-height: none; min-height: 280px; border: 0; border-radius: 0; background: transparent;
}
.moc-support-composer {
  background: #fff; border-top: 1px solid var(--moc-line);
  border-radius: 0; margin: 0; position: sticky; bottom: 0;
}
.moc-support-file { max-width: 220px; }
.moc-ticket-ai-panel {
  margin: 0;
  padding: .85rem 1rem;
  background: #fff;
  border-top: 1px solid var(--moc-line);
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}
.moc-ticket-ai-head { margin-bottom: .55rem; }
.moc-ticket-ai-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--moc-navy, #0b1f3a);
  display: flex;
  align-items: center;
  gap: .35rem;
}
.moc-ticket-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: .5rem;
}
.moc-ticket-ai-out {
  margin-top: .5rem;
  padding: .75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
  word-break: break-word;
}
.moc-ticket-ai-out .ai-message,
.moc-ticket-ai-out .ai-table-wrapper {
  max-width: 100%;
}
.moc-ticket-ai-draft-label {
  font-size: .78rem;
  color: var(--moc-muted, #64748b);
  margin-bottom: .35rem;
}
.moc-ticket-ai-draft-preview {
  font-size: .88rem;
  line-height: 1.55;
  white-space: normal;
  color: var(--moc-text, #0f172a);
}
.moc-student-page .moc-ticket-ai-panel {
  border: 1px solid var(--moc-line);
  border-radius: 12px;
  margin-top: .75rem;
}
.moc-support-meta { background: #fff; border-left: 1px solid var(--moc-line); overflow-y: auto; }
.moc-support-meta-inner { padding: 1rem; }
.moc-support-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1040;
}
.moc-support-backdrop.is-open { display: block; }

/* ========== MISC ========== */
.moc-alert { border-radius: 12px; border: 1px solid transparent; }
.toast-stack {
  position: fixed; top: 1rem; right: 1rem; z-index: 2000;
  display: flex; flex-direction: column; gap: .6rem; max-width: 360px;
}
.moc-toast {
  background: #fff; border: 1px solid var(--moc-line); border-left: 4px solid var(--moc-sky);
  border-radius: 12px; padding: .85rem 1rem; box-shadow: var(--moc-shadow);
  animation: mocRise .3s ease both;
}
.moc-toast.success { border-left-color: var(--moc-success); }
.moc-toast.error { border-left-color: var(--moc-danger); }
.moc-toast.warning { border-left-color: var(--moc-warning); }
.badge-soft { background: #e0f2fe; color: #0369a1; font-weight: 600; }
.table-responsive-moc { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .85rem .75rem; }
.streak-dot {
  width: 12px; height: 12px; border-radius: 50%; background: #e2e8f0; margin: 0 auto;
}
.streak-dot.on { background: var(--moc-sky); }
.notif-bell { position: relative; }
.notif-bell .dot {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; border-radius: 99px;
  background: var(--moc-danger); color: #fff; font-size: .65rem;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.moc-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--moc-navy); color: #fff; font-weight: 700;
}
.moc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moc-profile-hero {
  background: var(--moc-navy); color: #fff;
  border-radius: var(--moc-radius); padding: clamp(1.1rem, 2.5vw, 1.35rem);
  border-bottom: 3px solid var(--moc-sky); margin-bottom: 1rem;
}
.moc-profile-hero .meta { color: #94a3b8; font-size: var(--moc-text-sm); }
.moc-profile-stat {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 10px; padding: .65rem .75rem; text-align: center;
}
.moc-profile-stat .n { font-family: var(--moc-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
.moc-profile-stat .l { font-size: .75rem; color: #94a3b8; margin-top: .15rem; }
.moc-promo-banner {
  background: var(--moc-navy); color: #fff; border-bottom: 3px solid var(--moc-sky);
}
.moc-promo-banner code {
  background: rgba(255,255,255,.12); color: #fff; padding: .1rem .4rem; border-radius: 4px;
}
.moc-countdown {
  font-family: var(--moc-display); font-weight: 700; letter-spacing: .04em;
  font-variant-numeric: tabular-nums; background: rgba(255,255,255,.1);
  padding: .35rem .75rem; border-radius: 8px; white-space: nowrap;
}
.cms-content { line-height: 1.7; color: #1e293b; }
.cms-content h2, .cms-content h3 { font-family: var(--moc-display); margin-top: 1.5rem; }
.cms-content img { max-width: 100%; height: auto; border-radius: 8px; }
.cms-content a { color: var(--moc-sky-dark); }
.moc-success-panel { border-top: 4px solid var(--moc-sky); }
.moc-success-check {
  width: 56px; height: 56px; margin: 0 auto; border-radius: 50%;
  background: #ecfdf5; color: #059669; font-size: 1.6rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1199.98px) {
  .moc-support-desk { grid-template-columns: 1fr; min-height: calc(100vh - 120px); }
  .moc-support-list, .moc-support-meta {
    position: fixed; top: 0; bottom: 0; z-index: 1050;
    width: min(88vw, 320px); max-width: 100%;
    transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: 8px 0 30px rgba(15,23,42,.2);
  }
  .moc-support-meta {
    right: 0; left: auto; transform: translateX(105%);
    box-shadow: -8px 0 30px rgba(15,23,42,.2);
  }
  .moc-support-list.is-open, .moc-support-meta.is-open { transform: none; }
  .moc-support-chat { min-height: calc(100vh - 120px); }
  .moc-support-file { max-width: 100%; }
}

@media (max-width: 991.98px) {
  .learn-shell { grid-template-columns: 1fr; }
  .learn-curriculum-btn { display: inline-flex; }
  .learn-shell .learn-sidebar {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 1055;
    width: min(88vw, 340px); max-height: none;
    transform: translateX(105%); transition: transform .2s ease;
    box-shadow: -8px 0 30px rgba(15,23,42,.25); order: 0;
    visibility: hidden; pointer-events: none;
  }
  .learn-shell .learn-sidebar.is-open {
    transform: none;
    visibility: visible; pointer-events: auto;
  }
  .learn-sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.45); z-index: 1050;
  }
  .learn-sidebar-backdrop.is-open { display: block; }
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; display: none; }
  .admin-sidebar.show { display: block; }
  .stat-tile .n { font-size: 1.35rem; }
  .table-responsive-moc { display: block; width: 100%; overflow-x: auto; }
  .moc-section { padding-top: 1.5rem; padding-bottom: 1.75rem; }
  .course-sticky-cta { display: block; }
  .course-buy-card.desktop-only { display: none; }
}

@media (max-width: 575.98px) {
  .moc-chat-row { max-width: 94%; }
  .moc-chat-thread { max-height: 55vh; padding: .75rem; }
  .moc-chat-composer .form-control-sm { max-width: 100% !important; }
  .moc-auth-card { padding: 1.5rem 1.15rem; }
  .admin-content { padding: 1rem; }
  .learn-content { padding: 1rem; }
}

/* ========== AUTH SPLIT LAYOUT ========== */
.moc-auth-page {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  min-height: 100vh;
  background: var(--moc-bg);
}
.moc-auth-aside {
  background: var(--moc-navy);
  color: #fff;
  padding: 3rem 2.5rem;
  display: flex;
  align-items: center;
}
.moc-auth-aside-inner { max-width: 420px; }
.moc-auth-eyebrow {
  font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: #7dd3fc; font-weight: 700; margin-bottom: .75rem;
}
.moc-auth-aside-title {
  font-family: var(--moc-display); font-weight: 700;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem); letter-spacing: -.03em;
  margin-bottom: 1rem; line-height: 1.2;
}
.moc-auth-aside-text { color: #94a3b8; margin-bottom: 1.5rem; }
.moc-auth-points { list-style: none; padding: 0; margin: 0; }
.moc-auth-points li {
  display: flex; gap: .65rem; align-items: flex-start;
  margin-bottom: .65rem; color: #e2e8f0; font-weight: 500;
}
.moc-auth-points i { color: var(--moc-sky); margin-top: .15rem; }
.moc-auth-logo { max-height: 48px; width: auto; margin-bottom: 1.25rem; }
.moc-auth-logo--aside { max-height: 56px; }
.moc-auth-main {
  display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem;
}
.moc-auth-box {
  width: min(100%, 440px); background: #fff; border: 1px solid var(--moc-line);
  border-radius: 22px; padding: 2rem 1.75rem; box-shadow: var(--moc-shadow);
  animation: mocRise .45s ease both;
}
.moc-auth-box h1 {
  font-family: var(--moc-display); font-weight: 700; font-size: 1.55rem;
  color: var(--moc-navy); letter-spacing: -.03em;
}
.moc-auth-kicker {
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--moc-sky-dark); margin-bottom: .35rem;
}
.moc-login-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
  background: #f1f5f9; padding: .35rem; border-radius: 14px; margin-bottom: 1.15rem;
}
.moc-login-tab {
  border: 0; background: transparent; border-radius: 10px;
  padding: .55rem .25rem; font-size: .78rem; font-weight: 700; color: var(--moc-muted);
}
.moc-login-tab.is-active {
  background: #fff; color: var(--moc-navy); box-shadow: var(--moc-shadow-sm);
}
.moc-input-icon { position: relative; }
.moc-input-icon > i {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: #94a3b8;
}
.moc-input-icon .form-control { padding-left: 2.5rem; }
.moc-input-icon.password-wrap .form-control { padding-right: 2.75rem; }
.moc-input-icon .toggle-pass {
  position: absolute; right: .55rem; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: #64748b;
}
.moc-auth-links {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 1rem; font-size: .88rem; font-weight: 600;
}
.moc-btn-auth { padding: .85rem 1.25rem; }
.moc-auth-mobile-brand {
  background: var(--moc-navy); color: #fff; padding: 1.25rem 0; text-align: center;
}
.moc-auth-wordmark {
  font-family: var(--moc-display); font-weight: 700; font-size: 1.25rem;
}
.moc-auth-mobile-tag { color: #94a3b8; font-size: .9rem; margin-top: .35rem; }
@media (max-width: 991.98px) {
  .moc-auth-page { grid-template-columns: 1fr; }
  .moc-auth-aside { display: none; }
}

/* ========== HEADER SEARCH & PROFILE DROPDOWN ========== */
.moc-header-search {
  position: relative; max-width: 420px;
}
.moc-header-search > i {
  position: absolute; left: .9rem; top: 50%; transform: translateY(-50%);
  color: var(--moc-muted); pointer-events: none;
}
.moc-header-search .form-control {
  padding-left: 2.5rem; border-radius: 999px; background: #f8fafc;
}
.moc-nav-dropdown { border-radius: 14px; border-color: var(--moc-line); box-shadow: var(--moc-shadow); padding: .5rem; }
.moc-nav-dropdown .dropdown-item { border-radius: 8px; font-weight: 600; font-size: .9rem; }

.moc-profile-dropdown .moc-profile-trigger {
  display: inline-flex; align-items: center; gap: .5rem;
  border: 1px solid var(--moc-line); border-radius: 999px;
  padding: .25rem .65rem .25rem .25rem; background: #fff; color: var(--moc-navy);
  font-weight: 600; font-size: .88rem;
}
.moc-profile-dropdown .moc-profile-trigger::after { margin-left: .15rem; }
.learn-env-header .moc-profile-dropdown .moc-profile-trigger {
  border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: #fff;
}
.moc-profile-menu {
  width: min(92vw, 320px); border-radius: 18px; border-color: var(--moc-line);
  box-shadow: var(--moc-shadow); padding: 0; overflow: hidden;
  display: none; flex-direction: column;
  max-height: min(88vh, calc(100dvh - 72px));
}
.moc-profile-menu.show {
  display: flex;
}
.moc-profile-menu-head {
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--moc-line);
  flex-shrink: 0;
}
.moc-profile-menu-body {
  padding: .5rem; flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.moc-profile-menu-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .65rem .75rem; border-radius: 12px;
  color: var(--moc-ink); font-weight: 600; font-size: .9rem;
  text-decoration: none;
}
.moc-profile-menu-item:hover { background: #f1f5f9; color: var(--moc-navy); }
.moc-profile-menu-item .ico {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: var(--moc-navy); flex-shrink: 0;
}
.moc-profile-menu-item .ico-blue { background: #dbeafe; color: #1d4ed8; }
.moc-profile-menu-item .ico-green { background: #d1fae5; color: #047857; }
.moc-profile-menu-item .ico-purple { background: #ede9fe; color: #6d28d9; }
.moc-profile-menu-item .ico-red { background: #fee2e2; color: #b91c1c; }
.moc-profile-menu-item .ico-sky { background: var(--moc-sky-soft); color: var(--moc-sky-dark); }
.moc-profile-menu-item .ico-navy { background: #e2e8f0; color: var(--moc-navy); }
.moc-profile-menu-item .ico-amber { background: #fef3c7; color: #b45309; }
.moc-profile-menu-item .ico-teal { background: #ccfbf1; color: #0f766e; }
.moc-profile-menu-item .ico-danger { background: #fee2e2; color: #dc2626; }
.moc-profile-menu-logout-bar {
  flex-shrink: 0; padding: .65rem .75rem;
  border-top: 1px solid var(--moc-line); background: #fff;
}
.moc-profile-logout-btn {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 44px; padding: .7rem 1rem;
  border-radius: 12px; border: 1px solid #fecaca;
  background: #fef2f2; color: #dc2626 !important;
  font-weight: 700; font-size: .92rem; text-decoration: none;
}
.moc-profile-logout-btn:hover,
.moc-profile-logout-btn:focus {
  background: #fee2e2; color: #b91c1c !important;
}
.moc-profile-menu-foot {
  flex-shrink: 0;
  padding: .75rem 1rem; border-top: 1px solid var(--moc-line);
  text-align: center; font-size: .82rem; color: var(--moc-muted);
}
.moc-student-logout-action { margin-top: 1rem; }
.moc-student-logout-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 46px; padding: .75rem 1.15rem;
  border-radius: 14px; border: 1px solid #fecaca;
  background: #fef2f2; color: #dc2626; font-weight: 700;
  font-size: .92rem; text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.moc-student-logout-btn:hover,
.moc-student-logout-btn:focus {
  background: #fee2e2; border-color: #fca5a5; color: #b91c1c;
}
.moc-student-page-head .moc-student-logout-action {
  width: 100%;
  margin-top: 0;
}
@media (min-width: 576px) {
  .moc-student-page-head .moc-student-logout-action { width: auto; }
  .moc-student-page-head .moc-student-logout-btn { width: auto; min-width: 140px; }
}
.moc-profile-v2-logout-row {
  display: flex; flex-wrap: wrap; gap: .5rem;
  justify-content: center; margin-top: .75rem;
}
.moc-profile-v2-logout-row .moc-student-logout-btn {
  width: auto; min-width: min(100%, 160px);
}
.moc-profile-menu-foot a { color: var(--moc-muted); font-weight: 600; }

/* ========== STUDENT SHELL (Alison-style) ========== */
.moc-student-shell { display: flex; min-height: 100vh; min-width: 0; background: var(--moc-bg); }
.moc-student-sidebar {
  width: 260px; flex-shrink: 0; background: #fff;
  border-right: 1px solid var(--moc-line);
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.moc-student-sidebar-profile {
  padding: 1.25rem 1rem; border-bottom: 1px solid var(--moc-line);
  text-align: center; background: var(--moc-navy); color: #fff;
}
.moc-student-sidebar-profile .name {
  font-family: var(--moc-display); font-weight: 700; font-size: .95rem;
  margin-top: .65rem; line-height: 1.3;
}
.moc-student-sidebar-profile .view-link {
  display: inline-block; font-size: .82rem; color: #7dd3fc; margin: .25rem 0;
}
.moc-student-sidebar-profile .student-id {
  font-size: .72rem; color: #94a3b8; letter-spacing: .04em;
}
.moc-student-sidebar-nav { padding: .75rem 0 1.5rem; }
.moc-student-sidebar-nav .nav-group-label {
  padding: .85rem 1.1rem .35rem; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--moc-muted); font-weight: 700;
}
.moc-student-sidebar-nav a {
  display: flex; align-items: center; gap: .65rem;
  padding: .62rem 1.1rem; color: #334155; font-weight: 600; font-size: .88rem;
  border-left: 3px solid transparent;
}
.moc-student-sidebar-nav a i { width: 18px; text-align: center; color: var(--moc-muted); }
.moc-student-sidebar-nav a:hover { background: #f8fafc; color: var(--moc-navy); }
.moc-student-sidebar-nav a.is-active {
  background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  border-left-color: var(--moc-sky);
}
.moc-student-sidebar-nav a.is-active i { color: var(--moc-sky-dark); }
.moc-student-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.moc-student-topbar {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1.25rem; background: #fff;
  border-bottom: 1px solid var(--moc-line); position: sticky; top: 0; z-index: 30;
}
.moc-student-topbar-brand {
  font-family: var(--moc-display); font-weight: 700; color: var(--moc-navy);
  display: flex; align-items: center; max-width: min(150px, 42vw); flex-shrink: 0;
}
.moc-student-logo {
  display: block; max-height: 32px; max-width: 100%;
  width: auto; height: auto; object-fit: contain;
}
.moc-student-content { flex: 1; padding: var(--moc-gutter); }
.moc-student-page {
  max-width: var(--moc-container-max);
  width: 100%;
  margin-inline: auto;
}
.moc-student-page-head { margin-bottom: 1.15rem; }
.moc-student-page-head h1 {
  font-family: var(--moc-display); font-weight: 700; font-size: var(--moc-h2);
  color: var(--moc-navy); letter-spacing: -.03em; margin: 0 0 .3rem;
}
.moc-student-page-head p { color: var(--moc-muted); margin: 0; }
.moc-student-sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1040;
}
.moc-student-sidebar-backdrop.is-open { display: block; }

.moc-course-tabs {
  display: flex; flex-wrap: wrap; gap: .5rem 1.25rem;
  border-bottom: 1px solid var(--moc-line); padding-bottom: .5rem;
}
.moc-course-tabs a {
  color: var(--moc-muted); font-weight: 700; font-size: .9rem;
  padding-bottom: .5rem; border-bottom: 2px solid transparent;
}
.moc-course-tabs a.is-active { color: var(--moc-sky-dark); border-bottom-color: var(--moc-sky); }
.moc-course-list { display: flex; flex-direction: column; gap: 1rem; }
.moc-course-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 1rem;
  background: #fff; border: 1px solid var(--moc-line); border-radius: 18px;
  padding: 1rem; box-shadow: var(--moc-shadow-sm); align-items: center;
}
.moc-course-row-thumb {
  width: 120px; height: 72px; object-fit: cover; border-radius: 12px; background: #e2e8f0;
}
.moc-course-row-actions { text-align: right; min-width: 160px; }
.moc-settings-card {
  background: #fff; border: 1px solid var(--moc-line); border-radius: 18px;
  padding: 1.25rem; height: 100%; box-shadow: var(--moc-shadow-sm);
}
.moc-settings-card .ico {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: .75rem;
}
.moc-settings-card h2 { font-size: 1rem; font-weight: 700; color: var(--moc-navy); margin-bottom: .35rem; }
.moc-settings-card p { font-size: .88rem; color: var(--moc-muted); margin-bottom: 1rem; }

/* ========== LEARNING ENVIRONMENT (Alison-style) ========== */
.moc-learn-body { background: var(--moc-bg); }
.learn-env-header {
  background: var(--moc-navy); color: #fff;
  border-bottom: 3px solid var(--moc-sky);
  padding: .65rem 0; position: sticky; top: 0; z-index: 60;
}
.learn-env-brand {
  display: flex; align-items: center;
  color: #fff; font-family: var(--moc-display); font-weight: 700;
  flex-shrink: 0; max-width: min(140px, 36vw);
}
.learn-env-brand img { display: block; }
.learn-env-logo {
  display: block; max-width: 100%; max-height: 30px;
  width: auto; height: auto; object-fit: contain;
}
.learn-progress-bar { background: rgba(255,255,255,.2); }
.learn-progress-bar > span { background: var(--moc-sky); }
.learn-cert-btn {
  border: 2px solid #34d399; color: #34d399; font-weight: 700; border-radius: 999px;
}
.learn-cert-btn:hover { background: rgba(52,211,153,.12); color: #6ee7b7; border-color: #6ee7b7; }

.learn-env-shell {
  display: grid; grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  min-height: calc(100vh - 120px);
  max-width: var(--moc-container-wide);
  margin-inline: auto;
}
.learn-env-sidebar {
  background: var(--moc-navy-mid); color: #e2e8f0;
  overflow-y: auto; max-height: calc(100vh - 130px);
  position: sticky; top: 58px; border-right: 1px solid rgba(148,163,184,.12);
}
.learn-env-sidebar-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .85rem 1rem; background: var(--moc-navy); border-bottom: 1px solid rgba(148,163,184,.15);
  font-size: .9rem;
}
.learn-module { border-bottom: 1px solid rgba(148,163,184,.1); }
.learn-module-toggle {
  width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .15rem .5rem;
  padding: .75rem 1rem; border: 0; background: transparent; color: #e2e8f0;
  text-align: left; font-weight: 600;
}
.learn-module-toggle:hover { background: rgba(14,165,233,.1); }
.learn-module-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: #94a3b8; width: 100%;
}
.learn-module-title { font-size: .88rem; color: #f8fafc; flex: 1; }
.learn-module-lessons { padding: 0 .5rem .5rem; }
.learn-lesson-link {
  display: flex; gap: .65rem; align-items: flex-start;
  padding: .55rem .65rem; border-radius: 10px; color: #cbd5e1; font-size: .85rem;
}
.learn-lesson-link:hover { background: rgba(14,165,233,.15); color: #fff; }
.learn-lesson-link.is-active { background: rgba(251,191,36,.18); color: #fff; }
.learn-lesson-link.is-done .learn-lesson-name { color: #94a3b8; }
.learn-lesson-info { min-width: 0; flex: 1; }
.learn-lesson-name { display: block; font-weight: 600; line-height: 1.35; }
.learn-lesson-meta { display: block; font-size: .72rem; color: #94a3b8; margin-top: .15rem; }
.learn-env-main { padding: 1rem 1.15rem; min-width: 0; }
.learn-content-card {
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 18px; overflow: hidden; box-shadow: var(--moc-shadow-sm);
}
.learn-content-band {
  background: #f8fafc; color: var(--moc-navy);
  padding: .85rem 1.25rem; border-bottom: 1px solid var(--moc-line);
}
.learn-lesson-label {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--moc-muted); font-weight: 700; margin-bottom: .2rem;
}
.learn-lesson-title {
  font-family: var(--moc-display); font-weight: 700;
  overflow-wrap: anywhere; word-break: break-word;
}
.learn-content-body { padding: 1.25rem 1.35rem 1.5rem; min-width: 0; }
.learn-resources, .learn-notes {
  background: #f8fafc; border: 1px solid var(--moc-line);
  border-radius: 14px; padding: 1rem 1.1rem;
}
.learn-empty-state {
  max-width: 720px; margin: 2rem auto; padding: 0 1rem;
}
.learn-env-footer {
  position: sticky; bottom: 0; z-index: 55;
  background: #fff; border-top: 1px solid var(--moc-line);
  box-shadow: 0 -8px 24px rgba(15,23,42,.08);
  padding: .75rem 0 calc(.75rem + env(safe-area-inset-bottom));
}
.learn-env-footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem;
}
.learn-xp-badge {
  display: inline-block; background: #fef3c7; color: #b45309;
  font-weight: 800; font-size: .82rem; padding: .35rem .75rem; border-radius: 999px;
  border: 1px solid #fcd34d;
}
.learn-footer-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.btn-learn-next {
  background: #059669; border: 1px solid #047857; color: #fff;
  font-weight: 700; border-radius: 12px; padding: .6rem 1.35rem;
}
.btn-learn-next:hover { background: #047857; color: #fff; }
.learn-support-btn { border-radius: 12px; }

@media (max-width: 991.98px) {
  .moc-student-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 1050;
    width: min(88vw, 280px); transform: translateX(-105%);
    transition: transform .2s ease; box-shadow: 8px 0 30px rgba(15,23,42,.2);
    visibility: hidden; pointer-events: none;
  }
  .moc-student-sidebar.is-open {
    transform: none;
    visibility: visible; pointer-events: auto;
  }
  .moc-student-content { padding: 1rem; }
  .moc-course-row { grid-template-columns: 1fr; }
  .moc-course-row-thumb { width: 100%; height: 140px; }
  .moc-course-row-actions { text-align: left; min-width: 0; }
  .learn-env-shell:not(.learn-env-shell--page) { grid-template-columns: 1fr; }
  .learn-env-shell:not(.learn-env-shell--page) .learn-env-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1055;
    width: min(92vw, 320px); max-height: none;
    transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: 8px 0 30px rgba(15,23,42,.25);
    visibility: hidden; pointer-events: none;
  }
  .learn-env-shell:not(.learn-env-shell--page) .learn-env-sidebar.is-open {
    transform: none;
    visibility: visible; pointer-events: auto;
  }
  .learn-env-shell:not(.learn-env-shell--page) .learn-env-main { padding: .85rem; padding-bottom: 5rem; }
  .learn-footer-progress, .learn-footer-status { display: none !important; }
  .learn-env-footer-inner { justify-content: space-between; }
  .learn-footer-actions { margin-left: 0; flex: 1; justify-content: flex-end; }
}

@media (max-width: 575.98px) {
  .moc-profile-menu {
    width: min(96vw, 320px);
    max-height: min(82vh, calc(100dvh - 64px));
  }
  .moc-profile-menu.show {
    position: fixed;
    top: .65rem;
    right: .65rem;
    left: auto;
    bottom: auto;
    z-index: 1060;
    margin: 0;
  }
  .moc-profile-menu-body { max-height: 50vh; }
  .learn-content-body { padding: 1rem; }
}

/* ========== COURSE DETAILS (Alison-inspired) ========== */
.course-hero-title {
  font-family: var(--moc-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-size: var(--moc-h1);
  line-height: 1.15;
  margin: .5rem 0 .85rem;
}
.course-hero-lead { color: #cbd5e1; font-size: var(--moc-text-lg); max-width: 36rem; margin: 0; }
.course-level-badge {
  display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .12em;
  background: #ede9fe; color: #5b21b6; padding: .3rem .65rem; border-radius: 6px; margin-right: .5rem;
}
.course-chip {
  display: inline-block; font-size: .78rem; font-weight: 700;
  background: rgba(14,165,233,.18); color: #7dd3fc; padding: .3rem .7rem; border-radius: 999px;
}
.course-media-card {
  border-radius: 18px; overflow: hidden; border: 3px solid rgba(255,255,255,.15);
  box-shadow: var(--moc-shadow);
}
.course-media-card img { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; }
.course-instructor { color: #94a3b8; font-size: .88rem; }
.course-stats-bar {
  background: #fff; border-bottom: 1px solid var(--moc-line);
  padding: 1rem 0; margin-bottom: 1.5rem;
}
.course-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .75rem;
}
.course-stat {
  display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem;
  background: #f8fafc; border: 1px solid var(--moc-line); border-radius: 14px;
}
.course-stat i { font-size: 1.25rem; color: var(--moc-sky-dark); }
.course-stat strong { display: block; font-size: .92rem; color: var(--moc-navy); }
.course-stat span { display: block; font-size: .72rem; color: var(--moc-muted); font-weight: 600; }
.course-sticky-bar {
  position: sticky; top: 0; z-index: 1025;
  background: var(--moc-navy); color: #fff;
  border-bottom: 3px solid var(--moc-sky);
  padding: .65rem 0;
}
.course-sticky-inner { display: flex; align-items: center; gap: 1rem; }
.course-sticky-thumb {
  width: 48px; height: 48px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
}
.course-checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
@media (min-width: 768px) { .course-checklist { grid-template-columns: 1fr 1fr; } }
.course-checklist li {
  display: flex; gap: .65rem; align-items: flex-start;
  font-size: .92rem; color: #334155;
}
.course-checklist i { color: var(--moc-sky-dark); margin-top: .15rem; flex-shrink: 0; }
.course-simple-list { padding-left: 1.1rem; color: #334155; }
.course-simple-list li { margin-bottom: .4rem; }
.course-curriculum .accordion-item {
  border: 1px solid var(--moc-line); border-radius: 14px !important;
  margin-bottom: .65rem; overflow: hidden;
}
.course-curriculum .accordion-button {
  background: #fff; font-size: .92rem; box-shadow: none;
}
.course-curriculum .accordion-button:not(.collapsed) {
  background: var(--moc-sky-soft); color: var(--moc-navy);
}
.course-lesson-list { list-style: none; padding: 0; margin: 0; }
.course-lesson-list li {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
  padding: .7rem 1rem; border-top: 1px solid var(--moc-line); font-size: .88rem;
}
.course-lesson-list .lesson-main { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.course-buy-price {
  font-family: var(--moc-display); font-weight: 700; font-size: 1.45rem;
  color: var(--moc-navy); margin-bottom: .85rem;
}
.course-buy-price .old {
  text-decoration: line-through; color: var(--moc-muted);
  font-size: 1rem; font-weight: 500; margin-right: .5rem;
}
.course-buy-price .now { color: var(--moc-danger); }
.course-buy-features { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.course-buy-features li {
  display: flex; gap: .6rem; align-items: center;
  padding: .45rem 0; font-size: .9rem; color: #334155;
}
.course-buy-features i { color: var(--moc-sky-dark); }
.course-mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1040;
  background: #fff; border-top: 1px solid var(--moc-line);
  padding: .75rem 1rem calc(.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 24px rgba(15,23,42,.1);
  align-items: center; gap: .75rem;
}
.course-mobile-cta .price {
  font-family: var(--moc-display); font-weight: 700; color: var(--moc-navy); white-space: nowrap;
}
@media (max-width: 991.98px) {
  .course-mobile-cta { display: flex; }
  .course-sticky-bar { display: none !important; }
  body:has(.course-mobile-cta) { padding-bottom: 72px; }
}

/* ========== COURSE CARDS ========== */
.moc-course-card-media { position: relative; display: block; }
.moc-course-badge {
  position: absolute; top: .65rem; left: .65rem;
  background: rgba(11,31,58,.85); color: #fff; font-size: .68rem; font-weight: 700;
  padding: .25rem .55rem; border-radius: 999px;
}
.course-card-stats { display: flex; flex-wrap: wrap; gap: .5rem .85rem; }
.course-card-stats span { display: inline-flex; align-items: center; gap: .25rem; }
.course-card-desc { min-height: 2.5rem; }

/* ========== EMPTY STATES ========== */
.moc-empty-state {
  text-align: center; padding: 3rem 1.5rem;
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 22px; box-shadow: var(--moc-shadow-sm);
}
.moc-empty-icon {
  width: 72px; height: 72px; margin: 0 auto 1rem;
  border-radius: 50%; background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
}
.moc-empty-state h2 { font-family: var(--moc-display); color: var(--moc-navy); margin-bottom: .5rem; }
.moc-empty-state p { color: var(--moc-muted); max-width: 28rem; margin: 0 auto 1.25rem; }

/* ========== CERTIFICATES ========== */
.moc-cert-card {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--moc-line); border-radius: 18px;
  padding: 1.15rem; box-shadow: var(--moc-shadow-sm); height: 100%;
}
.moc-cert-card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: #fef3c7; color: #b45309;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.moc-cert-card-actions { display: flex; flex-direction: column; gap: .5rem; margin-left: auto; }

/* ========== NOTIFICATIONS ========== */
.moc-notif-list { display: flex; flex-direction: column; gap: .75rem; }
.moc-notif-item {
  display: flex; gap: .85rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--moc-line); border-radius: 16px;
  padding: 1rem 1.1rem; box-shadow: var(--moc-shadow-sm);
}
.moc-notif-item.is-unread { border-left: 4px solid var(--moc-sky); background: #f8fafc; }
.moc-notif-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  display: flex; align-items: center; justify-content: center;
}

/* ========== PAYMENTS ========== */
.moc-pay-icon {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0;
  background: #f1f5f9; color: var(--moc-navy);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.moc-course-row.is-completed { border-color: #bbf7d0; }

/* ========== ERROR PAGES ========== */
.moc-error-page {
  min-height: calc(100vh - 80px);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem; background: var(--moc-bg);
}
.moc-error-card {
  width: min(100%, 520px); text-align: center;
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 22px; padding: 2.5rem 2rem; box-shadow: var(--moc-shadow);
}
.moc-error-code {
  font-family: var(--moc-display); font-weight: 700; font-size: 3.5rem;
  color: var(--moc-sky-dark); letter-spacing: -.04em; line-height: 1;
}
.moc-error-card h1 {
  font-family: var(--moc-display); color: var(--moc-navy);
  font-size: 1.5rem; margin: .75rem 0 .5rem;
}
.moc-error-card p { color: var(--moc-muted); margin-bottom: 1.5rem; }

/* ========== COURSES PAGE ========== */
.courses-page-hero {
  background: var(--moc-navy); color: #fff;
  padding: clamp(1.75rem, 3vw, 2.25rem) 0 clamp(1.35rem, 2.5vw, 1.75rem);
  border-bottom: 3px solid var(--moc-sky);
}
.courses-page-hero .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #7dd3fc; margin-bottom: .65rem;
}
.courses-page-hero h1 {
  font-family: var(--moc-display); font-weight: 700;
  font-size: var(--moc-h1); margin: 0 0 .4rem;
}
.courses-page-hero p { color: #94a3b8; margin: 0; max-width: 36rem; }

/* ========== ADMIN KPI ========== */
.admin-kpi { transition: transform .15s ease, box-shadow .15s ease; }
.admin-kpi:hover { transform: translateY(-2px); box-shadow: var(--moc-shadow); }
a:hover .admin-kpi { border-color: var(--moc-sky); }

/* ========== HOME HERO (two-column) ========== */
.moc-hero--home { min-height: min(56vh, 440px); }
.moc-hero-grid {
  display: grid; grid-template-columns: 1fr;
  gap: 1.75rem; align-items: center; position: relative; z-index: 1;
}
@media (min-width: 992px) {
  .moc-hero-grid { grid-template-columns: 1.05fr .95fr; gap: 2rem; }
  .moc-hero--home .moc-hero-inner { max-width: none; padding: clamp(2rem, 3.5vw, 2.75rem) 0; }
  .moc-hero--home { min-height: min(48vh, 380px); }
}
.moc-hero-stats {
  display: flex; gap: 1.5rem; margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.12);
}
.moc-hero-stats .n {
  display: block; font-family: var(--moc-display); font-weight: 700;
  font-size: 1.25rem; color: #fff; line-height: 1.1;
}
.moc-hero-stats .l { font-size: .78rem; color: #94a3b8; text-transform: uppercase; letter-spacing: .08em; }
.moc-hero-visual { position: relative; min-height: 220px; display: none; }
@media (min-width: 992px) { .moc-hero-visual { display: block; } }
.moc-hero-card {
  position: absolute; display: flex; gap: .85rem; align-items: flex-start;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px; padding: 1rem 1.15rem; backdrop-filter: blur(8px);
  max-width: 280px; animation: mocRise .6s ease both;
}
.moc-hero-card i {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: rgba(14,165,233,.2); color: #7dd3fc;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.moc-hero-card strong { display: block; font-size: .92rem; color: #fff; margin-bottom: .15rem; }
.moc-hero-card span { font-size: .78rem; color: #94a3b8; line-height: 1.35; }
.moc-hero-card--1 { top: 8%; left: 5%; animation-delay: .1s; }
.moc-hero-card--2 { top: 38%; right: 0; animation-delay: .22s; }
.moc-hero-card--3 { bottom: 6%; left: 18%; animation-delay: .34s; }

/* ========== PAGE HEAD ========== */
.moc-page-head .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--moc-sky-dark); margin-bottom: .5rem;
}

/* ========== RESULT PAGES ========== */
.moc-result-page {
  min-height: calc(100vh - 80px); display: flex; align-items: center;
  padding: 3rem 0; background: var(--moc-bg);
}
.moc-result-card {
  max-width: 520px; margin: 0 auto; text-align: center;
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 22px; padding: 2.5rem 2rem; box-shadow: var(--moc-shadow);
}
.moc-result-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 1.25rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.75rem;
}
.moc-result-card.is-success .moc-result-icon { background: #dcfce7; color: #059669; }
.moc-result-card.is-error .moc-result-icon { background: #fee2e2; color: #dc2626; }
.moc-result-card.is-pending .moc-result-icon { background: #fef3c7; color: #d97706; }
.moc-result-card.is-info .moc-result-icon { background: var(--moc-sky-soft); color: var(--moc-sky-dark); }
.moc-result-card h1 {
  font-family: var(--moc-display); font-size: 1.5rem;
  color: var(--moc-navy); margin-bottom: .65rem;
}
.moc-result-card p { color: var(--moc-muted); margin-bottom: 1.5rem; }
.moc-result-actions { display: flex; flex-wrap: wrap; gap: .65rem; justify-content: center; }

/* ========== DEFINITION LIST ========== */
.moc-dl > div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; }
.moc-dl dt { color: var(--moc-muted); font-size: .88rem; margin: 0; }
.moc-dl dd { font-weight: 600; text-align: right; margin: 0; }

/* ========== CHECKOUT PAY METHODS ========== */
.moc-pay-methods { display: flex; flex-direction: column; gap: .65rem; }
.moc-pay-method {
  display: flex; align-items: center; gap: .75rem;
  border: 1px solid var(--moc-line); border-radius: 14px;
  padding: .9rem 1rem; cursor: pointer; transition: border-color .15s, background .15s;
}
.moc-pay-method:has(input:checked) { border-color: var(--moc-sky); background: var(--moc-sky-soft); }
.moc-pay-method span { display: flex; align-items: center; gap: .5rem; font-weight: 500; }
.moc-pay-method input { accent-color: var(--moc-sky-dark); }

/* ========== ADMIN PAGE HEAD ========== */
.admin-page-eyebrow {
  font-size: .7rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--moc-sky-dark); margin-bottom: .35rem;
}
.admin-page-title {
  font-family: var(--moc-display); font-weight: 700;
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  color: var(--moc-navy); margin: 0 0 .25rem;
}
.admin-page-sub { color: var(--moc-muted); font-size: .9rem; margin: 0; }

/* ========== ADMIN BUILDER ========== */
.admin-builder-module { border-left: 3px solid var(--moc-sky); }
.admin-lesson-list { margin: 0; }
.admin-lesson-item { border-radius: 8px; padding: .5rem .25rem !important; transition: background .12s; }
.admin-lesson-item:hover { background: #f8fafc; }
.admin-lesson-item.is-active { background: var(--moc-sky-soft); border-radius: 8px; }
.admin-lesson-item.is-active a { color: var(--moc-sky-dark); font-weight: 600; }
.admin-filter-tabs .badge { font-size: .7rem; }

/* ========== ADMIN SETTINGS TABS ========== */
.admin-settings-tabs { border-bottom: 1px solid var(--moc-line); gap: .25rem !important; }
.admin-settings-tabs .nav-link {
  color: var(--moc-muted); font-weight: 500; font-size: .88rem;
  border-radius: 8px 8px 0 0; padding: .5rem .85rem;
  border: 1px solid transparent; margin-bottom: -1px;
}
.admin-settings-tabs .nav-link:hover { color: var(--moc-navy); background: #f8fafc; }
.admin-settings-tabs .nav-link.active {
  color: var(--moc-sky-dark); background: #fff;
  border-color: var(--moc-line); border-bottom-color: #fff; font-weight: 600;
}
.admin-manual-card { border-left: 3px solid #f59e0b; }

/* ========== CMS PAGES ========== */
.cms-page-hero {
  background: var(--moc-navy); color: #fff;
  padding: clamp(1.75rem, 3vw, 2.25rem) 0 clamp(1.35rem, 2.5vw, 1.75rem);
  border-bottom: 3px solid var(--moc-sky);
}
.cms-page-hero .eyebrow {
  font-size: .72rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: #7dd3fc; margin-bottom: .65rem;
}
.cms-page-hero h1 {
  font-family: var(--moc-display); font-weight: 700;
  font-size: var(--moc-h1); margin: 0 0 .4rem;
}
.cms-page-hero p { color: #94a3b8; margin: 0; max-width: 36rem; }
.cms-page-body {
  max-width: var(--moc-container-narrow);
  margin-inline: auto;
}

/* ========== VERIFY PAGES ========== */
.moc-verify-page { max-width: 640px; }
.moc-verify-result {
  background: #fff; border: 1px solid var(--moc-line); border-radius: 20px;
  padding: 2rem; text-align: center; box-shadow: var(--moc-shadow-sm);
}
.moc-verify-result.is-success { border-color: #bbf7d0; }
.moc-verify-result.is-error { border-color: #fecaca; }
.moc-verify-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.moc-verify-result.is-success .moc-verify-icon { color: #059669; }
.moc-verify-result.is-error .moc-verify-icon { color: #dc2626; }
.moc-verify-result h2 {
  font-family: var(--moc-display); font-size: 1.35rem;
  color: var(--moc-navy); margin-bottom: 1rem;
}
.moc-verify-dl { max-width: 400px; margin: 0 auto; text-align: left; }
.moc-verify-dl dd { text-align: right; }

/* ========== CHAT PAGE MOBILE ========== */
@media (max-width: 575.98px) {
.moc-student-page.moc-chat-page {
  overflow-x: hidden;
  max-width: 100%;
}
  .moc-chat-page .moc-chat-thread { max-height: 50vh; }
  .moc-support-file { max-width: 100% !important; }
}

/* ========== LEARN LOGO (mobile tweaks) ========== */
@media (max-width: 575.98px) {
  .learn-env-logo { max-height: 28px; }
  .learn-env-brand { max-width: min(130px, 36vw); }
}
.learn-video-player { max-width: 100%; border-radius: 12px; background: #000; }

/* ========== PROFILE VIEW ========== */
.moc-profile-photo-lg {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  border: 3px solid rgba(255,255,255,.25); flex-shrink: 0;
}
.moc-profile-bio { color: #cbd5e1; max-width: 520px; }
.moc-profile-dl dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--moc-muted); margin-top: .65rem; }
.moc-profile-dl dd { margin-bottom: 0; font-weight: 600; color: var(--moc-navy); }
.moc-profile-course-card {
  display: flex; gap: .75rem; align-items: center;
  padding: .75rem; border: 1px solid var(--moc-line); border-radius: 14px;
  text-decoration: none; color: inherit; background: #fff;
}
.moc-profile-course-card img {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
}
.moc-settings-avatar {
  width: 80px; height: 80px; border-radius: 50%; object-fit: cover;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ========== ADMIN COURSE FORM ========== */
.admin-course-tabs .nav-link {
  border-radius: 999px; font-size: .88rem; font-weight: 600; color: var(--moc-muted);
}
.admin-course-tabs .nav-link.active { background: var(--moc-navy); color: #fff; }
.sticky-bottom-actions {
  position: sticky; bottom: 0; z-index: 5;
  background: rgba(248,250,252,.95); border-top: 1px solid var(--moc-line);
  padding: .85rem 0; margin-top: 1rem;
}
.admin-builder-module { border-left: 3px solid var(--moc-sky); }
.admin-lesson-item.is-active { background: var(--moc-sky-soft); border-radius: 8px; }
.lesson-type-panel[hidden] { display: none !important; }
.lesson-quill .ql-container { min-height: 140px; }

/* ========== LMS COURSE CARDS (Alison-inspired) ========== */
.moc-lms-card {
  background: #fff; border: 1px solid var(--moc-line); border-radius: 16px;
  box-shadow: var(--moc-shadow-sm); height: 100%; display: flex; flex-direction: column;
  overflow: hidden; transition: box-shadow .2s ease, transform .2s ease;
  min-width: 0; max-width: 100%;
}
.moc-story-form-card,
.moc-panel.moc-story-form-card {
  overflow: visible;
  position: relative;
  z-index: 2;
}
.moc-story-form-card .moc-quill-wrap,
.moc-story-form-card .ql-editor {
  pointer-events: auto;
  -webkit-user-select: text;
  user-select: text;
}
.moc-lms-card:hover { box-shadow: var(--moc-shadow); transform: translateY(-2px); }
.moc-lms-level-bar {
  padding: .55rem .85rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  border-bottom: 1px solid var(--moc-line);
}
.moc-lms-level-bar.is-beginner { background: #fdf2f8; color: #db2777; }
.moc-lms-level-bar.is-intermediate { background: #ecfdf5; color: #059669; }
.moc-lms-level-bar.is-advanced { background: #eff6ff; color: #2563eb; }
.moc-lms-level-bar.is-all { background: #f8fafc; color: #64748b; }
.moc-lms-card-top {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  padding: .65rem .85rem 0; min-height: 2rem;
}
.moc-lms-level {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: .3rem;
}
.moc-lms-level.is-beginner { color: #db2777; }
.moc-lms-level.is-intermediate { color: #059669; }
.moc-lms-level.is-advanced { color: #2563eb; }
.moc-lms-level.is-all { color: #64748b; }
.moc-lms-ribbon {
  font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  background: #fff; border: 1px solid var(--moc-line); border-radius: 6px;
  padding: .2rem .45rem; display: inline-flex; align-items: center; gap: .25rem;
  box-shadow: var(--moc-shadow-sm);
}
.moc-lms-card-media {
  display: block; position: relative; aspect-ratio: 16/9;
  overflow: hidden; background: #f1f5f9;
}
.moc-lms-card-media img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.moc-lms-cert-badge {
  position: absolute; top: .55rem; right: .55rem;
  background: #fff; border: 1px solid var(--moc-line); border-radius: 6px;
  font-size: .62rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase;
  padding: .22rem .45rem; display: inline-flex; align-items: center; gap: .2rem;
  box-shadow: var(--moc-shadow-sm); color: var(--moc-navy);
}
.moc-lms-card-body {
  padding: .85rem .9rem .95rem; display: flex; flex-direction: column;
  flex: 1; min-width: 0;
}
.moc-lms-card-category {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--moc-sky-dark); margin-bottom: .35rem;
}
.moc-lms-card-title {
  font-size: clamp(.95rem, 2.5vw, 1.05rem); font-weight: 700; line-height: 1.35;
  margin-bottom: .45rem; overflow-wrap: anywhere; word-break: break-word;
}
.moc-lms-card-title a { color: var(--moc-navy); text-decoration: none; }
.moc-lms-card-title a:hover { color: var(--moc-sky-dark); }
.moc-lms-card-desc {
  font-size: .84rem; color: var(--moc-muted); margin-bottom: .55rem;
  line-height: 1.45; overflow-wrap: anywhere; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.moc-lms-likes { font-size: .78rem; color: var(--moc-muted); margin-bottom: .45rem; display: flex; align-items: center; gap: .35rem; }
.moc-lms-meta {
  display: flex; flex-wrap: wrap; gap: .4rem .75rem; font-size: .78rem;
  color: var(--moc-muted); margin-bottom: .65rem;
}
.moc-lms-meta span { display: inline-flex; align-items: center; gap: .25rem; min-width: 0; }
.moc-lms-card-price { margin-bottom: .75rem; font-family: var(--moc-display); }
.moc-lms-card-price .old { text-decoration: line-through; color: var(--moc-muted); font-size: .85rem; margin-right: .35rem; }
.moc-lms-card-price .sale { color: var(--moc-danger); }
.moc-lms-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: auto; }
.moc-lms-card-actions .btn { width: 100%; min-height: 36px; font-size: .84rem; }

/* ========== COURSE PROSE ========== */
.course-prose { color: #334155; line-height: 1.65; font-size: .95rem; word-wrap: break-word; overflow-wrap: anywhere; }
.course-prose h1, .course-prose h2, .course-prose h3 { color: var(--moc-navy); margin-top: 1rem; font-family: var(--moc-display); }
.course-prose ul, .course-prose ol { padding-left: 1.25rem; }
.course-prose li { margin-bottom: .35rem; }
.course-prose table { width: 100%; max-width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.course-prose img { max-width: 100%; height: auto; border-radius: 10px; }
.course-prose pre, .course-prose code { word-break: break-word; white-space: pre-wrap; }

/* ========== LEARN COMPLETION ========== */
.learn-complete-banner {
  display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 16px; padding: 1rem 1.1rem;
}
.learn-complete-icon {
  width: 48px; height: 48px; border-radius: 12px; background: #dcfce7; color: #166534;
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0;
}
.learn-complete-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* ========== MOBILE OVERFLOW GUARD ========== */
.admin-main, .admin-content, .moc-student-main, .moc-student-content,
.learn-env-main, .learn-content, .moc-student-page, .row {
  min-width: 0;
}
.moc-cert-card-premium { border-color: #fde68a; }

/* ========== DESKTOP SCALE REFINEMENTS ========== */
@media (min-width: 992px) {
  .moc-student-sidebar {
    position: sticky;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
  }
  .moc-student-sidebar-backdrop {
    display: none !important;
  }
  .learn-env-shell--page .learn-env-sidebar,
  .learn-env-shell .learn-env-sidebar {
    position: sticky;
    top: 58px;
    transform: none;
    visibility: visible;
    pointer-events: auto;
    width: auto;
    max-height: calc(100vh - 130px);
    box-shadow: none;
  }
  .learn-env-shell--page .learn-sidebar-backdrop,
  .learn-sidebar-backdrop {
    display: none !important;
  }
  body { font-size: var(--moc-text-base); }
  .moc-navbar .navbar { padding-top: .4rem; padding-bottom: .4rem; }
  .moc-hero .btn-lg, .moc-continue-card .btn-lg {
    padding: .6rem 1.15rem;
    font-size: .95rem;
  }
  .moc-student-topbar { padding: .6rem 1.15rem; }
  .moc-course-card img { height: 150px; }
  .moc-student-page--settings .moc-panel form .col-md-9 > .row.g-3,
  .moc-student-page .moc-panel form .col-md-9 > .row.g-3 {
    max-width: var(--moc-container-form);
  }
  .moc-settings-card form { max-width: 100%; }
  .learn-content-body { padding: 1.1rem 1.2rem 1.35rem; }
  .learn-env-header .container-fluid,
  .learn-env-footer .container-fluid {
    max-width: var(--moc-container-wide);
    margin-inline: auto;
  }
}

@media (min-width: 1200px) {
  .container:not(.container-fluid) {
    max-width: var(--moc-container-max);
  }
}

@media (max-width: 575.98px) {
  .moc-lms-card-actions { grid-template-columns: 1fr; }
  .learn-complete-banner { flex-direction: column; }
}

/* ========== PROFILE PAGE ========== */
.moc-profile-page { overflow-x: clip; max-width: 100%; }
.moc-profile-page .moc-profile-hero { overflow: hidden; }
.moc-profile-page .moc-profile-hero .d-flex.flex-wrap { width: 100%; }
.moc-profile-page .moc-profile-bio,
.moc-profile-page .meta,
.moc-profile-page .moc-profile-dl dd,
.moc-profile-page code {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.moc-profile-page .moc-profile-dl dd { text-align: right; max-width: 65%; }
.moc-profile-page .moc-profile-course-card { min-width: 0; }
.moc-profile-page .moc-profile-course-card .fw-semibold { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moc-profile-page .moc-profile-stat .l { font-size: .7rem; line-height: 1.25; }

/* ========== LEARNING PLAN ========== */
.moc-learning-day-card {
  background: #fff; border: 1px solid var(--moc-line); border-radius: 16px;
  padding: 1rem 1.1rem; box-shadow: var(--moc-shadow-sm);
}
.moc-learning-day-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; }
.moc-learning-slot {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .75rem .85rem; border: 1px solid var(--moc-line); border-radius: 12px; background: #f8fafc;
}
.moc-learning-slot.is-disabled { opacity: .72; }

/* ========== LEARN PAGE RESPONSIVE ========== */
.learn-env-shell--page { width: 100%; max-width: 100%; }
.learn-env-course { min-width: 0; }
.learn-env-course .fw-semibold { overflow-wrap: anywhere; word-break: break-word; }
.learn-content-body,
.lesson-html {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.lesson-html img,
.lesson-html video,
.lesson-html iframe,
.learn-video iframe,
.learn-video video {
  max-width: 100%;
  height: auto;
}
.lesson-html pre,
.lesson-html table {
  max-width: 100%;
  overflow-x: auto;
  display: block;
}
.learn-env-footer-inner { flex-wrap: wrap; }
.learn-footer-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
  max-width: 100%;
}
.learn-footer-actions .btn { max-width: 100%; }

@media (max-width: 991.98px) {
  .moc-course-row { grid-template-columns: 1fr; }
  .moc-course-row-actions { text-align: left; min-width: 0; width: 100%; }
  .moc-course-row-actions .btn { width: 100%; }
  .moc-profile-page .moc-profile-dl > div { flex-direction: column; align-items: flex-start; gap: .15rem; }
  .moc-profile-page .moc-profile-dl dd { text-align: left; max-width: 100%; }
}

@media (max-width: 575.98px) {
  .moc-profile-page .moc-profile-hero .btn { width: 100%; }
  .learn-doc-viewer { height: min(55vh, 420px); }
  .learn-footer-actions .btn-learn-next { width: 100%; }
}

/* Learning plan widget */
.moc-plan-widget {
  border-left: 3px solid var(--moc-sky);
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.moc-plan-session {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem 0;
  border-bottom: 1px solid var(--moc-border);
  min-width: 0;
  max-width: 100%;
}
.moc-plan-session:last-child { border-bottom: 0; }
.moc-plan-session-time {
  font-family: var(--moc-display);
  font-weight: 700;
  color: var(--moc-navy);
  min-width: 3.75rem;
  max-width: 4.5rem;
  font-size: .88rem;
  line-height: 1.3;
}
.moc-plan-session-body { flex: 1; min-width: 0; }
.moc-plan-session-title {
  font-weight: 600;
  color: var(--moc-navy);
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}
.moc-plan-session-date,
.moc-plan-countdown {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.moc-plan-session-btn { flex-shrink: 0; white-space: nowrap; }

/* Achievements */
.moc-achieve-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .75rem;
}
.moc-achieve-stats--compact .moc-achieve-stat { padding: .85rem .5rem; }
.moc-achieve-stat {
  background: #fff;
  border: 1px solid var(--moc-border);
  border-radius: var(--moc-radius);
  text-align: center;
  padding: 1rem .65rem;
}
.moc-achieve-stat .ico {
  color: var(--moc-sky-dark);
  font-size: 1.15rem;
  margin-bottom: .35rem;
}
.moc-achieve-stat .n {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--moc-navy);
  line-height: 1.1;
}
.moc-achieve-stat .l {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--moc-muted);
  margin-top: .15rem;
}
.moc-achieve-stat .sub {
  font-size: .68rem;
  color: var(--moc-muted);
  margin-top: .2rem;
}
.moc-badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
}
.moc-badge-grid--compact { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.moc-badge-card {
  border: 1px solid var(--moc-border);
  border-radius: var(--moc-radius);
  padding: .85rem .65rem;
  text-align: center;
  background: #f8fafc;
}
.moc-badge-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto .5rem;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--moc-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--moc-sky-dark);
  font-size: 1.1rem;
}
.moc-badge-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--moc-navy);
  line-height: 1.25;
}
.moc-badge-icon--emoji {
  font-size: 1.25rem; line-height: 1;
}
.moc-badge-desc {
  font-size: .7rem;
  color: var(--moc-muted);
  margin-top: .25rem;
  line-height: 1.35;
}
.moc-achieve-courses {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.moc-achieve-course {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--moc-border);
  border-radius: var(--moc-radius);
  align-items: start;
}
.moc-achieve-course img {
  width: 72px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
}
.moc-achieve-course .title {
  font-size: .95rem;
  font-weight: 700;
  font-family: var(--moc-display);
  color: var(--moc-navy);
  margin: 0 0 .35rem;
}
.moc-achieve-course .actions {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .5rem;
}
.moc-achieve-course.is-complete { border-left: 3px solid #059669; }
.moc-achieve-course.is-progress { border-left: 3px solid var(--moc-sky); }
.moc-achieve-timeline li {
  display: flex;
  gap: .75rem;
  padding: .55rem 0;
  position: relative;
}
.moc-achieve-timeline li:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 1.35rem;
  bottom: 0;
  width: 2px;
  background: var(--moc-border);
}
.moc-achieve-timeline .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--moc-sky);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--moc-sky);
  flex-shrink: 0;
  margin-top: .2rem;
}
.moc-achieve-timeline .label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--moc-navy);
}
.moc-achieve-timeline .date {
  font-size: .75rem;
  color: var(--moc-muted);
}
.moc-achieve-timeline--compact li { padding: .4rem 0; }

@media (max-width: 991.98px) {
  .moc-achieve-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 575.98px) {
  .moc-achieve-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moc-achieve-course { grid-template-columns: 1fr; }
  .moc-achieve-course img { width: 100%; height: 120px; }
  .moc-plan-session { flex-wrap: wrap; }
  .moc-plan-session-btn { width: 100%; }
  .moc-lms-card-actions { grid-template-columns: 1fr; }
}

/* ========== LEARN COURSE HERO ========== */
.learn-course-hero {
  background: #fff;
  border-bottom: 1px solid var(--moc-line);
  padding: 1rem 0 1.1rem;
}
.learn-course-hero-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  min-width: 0;
}
.learn-course-hero-main { flex: 1 1 320px; min-width: 0; }
.learn-course-category {
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--moc-sky-dark); margin-bottom: .35rem;
}
.learn-course-title {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: clamp(1.15rem, 3.5vw, 1.65rem);
  color: var(--moc-navy);
  line-height: 1.25;
  margin: 0 0 .5rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.learn-course-desc {
  color: var(--moc-muted);
  font-size: .92rem;
  line-height: 1.55;
  margin: 0 0 .65rem;
  max-width: 52rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.learn-course-meta {
  display: flex; flex-wrap: wrap; gap: .45rem 1rem;
  font-size: .8rem; color: var(--moc-muted); font-weight: 600;
}
.learn-course-meta span {
  display: inline-flex; align-items: center; gap: .3rem;
  min-width: 0; overflow-wrap: anywhere;
}
.learn-course-hero-progress {
  flex: 0 1 220px; min-width: min(100%, 180px);
}
.learn-course-progress-bar { background: #e2e8f0; }
.learn-course-progress-bar > span { background: var(--moc-sky); }

/* ========== FILE PREVIEW ========== */
.moc-file-preview {
  border: 1px solid var(--moc-line);
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 1rem;
}
.moc-file-preview-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .65rem; padding: .65rem .85rem;
  background: #f8fafc; border-bottom: 1px solid var(--moc-line);
  min-width: 0;
}
.moc-file-preview-title {
  display: flex; align-items: center; gap: .45rem;
  font-size: .88rem; font-weight: 600; color: var(--moc-navy);
  overflow-wrap: anywhere; word-break: break-word;
}
.moc-file-preview-stage {
  width: 100%; max-width: 100%; min-width: 0;
  min-height: min(55vh, 420px);
  max-height: min(75vh, 640px);
  overflow: auto;
  background: #f1f5f9;
  -webkit-overflow-scrolling: touch;
}
.moc-file-preview-video {
  width: 100%; max-width: 100%; height: auto;
  display: block; background: #000;
}
.moc-file-preview-image {
  width: 100%; max-width: 100%; height: auto;
  display: block; margin: 0 auto;
}
.moc-file-preview-text {
  margin: 0; padding: 1rem;
  font-size: .85rem; white-space: pre-wrap;
  overflow-wrap: anywhere; word-break: break-word;
  max-width: 100%;
}
.moc-file-preview-pdf,
.moc-file-preview-doc { padding: .75rem; min-width: 0; }
.moc-file-preview-pdf-pages {
  display: flex; flex-direction: column; gap: .75rem; align-items: center;
}
.moc-file-preview-pdf-page {
  width: 100%; max-width: 100%; height: auto;
  display: block; background: #fff;
  box-shadow: 0 1px 4px rgba(15,23,42,.08);
}
.moc-file-preview-doc-body {
  background: #fff; padding: 1rem 1.1rem;
  border-radius: 10px; max-width: 100%;
  overflow-wrap: anywhere; word-break: break-word;
}
.moc-file-preview-loading {
  padding: 2rem 1rem; text-align: center; color: var(--moc-muted);
}
.moc-file-preview-fallback {
  padding: 2rem 1rem; text-align: center; color: var(--moc-muted);
}
.moc-file-preview-fallback-icon {
  font-size: 2rem; color: var(--moc-sky-dark); margin-bottom: .5rem;
}
.learn-resource-list { list-style: none; padding: 0; }
.learn-resource-item { padding: .65rem 0; border-bottom: 1px solid var(--moc-line); }
.learn-resource-item:last-child { border-bottom: 0; }
.learn-resource-row {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: .5rem; min-width: 0;
}
.learn-resource-name {
  flex: 1 1 160px; min-width: 0;
  overflow-wrap: anywhere; word-break: break-word;
}
.learn-resource-actions {
  display: flex; flex-wrap: wrap; gap: .35rem; flex-shrink: 0;
}
.learn-video-player { width: 100%; max-width: 100%; height: auto; border-radius: 12px; background: #000; }

@media (max-width: 991.98px) {
  .learn-course-hero-progress { flex: 1 1 100%; max-width: 100%; }
}
@media (max-width: 575.98px) {
  .moc-file-preview-stage { min-height: min(50vh, 360px); max-height: min(65vh, 480px); }
  .learn-resource-actions { width: 100%; }
  .learn-resource-actions .btn { flex: 1 1 auto; }
}

/* ========== PWA INSTALL BANNER ========== */
.moc-pwa-banner {
  display: flex; align-items: center; gap: .65rem;
  background: var(--moc-sky-soft); border-bottom: 1px solid var(--moc-line);
  padding: .65rem .85rem; position: relative; min-width: 0;
}
.moc-pwa-banner[hidden] { display: none !important; }
.moc-pwa-banner-close {
  border: 0; background: transparent; color: var(--moc-muted);
  padding: .15rem; line-height: 1; flex-shrink: 0;
}
.moc-pwa-banner-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: #fff; color: var(--moc-sky-dark);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
  border: 1px solid var(--moc-line);
}
.moc-pwa-banner-body { flex: 1; min-width: 0; }
.moc-pwa-banner-title {
  font-size: .82rem; font-weight: 700; color: var(--moc-navy); line-height: 1.25;
}
.moc-pwa-banner-text {
  font-size: .72rem; color: var(--moc-muted); margin: 0; line-height: 1.35;
  overflow-wrap: anywhere;
}
.moc-pwa-banner-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .3rem;
  background: #fff; color: #059669; border: 2px solid #059669;
  font-size: .75rem; font-weight: 700; padding: .4rem .7rem; border-radius: 10px;
  text-decoration: none; white-space: nowrap;
}
.moc-pwa-banner-btn:hover { background: #f0fdf4; color: #047857; }

/* ========== SIDEBAR LOGOUT ========== */
.moc-sidebar-logout-wrap {
  margin-top: .5rem; padding-top: .75rem;
  border-top: 1px solid var(--moc-line);
}
.moc-sidebar-logout {
  display: flex; align-items: center; gap: .55rem;
  padding: .65rem 1.15rem; color: #dc2626 !important;
  font-weight: 600; text-decoration: none;
}
.moc-sidebar-logout:hover { background: #fef2f2; }

/* ========== XP WIDGET ========== */
.moc-xp-widget {
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 18px; padding: 1.1rem 1.15rem;
  box-shadow: var(--moc-shadow-sm);
}
.moc-xp-widget-head {
  display: flex; flex-wrap: wrap; gap: 1rem 1.5rem;
  justify-content: space-between; margin-bottom: 1rem;
}
.moc-xp-streak, .moc-xp-total {
  display: flex; align-items: center; gap: .65rem; min-width: 0;
}
.moc-xp-streak-icon, .moc-xp-total-icon { font-size: 1.5rem; flex-shrink: 0; }
.moc-xp-streak-num, .moc-xp-total-num {
  font-family: var(--moc-display); font-weight: 700;
  font-size: 1.05rem; color: var(--moc-navy); line-height: 1.2;
}
.moc-xp-streak-sub, .moc-xp-total-sub {
  font-size: .75rem; color: var(--moc-muted);
}
.moc-xp-week {
  display: flex; justify-content: space-between; gap: .25rem;
  text-align: center; margin-bottom: .5rem;
}
.moc-xp-day { flex: 1; min-width: 0; }
.moc-xp-day-label {
  font-size: .68rem; color: var(--moc-muted); font-weight: 600;
  margin-bottom: .3rem; text-transform: uppercase;
}
.moc-xp-day-dot {
  width: 28px; height: 28px; margin: 0 auto;
  border-radius: 50%; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  background: #f1f5f9; color: var(--moc-muted);
  border: 1px solid var(--moc-line);
}
.moc-xp-day-dot.is-active {
  background: var(--moc-sky-soft); color: var(--moc-sky-dark);
  border-color: var(--moc-sky);
}
.moc-assessment-status .moc-assessment-badge {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .5rem;
}
.moc-assessment-badge.locked { background: #f1f5f9; color: #64748b; }
.moc-assessment-badge.unlocked { background: #e0f2fe; color: #0369a1; }
.moc-assessment-badge.passed { background: #dcfce7; color: #15803d; }
.moc-assessment-badge.failed { background: #fee2e2; color: #b91c1c; }

.moc-xp-widget-foot { text-align: center; padding-top: .25rem; }

/* ========== LEARNING ACTIVITY CALENDAR ========== */
.moc-learn-cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.moc-learn-cal-month {
  font-size: .82rem;
  color: var(--moc-muted);
}
.moc-learn-cal-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
}
.moc-learn-cal-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 4.5rem;
  padding: .45rem .65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--moc-line);
}
.moc-learn-cal-stat-val {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--moc-navy);
}
.moc-learn-cal-stat-lbl {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--moc-muted);
  margin-top: .15rem;
}
.moc-learn-cal-table {
  border: 1px solid var(--moc-line);
  border-radius: 14px;
  padding: .75rem;
  background: #fff;
}
.moc-learn-cal-weekdays,
.moc-learn-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
}
.moc-learn-cal-weekdays {
  margin-bottom: .35rem;
}
.moc-learn-cal-weekday {
  font-size: .68rem;
  font-weight: 700;
  text-align: center;
  color: var(--moc-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: .15rem 0;
}
.moc-learn-cal-cell {
  aspect-ratio: 1;
  min-height: 2rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.moc-learn-cal-cell:not(.is-empty):hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(11, 31, 58, 0.08);
}
.moc-learn-cal-cell.is-empty {
  background: transparent;
  pointer-events: none;
}
.moc-learn-cal-cell.level-1 {
  background: rgba(14, 165, 233, 0.18);
  border-color: rgba(14, 165, 233, 0.22);
}
.moc-learn-cal-cell.level-2 {
  background: rgba(14, 165, 233, 0.42);
  border-color: rgba(14, 165, 233, 0.35);
}
.moc-learn-cal-cell.is-today {
  box-shadow: inset 0 0 0 2px var(--moc-sky);
}
.moc-learn-cal-day {
  font-size: .72rem;
  font-weight: 700;
  color: var(--moc-navy);
  line-height: 1;
}
.moc-learn-cal-cell.level-0:not(.is-empty) .moc-learn-cal-day {
  color: var(--moc-muted);
}
.moc-learn-cal-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .65rem 1.25rem;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px solid var(--moc-line);
}
.moc-learn-cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  color: var(--moc-muted);
  white-space: nowrap;
}
.moc-learn-cal-dot {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  border-radius: 4px;
  flex-shrink: 0;
}
.moc-learn-cal-dot.level-0 { background: #f1f5f9; border: 1px solid var(--moc-line); }
.moc-learn-cal-dot.level-1 { background: rgba(14, 165, 233, 0.35); }
.moc-learn-cal-dot.level-2 { background: rgba(14, 165, 233, 0.65); }

.moc-study-coach-answer {
  white-space: pre-wrap;
  line-height: 1.55;
  padding: .85rem 1rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--moc-line);
  color: var(--moc-navy);
}

@media (max-width: 575.98px) {
  .moc-learn-cal-table { padding: .55rem; }
  .moc-learn-cal-weekdays,
  .moc-learn-cal-grid { gap: .2rem; }
  .moc-learn-cal-cell { min-height: 1.65rem; border-radius: 6px; }
  .moc-learn-cal-day { font-size: .62rem; }
  .moc-learn-cal-stat { min-width: 4rem; padding: .35rem .5rem; }
  .moc-learn-cal-legend { justify-content: flex-start; }
}

/* ========== ACHIEVEMENT CENTRE ========== */
.moc-achievement-centre {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr));
  gap: .75rem;
}
.moc-achievement-card {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .85rem; border-radius: 14px;
  border: 1px solid var(--moc-line); background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}
.moc-achievement-card.is-unlocked {
  border-color: #bbf7d0; background: #f0fdf4;
}
.moc-achievement-card.is-locked { opacity: .88; background: #f8fafc; }
.moc-achievement-card-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.moc-achievement-card-body { min-width: 0; flex: 1; }
.moc-achievement-card-title {
  font-size: .88rem; font-weight: 700; color: var(--moc-navy);
  overflow-wrap: anywhere; word-break: break-word;
}
.moc-achievement-card-desc {
  font-size: .75rem; color: var(--moc-muted); margin-top: .15rem;
  overflow-wrap: anywhere;
}
.moc-achievement-card-status {
  font-size: .68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; margin-top: .35rem;
}
.moc-achievement-card.is-unlocked .moc-achievement-card-status { color: #059669; }
.moc-achievement-card.is-locked .moc-achievement-card-status { color: var(--moc-muted); }
.moc-achievement-progress {
  display: flex; align-items: center; gap: .5rem; margin-top: .45rem;
}
.moc-achievement-progress-bar {
  flex: 1; height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
}
.moc-achievement-progress-bar > span {
  display: block; height: 100%; background: var(--moc-sky);
  border-radius: 999px; transition: width .3s ease;
}
.moc-achievement-progress-text {
  font-size: .68rem; font-weight: 700; color: var(--moc-muted); flex-shrink: 0;
}

/* ========== PROFILE V2 ========== */
.moc-profile-v2-hero {
  text-align: center; background: #fff;
  border: 1px solid var(--moc-line); border-radius: 20px;
  padding: 1.75rem 1.25rem 1.5rem; margin-bottom: 1rem;
  box-shadow: var(--moc-shadow-sm);
}
.moc-profile-v2-avatar {
  width: 88px; height: 88px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--moc-sky-soft);
}
.moc-profile-v2-name {
  font-family: var(--moc-display); font-weight: 700;
  font-size: 1.35rem; color: var(--moc-navy);
  margin: .85rem 0 .25rem; overflow-wrap: anywhere;
}
.moc-profile-v2-id {
  font-size: .82rem; color: var(--moc-muted); font-weight: 600;
  overflow-wrap: anywhere;
}
.moc-profile-v2-role {
  display: inline-block; margin-top: .35rem;
  font-size: .72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: var(--moc-sky-dark);
  background: var(--moc-sky-soft); padding: .25rem .65rem; border-radius: 999px;
}
.moc-profile-v2-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 90px), 1fr));
  gap: .65rem; margin-bottom: 1rem;
}
.moc-profile-v2-stat {
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 14px; padding: .85rem .5rem; text-align: center;
}
.moc-profile-v2-stat .n {
  font-family: var(--moc-display); font-weight: 700;
  font-size: 1.2rem; color: var(--moc-navy); line-height: 1.1;
}
.moc-profile-v2-stat .l {
  font-size: .68rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--moc-muted); margin-top: .2rem;
}
.moc-profile-v2-bio {
  overflow-wrap: anywhere; word-break: break-word; line-height: 1.6;
}
.moc-profile-v2-courses { display: flex; flex-direction: column; gap: .65rem; }
.moc-profile-v2-course {
  display: flex; gap: .75rem; align-items: center;
  padding: .75rem; border: 1px solid var(--moc-line);
  border-radius: 14px; text-decoration: none; color: inherit;
  min-width: 0;
}
.moc-profile-v2-course img {
  width: 56px; height: 56px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
}
.moc-profile-v2-course .title {
  font-weight: 600; color: var(--moc-navy);
  overflow-wrap: anywhere; word-break: break-word; line-height: 1.35;
}
.moc-profile-v2-course .meta { font-size: .78rem; color: var(--moc-muted); }

/* ========== INSTALL APP PAGE ========== */
.moc-install-tabs {
  display: flex; gap: .5rem; flex-wrap: wrap;
}
.moc-install-tab {
  flex: 1 1 140px; display: inline-flex; align-items: center;
  justify-content: center; gap: .4rem;
  padding: .65rem 1rem; border: 2px solid var(--moc-line);
  border-radius: 12px; background: #fff;
  font-weight: 600; font-size: .88rem; color: var(--moc-navy);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.moc-install-tab.is-active {
  border-color: var(--moc-sky); background: var(--moc-sky-soft);
  color: var(--moc-sky-dark);
}
.moc-install-steps { max-width: 520px; margin: 0 auto; }
.moc-install-step {
  display: flex; gap: 1rem; align-items: flex-start;
  background: #fff; border: 1px solid var(--moc-line);
  border-radius: 16px; padding: 1rem 1.1rem;
}
.moc-install-step-num {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: var(--moc-navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .88rem;
}
.moc-install-step h3 {
  font-size: .95rem; font-weight: 700; color: var(--moc-navy); margin-bottom: .25rem;
}
.moc-install-step p { font-size: .85rem; color: var(--moc-muted); margin: 0; }
.moc-install-step-visual {
  margin-top: .65rem; font-size: 1.75rem; color: var(--moc-sky-dark);
}
.moc-install-step--final { border-color: #bbf7d0; background: #f0fdf4; }
.moc-install-arrow {
  text-align: center; color: var(--moc-sky-dark);
  padding: .35rem 0; font-size: 1.1rem;
}
.moc-install-benefits li {
  display: flex; align-items: center; gap: .65rem;
  padding: .5rem 0; font-size: .88rem; color: var(--moc-navy);
}
.moc-install-benefits i { color: var(--moc-sky-dark); font-size: 1.1rem; }
.moc-install-menu-icon {
  display: inline-block; font-weight: 700; font-size: 1.1rem;
  vertical-align: middle;
}

/* ========== LEARN MOBILE (Alison-inspired, desktop unchanged) ========== */
.learn-mobile-progress { display: none; }

@media (max-width: 991.98px) {
  .learn-mobile-progress {
    display: block; background: #fff;
    border-bottom: 1px solid var(--moc-line);
    padding: .65rem 0 .75rem; position: sticky; top: 0; z-index: 58;
  }
  .learn-mobile-progress-top {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: .5rem; margin-bottom: .55rem; min-width: 0;
  }
  .learn-mobile-course-title {
    font-family: var(--moc-display); font-weight: 700;
    font-size: .88rem; color: var(--moc-navy); line-height: 1.35;
    overflow-wrap: anywhere; word-break: break-word; flex: 1; min-width: 0;
  }
  .learn-mobile-avatar { flex-shrink: 0; }
  .learn-mobile-progress-label {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .75rem; font-weight: 600; color: var(--moc-muted);
    margin-bottom: .3rem;
  }
  .learn-mobile-progress-label strong { color: #059669; }
  .learn-mobile-progress-bar {
    height: 6px; background: #e2e8f0; border-radius: 999px; overflow: hidden;
    margin-bottom: .55rem;
  }
  .learn-mobile-progress-bar > span {
    display: block; height: 100%; background: #059669; border-radius: 999px;
  }
  .learn-mobile-curriculum-btn {
    width: 100%; border: 1px solid var(--moc-line); background: #f8fafc;
    border-radius: 10px; padding: .45rem .75rem;
    font-size: .78rem; font-weight: 600; color: var(--moc-navy);
    display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
  }
  .learn-course-hero { display: none; }
  .learn-env-shell--page {
    display: grid; grid-template-columns: 1fr;
    min-height: auto;
  }
  .learn-env-shell--page .learn-env-sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 1055;
    width: min(92vw, 320px); max-height: none;
    transform: translateX(-105%); transition: transform .2s ease;
    box-shadow: 8px 0 30px rgba(15,23,42,.25);
    order: unset;
    visibility: hidden; pointer-events: none;
  }
  .learn-env-shell--page .learn-env-sidebar.is-open {
    transform: none;
    visibility: visible; pointer-events: auto;
  }
  .learn-env-shell--page .learn-sidebar-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(15,23,42,.45); z-index: 1050;
  }
  .learn-env-shell--page .learn-sidebar-backdrop.is-open { display: block; }
  .learn-env-shell--page .learn-env-main {
    order: unset; padding: .75rem; padding-bottom: 5.5rem;
  }
  .learn-env-shell--page #learnCurriculumToggle { display: inline-flex !important; }
  .learn-env-shell--page #learnCurriculumClose { display: inline-flex !important; }
  .learn-env-shell--page .learn-env-sidebar-head .fw-bold::before { content: ''; }
  .learn-env-footer {
    background: var(--moc-navy); border-top: 0;
    box-shadow: 0 -4px 20px rgba(15,23,42,.2);
    border-radius: 18px 18px 0 0;
    padding: .65rem 0 calc(.65rem + env(safe-area-inset-bottom));
  }
  .learn-env-footer-inner {
    flex-wrap: nowrap; align-items: center; gap: .5rem;
  }
  .learn-footer-actions {
    flex: 1; display: flex; align-items: center;
    gap: .4rem; margin-left: 0; min-width: 0;
  }
  .learn-footer-prev {
    background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2);
    color: #fff; border-radius: 10px; padding: .5rem .65rem;
    flex-shrink: 0;
  }
  .learn-footer-prev:hover { background: rgba(255,255,255,.18); color: #fff; }
  .learn-xp-badge--mobile {
    background: #fef3c7; color: #b45309; font-weight: 800;
    font-size: .72rem; padding: .3rem .55rem; border-radius: 999px;
    border: 1px solid #fcd34d; flex-shrink: 0; white-space: nowrap;
  }
  .learn-env-footer .btn-learn-next {
    flex: 1; min-width: 0; border-radius: 12px;
    padding: .55rem .85rem; font-size: .85rem;
  }
  .learn-env-footer .btn-outline-secondary[data-complete-btn] {
    background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25);
    color: #fff; flex-shrink: 0;
  }
  .learn-content-band {
    background: #ede9fe; border-bottom-color: #ddd6fe;
  }
  .learn-content-band .learn-lesson-label { color: #6d28d9; }
  .learn-content-band .learn-lesson-title { color: #5b21b6; }
  .moc-learn-body { padding-bottom: 0; }
  .moc-achieve-stats--compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 575.98px) {
  .moc-pwa-banner { flex-wrap: wrap; padding: .6rem .75rem; }
  .moc-pwa-banner-btn { width: 100%; justify-content: center; margin-top: .25rem; }
  .moc-xp-widget-head { flex-direction: column; gap: .75rem; }
  .moc-profile-v2-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .moc-achievement-centre { grid-template-columns: 1fr; }
  .moc-achieve-stats--compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .learn-env-footer .learn-footer-complete-form .btn { font-size: .75rem; padding: .45rem .5rem; }
  .moc-xp-day-dot { width: 24px; height: 24px; font-size: .65rem; }
}

@media (max-width: 360px) {
  .moc-student-bottom a span { font-size: .62rem; }
  .moc-student-bottom a i { font-size: 1.05rem; }
  .learn-mobile-course-title { font-size: .82rem; }
}

/* ========== SITE FOOTER (v2) ========== */
.moc-site-footer {
  background: var(--moc-navy);
  color: #94a3b8;
  padding: clamp(1.75rem, 4vw, 2.5rem) 0 1.25rem;
  margin-top: auto;
}
.moc-site-footer h6 {
  color: #fff;
  font-family: var(--moc-display);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .85rem;
}
.moc-site-footer a { color: #e2e8f0; text-decoration: none; }
.moc-site-footer a:hover { color: var(--moc-sky); }
.moc-site-footer-grid {
  display: grid;
  gap: 1.25rem 2rem;
  grid-template-columns: 1fr;
}
@media (min-width: 992px) {
  .moc-site-footer-grid {
    grid-template-columns: 1.4fr repeat(3, 1fr);
    align-items: start;
  }
}
.moc-site-footer-brand p { margin-bottom: .35rem; }
.moc-site-footer-col ul li,
.moc-footer-collapse ul li { margin-bottom: .4rem; }
.moc-footer-collapse {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: .75rem;
}
.moc-footer-collapse summary {
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.moc-footer-collapse summary::-webkit-details-marker { display: none; }
.moc-footer-collapse summary::after { content: '+'; color: #94a3b8; }
.moc-footer-collapse[open] summary::after { content: '−'; }
.moc-footer-collapse ul { margin: .75rem 0 0; padding: 0; }
.moc-app-install-btns { display: flex; flex-wrap: wrap; gap: .5rem; }
.moc-app-btn {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .45rem .75rem;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  font-size: .8rem;
  color: #fff !important;
  background: rgba(255,255,255,.06);
}
.moc-app-btn:hover { background: rgba(255,255,255,.12); color: #fff !important; }
.moc-site-footer-social {
  display: flex;
  gap: .85rem;
  font-size: 1.15rem;
  margin-top: 1.25rem;
}
.moc-site-footer-divider {
  border-color: rgba(255,255,255,.12);
  margin: 1.25rem 0 1rem;
}
.moc-site-footer-copy { color: #64748b; }
.moc-student-body .moc-site-footer {
  padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 991.98px) {
  .moc-student-body .moc-site-footer { padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px)); }
}

/* ========== LEARN WORKSPACE TABS ========== */
.learn-workspace-tabs {
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--moc-border, #e2e8f0);
  background: #f8fafc;
}
.learn-workspace-tabs::-webkit-scrollbar { display: none; }
.learn-ws-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--moc-muted, #64748b);
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
  position: relative;
}
.learn-ws-tab.is-active {
  background: #fff;
  border-color: #cbd5e1;
  color: var(--moc-navy, #0b1f3a);
  box-shadow: var(--moc-shadow-sm, 0 1px 2px rgba(0,0,0,.06));
}
.learn-ws-tab i { font-size: .95rem; }
.learn-ws-badge {
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 .3rem;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.learn-ws-badge--muted { background: #94a3b8; }
.learn-panel[hidden] { display: none !important; }
.learn-note-card { border: 1px solid #e2e8f0; }
.learn-ann-card {
  border: 1px solid #e2e8f0;
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.learn-ann-card:hover { border-color: #cbd5e1; box-shadow: var(--moc-shadow-sm); }
.learn-ann-card.is-unread { border-left: 3px solid var(--moc-primary, #0ea5e9); }
.learn-ann-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #ef4444; flex-shrink: 0;
}
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ========== COMMENT BUBBLES ========== */
.learn-comment-thread { min-width: 0; }
.learn-bubble {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: .75rem .9rem;
  margin-bottom: .65rem;
  max-width: 100%;
}
.learn-bubble.is-mine {
  background: #e0f2fe;
  border-color: #bae6fd;
  margin-left: auto;
  max-width: min(100%, 520px);
}
.learn-bubble-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .5rem;
  margin-bottom: .35rem;
  font-size: .82rem;
}
.learn-bubble-role {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--moc-navy, #0b1f3a);
  color: #fff;
  padding: .1rem .35rem;
  border-radius: 4px;
}
.learn-bubble-time { color: #94a3b8; font-size: .72rem; margin-left: auto; }
.learn-bubble-body { font-size: .9rem; line-height: 1.5; word-break: break-word; }
.learn-bubble-quote {
  background: rgba(255,255,255,.65);
  border-left: 3px solid var(--moc-primary, #0ea5e9);
  padding: .45rem .6rem;
  margin-bottom: .5rem;
  border-radius: 0 8px 8px 0;
  font-size: .8rem;
}
.learn-bubble-quote p { margin: .2rem 0 0; color: #64748b; }
.learn-bubble-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: .35rem; }
.learn-bubble-replies { margin-top: .5rem; padding-left: .75rem; border-left: 2px solid #e2e8f0; }
.learn-quote-preview {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: .5rem .65rem;
}
.learn-community-toast {
  position: fixed;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(120%);
  background: var(--moc-navy, #0b1f3a);
  color: #fff;
  padding: .65rem 1rem;
  border-radius: 10px;
  font-size: .85rem;
  z-index: 1080;
  opacity: 0;
  transition: transform .25s, opacity .25s;
  max-width: min(92vw, 360px);
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.learn-community-toast.is-visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}
.learn-community-toast.is-error { background: #b91c1c; }
@media (min-width: 992px) {
  .learn-workspace-tabs { padding-left: 1.15rem; padding-right: 1.15rem; }
}

/* MOCBT AI assistant */
.moc-ai-fab-wrap {
  position: fixed !important;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: auto !important;
  z-index: 1045;
  width: auto;
  height: auto;
  pointer-events: none;
}
.moc-ai-fab-wrap > * { pointer-events: auto; }
body.moc-learn-body .moc-ai-fab-wrap {
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 992px) {
  body.moc-learn-body .moc-ai-fab-wrap {
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
  }
}
.moc-ai-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--moc-navy, #0b1f3a);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 8px 24px rgba(11, 31, 58, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.moc-ai-fab:hover { background: #16325c; color: #fff; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(11, 31, 58, .34); }
.moc-ai-fab:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.moc-assistant-fab-icon,
.moc-ai-fab .moc-ai-icon {
  width: 28px; height: 28px; object-fit: contain; border-radius: 50%;
}
.moc-ai-fab img.moc-ai-icon { width: 32px; height: 32px; }
.moc-ai-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1046;
}
body.moc-ai-open { overflow: hidden; }
.moc-ai-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  width: min(100%, 420px);
  max-height: min(88vh, 640px);
  background: #fff;
  border: 1px solid rgba(11,31,58,.12);
  border-radius: 16px 16px 0 0;
  z-index: 1047;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0,0,0,.12);
}
@media (min-width: 768px) {
  .moc-ai-panel {
    right: 1rem;
    bottom: 5rem;
    border-radius: 14px;
    max-height: min(78vh, 600px);
  }
}
.moc-ai-panel[hidden] { display: none !important; }
.moc-ai-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(11,31,58,.08);
}
.moc-ai-panel-title { font-weight: 700; color: var(--moc-navy); font-family: var(--moc-display); }
.moc-ai-panel-sub { font-size: .75rem; color: #64748b; }
.moc-ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .65rem 1rem;
  border-bottom: 1px solid rgba(11,31,58,.06);
}
.moc-ai-action {
  border: 1px solid rgba(11,31,58,.15);
  background: #f8fafc;
  color: var(--moc-navy);
  border-radius: 999px;
  font-size: .75rem;
  padding: .3rem .65rem;
}
.moc-ai-action:hover { background: #eef2f7; }
.moc-ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: .75rem 1rem;
  min-height: 120px;
  max-height: 320px;
}
.moc-ai-msg {
  margin-bottom: .65rem;
  padding: .55rem .75rem;
  border-radius: 10px;
  font-size: .875rem;
  line-height: 1.45;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}
.moc-ai-msg--user {
  margin-left: 2rem;
  background: var(--moc-sky, #e8f4fc);
  color: var(--moc-navy);
}
.moc-ai-msg--assistant {
  margin-right: 1rem;
  background: #f1f5f9;
  color: #1e293b;
}
.moc-ai-composer {
  padding: .65rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(11,31,58,.08);
}
.moc-ai-composer-foot { display: flex; justify-content: flex-end; margin-top: .45rem; }
.moc-ai-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: .25rem 0;
}
.moc-ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  animation: mocAiDot 1.2s infinite ease-in-out;
}
.moc-ai-typing span:nth-child(2) { animation-delay: .15s; }
.moc-ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes mocAiDot {
  0%, 80%, 100% { opacity: .35; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
.moc-ai-insight-card {
  background: #fff;
  border: 1px solid rgba(11,31,58,.1);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
}
.moc-ai-insight-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  margin-bottom: .75rem;
}
.moc-ai-insight-eyebrow {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--moc-sky-dark);
  font-weight: 700;
}
.moc-ai-insight-title {
  font-family: var(--moc-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--moc-navy);
  margin: 0;
}
.moc-ai-insight-text { font-size: .9rem; line-height: 1.55; color: #334155; }
.moc-ai-save-notes { padding: 0 .75rem .5rem; }
.moc-ai-course-tools .btn-link { font-size: .8rem; text-decoration: none; }
.moc-ai-course-tools .btn-link:hover { text-decoration: underline; }

/* MOCBT AI Assistant (global) */
.moc-assistant-fab {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  left: auto;
  z-index: 1045;
  width: 56px;
  height: 56px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--moc-navy, #0b1f3a);
  color: #fff;
  box-shadow: 0 8px 24px rgba(11,31,58,.28);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 1.15rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.moc-assistant-fab:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(11,31,58,.34); }
.moc-assistant-fab:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.moc-assistant-fab-label { font-size: .62rem; font-weight: 700; line-height: 1; }
.moc-assistant-fab img.moc-assistant-fab-icon { width: 28px; height: 28px; object-fit: contain; border-radius: 50%; }

/* Welcome popup (Meta-style interaction, MOCBT branding) */
.moc-ai-welcome {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  left: auto;
  z-index: 1048;
  width: min(280px, calc(100vw - 1.5rem));
  max-width: calc(100vw - 1.25rem);
  animation: mocAiWelcomeIn .28s ease;
}
.moc-ai-fab-wrap .moc-ai-welcome {
  position: absolute;
  right: 0;
  bottom: calc(100% + .7rem);
  left: auto;
}
body.moc-learn-body .moc-ai-fab-wrap .moc-ai-welcome {
  bottom: calc(100% + .7rem);
}
body.moc-student-body .moc-assistant-root--student .moc-ai-welcome {
  bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
}
@media (min-width: 992px) {
  body.moc-student-body .moc-assistant-root--student .moc-ai-welcome {
    bottom: calc(4.85rem + env(safe-area-inset-bottom, 0px));
  }
}
@keyframes mocAiWelcomeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.moc-ai-welcome[hidden] { display: none !important; }
.moc-ai-welcome__inner {
  position: relative;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
  padding: .85rem 1rem .9rem;
}
.moc-ai-welcome__inner::after {
  content: '';
  position: absolute;
  right: 1.35rem;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  transform: rotate(45deg);
}
.moc-ai-welcome__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
}
.moc-ai-welcome__icon {
  width: 22px; height: 22px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--moc-navy, #0b1f3a); font-size: 1rem;
}
.moc-ai-welcome__icon img { width: 22px; height: 22px; object-fit: contain; border-radius: 50%; }
.moc-ai-welcome__title {
  flex: 1; min-width: 0;
  font-size: .92rem; font-weight: 700; color: #0f172a;
  line-height: 1.25;
}
.moc-ai-welcome__close {
  border: 0; background: transparent; color: #94a3b8;
  font-size: 1.25rem; line-height: 1; padding: 0 .15rem; cursor: pointer;
}
.moc-ai-welcome__close:hover { color: #475569; }
.moc-ai-welcome__body {
  margin: 0; font-size: .82rem; line-height: 1.45; color: #64748b;
}
.moc-assistant-tip,
.moc-ai-learn-tip { display: none !important; }
.moc-assistant-root { position: static; }
.moc-assistant-root .moc-assistant-tip { display: none !important; }
body.moc-assistant-open { overflow: hidden; }
.moc-assistant-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 1046;
}
.moc-assistant-panel {
  position: fixed;
  right: 0;
  bottom: 0;
  width: min(100%, 420px);
  max-height: min(92vh, 680px);
  background: #fff;
  border: 1px solid rgba(11,31,58,.12);
  border-radius: 16px 16px 0 0;
  z-index: 1047;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -10px 32px rgba(0,0,0,.15);
}
.moc-assistant-panel.is-minimized { transform: translateY(calc(100% - 3.2rem)); }
@media (min-width: 768px) {
  .moc-assistant-panel { right: 1rem; bottom: 5.2rem; border-radius: 14px; max-height: min(78vh, 640px); }
}
.moc-assistant-panel[hidden] { display: none !important; }
.moc-assistant-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid rgba(11,31,58,.08);
  background: var(--moc-navy, #0b1f3a);
  color: #fff;
  border-radius: 16px 16px 0 0;
}
.moc-assistant-head-main { display: flex; gap: .65rem; align-items: center; }
.moc-assistant-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex; align-items: center; justify-content: center;
}
.moc-assistant-title { font-weight: 700; font-family: var(--moc-display); }
.moc-assistant-sub { font-size: .75rem; opacity: .85; }
.moc-assistant-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; margin-right: 4px;
}
.moc-assistant-suggestions {
  display: flex; flex-wrap: wrap; gap: .35rem;
  padding: .55rem .75rem 0;
  max-height: 88px; overflow: auto;
}
.moc-assistant-chip {
  border: 1px solid rgba(11,31,58,.15);
  background: #f8fafc;
  color: var(--moc-navy);
  border-radius: 999px;
  font-size: .72rem;
  padding: .25rem .55rem;
}
.moc-assistant-messages {
  flex: 1; overflow-y: auto; padding: .75rem 1rem;
  min-height: 140px; max-height: 360px;
}
.moc-assistant-msg {
  margin-bottom: .65rem; padding: .55rem .75rem;
  border-radius: 10px; font-size: .875rem; line-height: 1.45;
}
.moc-assistant-msg--user { margin-left: 2rem; background: var(--moc-sky, #e8f4fc); color: var(--moc-navy); }
.moc-assistant-msg--assistant { margin-right: 1rem; background: #f1f5f9; color: #1e293b; }
.moc-assistant-notice { padding: 0 1rem .35rem; color: #64748b; }
.moc-assistant-composer { padding: .65rem 1rem calc(.75rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(11,31,58,.08); }
.moc-assistant-composer-foot { display: flex; justify-content: space-between; align-items: center; margin-top: .45rem; }

/* MOCBT Student AI (student portal) */
.moc-assistant-root--student .moc-student-ai-fab {
  background: var(--moc-sky-dark, #0284c7);
  box-shadow: 0 8px 24px rgba(2,132,199,.35);
}
body.moc-student-body .moc-student-ai-fab {
  bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
}
.moc-student-ai-head {
  background: var(--moc-sky-dark, #0284c7) !important;
}
.moc-student-ai-avatar {
  background: rgba(255,255,255,.2) !important;
}
.moc-student-ai-panel .moc-assistant-chip {
  border-color: rgba(2,132,199,.25);
  color: #0369a1;
}
@media (min-width: 992px) {
  body.moc-student-body .moc-student-ai-fab {
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Student onboarding */
body.moc-onboard-active { overflow: hidden; }
.moc-onboard-overlay { position: fixed; inset: 0; z-index: 2000; pointer-events: auto; }
.moc-onboard-spotlight {
  position: fixed; border: 2px solid var(--moc-sky, #38bdf8);
  border-radius: 10px; box-shadow: 0 0 0 9999px rgba(11,31,58,.72);
  pointer-events: none; z-index: 2001;
}
.moc-onboard-card {
  position: fixed; z-index: 2002;
  width: min(92vw, 360px);
  background: #fff; border-radius: 12px;
  padding: 1rem; box-shadow: 0 12px 32px rgba(0,0,0,.25);
}
.moc-onboard-step-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--moc-sky-dark); font-weight: 700; }
.moc-onboard-title { font-size: 1.05rem; font-family: var(--moc-display); color: var(--moc-navy); margin: .35rem 0; }
.moc-onboard-body { font-size: .9rem; color: #334155; margin-bottom: .75rem; }
.moc-onboard-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.moc-onboard-backdrop {
  position: fixed; inset: 0; background: rgba(11,31,58,.45); z-index: 2000; pointer-events: none;
}
.moc-onboard-progress {
  height: 4px; background: #e2e8f0; border-radius: 999px; margin-bottom: .75rem; overflow: hidden;
}
.moc-onboard-progress span {
  display: block; height: 100%; width: 0; background: var(--moc-sky, #0ea5e9); transition: width .25s ease;
}
.moc-nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 .35rem;
  border-radius: 999px; font-size: .68rem; font-weight: 700;
  background: #ef4444; color: #fff; margin-left: .35rem;
}
.moc-practical-swal-icon {
  font-size: 2rem; color: var(--moc-sky, #0ea5e9);
}
@media (max-width: 991.98px) {
  .moc-onboard-card {
    left: 50% !important; right: auto !important; transform: translateX(-50%) !important;
    bottom: max(1rem, env(safe-area-inset-bottom)) !important; top: auto !important;
    width: min(94vw, 380px) !important; max-width: calc(100vw - 1rem);
    max-height: min(55vh, 440px); overflow-y: auto;
  }
  .moc-onboard-body { font-size: .88rem; line-height: 1.45; }
  body.moc-onboard-active .moc-student-sidebar {
    z-index: 1990;
  }
}
@media (max-width: 575px) {
  .moc-onboard-card { width: min(94vw, 360px) !important; }
}

/* Course reviews */
.moc-review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.moc-review-bars { max-width: 360px; }
.moc-review-bar-row { display: grid; grid-template-columns: 2rem 1fr 2rem; align-items: center; gap: .5rem; font-size: .85rem; margin-bottom: .35rem; }
.moc-review-bar { height: 8px; background: #e2e8f0; border-radius: 4px; overflow: hidden; }
.moc-review-bar span { display: block; height: 100%; background: var(--moc-sky, #0ea5e9); border-radius: 4px; }
.moc-review-item { border: 1px solid var(--moc-line, #e2e8f0); border-radius: 12px; padding: 1rem; margin-bottom: .75rem; background: #fff; }
.moc-review-item p { white-space: pre-wrap; word-break: break-word; }


/* ========== PUBLIC SUCCESS STORIES ========== */
.moc-ss-hero {
  background: var(--moc-navy, #0b1f3a);
  color: #fff;
  padding: clamp(2.5rem, 6vw, 4.25rem) 0;
  border-bottom: 3px solid var(--moc-sky, #0ea5e9);
}
.moc-ss-hero__inner { max-width: 760px; text-align: center; margin: 0 auto; }
.moc-ss-hero__eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; font-weight: 700;
  opacity: .8; margin-bottom: .75rem;
}
.moc-ss-hero__title {
  font-family: var(--moc-display, 'Sora', sans-serif);
  font-weight: 700; font-size: clamp(1.75rem, 4vw, 2.6rem);
  line-height: 1.15; margin: 0 0 .85rem; color: #fff;
}
.moc-ss-hero__lead {
  margin: 0; font-size: clamp(.95rem, 2.2vw, 1.1rem); line-height: 1.55; opacity: .92;
  overflow-wrap: anywhere; word-break: break-word;
}
.moc-ss-hero__tagline { display: block; margin-top: .45rem; font-weight: 600; color: var(--moc-sky, #0ea5e9); }
.moc-ss-section { padding: clamp(2rem, 5vw, 3.5rem) 0 4rem; background: #f8fafc; }
.moc-ss-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .moc-ss-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
}
@media (min-width: 1100px) {
  .moc-ss-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.moc-ss-card {
  background: #fff;
  border: 1px solid rgba(11,31,58,.1);
  border-radius: 18px;
  box-shadow: 0 8px 24px rgba(11,31,58,.06);
  padding: clamp(1.15rem, 3vw, 1.5rem);
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
}
.moc-ss-card.is-featured { border-color: rgba(14,165,233,.35); box-shadow: 0 10px 28px rgba(14,165,233,.12); }
.moc-ss-card__profile {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
  min-width: 0;
}
.moc-ss-card__identity { min-width: 0; flex: 1; }
.moc-ss-card__name {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--moc-navy, #0b1f3a);
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.moc-ss-card__course {
  margin: .2rem 0 0;
  font-size: .82rem;
  color: #64748b;
  overflow-wrap: anywhere;
}
.moc-story-avatar {
  border: 2px solid #e2e8f0;
  background: #fff;
  box-shadow: 0 2px 8px rgba(11,31,58,.08);
}
.moc-ss-card__title {
  margin: 0 0 .85rem;
  font-family: var(--moc-display, 'Sora', sans-serif);
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 700;
  color: var(--moc-navy, #0b1f3a);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.moc-ss-card__divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(14,165,233,.45), rgba(226,232,240,.8) 60%, transparent);
  margin: 0 0 1rem;
}
.moc-ss-card__body {
  color: #334155;
  font-size: .95rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
  word-break: break-word;
  min-width: 0;
}
.moc-ss-card__body img,
.moc-ss-card__body table {
  max-width: 100%;
}
.moc-ss-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #64748b;
}
.moc-ss-empty i { font-size: 2rem; color: var(--moc-sky, #0ea5e9); display: block; margin-bottom: .75rem; }
.moc-ss-pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem;
  margin-top: 2rem;
}
.moc-ss-pager__meta { font-size: .85rem; color: #64748b; }

/* ========== STUDENT ANNOUNCEMENTS ========== */
.moc-ann-card {
  background: #fff; border: 1px solid var(--moc-line, #e2e8f0); border-radius: 14px;
  padding: 1rem 1.1rem; margin-bottom: .85rem; min-width: 0;
}
.moc-ann-card.is-unread { border-color: rgba(14,165,233,.45); box-shadow: 0 0 0 1px rgba(14,165,233,.12); }
.moc-ann-card__meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-bottom: .45rem; }
.moc-ann-priority--important, .moc-ann-priority--high { background: #fef3c7; color: #92400e; }
.moc-ann-priority--urgent { background: #fee2e2; color: #991b1b; }
.moc-ann-priority--normal { background: #f1f5f9; color: #475569; }
.moc-ann-detail {
  background: #fff; border: 1px solid var(--moc-line, #e2e8f0); border-radius: 16px;
  padding: clamp(1.1rem, 3vw, 1.75rem); max-width: 820px; margin: 0 auto; min-width: 0;
}
.moc-ann-detail__body { overflow-wrap: anywhere; word-break: break-word; }
.moc-ann-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.5rem; }
.moc-ann-actions .btn { min-height: 44px; flex: 1 1 140px; }
.apx-mobile-cards .apx-m-card { min-width: 0; overflow-wrap: anywhere; }

/* ========== PRACTICAL LAB DETAIL ========== */
.moc-lab-detail { max-width: 1100px; }
.moc-lab-topbar { margin-bottom: .85rem; }
.moc-lab-hero {
  background: #fff;
  border: 1px solid var(--moc-line, #e2e8f0);
  border-radius: 18px;
  padding: clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(11,31,58,.05);
  min-width: 0;
}
.moc-lab-hero__meta { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; margin-bottom: .75rem; }
.moc-lab-chip {
  display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 999px;
  background: #f1f5f9; color: #334155; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.moc-lab-badge {
  display: inline-flex; align-items: center; padding: .28rem .65rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; letter-spacing: .03em;
}
.moc-lab-badge--new { background: #e0f2fe; color: #0369a1; }
.moc-lab-badge--progress { background: #ede9fe; color: #5b21b6; }
.moc-lab-badge--review { background: #fef3c7; color: #92400e; }
.moc-lab-badge--approved { background: #dcfce7; color: #166534; }
.moc-lab-badge--rejected { background: #fee2e2; color: #991b1b; }
.moc-lab-xp {
  display: inline-flex; align-items: center; gap: .3rem;
  color: #15803d; font-weight: 700; font-size: .85rem;
}
.moc-lab-hero__title {
  margin: 0 0 .35rem; font-family: var(--moc-display, 'Sora', sans-serif);
  font-size: clamp(1.35rem, 3.5vw, 1.9rem); color: var(--moc-navy, #0b1f3a);
  line-height: 1.2; overflow-wrap: anywhere;
}
.moc-lab-hero__sub { margin: 0 0 1rem; color: #64748b; font-size: .92rem; }
.moc-lab-hero__stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem;
  border-top: 1px solid #e2e8f0; padding-top: .9rem;
}
.moc-lab-hero__stats .label { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 700; }
.moc-lab-hero__stats strong { font-size: .92rem; color: var(--moc-navy, #0b1f3a); overflow-wrap: anywhere; }
.moc-lab-layout {
  display: grid; grid-template-columns: 1fr; gap: 1.15rem; align-items: start;
}
@media (min-width: 992px) {
  .moc-lab-layout { grid-template-columns: minmax(0, 1.45fr) minmax(280px, .9fr); gap: 1.35rem; }
}
.moc-lab-section, .moc-lab-panel {
  background: #fff; border: 1px solid var(--moc-line, #e2e8f0); border-radius: 16px;
  padding: clamp(1rem, 2.5vw, 1.35rem); min-width: 0; overflow: hidden;
}
.moc-lab-section--directive { border-color: rgba(14,165,233,.28); background: linear-gradient(180deg, #f0f9ff, #fff); }
.moc-lab-section__title {
  display: flex; align-items: center; gap: .45rem; font-size: 1rem; font-weight: 700;
  color: var(--moc-navy, #0b1f3a); margin: 0 0 .85rem;
}
.moc-lab-section__body { overflow-wrap: anywhere; word-break: break-word; min-width: 0; }
.moc-lab-section__body img, .moc-lab-section__body table, .moc-lab-section__body pre,
.moc-lab-section__body .moc-file-preview { max-width: 100%; }
.moc-lab-panel--success { border-color: rgba(22,163,74,.35); background: #f0fdf4; }
.moc-lab-panel--review { border-color: rgba(217,119,6,.3); background: #fffbeb; }
.moc-lab-result-icon { font-size: 1.75rem; margin-bottom: .35rem; }
.moc-lab-panel--success .moc-lab-result-icon { color: #16a34a; }
.moc-lab-panel--review .moc-lab-result-icon { color: #d97706; }
.moc-lab-xp-earned {
  display: inline-flex; padding: .45rem .8rem; border-radius: 10px;
  background: #dcfce7; color: #166534; font-weight: 800;
}
.moc-lab-dropzone {
  position: relative; border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 1rem;
  background: #f8fafc; text-align: center; min-width: 0;
}
.moc-lab-dropzone.is-drag { border-color: var(--moc-sky, #0ea5e9); background: #f0f9ff; }
.moc-lab-dropzone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.moc-lab-dropzone__ui { pointer-events: none; display: grid; gap: .2rem; justify-items: center; color: #64748b; font-size: .88rem; }
.moc-lab-dropzone__ui i { font-size: 1.5rem; color: var(--moc-sky, #0ea5e9); }
.moc-lab-dropzone__ui span { font-size: .75rem; }
.moc-lab-dropzone__file { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; justify-content: center; font-size: .88rem; font-weight: 600; }
.moc-lab-submit-form .btn { min-height: 46px; }
.moc-lab-aside { display: grid; gap: 1rem; min-width: 0; }
.moc-lab-aside .moc-file-preview { max-width: 100%; }
@media (max-width: 575.98px) {
  .moc-lab-hero__stats { grid-template-columns: 1fr 1fr; }
  .moc-lab-dropzone { padding: .85rem; }
}

/* ========== E-BOOK MARKETPLACE ========== */
.moc-ebook-hero {
  background: var(--moc-navy);
  color: #fff;
  padding: clamp(2rem, 5vw, 3.25rem) 0;
}
.moc-ebook-hero__eyebrow {
  margin: 0 0 .35rem;
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .75;
}
.moc-ebook-hero h1 {
  font-family: var(--moc-display);
  font-size: var(--moc-h1);
  margin: 0 0 .5rem;
  color: #fff;
}
.moc-ebook-hero p { margin: 0; opacity: .88; max-width: 36rem; }
.moc-ebook-section { padding: var(--moc-section-y) 0 3rem; }
.moc-ebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 1.25rem;
}
.moc-ebook-card {
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: var(--moc-radius-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
  box-shadow: var(--moc-shadow-sm);
}
.moc-ebook-card__cover {
  display: block;
  aspect-ratio: 3 / 4;
  background: #e2e8f0;
  overflow: hidden;
}
.moc-ebook-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.moc-ebook-card__body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  flex: 1;
  min-width: 0;
}
.moc-ebook-card__type {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--moc-sky-dark);
}
.moc-ebook-card__title {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.35;
  font-family: var(--moc-display);
}
.moc-ebook-card__title a { color: var(--moc-navy); }
.moc-ebook-card__desc {
  margin: 0;
  font-size: .875rem;
  color: var(--moc-muted);
  overflow-wrap: anywhere;
}
.moc-ebook-card__foot {
  margin-top: auto;
  padding-top: .75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.moc-ebook-card__price { color: var(--moc-navy); font-size: 1.05rem; }
.moc-ebook-detail { padding: var(--moc-section-y) 0 3rem; }
.moc-ebook-detail__grid {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}
.moc-ebook-detail__cover {
  border-radius: var(--moc-radius-sm);
  overflow: hidden;
  border: 1px solid var(--moc-line);
  background: #e2e8f0;
  aspect-ratio: 3 / 4;
}
.moc-ebook-detail__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moc-ebook-detail__info h1 {
  font-family: var(--moc-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: .35rem 0 .75rem;
  color: var(--moc-navy);
  overflow-wrap: anywhere;
}
.moc-ebook-detail__price {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--moc-navy);
  margin-bottom: .75rem;
}
.moc-ebook-detail__body {
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: var(--moc-radius-sm);
  padding: 1.25rem;
  overflow-wrap: anywhere;
  min-width: 0;
}
.moc-ebook-detail__body img,
.moc-ebook-detail__body table { max-width: 100%; }
.moc-ebook-library { display: grid; gap: 1rem; }
.moc-ebook-lib-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: var(--moc-radius-sm);
  padding: 1rem;
  min-width: 0;
}
.moc-ebook-lib-card__cover {
  width: 72px;
  height: 96px;
  object-fit: cover;
  border-radius: 8px;
}
@media (max-width: 575.98px) {
  .moc-ebook-detail__grid { grid-template-columns: 1fr; }
  .moc-ebook-detail__cover { max-width: 200px; }
}
.moc-li-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 1rem;
}
.moc-li-card {
  background: #fff;
  border: 1px solid var(--moc-line);
  border-radius: var(--moc-radius-sm);
  padding: 1.1rem;
  min-width: 0;
}
.moc-li-card h2 { font-size: 1rem; margin: 0 0 .75rem; color: var(--moc-navy); }
.moc-skill-bar {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  margin-top: .35rem;
}
.moc-skill-bar > span { display: block; height: 100%; background: var(--moc-sky); border-radius: 999px; }
.moc-checklist { list-style: none; padding: 0; margin: 0; }
.moc-checklist li {
  display: flex;
  gap: .5rem;
  align-items: flex-start;
  padding: .35rem 0;
  font-size: .92rem;
}
.moc-checklist .ok { color: var(--moc-success); }
.moc-checklist .pending { color: var(--moc-muted); }

/* Accessibility preferences */
html.moc-a11y-large { font-size: 112.5%; }
html.moc-a11y-reduce-motion *,
html.moc-a11y-reduce-motion *::before,
html.moc-a11y-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Accessibility preferences */
html.moc-a11y-large { font-size: 112.5%; }
html.moc-a11y-reduce-motion *,
html.moc-a11y-reduce-motion *::before,
html.moc-a11y-reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* Public scroll-to-top — left of AI widget, no overlap */
.moc-scroll-top {
  position: fixed;
  right: calc(5.1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1.15rem + env(safe-area-inset-bottom, 0px));
  z-index: 1044;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid #dbe3ef;
  background: #fff;
  color: var(--moc-navy, #0b1f3a);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.moc-scroll-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.moc-scroll-top:hover { background: #f8fafc; color: #0284c7; }
.moc-scroll-top:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; }
.moc-scroll-top[hidden] { display: none !important; }
@media (max-width: 360px) {
  .moc-scroll-top {
    right: calc(4.75rem + env(safe-area-inset-right, 0px));
    width: 40px;
    height: 40px;
  }
}
