:root {
  --moc-sky: #0ea5e9;
  --moc-sky-dark: #0284c7;
  --moc-navy: #0b1f3a;
  --moc-navy-mid: #12263f;
  --moc-ink: #0f172a;
  --moc-bg: #f4f7fb;
  --moc-surface: #ffffff;
  --moc-muted: #64748b;
  --moc-border: #e2e8f0;
  --moc-success: #059669;
  --moc-danger: #dc2626;
  --moc-warning: #d97706;
  --moc-radius: 16px;
  --moc-radius-sm: 10px;
  --moc-shadow: 0 8px 24px rgba(11, 31, 58, 0.08);
  --moc-shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.06);
  --moc-font: "DM Sans", system-ui, sans-serif;
  --moc-display: "Outfit", "DM Sans", sans-serif;
  --moc-primary: var(--moc-sky);
  --moc-primary-dark: var(--moc-sky-dark);
  --moc-secondary: var(--moc-navy);
}

* { 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;
}

a { color: var(--moc-sky-dark); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--moc-sky); }

img { max-width: 100%; height: auto; }

/* ========== NAV ========== */
.moc-navbar {
  background: var(--moc-surface);
  border-bottom: 1px solid var(--moc-border);
  position: sticky; top: 0; z-index: 1030;
  box-shadow: var(--moc-shadow-sm);
}
.moc-brand {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--moc-navy) !important;
  letter-spacing: -0.02em;
  display: flex; align-items: center; gap: .6rem;
}
.moc-brand img { height: 36px; width: auto; }
.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: 500; font-size: .92rem;
  padding: .45rem .85rem !important; border-radius: 8px;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active {
  color: var(--moc-sky-dark) !important; background: #e0f2fe;
}

/* ========== HERO (solid, no gradient) ========== */
.moc-hero {
  position: relative;
  min-height: min(78vh, 620px);
  display: flex; align-items: center;
  background: var(--moc-navy);
  color: #fff;
  overflow: hidden;
}
.moc-hero::before {
  content: "";
  position: absolute; right: -80px; top: -80px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(14, 165, 233, 0.18);
  pointer-events: none;
}
.moc-hero::after {
  content: "";
  position: absolute; left: -60px; bottom: -100px;
  width: 320px; height: 320px; border-radius: 50%;
  background: rgba(14, 165, 233, 0.10);
  pointer-events: none;
}
.moc-hero-inner { position: relative; z-index: 1; max-width: 680px; padding: 4.5rem 0; }
.moc-hero .eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--moc-sky); margin-bottom: 1rem;
  background: rgba(14,165,233,.12); padding: .35rem .75rem; border-radius: 999px;
  border: 1px solid rgba(14,165,233,.25);
}
.moc-hero h1 {
  font-family: var(--moc-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1rem;
  animation: mocRise .55s ease both;
}
.moc-hero p {
  font-size: 1.08rem; color: rgba(255,255,255,.82);
  max-width: 34rem; margin-bottom: 1.75rem;
  animation: mocRise .55s ease .08s both;
}
.moc-hero .btn { animation: mocRise .55s ease .14s both; }

@keyframes mocRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========== SECTIONS ========== */
.moc-section { padding: 4.25rem 0; }
.moc-section-title {
  font-family: var(--moc-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: .4rem;
  color: var(--moc-navy);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
}
.moc-section-sub { color: var(--moc-muted); margin-bottom: 2rem; max-width: 38rem; }

/* ========== CARDS ========== */
.moc-card, .stat-tile, .moc-course-card {
  background: var(--moc-surface);
  border: 1px solid var(--moc-border);
  border-radius: var(--moc-radius);
  box-shadow: var(--moc-shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.moc-card:hover, .moc-course-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--moc-shadow);
  border-color: #cbd5e1;
}
.moc-course-card {
  overflow: hidden; height: 100%;
  display: flex; flex-direction: column;
}
.moc-course-card img {
  width: 100%; height: 180px; 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: 500; }
.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: 1.15rem 1.25rem; height: 100%; }
.stat-tile .n {
  font-size: 1.65rem; font-weight: 700; font-family: var(--moc-display);
  color: var(--moc-navy); letter-spacing: -0.02em;
}
.stat-tile .l { color: var(--moc-muted); font-size: .85rem; margin-top: .15rem; }

/* ========== BUTTONS ========== */
.btn-moc {
  background: var(--moc-sky);
  border: 1px solid var(--moc-sky-dark);
  color: #fff; font-weight: 600;
  border-radius: 12px; padding: .7rem 1.3rem;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28);
  transition: background .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-moc:hover { background: var(--moc-sky-dark); color: #fff; transform: translateY(-1px); }
.btn-moc:active { transform: none; opacity: .92; }
.btn-moc.is-loading {
  transform: none;
  opacity: .85;
  cursor: wait;
  pointer-events: none;
}
.btn-moc-outline {
  border: 1.5px solid rgba(255,255,255,.65); color: #fff;
  border-radius: 12px; font-weight: 600; background: transparent;
}
.btn-moc-outline:hover { background: #fff; color: var(--moc-navy); }
.btn-navy {
  background: var(--moc-navy); border: 1px solid var(--moc-navy); color: #fff;
  border-radius: 12px; font-weight: 600; padding: .65rem 1.2rem;
}
.btn-navy:hover { background: var(--moc-navy-mid); color: #fff; }

/* ========== AUTH (mobile-first) ========== */
.moc-auth-body { background: var(--moc-bg); }
.moc-auth-page {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--moc-bg);
}
.moc-auth-mobile-brand {
  background: var(--moc-navy);
  color: #fff;
  padding: 1rem 0 1.1rem;
  border-bottom: 3px solid var(--moc-sky);
}
.moc-auth-logo { height: 36px; width: auto; display: block; margin-bottom: .35rem; }
.moc-auth-logo--aside { height: 44px; margin-bottom: 1.25rem; }
.moc-auth-wordmark {
  font-family: var(--moc-display); font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em;
}
.moc-auth-mobile-tag { color: #94a3b8; font-size: .85rem; margin-top: .15rem; }

.moc-auth-aside {
  display: none;
  background: var(--moc-navy); color: #fff;
  padding: 3rem 2.5rem; position: relative; overflow: hidden;
}
.moc-auth-aside::before {
  content: ""; position: absolute; width: 220px; height: 220px;
  border-radius: 50%; background: rgba(14,165,233,.12);
  top: -50px; right: -40px; pointer-events: none;
}
.moc-auth-aside::after {
  content: ""; position: absolute; width: 140px; height: 140px;
  border-radius: 50%; background: rgba(14,165,233,.08);
  bottom: 40px; left: -30px; pointer-events: none;
}
.moc-auth-aside-inner { position: relative; z-index: 1; max-width: 26rem; }
.moc-auth-eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: #7dd3fc; margin-bottom: .85rem;
}
.moc-auth-aside-title {
  font-family: var(--moc-display); font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 700; letter-spacing: -.02em; margin: 0 0 .75rem; line-height: 1.2;
}
.moc-auth-aside-text { color: #94a3b8; margin: 0 0 1.5rem; line-height: 1.6; }
.moc-auth-points { list-style: none; padding: 0; margin: 0; }
.moc-auth-points li {
  display: flex; align-items: flex-start; gap: .65rem;
  color: #e2e8f0; font-size: .95rem; margin-bottom: .7rem;
}
.moc-auth-points i { color: var(--moc-sky); margin-top: .15rem; flex-shrink: 0; }

.moc-auth-main {
  flex: 1; display: flex; align-items: flex-start; justify-content: center;
  padding: 1.25rem 1rem 2rem;
}
.moc-auth-box {
  width: 100%; max-width: 440px;
  background: var(--moc-surface);
  border: 1px solid var(--moc-border);
  border-radius: 16px; padding: 1.35rem 1.15rem 1.5rem;
  box-shadow: var(--moc-shadow-sm);
}
.moc-auth-box h1 {
  font-family: var(--moc-display); font-weight: 700;
  color: var(--moc-navy); font-size: 1.4rem; letter-spacing: -0.02em;
}
.moc-auth-kicker {
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--moc-sky-dark); margin-bottom: .35rem;
}
.moc-auth-icon-badge {
  width: 56px; height: 56px; border-radius: 14px; margin: 0 auto;
  background: #e0f2fe; color: var(--moc-sky-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.moc-auth-icon-badge.success { background: #ecfdf5; color: #059669; }
.moc-auth-links {
  display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  margin-top: 1rem; font-size: .875rem;
}
.moc-btn-auth {
  min-height: 48px; font-weight: 700; letter-spacing: .01em;
  border-radius: 12px;
}

.moc-input-icon { position: relative; }
.moc-input-icon > .bi:first-child {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: #64748b; pointer-events: none; z-index: 2;
}
.moc-input-icon .form-control { padding-left: 2.55rem; min-height: 48px; }
.moc-input-icon.password-wrap .form-control { padding-right: 2.75rem; }
.password-wrap { position: relative; }
.password-wrap .toggle-pass {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--moc-muted); cursor: pointer;
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; z-index: 2;
}
.password-wrap .toggle-pass:focus-visible { outline: 2px solid var(--moc-sky); outline-offset: 1px; }

.moc-login-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .35rem;
  background: #f1f5f9; border: 1px solid var(--moc-border);
  border-radius: 12px; padding: .3rem; margin-bottom: 1.15rem;
}
.moc-login-tab {
  border: 0; background: transparent; color: #475569;
  font-size: .78rem; font-weight: 700; min-height: 40px;
  border-radius: 9px; padding: .35rem .25rem; cursor: pointer;
  transition: background .15s, color .15s;
}
.moc-login-tab.is-active {
  background: #fff; color: var(--moc-navy);
  box-shadow: 0 1px 2px rgba(15,23,42,.08);
}
.moc-login-tab:focus-visible { outline: 2px solid var(--moc-sky); outline-offset: 1px; }

.form-control, .form-select {
  border-radius: 10px; border-color: #cbd5e1; padding: .7rem .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--moc-sky);
  box-shadow: 0 0 0 3px rgba(14,165,233,.18);
}
.strength-meter { height: 6px; background: #e2e8f0; border-radius: 99px; overflow: hidden; margin-top: .4rem; }
.strength-meter > span { display: block; height: 100%; width: 0; background: var(--moc-danger); transition: width .2s, background .2s; }
.strength-meter.s1 > span { width: 25%; background: var(--moc-danger); }
.strength-meter.s2 > span { width: 50%; background: var(--moc-warning); }
.strength-meter.s3 > span { width: 75%; background: var(--moc-sky); }
.strength-meter.s4 > span { width: 100%; background: var(--moc-success); }

.otp-row {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .4rem; margin: 1.25rem 0; max-width: 360px; margin-left: auto; margin-right: auto;
}
.otp-row input {
  width: 100%; aspect-ratio: 1 / 1.1; min-height: 48px; text-align: center;
  font-size: 1.2rem; font-weight: 700; font-family: var(--moc-display);
  border: 2px solid #cbd5e1; border-radius: 12px; text-transform: uppercase;
  padding: 0;
}
.otp-row input:focus { border-color: var(--moc-sky); outline: none; box-shadow: 0 0 0 3px rgba(14,165,233,.18); }
.otp-row input.is-invalid { border-color: var(--moc-danger); }
.otp-timer { font-variant-numeric: tabular-nums; color: var(--moc-muted); font-weight: 600; }

.moc-auth-modal { border-radius: 16px; border: 1px solid var(--moc-border); }
.moc-auth-modal .modal-header { border-bottom: 1px solid var(--moc-border); }
.moc-auth-modal .modal-title { font-family: var(--moc-display); color: var(--moc-navy); font-weight: 700; }
.moc-auth-modal .modal-body { max-height: min(60vh, 420px); }

@media (min-width: 576px) {
  .moc-auth-box { padding: 1.75rem 1.6rem; border-radius: 18px; }
  .moc-auth-box h1 { font-size: 1.55rem; }
  .moc-login-tab { font-size: .82rem; }
  .otp-row { gap: .5rem; }
  .otp-row input { font-size: 1.35rem; min-height: 54px; }
}
@media (min-width: 992px) {
  .moc-auth-page { flex-direction: row; align-items: stretch; min-height: 100vh; }
  .moc-auth-aside {
    display: flex; flex-direction: column; justify-content: center;
    width: min(42%, 520px); flex-shrink: 0;
  }
  .moc-auth-main { align-items: center; padding: 2.5rem 1.5rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .moc-auth-enter { animation: mocAuthIn .35s ease both; }
  @keyframes mocAuthIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .moc-auth-enter { animation: none; }
}

/* ========== FOOTER ========== */
.moc-footer {
  background: var(--moc-navy);
  color: #94a3b8;
  padding: 3.25rem 0 1.5rem;
  margin-top: 3rem;
}
.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;
}

/* ========== ADMIN ========== */
.admin-shell { display: flex; min-height: 100vh; background: var(--moc-bg); }
.admin-sidebar {
  width: 268px; background: var(--moc-navy); color: #94a3b8;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0;
}
.admin-sidebar .brand {
  padding: 1.35rem 1.25rem 1.1rem;
  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: .25rem; }
.admin-sidebar a {
  display: flex; align-items: center; gap: .55rem;
  color: #cbd5e1; padding: .58rem 1.25rem;
  border-left: 3px solid transparent; font-size: .9rem;
  transition: background .15s, color .15s;
}
.admin-sidebar a:hover, .admin-sidebar a.active {
  background: rgba(14,165,233,.12); color: #fff; border-left-color: var(--moc-sky);
}
.admin-sidebar .nav-label {
  padding: .95rem 1.25rem .3rem; font-size: .68rem; text-transform: uppercase;
  letter-spacing: .1em; color: #64748b; font-weight: 600;
}
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  background: #fff; border-bottom: 1px solid var(--moc-border);
  padding: .9rem 1.5rem; display: flex; justify-content: space-between; align-items: center;
}
.admin-content { padding: 1.5rem; }

/* ========== LEARN ========== */
.learn-topbar {
  background: var(--moc-navy); color: #fff;
  padding: .75rem 0; position: sticky; top: 0; z-index: 50;
}
.learn-shell { display: grid; grid-template-columns: 1fr 320px; min-height: calc(100vh - 56px); }
.learn-sidebar {
  background: var(--moc-navy-mid); color: #e2e8f0;
  overflow-y: auto; max-height: calc(100vh - 56px);
  position: sticky; top: 56px; order: 2;
}
.learn-sidebar a {
  color: #cbd5e1; display: block; padding: .5rem .9rem; font-size: .88rem;
  border-radius: 8px; margin: 0 .4rem; transition: background .15s;
}
.learn-sidebar a.active, .learn-sidebar a:hover { background: rgba(14,165,233,.2); color: #fff; }
.learn-content { padding: 1.35rem 1.5rem 2.5rem; background: #fff; min-width: 0; order: 1; }
.learn-video {
  background: #0b1220; border-radius: 14px; aspect-ratio: 16/9; overflow: hidden;
}
.learn-video iframe, .learn-video video { width: 100%; height: 100%; border: 0; }
.progress-bar-moc {
  height: 8px; 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;
}

/* ========== TOASTS / ALERTS ========== */
.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-border); 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; }
.skeleton {
  background: #e2e8f0; border-radius: 8px; position: relative; overflow: hidden;
}
.skeleton::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(255,255,255,.45);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}
@keyframes shimmer { 100% { transform: translateX(100%); } }

.chart-box {
  background: #fff; border: 1px solid var(--moc-border); border-radius: var(--moc-radius);
  padding: 1.25rem; box-shadow: var(--moc-shadow-sm);
}
.quick-action {
  display: flex; align-items: center; gap: .75rem;
  padding: 1rem; border: 1px solid var(--moc-border); border-radius: 14px;
  background: #fff; color: inherit; transition: border-color .15s, box-shadow .15s;
}
.quick-action:hover { border-color: var(--moc-sky); box-shadow: var(--moc-shadow-sm); color: inherit; }
.quick-action i {
  width: 40px; height: 40px; border-radius: 10px;
  background: #e0f2fe; color: var(--moc-sky-dark);
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem;
}
.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;
}

.upload-preview {
  width: 96px; height: 96px; object-fit: contain;
  border: 1px solid var(--moc-border); border-radius: 12px; background: #f8fafc; padding: 6px;
}

.moc-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--moc-navy, #0b1f3a); color: #fff; font-weight: 700;
}
.moc-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moc-avatar-initial { letter-spacing: 0; }

.moc-ticket-card {
  display: block; background: #fff; border: 1px solid var(--moc-border, #e2e8f0);
  border-radius: 14px; padding: 1rem 1.1rem; color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.moc-ticket-card:hover { border-color: var(--moc-sky, #0ea5e9); box-shadow: var(--moc-shadow-sm); }

.moc-status-pill {
  display: inline-block; font-size: .72rem; font-weight: 700;
  padding: .25rem .55rem; 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-success-panel { border-top: 4px solid var(--moc-sky, #0ea5e9); }
.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;
  animation: mocPop .45s ease both;
}
@keyframes mocPop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }

.moc-chat-thread {
  background: #f8fafc; border: 1px solid var(--moc-border, #e2e8f0);
  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: 600; 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: #0b1f3a; color: #fff; border-color: #0b1f3a; 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 .body p { margin: 0 0 .5rem; }
.moc-chat-bubble .body p:last-child { margin-bottom: 0; }
.moc-chat-bubble .time { font-size: .7rem; opacity: .7; margin-top: .45rem; }
.moc-chat-composer { position: sticky; bottom: 0; }

.moc-promo-banner {
  background: var(--moc-navy);
  color: #fff;
  border-bottom: 3px solid var(--moc-sky);
}

/* Student mobile 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-border);
  box-shadow: 0 -4px 16px rgba(15,23,42,.06);
  padding: .35rem .25rem calc(.35rem + 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: 600;
  min-height: 52px; border-radius: 10px;
}
.moc-student-bottom a i { font-size: 1.15rem; }
.moc-student-bottom a.is-active { color: var(--moc-navy); background: #e0f2fe; }
.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: 72px; }
  .moc-student-body .moc-footer { display: none; }
}

/* Admin drawer polish */
.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: 8px 0 30px rgba(15,23,42,.25);
}
.admin-sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 1045;
}
.admin-sidebar-backdrop.is-open { display: block; }

@media (max-width: 991.98px) {
  .table-responsive-moc { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .moc-section { padding-top: 1.25rem; padding-bottom: 1.5rem; }
  .moc-section-title { font-size: 1.35rem; }
}
.moc-promo-banner code {
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: .1rem .4rem;
  border-radius: 4px;
}
.moc-countdown {
  font-family: Outfit, DM Sans, sans-serif;
  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: var(--moc-text, #1e293b);
}
.cms-content h2, .cms-content h3 { font-family: Outfit, DM Sans, sans-serif; margin-top: 1.5rem; }
.cms-content img { max-width: 100%; height: auto; border-radius: 8px; }
.cms-content a { color: var(--moc-sky-dark); }

@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; }
}

@media (max-width: 991.98px) {
  .learn-shell { grid-template-columns: 1fr; }
  .learn-sidebar { position: relative; top: 0; max-height: none; order: 2; }
  .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; }
}
