/* ============================================================
   Megaminds Student Portal — Booking Journey + Login
   Ported from the approved Claude Design (brand.css + prototype).
   Self-contained (no Tailwind/Vite). Light + Dark via [data-theme].
   RTL-first via CSS logical properties. Fonts: Fredoka + Cairo.
   ============================================================ */

/* ---- Fonts: Fredoka (display) self-hosted, Cairo (ui) via Google ---- */
@font-face { font-family:'Fredoka'; font-style:normal; font-weight:500; font-display:swap; src:url('/frontend/fonts/fredoka-medium.woff2') format('woff2'),url('/certifi/static/Fredoka-Medium.ttf') format('truetype'); }
@font-face { font-family:'Fredoka'; font-style:normal; font-weight:600; font-display:swap; src:url('/frontend/fonts/fredoka-semibold.woff2') format('woff2'),url('/certifi/static/Fredoka-SemiBold.ttf') format('truetype'); }
@font-face { font-family:'Fredoka'; font-style:normal; font-weight:700; font-display:swap; src:url('/frontend/fonts/fredoka-bold.woff2') format('woff2'),url('/certifi/static/Fredoka-Bold.ttf') format('truetype'); }

:root {
  --brand-500:#fb6514; --brand-600:color-mix(in srgb,var(--brand-500) 84%,#000);
  --brand-400:color-mix(in srgb,var(--brand-500) 80%,#fff);
  --brand-100:color-mix(in srgb,var(--brand-500) 24%,#fff);
  --brand-50:color-mix(in srgb,var(--brand-500) 11%,#fff);
  --head:#0f3d3c; --teal-600:#0d9488; --teal-500:#14b8a6; --teal-100:#ccfbf1; --teal-50:#f0fdfa;
  --wa-500:#25d366; --wa-600:#1da851;
  --ink:#1c1917; --ink-soft:#44403c; --muted:#78716c; --faint:#a8a29e;
  --line:#ece7e1; --line-2:#ded7cf; --surface:#ffffff; --surface-2:#faf7f3; --bg:#fbf7f2; --bg-tint:#fff4ea;
  --ok:#059669; --ok-bg:#d1fae5; --warn:#d97706; --err:#e11d48; --err-bg:#ffe4e6; --info:#0284c7;
  --field-bg:#ffffff; --field-line:#ded7cf; --ring:color-mix(in srgb,var(--brand-500) 22%,transparent);
  --r-xs:8px; --r-sm:13px; --r-md:18px; --r-lg:26px; --r-xl:34px; --r-pill:999px;
  --sh-sm:0 1px 2px rgba(28,25,23,.06),0 1px 3px rgba(28,25,23,.04);
  --sh-md:0 4px 14px -6px rgba(28,25,23,.12),0 2px 6px -3px rgba(28,25,23,.08);
  --sh-lg:0 24px 60px -24px rgba(124,45,18,.28),0 8px 24px -12px rgba(28,25,23,.12);
  --sh-brand:0 10px 30px -10px color-mix(in srgb,var(--brand-500) 52%,transparent);
  --display:"Fredoka","Cairo",system-ui,sans-serif; --ui:"Cairo","Cairo Fallback",system-ui,-apple-system,sans-serif;
  --ease:cubic-bezier(0.22,1,0.36,1); --fast:150ms; --base:240ms; --slow:360ms;
}
:root[data-theme="dark"]{
  --ink:#f5f1ea; --ink-soft:#e3ddd3; --muted:#a8a097; --faint:#6f675e;
  --line:#2c2723; --line-2:#3a342e; --surface:#221d19; --surface-2:#1b1714; --bg:#14110e; --bg-tint:#1d1813;
  --field-bg:#1b1714; --field-line:#3a342e; --ring:color-mix(in srgb,var(--brand-500) 30%,transparent);
  --brand-50:color-mix(in srgb,var(--brand-500) 18%,#14110e); --brand-100:color-mix(in srgb,var(--brand-500) 30%,#14110e);
  --head:#e9f5f1; --ok-bg:#06372a; --err-bg:#3d1420;
  --sh-sm:0 1px 2px rgba(0,0,0,.4); --sh-md:0 6px 18px -8px rgba(0,0,0,.6); --sh-lg:0 28px 64px -24px rgba(0,0,0,.7);
  --sh-brand:0 12px 34px -12px color-mix(in srgb,var(--brand-500) 55%,transparent);
}
/* dark hero gradient on the <html> canvas (one continuous surface) */
:root[data-theme="dark"]{ background:
    radial-gradient(150% 120% at 50% -30%,#d85e22 0%,transparent 55%),
    linear-gradient(160deg,#c4561a 0%,#b14c16 60%,#9e4212 100%); background-color:#b14c16; }
:root[data-theme="dark"] body{ background:transparent; }
@media (prefers-reduced-motion:reduce){ :root{ --fast:1ms; --base:1ms; --slow:1ms; } }

*{ box-sizing:border-box; }
/* The hero gradient lives on the root <html> canvas, so it is ONE continuous surface across the
   whole viewport — top/bottom safe areas, content, and iOS rubber-band overscroll all share it
   (no seams, no separate orange bars). body + .web-root stay transparent and sit on top of it. */
html{ min-height:100dvh; background:
    radial-gradient(150% 120% at 50% -30%,#fb8a45 0%,transparent 55%),
    radial-gradient(130% 120% at 100% 120%,#d8521b 0%,transparent 60%),
    linear-gradient(160deg,#f37322 0%,#ec6420 58%,#e15a18 100%); background-color:#ec6420; }
body{ margin:0; font-family:var(--ui); background:transparent; color:var(--ink-soft); -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; overflow-x:hidden; }
.tnum{ font-variant-numeric:tabular-nums; }
h1,h2,h3,h4{ font-family:var(--display); color:var(--ink); margin:0; line-height:1.1; }
a{ color:var(--brand-600); text-decoration:none; }
::selection{ background:var(--brand-100); color:var(--ink); }
[x-cloak]{ display:none !important; }

/* ===================== Web shell ===================== */
.web-root{ --terra:#ef6c2a; min-height:100vh; min-height:100dvh; display:flex; flex-direction:column; position:relative;
  padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  background:transparent; }   /* gradient lives on <html> as one continuous canvas (no safe-area seams) */

/* decorative constellation network + doodles (ported from MCP WebDecor) */
.web-decor{ position:fixed; inset:0; z-index:0; pointer-events:none; overflow:hidden; }
.web-net{ position:absolute; inset:0; width:100%; height:100%; }
.web-doodle{ position:absolute; color:#fff; opacity:.6; filter:drop-shadow(0 2px 7px rgba(120,40,18,.22)); }
.web-tag{ font-family:var(--display); font-weight:700; color:#fff; letter-spacing:.03em; text-shadow:0 2px 8px rgba(120,40,18,.25); opacity:1; }

/* floating mascot beside the hero */
.web-mascot-bg{ position:relative; z-index:1; pointer-events:none; }  /* in-flow flex item; size/visibility set in RESPONSIVE section */
.web-mascot-bg img{ display:block; width:100%; height:auto; aspect-ratio:946/1357; object-fit:contain; filter:drop-shadow(0 12px 16px rgba(90,28,10,.18)); animation:mascotFloat 5.5s var(--ease) infinite; }
@keyframes mascotFloat{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-10px);} }
@media (prefers-reduced-motion:reduce){ .web-mascot-bg img{ animation:none; } }
/* mascot visibility handled in the RESPONSIVE section (shown only >=1360px) */

/* ============================================================
   Floating educational / coding cards framing the mascot.
   Visual language ported 1:1 from the Admin Login hero
   (.mm-chip / .mm-win in resources/css/filament/theme.css):
   identical glass fill, white border, backdrop blur, soft shadow
   and gentle vertical float. Namespaced .web-fcard* because
   portal.css already uses .mm-chip for the hero pills. Scoped to
   the mascot box so they inherit its responsive show/hide.
   ============================================================ */
.web-fcards{ display:contents; }                                  /* group only; children stack inside .web-mascot-bg */
.web-mascot-bg > img{ position:relative; z-index:2; }             /* mascot sits ABOVE the behind-cards, below the front chips */

/* shared glass treatment — identical values to admin .mm-chip / .mm-win */
.web-fcard{ position:absolute; z-index:3; display:grid; place-items:center;
  color:oklch(1 0 0 / .92);
  background:oklch(1 0 0 / .12); border:1px solid oklch(1 0 0 / .26);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  box-shadow:0 10px 24px -12px oklch(.3 .1 40 / .5); }

/* code chips: square, monospace glyph */
.web-fcard--chip{ width:46px; height:46px; border-radius:14px;
  font-family:ui-monospace,"SF Mono",Menlo,Consolas,monospace; font-weight:700; font-size:1.02rem; letter-spacing:.02em; }

/* icon cards: square with an SVG (color via currentColor) */
.web-fcard--icon{ width:44px; height:44px; border-radius:14px; }
.web-fcard--icon svg{ width:22px; height:22px; }

/* window card: a little browser/code panel that peeks from behind the mascot */
.web-fcard--win{ display:flex; flex-direction:column; gap:6px; width:clamp(92px,8vw,108px); padding:11px;
  border-radius:13px; border-color:oklch(1 0 0 / .24);
  -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px);
  box-shadow:0 14px 30px -16px oklch(.3 .1 40 / .55); }
.web-fwin-bar{ display:flex; gap:5px; margin-bottom:1px; }
.web-fwin-bar i{ width:7px; height:7px; border-radius:50%; background:oklch(1 0 0 / .45); }
.web-fwin-row{ height:6px; width:var(--w,60%); border-radius:4px; background:oklch(1 0 0 / .38); }

/* positions — logical insets so the framing mirrors correctly in RTL.
   Small outward offsets stay within the .web-main side padding so they
   never trigger horizontal scroll. The window + robot cards use z-index:1
   so the mascot occludes their inner half (clean "peek from behind"). */
.web-fc-tag  { inset-block-start:1%;   inset-inline-end:-4%;   animation:webFloat 5.5s ease-in-out infinite; }
.web-fc-brace{ inset-block-end:11%;    inset-inline-end:-2%;   width:40px; height:40px; font-size:.9rem;  animation:webFloat 7s   ease-in-out infinite .4s; }
.web-fc-win  { inset-block-start:9%;   inset-inline-start:-8%; z-index:1;  animation:webFloat 6.5s ease-in-out infinite .2s; }
.web-fc-robot{ inset-block-end:8%;     inset-inline-start:-6%; z-index:1;  animation:webFloat 6s   ease-in-out infinite .8s; }
.web-fc-learn{ inset-block-start:-8%;  inset-inline-start:28%;             animation:webFloat 6.2s ease-in-out infinite .15s; }
.web-fc-ai   { inset-block-start:31%;  inset-inline-end:-7%;   width:40px; height:40px; animation:webFloat 6.8s ease-in-out infinite .6s; }

@keyframes webFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-12px); } }

/* AI spark: only on wide desktops, so the set never feels crowded */
.web-fc-ai{ display:none; }
@media (min-width:1500px){ .web-fc-ai{ display:grid; } }

/* Dark mode (portal uses [data-theme="dark"]): warm amber-tinted glass,
   mirroring admin's .dark .mm-chip / .dark .mm-win treatment. */
:root[data-theme="dark"] .web-fcard{
  color:oklch(.86 .13 60);
  background:oklch(.70 .19 42 / .12); border-color:oklch(.70 .19 42 / .30);
  box-shadow:0 0 0 1px oklch(.70 .19 42 / .10), 0 14px 30px -16px oklch(0 0 0 / .6); }
:root[data-theme="dark"] .web-fwin-row,
:root[data-theme="dark"] .web-fwin-bar i{ background:oklch(.80 .12 55 / .5); }

@media (prefers-reduced-motion:reduce){ .web-fcard{ animation:none !important; } }

/* in-page top bar: lang + theme */
.web-top{ position:relative; z-index:5; display:flex; align-items:center; justify-content:flex-end; gap:10px; padding:14px clamp(16px,5vw,48px) 0; }
.web-brandrow{ display:inline-flex; align-items:center; gap:10px; }
.web-brandrow img{ height:38px; width:auto; border-radius:9px; box-shadow:var(--sh-sm); }
.web-pillbtn{ display:inline-flex; align-items:center; gap:8px; font-family:var(--ui); font-weight:700; font-size:13.5px; color:#fff;
  background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.32); border-radius:var(--r-pill); padding:9px 15px; min-width:120px; justify-content:center; white-space:nowrap; cursor:pointer; transition:all var(--fast); }
.web-pillbtn:hover{ background:rgba(255,255,255,.26); }
.web-toolbar{ display:inline-flex; gap:8px; }

/* main split */
.web-main{ flex:1; position:relative; z-index:1; display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:clamp(24px,4vw,64px); align-items:center;
  max-width:1780px; width:100%; margin:0 auto; padding:clamp(14px,3vw,40px) clamp(16px,4.5vw,48px) clamp(20px,4vw,48px); }

.web-aside{ position:relative; min-width:0; }
.web-asidetop{ display:flex; align-items:center; gap:10px; margin-bottom:22px; }
.web-h1{ font-family:var(--display); font-weight:600; font-size:clamp(40px,4vw,70px); letter-spacing:-.025em; margin:0; line-height:1.0; color:#fff; }
.web-h1 .h1a{ display:block; color:var(--head); }
.web-h1 .h1b{ display:block; color:#fff; }
.web-lead{ font-family:var(--ui); font-size:19px; line-height:1.5; color:rgba(255,255,255,.94); margin:18px 0 0; max-width:42ch; }
.web-points{ list-style:none; margin:24px 0 0; padding:0; display:grid; gap:12px; }
.web-points li{ font-family:var(--ui); font-size:17px; font-weight:600; color:#fff; display:flex; align-items:center; gap:12px; }
.web-points svg{ color:#fff; flex-shrink:0; }
/* wrapper for chips + STEM badge; transparent by default (desktop + mobile keep
   the chips row and the STEM badge on its own row exactly as designed). Tablet
   overrides this to flow all four into one row. */
.web-featurewrap{ display:contents; }
.web-chips{ display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.web-chip{ display:inline-flex; align-items:center; gap:8px; font-family:var(--ui); font-weight:700; font-size:14.5px; color:#fff;
  background:rgba(255,255,255,.15); border:1px solid rgba(255,255,255,.30); padding:8px 15px; border-radius:var(--r-pill); -webkit-backdrop-filter:blur(4px); backdrop-filter:blur(4px); }
.web-chip svg{ color:#fff; }
/* STEM trust badge on its own centered row */
.web-trust-row{ display:flex; justify-content:flex-start; margin-top:18px; }
.web-trustbadge{ background:rgba(255,255,255,.22); border-color:rgba(255,255,255,.48); padding:10px 18px; font-size:15px; gap:9px; box-shadow:0 6px 18px -8px rgba(120,40,18,.35); }
.web-trustbadge svg{ color:#fff; }
/* Responsive overrides consolidated in the RESPONSIVE section at end of file. */

/* flow toggle (segmented) */
.web-flowseg{ margin-top:30px; }
.seg{ display:inline-flex; background:var(--surface); border-radius:var(--r-pill); padding:4px; border:1px solid var(--line); gap:2px; box-shadow:var(--sh-sm); }
.seg button{ border:none; cursor:pointer; font-family:var(--ui); font-weight:700; font-size:14.5px; padding:10px 18px; border-radius:var(--r-pill); background:transparent; color:var(--muted); transition:all var(--fast); display:inline-flex; align-items:center; gap:8px; }
.seg button.on{ background:var(--brand-500); color:#fff; box-shadow:var(--sh-brand); }

/* card */
.web-cardwrap{ display:flex; justify-content:center; min-width:0; }
.web-cardshell{ position:relative; width:clamp(360px,33vw,500px); max-width:100%; }
/* progress-bar "finish line" mascot — small, stands on the last segment */
.mm-seg-wrap{ position:relative; }
.mm-mascot-finish{ position:absolute; inset-inline-end:-9px; bottom:0; width:clamp(30px,3.6vw,38px); height:auto; z-index:5; pointer-events:none;
  filter:drop-shadow(0 5px 7px rgba(120,40,18,.30)); transform-origin:bottom center; animation:mascotFinish 2.6s var(--ease) infinite; }
@keyframes mascotFinish{ 0%,100%{ transform:translateY(0);} 50%{ transform:translateY(-4px);} }
@media (prefers-reduced-motion:reduce){ .mm-mascot-finish{ animation:none; } }
@media (max-width:520px){ .mm-mascot-finish{ width:26px; inset-inline-end:-5px; } }
.web-card{ width:100%; overflow:hidden; position:relative; z-index:1; background:var(--surface); border-radius:30px; display:flex; flex-direction:column;
  box-shadow:0 26px 64px -22px rgba(124,45,18,.45),0 0 44px rgba(70,25,10,.20),0 4px 16px rgba(0,0,0,.10); border:1px solid var(--line); }

/* Column order + stacking handled in the RESPONSIVE section at end of file. */

/* step animation */
.mm-step{ animation:mmIn var(--base) var(--ease) backwards; }
@keyframes mmIn{ from{ transform:translateY(10px); opacity:.6; } to{ transform:none; opacity:1; } }
.mm-pop{ animation:mmPop 460ms var(--ease) backwards; }
@keyframes mmPop{ 0%{ transform:scale(.4);} 60%{ transform:scale(1.08);} 100%{ transform:scale(1);} }
.mm-spin{ animation:mmSpin .7s linear infinite; } @keyframes mmSpin{ to{ transform:rotate(360deg);} }

/* ===================== Fields / inputs ===================== */
.mm-field{ margin-bottom:12px; }
.mm-field > label{ display:block; font-family:var(--ui); font-size:18px; font-weight:700; color:var(--ink); margin-bottom:7px; letter-spacing:-.01em; }
.mm-hint{ font-family:var(--ui); font-size:12.5px; color:var(--muted); margin-top:6px; }
.mm-err{ font-family:var(--ui); font-size:12.5px; color:var(--err); margin-top:6px; display:flex; align-items:center; gap:6px; }
.mm-err::before{ content:""; width:5px; height:5px; border-radius:9px; background:var(--err); flex-shrink:0; }
.mm-input,.mm-select,.mm-textarea{ width:100%; height:52px; padding:0 16px; border-radius:var(--r-md); background:var(--field-bg); color:var(--ink);
  font-family:var(--ui); font-size:16px; font-weight:500; border:1.5px solid var(--field-line); outline:none; transition:border-color var(--fast),box-shadow var(--fast); }
.mm-textarea{ height:auto; padding:13px 16px; resize:vertical; line-height:1.5; min-height:92px; }
.mm-input:focus,.mm-select:focus,.mm-textarea:focus{ border-color:var(--brand-500); box-shadow:0 0 0 4px var(--ring); }
.mm-input.is-bad,.mm-select.is-bad{ border-color:var(--err); }
.mm-select{ appearance:none; -webkit-appearance:none; padding-inline-end:34px; cursor:pointer; }
.mm-selectwrap{ position:relative; }
.mm-selectwrap::after{ content:"▾"; position:absolute; inset-inline-end:13px; top:50%; transform:translateY(-50%); pointer-events:none; color:var(--muted); font-size:11px; }
.mm-dob{ display:grid; grid-template-columns:.85fr 1.3fr 1fr; gap:10px; }

/* buttons */
.mm-btn{ font-family:var(--ui); font-weight:700; font-size:16px; cursor:pointer; height:52px; padding:0 22px; border-radius:var(--r-pill); border:none;
  display:inline-flex; align-items:center; justify-content:center; gap:9px; transition:transform var(--fast) var(--ease),background var(--fast),box-shadow var(--fast); }
.mm-btn.full{ width:100%; } .mm-btn:active{ transform:scale(.97); } .mm-btn:disabled{ opacity:.5; cursor:not-allowed; }
.mm-btn.primary{ background:var(--brand-500); color:#fff; box-shadow:var(--sh-brand); }
.mm-btn.primary:hover{ background:var(--brand-600); }
.mm-btn.wa{ background:var(--wa-500); color:#fff; box-shadow:0 10px 26px -10px rgba(37,211,102,.6); }
.mm-btn.wa:hover{ background:var(--wa-600); }
.mm-btn.ghost{ background:transparent; color:var(--ink); box-shadow:inset 0 0 0 1.5px var(--field-line); }
.mm-btn.ghost:hover{ background:var(--surface-2); }

/* phone input (dial + number) */
.mm-phone{ position:relative; direction:ltr; }  /* country code selector stays on the LEFT in LTR + RTL */
.mm-phone-row{ display:flex; gap:8px; }
.mm-dial{ display:inline-flex; align-items:center; gap:7px; height:52px; padding:0 13px; border-radius:var(--r-md); border:1.5px solid var(--field-line);
  background:var(--field-bg); color:var(--ink); font-family:var(--ui); font-weight:700; font-size:15px; cursor:pointer; flex-shrink:0; }
.mm-dial .caret{ font-size:10px; color:var(--muted); }
.mm-phone-num{ flex:1; }
/* fixed -> floats above the card (never clipped); top/left/width/max-height set in JS */
.mm-dialmenu{ position:fixed; z-index:50; background:var(--surface); border-radius:var(--r-md); box-shadow:var(--sh-lg); border:1px solid var(--line); padding:5px; max-height:60vh; display:flex; flex-direction:column; }
.mm-dialsearch{ display:flex; align-items:center; gap:7px; height:27px; padding:0 10px; margin-bottom:5px; border:1.5px solid var(--field-line); border-radius:9px; background:var(--field-bg); }  /* compact search (~60% height) */
.mm-dialsearch svg{ color:var(--muted); flex-shrink:0; width:14px; height:14px; }
.mm-dialsearch input{ flex:1; min-width:0; border:none; outline:none; background:transparent; color:var(--ink); font-family:var(--ui); font-size:13.5px; font-weight:600; }
.mm-dialsearch input::placeholder{ color:var(--faint); }
.mm-diallist{ overflow:auto; display:flex; flex-direction:column; gap:1px; }
.mm-dialmenu button{ width:100%; display:flex; align-items:center; gap:9px; padding:7px 10px; border-radius:9px; line-height:21px; border:none; background:transparent; color:var(--ink); font-family:var(--ui); font-size:14px; font-weight:600; cursor:pointer; text-align:start; }  /* tighter, touch-friendly rows (~35px) */
.mm-dialmenu button > span:first-child{ font-size:17px; }  /* flag size, keeps the row compact */
.mm-dialmenu button.on,.mm-dialmenu button:hover{ background:var(--brand-50); }
.mm-dialmenu .nm{ flex:0 1 auto; min-width:0; white-space:normal; overflow-wrap:anywhere; }  /* name keeps the code right beside it */
.mm-dialmenu .code{ color:var(--muted); flex-shrink:0; }            /* code sits right beside the name (row gap only), not pushed to the far edge */
.mm-dialempty{ padding:14px 12px; text-align:center; color:var(--muted); font-family:var(--ui); font-size:13px; }

/* whatsapp note + trust row */
.mm-wanote{ display:flex; align-items:center; gap:11px; background:color-mix(in srgb,var(--wa-500) 12%,var(--surface)); border:1px solid color-mix(in srgb,var(--wa-500) 30%,transparent); border-radius:var(--r-md); padding:12px 14px; margin-top:4px; }
.mm-wanote .ic{ width:34px; height:34px; border-radius:10px; background:var(--wa-500); color:#fff; display:grid; place-items:center; flex-shrink:0; }
.mm-wanote span{ font-family:var(--ui); font-size:13px; color:var(--ink-soft); line-height:1.5; }
.mm-trust{ display:grid; grid-template-columns:repeat(3,1fr); gap:14px; padding:4px 0; }
.mm-trust-i{ display:flex; align-items:flex-start; gap:8px; }
.mm-trust-i svg{ color:var(--teal-600); flex-shrink:0; margin-top:1px; }
.mm-trust-t{ font-family:var(--ui); font-size:12.5px; font-weight:700; color:var(--ink); line-height:1.2; }
.mm-trust-s{ font-family:var(--ui); font-size:11px; color:var(--muted); line-height:1.25; margin-top:1px; }

/* ===================== Progress header ===================== */
.mm-phead{ padding:22px 26px 0; }
.mm-phead-top{ display:flex; align-items:center; gap:16px; margin-bottom:14px; }
.mm-phead-top img{ width:56px; height:56px; border-radius:16px; object-fit:cover; box-shadow:var(--sh-sm); flex-shrink:0; }
/* The logo is the way back out of the booking flow. It stays visually identical —
   the anchor only has to stop being a text box and keep the flex sizing the <img>
   used to own, since it is now the flex child in both headers. */
.mm-homelink{ display:block; line-height:0; flex-shrink:0; border-radius:16px;
  transition:transform var(--fast) var(--ease); }
.mm-homelink:hover{ transform:translateY(-2px); }
.mm-homelink:focus-visible{ outline:2px solid var(--brand-500); outline-offset:3px; }
.mm-phead-div{ width:1px; align-self:stretch; min-height:44px; background:var(--line); flex-shrink:0; }
.mm-phead-title{ font-family:var(--display); font-size:25px; font-weight:700; color:var(--head); letter-spacing:-.01em; line-height:1.08; }
.mm-phead-sub{ font-family:var(--ui); font-size:13.5px; color:var(--muted); margin-top:3px; }
.mm-seg{ display:flex; gap:6px; }
.mm-seg-i{ flex:1; height:6px; border-radius:4px; overflow:hidden; background:var(--surface-2); box-shadow:inset 0 0 0 1px var(--line); }
.mm-seg-i > span{ display:block; height:100%; width:0; border-radius:4px; background:linear-gradient(90deg,var(--brand-500),var(--brand-400)); transition:width var(--slow) var(--ease); }
.mm-seg-i.fill > span{ width:100%; }
.mm-phead-row{ display:flex; align-items:center; gap:12px; margin-top:9px; min-height:18px; }
.mm-back{ display:inline-flex; align-items:center; gap:5px; background:none; border:none; cursor:pointer; color:var(--muted); font-family:var(--ui); font-weight:700; font-size:13.5px; padding:0; }
.mm-stepcount{ margin-inline-start:auto; font-family:var(--ui); font-size:13px; font-weight:700; color:var(--muted); white-space:nowrap; }
.mm-stepcount b{ color:var(--brand-600); }

.mm-body{ padding:6px 26px 8px; }
.mm-foot{ padding:14px 22px 20px; border-top:1px solid var(--line); background:var(--surface); }
.mm-foot-left{ text-align:center; margin-top:12px; font-family:var(--ui); font-size:12.5px; font-weight:600; color:var(--faint); }

/* ===================== Wizard pickers ===================== */
/* program (division) picker: stable single-column, full-width rows (no reflow) */
.mm-tiles{ display:flex; flex-direction:column; gap:12px; }
.mm-tile{ display:flex; flex-direction:row; align-items:center; gap:14px; width:100%; min-height:74px; padding:14px 16px; border:2px solid var(--field-line); background:var(--surface); border-radius:var(--r-md); text-align:start; cursor:pointer; transition:border-color var(--fast),background var(--fast),box-shadow var(--fast),transform var(--fast) var(--ease); box-shadow:var(--sh-sm); }
.mm-tile:hover{ border-color:color-mix(in srgb,var(--brand-500) 45%,var(--field-line)); }
.mm-tile.on{ border-color:var(--brand-500); background:var(--brand-50); box-shadow:0 0 0 4px var(--ring); }
.mm-tile .ic{ width:46px; height:46px; flex-shrink:0; border-radius:13px; display:grid; place-items:center; background:var(--bg-tint); color:var(--brand-600); transition:all var(--fast); }
.mm-tile.on .ic{ background:var(--brand-500); color:#fff; }
.mm-tile .ic svg{ width:24px; height:24px; }                 /* consistent icon size/weight */
.mm-tile .nm{ flex:1; min-width:0; font-family:var(--ui); font-weight:700; font-size:16px; color:var(--ink); line-height:1.25; }
.mm-tile-check{ flex-shrink:0; color:var(--brand-500); }
.mm-tile .ds{ font-family:var(--ui); font-size:12px; color:var(--muted); margin-top:-4px; }

.mm-chips{ display:flex; flex-wrap:wrap; gap:9px; }
.mm-chip{ border-radius:var(--r-pill); padding:11px 18px; font-family:var(--ui); font-weight:700; font-size:14px; cursor:pointer;
  border:1.5px solid var(--field-line); background:var(--surface); color:var(--ink-soft); box-shadow:var(--sh-sm); transition:all var(--fast) var(--ease); }
.mm-chip.on{ border-color:var(--brand-500); background:var(--brand-500); color:#fff; box-shadow:var(--sh-brand); }

.mm-timing{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.mm-timeopt{ border:2px solid var(--field-line); background:var(--surface); border-radius:var(--r-md); padding:20px 14px; display:flex; flex-direction:column; align-items:center; gap:8px; text-align:center; cursor:pointer; transition:all var(--fast) var(--ease); box-shadow:var(--sh-sm); }
.mm-timeopt.on{ border-color:var(--brand-500); background:var(--brand-50); box-shadow:0 0 0 4px var(--ring); }
.mm-timeopt .ic{ width:46px; height:46px; border-radius:13px; display:grid; place-items:center; background:var(--bg-tint); color:var(--brand-600); }
.mm-timeopt.on .ic{ background:var(--brand-500); color:#fff; }
.mm-timeopt .nm{ font-family:var(--ui); font-weight:700; font-size:15px; color:var(--ink); }
.mm-timeopt .ds{ font-family:var(--ui); font-size:12px; color:var(--muted); margin-top:-4px; }

/* This step shows at most a handful of cards and is the one place in the wizard
   where the parent compares rather than fills in — so the cards get room to sit
   apart and breathe inside, instead of the tight rhythm the input steps use. */
.mm-plans{ display:flex; flex-direction:column; gap:14px; }
.mm-plan{ border:2px solid var(--field-line); background:var(--surface); border-radius:var(--r-md); padding:20px 22px; text-align:start; position:relative; overflow:hidden; cursor:pointer; transition:all var(--fast) var(--ease); box-shadow:var(--sh-sm); }
.mm-plan.on{ border-color:var(--brand-500); background:var(--brand-50); box-shadow:0 0 0 4px var(--ring); }
/* Best-offer plan: the same featured treatment the homepage pricing grid uses
   (.mm-price-feat) — brand gradient, white type, white badge carrying the same
   gold star — so a parent arriving from the homepage meets the same card. */
.mm-plan.pop{ padding-top:36px; border-color:transparent; color:#fff; box-shadow:var(--sh-brand);
  background:linear-gradient(168deg,#FF7A45 0%,var(--brand-600) 100%); }
/* The badge is welded to the card's top and start edges and curves in on its one
   free corner, so it reads as part of the card. Centred and tucked inside, it sat
   alone in a 38px band of empty gradient and read as a sticker on a blank wall.
   `overflow:hidden` above clips the badge's outer corner to the card's own radius,
   which is what makes the two shapes look cut from one piece. Its size is the
   middle of two rejections: at 11.5px in a 6/14px box it was a white slab covering
   the corner, at 10px in a 3/9px box it stopped registering as a badge at all. */
.mm-plan-pop{ position:absolute; top:0; inset-inline-start:0;
  display:inline-flex; align-items:center; gap:5px;
  background:#fff; color:var(--brand-600); font-family:var(--ui); font-weight:800; font-size:11px;
  padding:5px 12px 6px; border-end-end-radius:13px; white-space:nowrap;
  box-shadow:0 3px 10px -6px rgba(90,35,10,.5); }
.mm-plan-pop svg{ flex-shrink:0; width:11px; height:11px; }
/* Selection needs a different signal here: the brand-50 fill vanishes into the
   gradient, and a white halo vanishes into the white wizard card behind it. A
   white inner border sits directly on the orange, so it reads in both themes;
   the outer ring stays the same brand halo every other plan card uses. */
.mm-plan.pop.on{ background:linear-gradient(168deg,#FF7A45 0%,var(--brand-600) 100%);
  border-color:#fff; box-shadow:0 0 0 4px var(--ring), var(--sh-brand); }
.mm-plan.pop .mm-plan-name, .mm-plan.pop .mm-plan-price{ color:#fff; }
.mm-plan.pop .mm-plan-price{ text-shadow:0 1px 0 rgba(120,40,10,.18); }
.mm-plan.pop .mm-plan-cur{ color:#fff; opacity:.82; }
.mm-plan.pop .mm-plan-was{ color:rgba(255,255,255,.78); }
.mm-plan.pop .mm-plan-was s{ color:#fff; text-decoration-color:rgba(255,255,255,.6); }
.mm-plan.pop .mm-plan-feats li{ color:rgba(255,255,255,.94); }
.mm-plan.pop .mm-plan-feats svg{ color:#fff; }
.mm-plan.pop .mm-plan-rad{ border-color:rgba(255,255,255,.6); }
.mm-plan.pop.on .mm-plan-rad{ background:#fff; border-color:#fff; color:var(--brand-600); }
.mm-plan-head{ display:flex; align-items:flex-start; gap:14px; }
.mm-plan-rad{ margin-top:5px; width:22px; height:22px; border-radius:8px; flex-shrink:0; display:grid; place-items:center; border:2px solid var(--field-line); background:transparent; }
.mm-plan.on .mm-plan-rad{ border-color:var(--brand-500); background:var(--brand-500); color:#fff; }
/* name and price share a baseline row; the wrap is the safety net on narrow phones */
.mm-plan-topline{ display:flex; align-items:flex-end; justify-content:space-between; gap:12px 16px; flex-wrap:wrap; }
.mm-plan-name{ font-family:var(--ui); font-weight:700; font-size:16.5px; color:var(--teal-600); }
/* The price answers the question this step asks, so it leads the card: Fredoka at
   32px with the currency in the same face beside it, not a 12px grey afterthought.
   .mm-plan-money carries dir="ltr" in the markup so "EGP 11,900" holds that order
   in both locales — the same pairing the homepage pricing grid uses. */
.mm-plan-money{ display:inline-flex; align-items:baseline; gap:7px; white-space:nowrap; }
.mm-plan-price{ font-family:var(--display); font-weight:700; font-size:32px; line-height:1;
  letter-spacing:-.5px; color:var(--head); }
.mm-plan-cur{ font-family:var(--display); font-weight:600; font-size:14px; color:var(--ink-soft); opacity:.72; }
/* Mirrors .mm-plan-topline's space-between so the saving lines up under the plan
   name and the struck-through figure under the price. */
.mm-plan-offrow{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-top:8px; }
/* "instead of" stays a label, but the old figure itself is information the parent
   is meant to read — at 12.5px and 78% opacity it was the faintest thing here. */
.mm-plan-was{ font-family:var(--ui); font-size:15px; font-weight:600; color:var(--muted); }
.mm-plan-was s{ font-weight:700; color:var(--ink-soft); text-decoration-thickness:1.5px;
  text-decoration-color:color-mix(in srgb,var(--muted) 70%,transparent); }
/* The saving is the strongest reason to choose a plan and used to be the smallest
   mark on the card. Gold rather than brand orange: orange sinks into the featured
   card's gradient, and on a white card it reads as a warning rather than a reward.
   The featured card gets a lighter, creamier gold for the same reason. */
.mm-plan-off{ display:inline-flex; align-items:center; gap:6px; font-family:var(--ui);
  font-weight:800; font-size:13.5px; line-height:1; padding:7px 13px; border-radius:10px;
  white-space:nowrap; background:linear-gradient(180deg,#FFE08F 0%,#F2B01F 100%); color:#5A3703;
  box-shadow:0 4px 10px -4px rgba(190,140,20,.75), inset 0 1px 0 rgba(255,255,255,.65); }
.mm-plan-off svg{ flex-shrink:0; opacity:.85; }
.mm-plan.pop .mm-plan-off{ background:linear-gradient(180deg,#FFF0C4 0%,#FFD469 100%); color:#6B4104;
  box-shadow:0 5px 12px -4px rgba(90,40,5,.45), inset 0 0 0 1px rgba(255,255,255,.55); }
/* the benefits only unfold on the selected card, and that is the state where the
   Continue button is closest to the fold — so this list keeps its original rhythm
   rather than spending the same vertical budget the cards above just took.
   Every benefit stays on one line. The list uses the card's full width, starting
   under the checkbox (its 22px plus the 14px head gap), one benefit per line;
   pairFeats() in portal/shell.blade.php adds .is-paired (two columns, filled row
   by row so the reading order and RTL hold) only when every benefit still fits on
   one line that way. Text longer than the whole card still wraps rather than spills. */
.mm-plan-feats{ margin:13px 0 2px; margin-inline-start:calc(-22px - 14px); padding:0; list-style:none; display:grid; gap:7px 12px; }
.mm-plan-feats.is-paired{ grid-template-columns:repeat(2, minmax(max-content, 1fr)); }
.mm-plan-feats li{ font-family:var(--ui); font-size:13px; line-height:1.45; color:var(--ink-soft); display:flex; align-items:flex-start; gap:8px; }
.mm-plan-feats.is-paired li{ white-space:nowrap; }
.mm-plan-feats li span{ min-width:0; overflow-wrap:break-word; }
.mm-plan-feats svg{ color:var(--ok); flex-shrink:0; margin-top:1.5px; }

/* review summary */
.mm-sum{ background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-md); padding:6px 16px; margin-bottom:18px; }
.mm-sumrow{ display:flex; justify-content:space-between; gap:14px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.mm-sumrow:last-child{ border-bottom:none; }
.mm-sumrow .k{ font-family:var(--ui); font-size:13px; color:var(--muted); font-weight:600; flex-shrink:0; }
.mm-sumrow .v{ font-family:var(--ui); font-size:13.5px; color:var(--ink); font-weight:700; text-align:end; }
.mm-nopay{ display:flex; align-items:center; gap:9px; justify-content:center; color:var(--muted); font-family:var(--ui); font-size:12.5px; }
.mm-nopay svg{ color:var(--teal-600); }

/* ===================== Post-booking payment =====================
   The confirmation screen is also where the family pays: the plan's amount,
   the admin's Payment Methods for their region as expand-on-tap cards, then
   one WhatsApp step to send the proof. From the approved "Post-booking Payment
   Flow" design; the shared atoms (.mm-btn, .mm-wanote, .mm-nopay) are reused. */
.mm-pay{ flex:1; display:flex; flex-direction:column; padding:30px 28px 26px; }
.mm-pay-head{ display:flex; align-items:flex-start; gap:14px; margin-bottom:20px; }
.mm-pay-head .badge{ width:46px; height:46px; border-radius:14px; background:var(--ok); color:#fff; display:grid; place-items:center; flex-shrink:0; box-shadow:0 12px 28px -12px rgba(5,150,105,.6); }
.mm-pay-head .tx{ min-width:0; padding-top:1px; }
.mm-pay-head h2{ font-size:23px; font-weight:600; color:var(--head); }
.mm-pay-head p{ font-family:var(--ui); font-size:13.5px; line-height:1.55; color:var(--muted); margin:4px 0 0; }
.mm-pay-head .ref{ font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:13px; font-weight:600; color:var(--ink); unicode-bidi:isolate; }

.mm-pay-amount{ display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 18px; margin-bottom:22px;
  background:var(--surface-2); border:1px dashed var(--line-2); border-radius:var(--r-md); }
.mm-pay-amount .k{ display:flex; flex-direction:column; gap:3px; min-width:0; }
.mm-pay-amount .lb{ font-family:var(--ui); font-size:13px; font-weight:600; color:var(--ink-soft); }
.mm-pay-amount .pl{ font-family:var(--ui); font-size:12.5px; color:var(--muted); }
/* Inline spans on purpose: under dir="ltr" the bidi algorithm puts "$" before
   the figure and "ج.م" after it, as the design shows. Flex items would not. */
.mm-pay-amount .v{ flex-shrink:0; white-space:nowrap; line-height:1; }
.mm-pay-amount .num{ font-family:var(--display); font-weight:700; font-size:34px; letter-spacing:-.01em; color:var(--ink); }
.mm-pay-amount .cur{ font-family:var(--display); font-weight:600; font-size:15px; color:var(--muted); }

.mm-pay-label{ font-family:var(--ui); font-size:14px; font-weight:700; color:var(--ink); margin-bottom:12px; }
.mm-pay-methods{ display:flex; flex-direction:column; gap:12px; }
.mm-paym{ background:var(--surface); border:1.5px solid var(--line); border-radius:var(--r-md); overflow:hidden; transition:border-color var(--fast),box-shadow var(--fast); }
.mm-paym.on{ border-color:var(--brand-500); box-shadow:0 14px 32px -20px color-mix(in srgb,var(--brand-500) 70%,transparent); }
.mm-paym-head{ width:100%; display:flex; align-items:center; gap:13px; padding:13px 16px; border:none; background:transparent; color:inherit; font:inherit; text-align:start; cursor:pointer; transition:background var(--fast); }
.mm-paym.on .mm-paym-head{ background:var(--brand-50); }
.mm-paym-head:focus-visible{ outline:none; box-shadow:inset 0 0 0 3px var(--ring); }
.mm-paym-head .ic{ width:44px; height:44px; border-radius:12px; background:var(--brand-50); color:var(--brand-600); display:grid; place-items:center; flex-shrink:0; overflow:hidden; }
.mm-paym.on .mm-paym-head .ic{ background:var(--brand-100); }
.mm-paym-head .ic img{ width:100%; height:100%; object-fit:cover; }
.mm-paym-head .tx{ flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.mm-paym-head .nm{ font-family:var(--ui); font-size:15.5px; font-weight:700; line-height:1.3; color:var(--ink); }
.mm-paym-head .ds{ font-family:var(--ui); font-size:12.5px; line-height:1.45; color:var(--muted); }
.mm-paym-head .chev{ flex-shrink:0; color:var(--muted); transition:transform var(--base) var(--ease); }
.mm-paym.on .mm-paym-head .chev{ transform:rotate(180deg); }
.mm-paym-body{ display:flex; flex-direction:column; gap:14px; padding:14px 16px 16px; border-top:1px solid var(--line); }
.mm-paym-body .mm-btn{ text-decoration:none; }
.mm-paym-ins{ font-family:var(--ui); font-size:14.5px; line-height:1.6; color:var(--ink-soft); overflow-wrap:anywhere; }
.mm-paym-ins p{ margin:0; }
.mm-paym-ins p + p, .mm-paym-ins ul, .mm-paym-ins ol{ margin:6px 0 0; }
.mm-paym-ins ul, .mm-paym-ins ol{ padding-inline-start:20px; }
.mm-paym-ins a{ color:var(--brand-600); text-decoration:underline; }
.mm-paym-note{ margin-top:-4px; }
.mm-paym-note svg, .mm-pay-secure svg{ color:var(--muted); }

/* wallet numbers: one copyable line each, with its operator label */
.mm-wallets{ display:flex; flex-direction:column; gap:8px; }
.mm-wallet{ display:flex; align-items:center; gap:10px; padding-block:8px; padding-inline:14px 8px; background:var(--surface-2); border:1px solid var(--line); border-radius:var(--r-sm); }
.mm-wallet .tx{ flex:1; min-width:0; display:flex; align-items:baseline; flex-wrap:wrap; column-gap:9px; }
.mm-wallet .num{ font-family:var(--display); font-weight:600; font-size:17px; letter-spacing:.02em; color:var(--ink); }
.mm-wallet .lb{ font-family:var(--ui); font-size:12.5px; color:var(--muted); }
.mm-wallet-copy{ height:34px; padding:0 12px; flex-shrink:0; border:none; border-radius:var(--r-pill); cursor:pointer;
  background:var(--brand-50); color:var(--brand-600); font-family:var(--ui); font-size:12.5px; font-weight:700; transition:background var(--fast),color var(--fast); }
.mm-wallet-copy:hover{ background:var(--brand-100); }
.mm-wallet-copy.ok{ background:var(--ok-bg); color:var(--ok); }
.mm-wallet-copy > span{ display:inline-flex; align-items:center; gap:6px; }

/* after you pay */
.mm-pay-div{ display:flex; align-items:center; gap:12px; margin:22px 0 14px; font-family:var(--ui); font-size:11.5px; font-weight:700; letter-spacing:.14em; text-transform:uppercase; color:var(--faint); }
[dir="rtl"] .mm-pay-div{ letter-spacing:0; font-size:12.5px; }  /* tracking would break Arabic joining */
.mm-pay-div::before, .mm-pay-div::after{ content:""; flex:1; height:1px; background:var(--line); }
.mm-pay-after{ align-items:flex-start; margin-top:0; }
.mm-pay-after b{ font-weight:700; color:var(--ink); }
.mm-pay-send{ margin-top:12px; text-decoration:none; }
.mm-pay-secure{ margin-top:14px; }
.mm-pay-empty{ display:flex; flex-direction:column; gap:14px; }
.mm-pay-empty p{ margin:0; font-family:var(--ui); font-size:14px; line-height:1.55; color:var(--ink-soft); text-align:center; }
.mm-pay-empty .mm-btn{ text-decoration:none; }
@media (max-width:480px){
  .mm-pay{ padding:24px 18px 20px; }
  .mm-pay-head h2{ font-size:21px; }
  .mm-pay-amount{ padding:13px 15px; }
  .mm-pay-amount .num{ font-size:30px; }
}

/* ===================== Login / not-found / selection ===================== */
.mm-login{ display:flex; flex-direction:column; padding:34px 30px 26px; }
.mm-login-head{ display:flex; align-items:flex-start; gap:16px; margin-bottom:22px; }
.mm-login-head img{ width:60px; height:60px; border-radius:16px; object-fit:cover; box-shadow:var(--sh-sm); flex-shrink:0; }
.mm-login-head .div{ width:1px; align-self:stretch; min-height:52px; background:var(--line); flex-shrink:0; }
.mm-login-head h2{ font-family:var(--display); font-size:27px; font-weight:700; color:var(--head); letter-spacing:-.01em; line-height:1.06; }
.mm-login-head p{ font-family:var(--ui); font-size:15px; color:var(--muted); margin:5px 0 0; line-height:1.4; }
.mm-or{ display:flex; align-items:center; gap:14px; margin:18px 0; }
.mm-or span{ font-family:var(--ui); font-weight:700; font-size:12px; letter-spacing:.1em; color:var(--faint); }
.mm-or::before,.mm-or::after{ content:""; flex:1; height:1px; background:var(--line); }
.mm-emailbtn{ width:100%; height:54px; display:inline-flex; align-items:center; justify-content:center; gap:10px; border:1.5px solid var(--field-line); background:var(--surface); color:var(--ink); border-radius:var(--r-md); font-family:var(--ui); font-weight:700; font-size:16px; cursor:pointer; transition:all var(--fast); }
.mm-emailbtn:hover{ border-color:var(--brand-500); color:var(--brand-600); background:var(--brand-50); }
.mm-emailbtn svg{ color:var(--brand-500); }

/* not found state */
.mm-state{ display:flex; flex-direction:column; align-items:center; text-align:center; padding:44px 30px; }
.mm-state .ic{ width:74px; height:74px; border-radius:22px; display:grid; place-items:center; margin-bottom:20px; }
.mm-state.warn .ic{ background:var(--err-bg); color:var(--err); }
.mm-state h2{ font-size:24px; font-weight:600; color:var(--head); }
.mm-state p{ font-family:var(--ui); font-size:14.5px; color:var(--muted); margin:10px 0 22px; line-height:1.55; max-width:36ch; }

/* student selection */
.mm-pick{ padding:34px 30px 28px; display:flex; flex-direction:column; }
.mm-pick h2{ font-family:var(--display); font-size:26px; font-weight:700; color:var(--head); }
.mm-pick .sub{ font-family:var(--ui); font-size:14px; color:var(--muted); margin:6px 0 4px; }
.mm-pick .masked{ font-family:var(--ui); font-size:13px; font-weight:700; color:var(--ink-soft); margin-bottom:20px; }
.mm-students{ display:flex; flex-direction:column; gap:10px; }
.mm-student{ display:flex; align-items:center; gap:14px; width:100%; text-align:start; padding:14px 16px; border-radius:var(--r-md); border:1.5px solid var(--field-line); background:var(--surface); cursor:pointer; transition:all var(--fast) var(--ease); }
.mm-student:hover{ border-color:var(--brand-500); background:var(--brand-50); box-shadow:0 0 0 4px var(--ring); }
.mm-student-av{ width:50px; height:50px; border-radius:14px; object-fit:cover; flex-shrink:0; background:var(--bg-tint); display:grid; place-items:center; color:var(--brand-600); font-family:var(--display); font-weight:700; font-size:20px; overflow:hidden; }
.mm-student-av img{ width:100%; height:100%; object-fit:cover; }
.mm-student-meta{ min-width:0; flex:1; }
.mm-student-nm{ font-family:var(--ui); font-weight:700; font-size:16px; color:var(--ink); line-height:1.2; }
.mm-student-sub{ font-family:var(--ui); font-size:12.5px; color:var(--muted); margin-top:2px; }
.mm-student-go{ color:var(--faint); flex-shrink:0; }
.mm-pick-foot{ margin-top:18px; text-align:center; }
.mm-textbtn{ background:none; border:none; color:var(--muted); font-family:var(--ui); font-weight:600; font-size:14px; cursor:pointer; }
.mm-textbtn:hover{ color:var(--brand-600); }

/* standalone selection page wrapper (no card chrome variant) */
.mm-pageroot{ min-height:100vh; min-height:100dvh; display:grid; place-items:center; padding:clamp(16px,5vw,40px);
  background:radial-gradient(150% 120% at 50% -30%,#fb8a45 0%,transparent 55%),linear-gradient(160deg,#f37322 0%,#ec6420 58%,#e15a18 100%); }
:root[data-theme="dark"] .mm-pageroot{ background:linear-gradient(160deg,#c4561a 0%,#9e4212 100%); }
.mm-pageroot .web-card{ width:clamp(340px,42vw,460px); max-width:100%; }

/* RTL arrow flip */
[dir="rtl"] .flip-x{ transform:scaleX(-1); }
/* LEARN doodle arrow points INTO the page (toward content) in RTL, not off-screen */
[dir="rtl"] .web-tag svg{ transform:scaleX(-1); }

/* ============================================================
   RESPONSIVE LAYOUT SYSTEM  (authored last -> wins the cascade)

   Hero text + the mascot share one flex zone (.web-herowrap), so they
   can never overlap at any width. Collisions are solved by letting
   flex distribute the width (content adapts) -- NOT by shrinking the
   mascot. The mascot scales fluidly with clamp(240px,21vw,330px) and
   only hides on phones.

   Verified: 1920 / 1600 / 1440 / 1280 / 1200 / 1024 / 900 / 768 / 480 / 390
   Zoom 80-150% maps onto these same breakpoints.

   Bands:
     >=1200   desktop : [ card | hero-text | mascot ] one row
     768-1199 tablet  : [ hero-text | mascot ] row on top, card below
     <=767    mobile  : mascot hidden, compact hero (H1+chips+badge)+form
   ============================================================ */

/* No-overflow + graceful text reflow guards (every width) */
.web-h1{ overflow-wrap:break-word; }
.web-lead,.web-points li,.web-chip{ overflow-wrap:break-word; }

/* Trust indicators: supporting info, sits BELOW the primary CTA */
.mm-foot-trust{ margin-top:18px; padding-top:16px; border-top:1px solid var(--line); }
.mm-foot-trust .mm-trust-t{ font-weight:600; }
.mm-foot-trust .mm-trust-s{ opacity:.85; }
.mm-foot-trust .mm-trust-i svg{ width:15px; height:15px; opacity:.9; }

/* hero zone = text + mascot, always a centered flex row (no overlap, ever) */
.web-herowrap{ display:flex; align-items:center; gap:clamp(24px,2.8vw,56px); min-width:0; }
.web-aside{ flex:1 1 auto; min-width:0; }
.web-mascot-bg{ flex:0 0 clamp(240px,21vw,330px); align-self:center; }

/* ---- Desktop (>=1200): [ card | hero-text | mascot ] in one row ---- */
@media (min-width:1200px){
  .web-main{ display:flex; flex-direction:row; align-items:center; gap:clamp(60px,6.4vw,140px); }
  .web-main{ max-width:1780px; }                                /* wider hero section (~+10%) */
  .web-cardwrap{ flex:0 0 clamp(380px,37%,640px); order:-1; }   /* form = primary, largest */
  .web-herowrap{ flex:1 1 auto; justify-content:flex-start; }
  .web-aside{ max-width:620px; }                                /* content = comfortable, roomier on wide */
}

/* ---- Tablet / constrained medium (768-1199): single column, form-first ----
   The whole middle range is one clean, centered single column. The mascot is a
   desktop-only element here (hidden); the secondary paragraph and the three
   checkmark benefits are dropped so the form rises near the top; and the four
   feature/trust pills collapse into ONE row. Desktop (>=1200) keeps everything. */
@media (min-width:768px) and (max-width:1199px){
  .web-main{ display:flex; flex-direction:column; align-items:center;
    gap:clamp(20px,2.6vw,30px); align-content:start; padding-block:clamp(20px,3vw,34px); }
  .web-mascot-bg{ display:none; }
  .web-herowrap{ order:0; width:100%; max-width:720px; justify-content:center; }
  .web-aside{ width:100%; max-width:720px; text-align:center;
    display:flex; flex-direction:column; align-items:center; }
  .web-asidetop{ justify-content:center; }
  /* drop the secondary paragraph + the three checkmark benefits (form-first) */
  .web-lead{ display:none; }
  .web-points{ display:none; }
  /* the four feature/trust pills collapse into ONE centered row; flex-wrap only
     falls back to 3 + 1 by itself if they genuinely cannot fit the width. */
  .web-featurewrap{ display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:9px; margin-top:18px; }
  .web-featurewrap .web-chips,
  .web-featurewrap .web-trust-row{ display:contents; }
  .web-chip{ padding:8px 13px; font-size:14px; }         /* compact pills so four fit one row */
  .web-trustbadge{ padding:8px 14px; font-size:14px; }
  .web-cardwrap{ order:1; width:100%; display:flex; justify-content:center; }
  .web-cardshell{ width:min(540px,100%); }
}

/* ---- Mobile (<=767): mascot hidden, keep H1 + chips + STEM badge, form first ---- */
@media (max-width:767px){
  .web-main{ display:flex; flex-direction:column; align-items:center;
    gap:16px; align-content:start; padding-block:clamp(14px,5vw,24px); }
  .web-herowrap{ order:0; width:100%; justify-content:center; }
  .web-mascot-bg{ display:none; }
  .web-aside{ width:100%; max-width:540px; text-align:center;
    display:flex; flex-direction:column; align-items:center; }
  .web-lead,.web-points{ display:none !important; }   /* keep H1 + chips + STEM badge */
  .web-chip--langs{ display:none !important; }         /* mobile = 3 items: code, live, STEM */
  .web-h1{ font-size:clamp(30px,8.5vw,40px); margin-top:2px; }
  .web-asidetop{ justify-content:center; margin-bottom:12px; }
  .web-chips{ justify-content:center; }
  .web-trust-row{ justify-content:center; margin-top:14px; }
  .web-flowseg{ display:flex; justify-content:center; margin-top:20px; width:100%; max-width:360px; }
  .web-flowseg .seg{ display:flex; width:100%; }
  .web-flowseg .seg button{ flex:1; justify-content:center; }
  .web-cardwrap{ order:1; width:100%; display:flex; justify-content:center; }
}

/* ---- Decoration intensity across the breakpoints ----
   Below desktop the floating code-cards drop out entirely (a shrunk or hidden
   mascot cannot frame them, and their negative offsets must never cause
   horizontal scroll). On tablet/mobile the hand-lettered tags (LEARN / IDEA!)
   are hidden and the small doodles softened -- the brand gradient + constellation
   stay as atmosphere. */
@media (max-width:1199px){
  .web-fcard{ display:none !important; }
  .web-tag{ display:none !important; }    /* !important: LEARN/IDEA carry an inline display */
  .web-doodle{ opacity:.32 !important; }  /* !important: some doodles carry an inline opacity */
}

/* ---- Short viewport height ----
   Only desktop (>=1200) is a row layout; a short/un-maximized window there would
   vertically center a tall hero and lift the form's top off-screen. Anchor to the
   top and trim vertical padding. The single-column tablet + mobile bands already
   flow from the top. */
@media (min-width:1200px) and (max-height:760px){
  .web-main{ align-items:flex-start; padding-block:clamp(10px,2vh,22px); }
}

/* ---- Small phones (<=480) ---- */
@media (max-width:480px){
  .web-main{ padding-inline:12px; }            /* use more device width */
  .web-cardshell{ width:100%; }
  .web-card{ border-radius:22px; }
  .mm-phead{ padding:18px 16px 0; }
  .mm-body{ padding:6px 16px 8px; }
  .mm-foot{ padding:14px 16px 18px; }
  .mm-login,.mm-pick{ padding:26px 18px 22px; }
  .mm-state{ padding:36px 18px; }
  .mm-login-head h2{ font-size:24px; }
  .web-h1{ font-size:clamp(28px,8.5vw,36px); }
  /* date group: Day / Month / Year never clip (tighter padding + caret) */
  .mm-dob{ gap:8px; }
  .mm-dob .mm-select{ padding:0 11px; padding-inline-end:28px; }
  .mm-dob .mm-selectwrap::after{ inset-inline-end:10px; }
  /* phone: dial compact so the number field keeps usable room */
  .mm-dial{ padding:0 11px; gap:5px; }
}

/* ---- Small phones (<=360): maximize width, guarantee no clipped text ---- */
@media (max-width:360px){
  .web-main{ padding-inline:9px; }
  .mm-phead{ padding:16px 13px 0; }
  .mm-body{ padding:6px 13px 8px; }
  .mm-foot{ padding:13px 13px 16px; }
  .mm-login,.mm-pick{ padding:22px 14px 18px; }
  .mm-field > label{ font-size:16px; }
  .mm-dob{ gap:6px; grid-template-columns:1fr 1.2fr 1fr; }
  .mm-dob .mm-select{ padding:0 8px; padding-inline-end:23px; font-size:14px; }
  .mm-dob .mm-selectwrap::after{ inset-inline-end:8px; font-size:10px; }
  .mm-dial{ padding:0 8px; gap:4px; font-size:14px; }
  .mm-dialmenu{ max-height:300px; }
}

/* ============================================================
   STUDENT SELECTION — premium picker (MCP portal)
   Full white panel on the brand, 2-col card grid (1 col mobile),
   distinct colored avatars, select-then-continue.
   ============================================================ */
.mm-selroot{ align-items:center; justify-content:center; padding:clamp(14px,2.6vw,40px); }
.mm-selpanel{ position:relative; z-index:2; width:100%; max-width:1140px;
  background:var(--surface); border:1px solid var(--line); border-radius:clamp(22px,2.4vw,38px);
  box-shadow:0 44px 100px -44px rgba(124,45,18,.50), 0 14px 44px -22px rgba(28,25,23,.20);
  padding:clamp(22px,3.2vw,52px); }

/* utility controls sit on the white panel -> dark text variant */
.mm-seltop{ position:absolute; top:clamp(16px,2vw,26px); inset-inline-end:clamp(16px,2vw,26px); display:flex; gap:8px; z-index:6; }
.mm-seltop .web-pillbtn{ color:var(--ink); background:var(--surface-2); border-color:var(--line); }
.mm-seltop .web-pillbtn:hover{ background:var(--bg-tint); }

.mm-selhead{ margin-bottom:clamp(18px,2.2vw,28px); max-width:62ch; }
.mm-seleyebrow{ display:inline-flex; align-items:center; gap:7px; font-family:var(--ui); font-weight:700; font-size:12.5px; letter-spacing:.15em; text-transform:uppercase; color:var(--brand-600); }
.mm-seltitle{ font-family:var(--display); font-weight:700; font-size:clamp(30px,4.2vw,50px); color:var(--head); letter-spacing:-.02em; margin:10px 0 0; line-height:1.04; }
.mm-selsub{ font-family:var(--ui); font-size:clamp(14px,1.2vw,16px); color:var(--muted); margin:10px 0 0; line-height:1.55; }
.mm-selwa{ display:inline-flex; align-items:center; gap:10px; margin-top:18px; padding:8px 16px 8px 9px; border-radius:var(--r-pill);
  background:color-mix(in srgb,var(--wa-500) 13%,var(--surface)); border:1px solid color-mix(in srgb,var(--wa-500) 30%,transparent); }
[dir="rtl"] .mm-selwa{ padding:8px 9px 8px 16px; }
.mm-selwa .ic{ width:26px; height:26px; border-radius:50%; background:var(--wa-500); color:#fff; display:grid; place-items:center; flex-shrink:0; }
.mm-selwa .ic svg{ width:15px; height:15px; }
.mm-selwa > span:last-child{ font-family:var(--ui); font-weight:700; font-size:15px; color:var(--ink); letter-spacing:.02em; }

.mm-selgrid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:clamp(12px,1.3vw,18px); }
.mm-selcard{ display:flex; align-items:center; gap:clamp(13px,1.3vw,18px); text-align:start; cursor:pointer; width:100%;
  background:var(--surface); border:1.5px solid var(--field-line); border-radius:20px; padding:clamp(14px,1.4vw,18px);
  box-shadow:var(--sh-sm); transition:border-color var(--fast),box-shadow var(--fast),background var(--fast),transform var(--fast) var(--ease); }
.mm-selcard:hover{ border-color:color-mix(in srgb,var(--avc) 50%,var(--field-line)); box-shadow:var(--sh-md); transform:translateY(-2px); }
.mm-selcard.on{ border-color:var(--brand-500); background:var(--brand-50); box-shadow:0 0 0 4px var(--ring),var(--sh-md); }
.mm-selav{ flex-shrink:0; width:clamp(54px,4vw,64px); height:clamp(54px,4vw,64px); border-radius:50%; display:grid; place-items:center; overflow:hidden;
  font-family:var(--display); font-weight:700; font-size:clamp(21px,1.8vw,25px); line-height:1; color:var(--avc);
  background:color-mix(in srgb,var(--avc) 15%,#fff); border:2.5px solid color-mix(in srgb,var(--avc) 42%,#fff); }
:root[data-theme="dark"] .mm-selav{ background:color-mix(in srgb,var(--avc) 28%,#14110e); border-color:color-mix(in srgb,var(--avc) 52%,#14110e); color:color-mix(in srgb,var(--avc) 72%,#fff); }
.mm-selav img{ width:100%; height:100%; object-fit:cover; }
.mm-selmeta{ flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.mm-selname{ font-family:var(--display); font-weight:600; font-size:clamp(17px,1.5vw,20px); color:var(--ink); line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-selfacts{ font-family:var(--ui); font-size:13.5px; color:var(--muted); display:flex; align-items:center; gap:5px; }
.mm-selfacts .k{ font-weight:500; color:var(--muted); }
.mm-selfacts b{ font-weight:700; color:var(--ink-soft); }
.mm-selfacts .dot{ color:var(--faint); margin:0 3px; }
.mm-selgo{ flex-shrink:0; width:clamp(36px,3vw,42px); height:clamp(36px,3vw,42px); border-radius:50%; display:grid; place-items:center;
  background:var(--surface-2); color:var(--muted); border:1px solid var(--line); transition:all var(--fast); }
.mm-selcard:hover .mm-selgo{ background:color-mix(in srgb,var(--avc) 14%,var(--surface)); color:var(--avc); border-color:transparent; }
.mm-selcard.on .mm-selgo{ background:var(--brand-500); color:#fff; border-color:transparent; box-shadow:var(--sh-brand); }

.mm-selfoot{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin-top:clamp(20px,2.2vw,30px); padding-top:clamp(18px,1.8vw,24px); border-top:1px solid var(--line); }
.mm-seltextbtn{ display:inline-flex; align-items:center; gap:8px; cursor:pointer; font-family:var(--ui); font-weight:700; font-size:14.5px; color:var(--brand-600); }
.mm-seltextbtn:hover{ color:var(--brand-500); }
.mm-selcontinue{ min-width:clamp(230px,22vw,300px); }
.mm-selcontinue:disabled{ background:var(--surface-2); color:var(--faint); box-shadow:none; cursor:not-allowed; opacity:1; }

@media (max-width:768px){
  .mm-selgrid{ grid-template-columns:1fr; }
  .mm-selpanel{ padding:56px 16px 20px; border-radius:24px; }
  .mm-seltop{ top:14px; inset-inline-end:14px; }
  .mm-selfoot{ flex-direction:column-reverse; align-items:stretch; }
  .mm-selcontinue{ width:100%; }
  .mm-seltextbtn{ justify-content:center; }
}

/* ============================================================
   STUDENT DASHBOARD  (authenticated portal shell + dashboard)
   Layout follows the MCP design (sidebar app); visuals reuse the
   portal token system. Dark mode = [data-theme="dark"] (portal
   convention, NOT .dark). Cream app surface overrides the orange
   <html> gradient used by the book/login pages, scoped via :has().
   ============================================================ */
html:has(.mm-app){ background:#FDF5EA; }
:root[data-theme="dark"]:has(.mm-app){ background:#14110D; }
.mm-app{
  /* warm cream surface palette (design cream-*) + brand/teal/semantic from portal tokens */
  --d-page:#FDF5EA; --d-card:#ffffff; --d-soft:#FFFBF6; --d-soft2:#FDF5EA;
  --d-line:#F3E1C9; --d-line2:#EAD4B6;
  --d-ink:#1F1410; --d-ink2:#3A241A; --d-muted:#8a6450; --d-faint:#b08c78;
  --d-shadow:0 1px 2px rgba(45,20,10,.05), 0 10px 30px -22px rgba(120,45,18,.5);
  --d-brand:var(--brand-500); --d-brand-600:#ea580c; --d-brand-700:#c2410c;
  --d-brand-50:#FFF4ED; --d-brand-100:#FFE6D5;
  --d-teal:#159C88; --d-teal-50:#ECFBF7; --d-teal-600:#0C7C6E;
  position:relative; z-index:1; min-height:100dvh; display:flex; align-items:stretch;
  background:var(--d-page); color:var(--d-ink); font-family:var(--ui);
  overflow-x:clip;   /* shell-level guard: decorative/topbar content can never cause horizontal scroll (clip ≠ scroll container, so sticky topbar is unaffected) */
}
:root[data-theme="dark"] .mm-app{
  --d-page:#14110D; --d-card:#211b15; --d-soft:#1b1611; --d-soft2:#1f1913;
  --d-line:#342a22; --d-line2:#40342a;
  --d-ink:#f6f1ea; --d-ink2:#e6ddd2; --d-muted:#b6a595; --d-faint:#7d7065;
  --d-shadow:0 1px 2px rgba(0,0,0,.4), 0 18px 40px -24px rgba(0,0,0,.7);
  --d-brand-50:#2a1a0f; --d-brand-100:#34200f; --d-teal-50:#0e2a26;
}

/* ---- MCP constellation layer (shared) ---- */
.mcp-layer{ position:absolute; inset:0; pointer-events:none; overflow:hidden; }
.mcp-layer svg{ width:100%; height:100%; display:block; }
.mcp-line{ stroke:rgba(255,255,255,.5); } .mcp-dot{ fill:rgba(255,255,255,.7); } .mcp-spark{ fill:rgba(255,255,255,.9); }
.mcp-on-cream .mcp-line{ stroke:rgba(249,115,22,.28); } .mcp-on-cream .mcp-dot{ fill:rgba(249,115,22,.45); } .mcp-on-cream .mcp-spark{ fill:rgba(249,115,22,.6); }
@keyframes twinkle{ 0%,100%{ opacity:.25; transform:scale(.8); } 50%{ opacity:.95; transform:scale(1.15); } }
.twinkle{ animation:twinkle 3s ease-in-out infinite; }

/* ---- Sidebar rail ---- */
.mm-side{ position:sticky; top:0; z-index:50; align-self:flex-start; height:100dvh; width:268px; flex:0 0 auto;
  color:#fff; display:flex; flex-direction:column; overflow:hidden;
  transition:width .3s var(--ease), transform .3s var(--ease);
  background:
    radial-gradient(120% 80% at 10% 0%, #FF8A3D 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 100%, #E0490B 0%, transparent 60%),
    linear-gradient(180deg, #FB7A22 0%, #F2670F 48%, #E25608 100%);
  box-shadow:18px 0 40px -24px rgba(120,45,18,.55); }
:root[data-theme="dark"] .mm-side{
  background:
    radial-gradient(120% 80% at 10% 0%, #F4842F 0%, transparent 55%),
    radial-gradient(120% 90% at 100% 100%, #B8430A 0%, transparent 60%),
    linear-gradient(180deg, #E86A14 0%, #C9530B 52%, #A8440A 100%); }
@media (min-width:768px){ .mm-side.is-collapsed{ width:84px; } }   /* collapse is desktop-only; mobile uses the drawer */
.mm-side-inner{ position:relative; z-index:1; display:flex; flex-direction:column; height:100%; padding:14px; overflow-y:auto; }
.mm-side-inner::-webkit-scrollbar{ width:6px; } .mm-side-inner::-webkit-scrollbar-thumb{ background:rgba(255,255,255,.25); border-radius:999px; } .mm-side-inner::-webkit-scrollbar-track{ background:transparent; }

.mm-brand{ display:flex; align-items:center; gap:12px; padding:6px 6px 14px; }
@media (min-width:768px){ .mm-side.is-collapsed .mm-brand{ justify-content:center; } }
/* Glassmorphism brand tile: floating frosted glass above the orange sidebar */
.mm-brand-logo{ width:52px; height:52px; border-radius:18px; flex:none; position:relative; display:grid; place-items:center; padding:4px;
  background:rgba(255,255,255,.18);
  -webkit-backdrop-filter:blur(16px) saturate(1.1); backdrop-filter:blur(16px) saturate(1.1);
  border:1px solid rgba(255,255,255,.25);
  box-shadow:0 8px 32px rgba(255,255,255,.12), 0 4px 20px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.4); }
.mm-brand-logo img{ width:100%; height:100%; object-fit:contain; display:block; border-radius:14px; }
.mm-brand-txt{ line-height:1.12; min-width:0; flex:1; }
.mm-brand-txt b{ display:block; font-size:17.5px; font-weight:800; letter-spacing:-.005em; }
.mm-brand-txt small{ display:block; font-size:11.5px; font-weight:700; letter-spacing:.2em; color:rgba(255,255,255,.82); }
/* (legacy .mm-side-iconbtn removed — unused after the brand/toggle refactor) */
/* Sidebar collapse/expand toggle — circular translucent button below the brand,
   shown in both states (incl. after collapsing so it can be reopened) */
.mm-side-toggle{ display:grid; place-items:center; width:40px; height:40px; margin:8px auto 6px; border:0; border-radius:50%; background:rgba(255,255,255,.18); color:#fff; cursor:pointer; outline:none; -webkit-tap-highlight-color:transparent; -webkit-appearance:none; appearance:none; transition:background var(--fast); }
.mm-side-toggle::-moz-focus-inner{ border:0; padding:0; }   /* kill Firefox's inner button border */
.mm-side-toggle:hover{ background:rgba(255,255,255,.30); }
.mm-side-toggle:focus, .mm-side-toggle:active{ outline:none; }   /* no UA outline on click / tap */
.mm-side-toggle:focus-visible{ outline:none; box-shadow:0 0 0 3px rgba(255,255,255,.55); }   /* keyboard-only: soft white ring on the orange rail */
.mm-side-toggle-ic{ display:grid; place-items:center; transition:transform .3s var(--ease); }

.mm-nav{ display:flex; flex-direction:column; gap:6px; margin-top:4px; }
.mm-navlink{ display:flex; align-items:center; gap:13px; height:48px; padding:0 14px; border-radius:14px;
  font-family:var(--ui); font-size:14.5px; font-weight:700; letter-spacing:-.01em; color:rgba(255,255,255,.86);
  position:relative; cursor:pointer; white-space:nowrap; outline:none; -webkit-tap-highlight-color:transparent; transition:background .15s, color .15s; }
.mm-navlink:hover{ background:rgba(255,255,255,.14); color:#fff; }
.mm-navlink:focus-visible{ outline:2px solid rgba(255,255,255,.8); outline-offset:-2px; }   /* keyboard only */
.mm-navlink.active{ background:#fff; color:#E2560A; box-shadow:0 10px 22px -10px rgba(120,45,18,.65), 0 2px 0 rgba(255,255,255,.6) inset; }
:root[data-theme="dark"] .mm-navlink.active{ background:#FFF7F0; color:#C2410C; }
.mm-navlink.soon{ opacity:.62; cursor:default; }
.mm-navlink.soon:hover{ background:transparent; color:rgba(255,255,255,.86); }
.mm-nav-ic{ flex:none; }
/* Sidebar count badge (Assessment: exams waiting for the student). The topbar bell's pill,
   inverted for the orange rail: white on the rail, brand on the white active link. On the
   collapsed desktop rail it sits on the icon's top corner. */
.mm-nav-badge{ margin-inline-start:auto; min-width:20px; height:20px; padding:0 6px; border-radius:999px; flex:none; display:grid; place-items:center;
  background:#fff; color:#E2560A; font-size:11px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; box-shadow:0 2px 6px -2px rgba(120,45,18,.45); }
.mm-navlink.active .mm-nav-badge{ background:var(--brand-500); color:#fff; box-shadow:none; }
@media (min-width:768px){
  .mm-side.is-collapsed .mm-nav-badge,
  html.mm-pre-collapsed .mm-side .mm-nav-badge{ position:absolute; top:5px; inset-inline-end:12px; min-width:18px; height:18px; padding:0 4px; font-size:10px; }
}
/* Desktop collapse = icon-only rail (labels hidden). Scoped to >=768px so the MOBILE
   drawer is never affected: on mobile every label stays visible (no icon-only state). */
@media (min-width:768px){
  .mm-side.is-collapsed .mm-navlink{ justify-content:center; padding:0; }
  .mm-side.is-collapsed .mm-navlink span,
  .mm-side.is-collapsed .mm-brand-txt,
  .mm-side.is-collapsed .mm-keep,
  .mm-side.is-collapsed .mm-prof-txt,
  .mm-side.is-collapsed .mm-prof-caret{ display:none; }
}
/* Pre-paint collapsed mirror (desktop only): the persisted collapsed sidebar is painted
   already-collapsed by the inline head script (class on <html>) BEFORE Alpine boots, so
   navigating pages never shows a 268->84 width snap, reflow, or shake. Mirrors .is-collapsed
   exactly; Alpine adopts the same value then removes this class (x-init), leaving the toggle
   button as the ONLY thing that animates the width. Scoped to desktop so the mobile drawer
   (full-width overlay) is never affected. */
@media (min-width:768px){
  html.mm-pre-collapsed .mm-side{ width:84px; }
  html.mm-pre-collapsed .mm-side .mm-brand{ justify-content:center; }
  html.mm-pre-collapsed .mm-side .mm-navlink{ justify-content:center; padding:0; }
  html.mm-pre-collapsed .mm-side .mm-navlink span,
  html.mm-pre-collapsed .mm-side .mm-brand-txt,
  html.mm-pre-collapsed .mm-side .mm-keep,
  html.mm-pre-collapsed .mm-side .mm-prof-txt,
  html.mm-pre-collapsed .mm-side .mm-prof-caret{ display:none; }
  html.mm-pre-collapsed .mm-side .mm-prof{ justify-content:center; }
  html.mm-pre-collapsed .mm-side .mm-side-toggle-ic{ transform:rotate(180deg); }
}

.mm-keep{ position:relative; margin-top:20px; border-radius:16px; padding:16px; overflow:hidden;
  background:linear-gradient(160deg, rgba(255,255,255,.20), rgba(255,255,255,.06)); box-shadow:inset 0 1px 0 rgba(255,255,255,.25); }
.mm-keep-row{ position:relative; display:flex; align-items:center; gap:12px; }
.mm-keep img{ width:auto; height:60px; flex:none; filter:drop-shadow(0 6px 10px rgba(90,28,10,.35)); }
.mm-keep b{ display:block; font-size:14.5px; font-weight:800; line-height:1.15; }
.mm-keep p{ margin:5px 0 0; font-size:11.5px; line-height:1.35; color:rgba(255,255,255,.85); }

.mm-side-spacer{ flex:1; }
/* Profile card is a <button> (account-menu trigger) — reset UA chrome, keep the glass look. */
.mm-prof{ margin-top:14px; border-radius:16px; background:rgba(255,255,255,.12); box-shadow:inset 0 0 0 1px rgba(255,255,255,.15);
  padding:8px; display:flex; align-items:center; gap:10px;
  width:100%; border:0; cursor:pointer; color:#fff; font-family:var(--ui); text-align:start;
  -webkit-appearance:none; appearance:none; -webkit-tap-highlight-color:transparent; outline:none; transition:background var(--fast); }
.mm-prof::-moz-focus-inner{ border:0; padding:0; }
.mm-prof:hover{ background:rgba(255,255,255,.18); }
.mm-prof:focus-visible{ box-shadow:inset 0 0 0 1px rgba(255,255,255,.18), 0 0 0 3px rgba(255,255,255,.5); }
@media (min-width:768px){ .mm-side.is-collapsed .mm-prof{ justify-content:center; } }
.mm-prof img{ width:36px; height:36px; border-radius:11px; object-fit:cover; box-shadow:0 0 0 2px rgba(255,255,255,.4); flex:none; }
.mm-prof-txt{ min-width:0; flex:1; line-height:1.15; }
.mm-prof-txt b{ display:block; font-size:12.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-prof-txt small{ font-size:10.5px; color:rgba(255,255,255,.75); }
.mm-prof-caret{ color:rgba(255,255,255,.8); transform:rotate(-90deg); flex:none; transition:transform var(--base) var(--ease); }
.mm-prof[aria-expanded="true"] .mm-prof-caret{ transform:rotate(90deg); }

/* ============================================================
   ACCOUNT MENU — sidebar profile card → student switcher / profile / logout.
   Desktop: dropdown anchored just above the bottom-pinned profile card.
   Mobile: bottom sheet with large touch targets.
   Rendered as children of .mm-app (outside .mm-side) so the sidebar's
   overflow:hidden + mobile transform can't clip or mis-anchor them. Surfaces,
   typography and dark mode all come from the portal tokens (no hardcoded colors).
   ============================================================ */
.mm-acct-back{ position:fixed; inset:0; z-index:70; background:transparent;
  opacity:0; pointer-events:none; transition:opacity var(--base) var(--ease); }
.mm-acct-back.is-open{ opacity:1; pointer-events:auto; }

.mm-acct{ position:fixed; z-index:71; inset-inline-start:14px; bottom:80px;
  width:264px; max-width:calc(100vw - 28px); max-height:min(74vh,560px); overflow-y:auto;
  background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:var(--r-md); box-shadow:var(--sh-lg); padding:6px; transform-origin:bottom left;
  opacity:0; visibility:hidden; pointer-events:none; transform:translateY(8px) scale(.98);
  transition:opacity .18s var(--ease), transform .18s var(--ease), visibility 0s linear .18s; }
[dir="rtl"] .mm-acct{ transform-origin:bottom right; }
.mm-acct.is-open{ opacity:1; visibility:visible; pointer-events:auto; transform:none;
  transition:opacity .2s var(--ease), transform .2s var(--ease); }
.mm-acct-grip{ display:none; }

.mm-acct-sec{ font-family:var(--ui); font-size:10.5px; font-weight:800; letter-spacing:.06em;
  text-transform:uppercase; color:var(--muted); padding:8px 10px 4px; }
.mm-acct-list{ display:flex; flex-direction:column; gap:2px; }
.mm-acct-form{ margin:0; }

.mm-acct-row{ width:100%; display:flex; align-items:center; gap:11px; padding:8px 10px;
  border:0; border-radius:12px; background:transparent; cursor:pointer; text-align:start;
  font-family:var(--ui); color:var(--ink); -webkit-appearance:none; appearance:none;
  -webkit-tap-highlight-color:transparent; transition:background var(--fast); }
.mm-acct-row::-moz-focus-inner{ border:0; padding:0; }
.mm-acct-row:hover, .mm-acct-row:focus-visible{ background:var(--brand-50); outline:none; }
.mm-acct-meta{ flex:1; min-width:0; line-height:1.2; }
.mm-acct-meta b{ display:block; font-size:13.5px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-acct-meta small{ display:block; font-size:11px; color:var(--muted); margin-top:1px; }

.mm-acct-av{ flex:none; width:36px; height:36px; border-radius:50%; display:grid; place-items:center;
  font-family:var(--display); font-weight:700; font-size:15px; color:#fff;
  background:var(--avc,#7c3aed); box-shadow:inset 0 0 0 1px rgba(255,255,255,.28); }
.mm-acct-stu.is-current{ background:var(--brand-50); cursor:default; }
.mm-acct-check{ flex:none; display:inline-flex; color:var(--brand-500); }
.mm-acct-go{ flex:none; display:inline-flex; color:var(--faint); }
[dir="rtl"] .mm-acct-go svg{ transform:scaleX(-1); }

.mm-acct-ic{ flex:none; width:36px; height:36px; border-radius:11px; display:grid; place-items:center;
  background:var(--surface-2); color:var(--ink-soft); }
.mm-acct-div{ height:1px; background:var(--line); margin:5px 8px; }

.mm-acct-soon{ cursor:default; }
.mm-acct-soon:hover{ background:transparent; }
.mm-acct-soon .mm-acct-meta b{ color:var(--ink-soft); }
.mm-acct-badge{ flex:none; font-size:9.5px; font-weight:800; letter-spacing:.04em; text-transform:uppercase;
  color:var(--muted); background:var(--surface-2); border:1px solid var(--line); padding:2px 7px; border-radius:999px; }

.mm-acct-logout .mm-acct-meta b{ color:var(--err); }
.mm-acct-logout .mm-acct-ic{ background:color-mix(in srgb,var(--err) 12%,var(--surface)); color:var(--err); }
.mm-acct-logout:hover, .mm-acct-logout:focus-visible{ background:color-mix(in srgb,var(--err) 10%,var(--surface)); }

/* ---- Logout confirmation dialog (centered modal) ---- */
.mm-confirm-back{ position:fixed; inset:0; z-index:80; background:rgba(20,10,4,.5);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px);
  opacity:0; pointer-events:none; transition:opacity var(--base) var(--ease); }
.mm-confirm-back.is-open{ opacity:1; pointer-events:auto; }
.mm-confirm{ position:fixed; z-index:81; left:50%; top:50%; width:min(92vw,360px);
  background:var(--surface); color:var(--ink); border:1px solid var(--line);
  border-radius:var(--r-lg); box-shadow:var(--sh-lg); padding:24px 22px 22px; text-align:center;
  opacity:0; visibility:hidden; pointer-events:none; transform:translate(-50%,-48%) scale(.96);
  transition:opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s; }
.mm-confirm.is-open{ opacity:1; visibility:visible; pointer-events:auto; transform:translate(-50%,-50%) scale(1);
  transition:opacity .2s var(--ease), transform .2s var(--ease); }
.mm-confirm-ic{ display:grid; place-items:center; width:54px; height:54px; margin:0 auto 14px; border-radius:50%;
  background:color-mix(in srgb,var(--err) 12%,var(--surface)); color:var(--err); }
.mm-confirm h3{ font-family:var(--display); font-size:19px; font-weight:700; color:var(--ink); margin:0 0 6px; }
.mm-confirm p{ font-family:var(--ui); font-size:13.5px; line-height:1.5; color:var(--muted); margin:0 0 20px; }
.mm-confirm-act{ display:flex; gap:10px; }
.mm-confirm-act > *{ flex:1 1 0; }
.mm-confirm-act form{ margin:0; }
.mm-cbtn{ width:100%; height:46px; border-radius:14px; border:1px solid transparent; cursor:pointer;
  font-family:var(--ui); font-size:14px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; gap:7px;
  -webkit-appearance:none; appearance:none; transition:background var(--fast), border-color var(--fast); }
.mm-cbtn::-moz-focus-inner{ border:0; padding:0; }
.mm-cbtn.ghost{ background:var(--surface-2); color:var(--ink); border-color:var(--line); }
.mm-cbtn.ghost:hover{ background:var(--line); }
.mm-cbtn.danger{ background:var(--err); color:#fff; }
.mm-cbtn.danger:hover{ background:color-mix(in srgb,var(--err) 88%,#000); }

/* ---- Mobile: account menu becomes a bottom sheet ---- */
@media (max-width:767px){
  .mm-acct-back{ background:rgba(20,10,4,.45); -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); }
  .mm-acct{ inset-inline:0; left:0; right:0; bottom:0; top:auto; width:auto; max-width:none; max-height:82vh;
    border:0; border-top:1px solid var(--line); border-radius:22px 22px 0 0;
    padding:8px 12px calc(14px + env(safe-area-inset-bottom)); box-shadow:0 -18px 50px -18px rgba(20,10,4,.5);
    opacity:1; visibility:visible; pointer-events:none; transform:translateY(100%); transform-origin:bottom;
    transition:transform .3s var(--ease); }
  .mm-acct.is-open{ transform:translateY(0); pointer-events:auto; }
  .mm-acct-grip{ display:block; width:40px; height:4px; border-radius:999px; background:var(--line-2); margin:2px auto 9px; }
  .mm-acct-sec{ font-size:11px; padding:6px 12px; }
  .mm-acct-row{ padding:12px; border-radius:14px; gap:13px; }
  .mm-acct-av, .mm-acct-ic{ width:44px; height:44px; }
  .mm-acct-av{ font-size:17px; }
  .mm-acct-meta b{ font-size:15.5px; }
  .mm-acct-meta small{ font-size:12px; }
}

/* ---- Main column ---- */
.mm-main{ flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.mm-topbar{ position:sticky; top:0; z-index:30; background:color-mix(in srgb, var(--d-page) 85%, transparent); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); }
.mm-topbar-in{ height:68px; display:flex; align-items:center; gap:12px; padding:0 clamp(16px,3vw,24px); }
/* (legacy header hamburger removed — the sidebar's orange circular toggle is the only sidebar toggle) */
.mm-search{ flex:1; min-width:0; max-width:460px; height:44px; padding:0 14px; border-radius:16px; background:var(--d-card); box-shadow:var(--sh-sm); display:flex; align-items:center; gap:10px; color:var(--d-muted); transition:box-shadow var(--fast); }
.mm-search:focus-within{ box-shadow:0 0 0 1px var(--brand-300, #FFA371); }
.mm-search input{ flex:1; min-width:0; border:0; background:transparent; outline:none; font-family:var(--ui); font-size:13.5px; color:var(--d-ink); }
.mm-search input::placeholder{ color:var(--d-faint); }
.mm-kbd{ font-size:11px; font-weight:700; color:var(--d-muted); background:var(--d-soft2); border-radius:6px; padding:2px 6px; }
.mm-tb-spacer{ flex:1; }
/* Top controls (per reference): clean white pills (soft shadow, no border) + an orange theme circle */
.mm-tbtn{ height:40px; border:0; border-radius:14px; background:var(--d-card); box-shadow:var(--sh-sm); color:var(--d-ink2); display:inline-flex; align-items:center; gap:7px; padding:0 12px; font-family:var(--ui); font-weight:600; font-size:13px; cursor:pointer; flex:none; outline:none; -webkit-tap-highlight-color:transparent; -webkit-appearance:none; appearance:none; transition:background var(--fast), box-shadow var(--fast); }
.mm-tbtn::-moz-focus-inner{ border:0; padding:0; }   /* kill Firefox's inner button border */
.mm-tbtn:hover{ background:var(--d-soft); }
.mm-tbtn:focus, .mm-tbtn:active{ outline:none; }      /* no UA outline on click / tap */
.mm-tbtn:focus-visible{ outline:none; box-shadow:var(--sh-sm), 0 0 0 3px color-mix(in srgb, var(--brand-500) 30%, transparent); }   /* keyboard-only: soft on-brand ring, never black */
.mm-tbtn.sq{ width:40px; justify-content:center; padding:0; }
.mm-tbtn .mut{ color:var(--d-faint); }
.mm-tbtn.mm-theme{ background:var(--brand-500); border-radius:50%; box-shadow:0 6px 14px -6px rgba(249,115,22,.55); }
.mm-tbtn.mm-theme:hover{ background:var(--brand-600); }
.mm-theme .ic-sun, .mm-theme .ic-moon{ color:#fff; }
.ic-sun{ display:inline-flex; }
.ic-moon{ display:none; }
:root[data-theme="dark"] .ic-sun{ display:none; }
:root[data-theme="dark"] .ic-moon{ display:inline-flex; }
.mm-bell{ position:relative; }
.mm-bell b{ position:absolute; top:-5px; right:-5px; min-width:18px; height:18px; padding:0 4px; border-radius:999px; background:var(--brand-500); color:#fff; font-size:10px; font-weight:700; display:grid; place-items:center; box-shadow:0 0 0 2px var(--d-page); }

.mm-content{ width:100%; max-width:1280px; margin:0 auto; padding:clamp(16px,3vw,28px) clamp(16px,3vw,24px) 40px; display:flex; flex-direction:column; gap:20px; }

/* ---- Cards (shared) ---- */
.mm-d-card{ background:var(--d-card); border-radius:24px; box-shadow:0 0 0 1px var(--d-line), var(--d-shadow); }
.mm-d-pad{ padding:20px; }
.mm-d-h3{ font-family:var(--display); font-weight:700; font-size:16px; color:var(--d-ink); margin:0; }
.mm-icbox{ width:40px; height:40px; border-radius:14px; display:grid; place-items:center; flex:none; }
.mm-icbox.brand{ background:var(--d-brand-50); color:var(--brand-500); }
.mm-icbox.amber{ background:#FEF3C7; color:#D97706; } :root[data-theme="dark"] .mm-icbox.amber{ background:#3a2c0e; }
.mm-icbox.teal{ background:var(--d-teal-50); color:var(--d-teal-600); }

/* ---- Hero ---- */
.mm-dhero{ position:relative; border-radius:26px; overflow:hidden; box-shadow:0 0 0 1px var(--d-line), var(--d-shadow);
  background:
    radial-gradient(80% 140% at 88% 0%, rgba(255,177,120,.30) 0%, transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(53,187,163,.12) 0%, transparent 55%),
    linear-gradient(120deg, #FFF6EC 0%, #FFEFE0 100%); }
:root[data-theme="dark"] .mm-dhero{
  background:
    radial-gradient(80% 140% at 88% 0%, rgba(249,115,22,.22) 0%, transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(21,156,136,.16) 0%, transparent 55%),
    linear-gradient(120deg, #241C15 0%, #2B2018 100%); }
.mm-dhero-in{ position:relative; z-index:1; padding:clamp(10px,1.3vw,13px) clamp(20px,3vw,28px); }
.mm-dhero-grid{ display:grid; grid-template-columns:1fr; gap:8px; align-items:center; }
.mm-dhero-main{ min-width:0; }
.mm-dhero-greet{ min-width:0; }
/* mascot art on the right of the hero (decorative; shown on wide screens) */
.mm-dhero-art{ position:relative; display:none; }
/* Dashboard hero mascot — gentle decorative float (RESTORED, dashboard-only). Reuses the original
   `mascotFloat` keyframe (transform-only translateY, GPU-friendly, no layout shift). Scoped to
   .mm-hero-mascot, which is used ONLY on the dashboard hero — the other portal heroes
   (.mm-phero-mascot / .mm-cert-mascot) stay static. No RTL flip rule: the original live RTL mascot
   rendered unflipped (the float transform overrode the static scaleX(-1)), so this preserves that
   exact prior appearance. Disabled under prefers-reduced-motion. */
.mm-hero-mascot{ position:relative; z-index:2; display:block; width:auto; max-width:100%; max-height:clamp(140px,17vw,205px); height:auto; margin-inline:auto; filter:drop-shadow(0 14px 22px rgba(120,45,18,.22)); animation:mascotFloat 5.5s var(--ease) infinite; }
@media (prefers-reduced-motion:reduce){ .mm-hero-mascot{ animation:none; } }
.mm-hero-chip{ position:absolute; z-index:1; display:grid; place-items:center; min-width:42px; height:42px; padding:0 10px; border-radius:13px;
  color:var(--brand-600); font-family:ui-monospace,Menlo,Consolas,monospace; font-weight:700; font-size:.95rem; letter-spacing:.02em;
  background:rgba(255,255,255,.72); -webkit-backdrop-filter:blur(7px); backdrop-filter:blur(7px);
  box-shadow:0 10px 22px -12px rgba(120,45,18,.35), inset 0 0 0 1px rgba(255,255,255,.6); }
:root[data-theme="dark"] .mm-hero-chip{ color:oklch(.86 .13 60); background:rgba(255,255,255,.08); box-shadow:0 10px 22px -12px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08); }
.mm-hero-chip.win{ gap:5px; }
.mm-hero-chip.win i{ width:7px; height:7px; border-radius:50%; background:var(--brand-300,#FFA371); }
.mm-hero-chip.c1{ inset-block-start:4%;  inset-inline-start:0%;  animation:webFloat 5.5s ease-in-out infinite; }
.mm-hero-chip.c2{ inset-block-start:0%;  inset-inline-end:6%;   animation:webFloat 6.5s ease-in-out infinite .3s; }
.mm-hero-chip.c3{ inset-block-end:12%;  inset-inline-end:-2%;  width:40px; height:40px; animation:webFloat 7s ease-in-out infinite .6s; }
.mm-hero-chip.c4{ inset-block-end:6%;   inset-inline-start:4%; width:40px; height:40px; animation:webFloat 6s ease-in-out infinite .9s; }
.mm-dhero-top{ display:flex; align-items:center; gap:16px; }
.mm-dhero-av{ position:relative; flex:none; }
.mm-dhero-av img{ width:92px; height:92px; border-radius:24px; object-fit:cover; box-shadow:0 0 0 4px #fff, var(--sh-md); }
:root[data-theme="dark"] .mm-dhero-av img{ box-shadow:0 0 0 4px #2b2018, var(--sh-md); }
.mm-dhero-av .vchk{ position:absolute; bottom:-2px; inset-inline-end:-2px; width:23px; height:23px; border-radius:8px; background:var(--ok); color:#fff; display:grid; place-items:center; box-shadow:0 0 0 3px #fff; }
:root[data-theme="dark"] .mm-dhero-av .vchk{ box-shadow:0 0 0 3px #2b2018; }
.mm-dhero h1{ font-family:var(--display); font-weight:800; font-size:clamp(22px,3vw,30px); letter-spacing:-.02em; line-height:1.15; color:var(--d-ink); margin:0; }
.mm-dhero .lead{ margin:4px 0 0; font-size:14px; font-weight:500; color:var(--d-muted); }
.mm-chiprow{ margin-top:8px; display:flex; flex-wrap:wrap; gap:10px; }
.mm-ichip{ background:color-mix(in srgb, var(--d-card) 80%, transparent); box-shadow:0 0 0 1px var(--d-line); border-radius:16px; padding:8px 14px; min-width:130px; }
.mm-ichip .k{ font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--d-faint); display:flex; align-items:center; gap:4px; }
.mm-ichip .v{ margin-top:2px; display:flex; align-items:center; gap:6px; font-size:14px; font-weight:700; color:var(--d-ink); }
.mm-ichip .v .mono{ font-family:ui-monospace, Menlo, monospace; }
.mm-dot{ width:8px; height:8px; border-radius:50%; flex:none; }
.mm-meta{ margin-top:8px; display:flex; flex-wrap:wrap; align-items:center; gap:8px 24px; font-size:13px; font-weight:500; color:var(--d-ink2); }
.mm-meta span{ display:inline-flex; align-items:center; gap:8px; min-width:0; }
.mm-meta .tr{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:240px; }
.mm-meta svg{ color:var(--brand-500); flex:none; }

/* ---- Dashboard grid ---- */
.mm-dgrid{ display:grid; grid-template-columns:1fr; gap:20px; }
.mm-drail{ display:flex; flex-direction:column; gap:20px; }

/* ---- Sessions card ---- */
.mm-sess-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.mm-sess-head .l{ display:flex; align-items:flex-start; gap:12px; }
.mm-sess-head p{ margin:2px 0 0; font-size:12.5px; color:var(--d-muted); }
.mm-pill-dark{ height:40px; padding:0 16px; border-radius:14px; background:var(--ink); color:#fff; font-family:var(--ui); font-weight:700; font-size:13px; display:inline-flex; align-items:center; gap:8px; cursor:pointer; border:0; }
:root[data-theme="dark"] .mm-pill-dark{ background:#3a2f27; }
.mm-seslist{ display:flex; flex-direction:column; gap:12px; }
.mm-sesrow{ position:relative; border-radius:16px; padding:14px; display:flex; align-items:center; gap:14px; background:var(--d-soft); box-shadow:0 0 0 1px var(--d-line); }
.mm-sesrow.led-card{ background:linear-gradient(135deg,#FFF7EE 0%,#FFFFFF 60%); box-shadow:0 0 0 1px rgba(234,88,12,.35); animation:ledPulse 2.6s ease-in-out infinite; }
:root[data-theme="dark"] .mm-sesrow.led-card{ background:linear-gradient(135deg,#2A2017 0%,#221B15 60%); }
@keyframes ledPulse{ 0%,100%{ box-shadow:0 0 0 1px rgba(234,88,12,.35), 0 0 0 0 rgba(249,115,22,.0); } 50%{ box-shadow:0 0 0 1px rgba(234,88,12,.5), 0 0 22px -2px rgba(249,115,22,.35); } }
.mm-ses-ic{ width:56px; height:56px; border-radius:16px; background:var(--d-brand-50); color:var(--brand-500); box-shadow:0 0 0 1px var(--d-brand-100); display:grid; place-items:center; flex:none; }
.mm-ses-body{ min-width:0; flex:1; }
.mm-ses-tags{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.mm-code{ font-family:ui-monospace, Menlo, monospace; font-size:11.5px; font-weight:700; color:var(--d-ink2); background:var(--d-card); box-shadow:0 0 0 1px var(--d-line2); border-radius:8px; padding:2px 8px; }
.mm-statuspill{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:700; color:var(--d-brand-700); background:var(--d-brand-50); box-shadow:0 0 0 1px var(--d-brand-100); border-radius:999px; padding:2px 10px; }
.led-dot{ width:6px; height:6px; border-radius:50%; background:var(--brand-500); animation:ledBlink 1.6s ease-in-out infinite; box-shadow:0 0 8px 2px rgba(249,115,22,.7); }
@keyframes ledBlink{ 0%,60%,100%{ opacity:1; transform:scale(1); } 30%{ opacity:.55; transform:scale(.85); } }
/* Session details grid — desktop: topic on its own row, date/time/instructor inline beneath */
.mm-ses-grid{ margin-top:6px; display:grid; grid-template-columns:auto auto 1fr; grid-template-areas:"topic topic topic" "date time instr"; column-gap:12px; row-gap:4px; align-items:center; min-width:0; }
.mm-ses-topic{ grid-area:topic; font-family:var(--display); font-weight:700; font-size:15px; color:var(--d-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.mm-ses-desc{ font-family:var(--ui); font-weight:600; font-size:13px; color:var(--d-muted); }
.mm-ses-m{ display:inline-flex; align-items:center; gap:6px; font-size:12px; font-weight:600; color:var(--d-muted); white-space:nowrap; }
.mm-ses-m svg{ color:var(--brand-400, #FB7C3C); flex:none; }
.mm-ses-date{ grid-area:date; } .mm-ses-time{ grid-area:time; } .mm-ses-instr{ grid-area:instr; color:var(--d-faint); }
.mm-ses-actions{ display:flex; align-items:center; gap:8px; flex:none; }
.mm-sbtn{ height:40px; padding:0 14px; border-radius:12px; font-family:var(--ui); font-weight:700; font-size:12.5px; display:inline-flex; align-items:center; gap:6px; cursor:pointer; border:0; text-decoration:none; }
.mm-sbtn.ghost{ background:var(--d-card); color:var(--d-ink2); box-shadow:inset 0 0 0 1px var(--d-line2); }
.mm-sbtn.ghost:hover{ background:var(--d-soft); }
.mm-sbtn.brand{ background:var(--brand-500); color:#fff; box-shadow:0 8px 16px -8px rgba(249,115,22,.5); }
.mm-sbtn.brand:hover{ background:var(--brand-600); }
.mm-sbtn.disabled{ opacity:.5; pointer-events:none; }
.mm-empty{ padding:32px 20px; text-align:center; font-size:13px; color:var(--d-muted); background:var(--d-soft); border-radius:16px; }

.mm-motiv{ position:relative; margin-top:16px; border-radius:16px; overflow:hidden; padding:16px; display:flex; align-items:center; gap:16px; background:linear-gradient(110deg,#FFF1E4 0%,#FBE8FF 55%,#E8F0FF 100%); }
:root[data-theme="dark"] .mm-motiv{ background:linear-gradient(110deg,#2a2017 0%,#241a26 55%,#171d2a 100%); }
.mm-motiv .em{ width:48px; height:48px; border-radius:14px; background:rgba(255,255,255,.7); display:grid; place-items:center; font-size:24px; flex:none; }
:root[data-theme="dark"] .mm-motiv .em{ background:rgba(255,255,255,.1); }
.mm-motiv b{ display:block; font-family:var(--display); font-weight:700; font-size:15px; color:var(--d-ink); }
.mm-motiv small{ display:block; margin-top:2px; font-size:12.5px; font-weight:500; color:var(--d-muted); }
.mm-motiv .rk{ color:var(--brand-500); flex:none; margin-inline-start:auto; }

/* ---- Quick actions ---- */
.mm-qa{ display:flex; flex-direction:column; gap:10px; }
.mm-qa-row{ height:58px; padding:0 14px; border-radius:16px; display:flex; align-items:center; justify-content:space-between; gap:8px; text-decoration:none; font-weight:700; font-size:13px; cursor:pointer;
  background:var(--d-soft); color:var(--d-ink2); box-shadow:inset 0 0 0 1px var(--d-line); transition:background var(--fast), box-shadow var(--fast); }
.mm-qa-row:hover{ background:var(--d-soft2); }
.mm-qa-row .l{ display:inline-flex; align-items:center; gap:12px; min-width:0; }
.mm-qa-ic{ width:36px; height:36px; border-radius:11px; display:grid; place-items:center; flex:none; }
.mm-qa-ic.brand{ background:var(--d-brand-50); color:var(--brand-500); }
.mm-qa-ic.teal{ background:var(--d-teal-50); color:var(--d-teal-600); }
.mm-qa-tt{ display:flex; flex-direction:column; min-width:0; line-height:1.2; }
.mm-qa-tt b{ font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-qa-tt small{ font-size:11px; font-weight:600; color:var(--d-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-qa-row .ch{ opacity:.5; flex:none; }
.mm-qa-row.wa{ background:#25D366; color:#fff; box-shadow:0 8px 16px -8px rgba(37,211,102,.5); }
.mm-qa-row.wa:hover{ background:#1FBA59; }
.mm-qa-row.wa .mm-qa-ic{ background:rgba(255,255,255,.2); color:#fff; }
.mm-qa-row.wa .mm-qa-tt small{ color:rgba(255,255,255,.85); }
.mm-qa-row.wa .ch{ opacity:.9; }

/* ---- Subscription / renewal ---- */
.mm-sub{ position:relative; overflow:hidden; }
.mm-sub-glow{ position:absolute; top:-40px; inset-inline-end:-40px; width:128px; height:128px; border-radius:50%; opacity:.6; background:radial-gradient(circle, rgba(21,156,136,.16), transparent 70%); }
.mm-sub.overdue .mm-sub-glow{ background:radial-gradient(circle, rgba(245,158,11,.18), transparent 70%); }
.mm-sub-in{ position:relative; z-index:1; }
.mm-sub-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:12px; }
.mm-sub-head .l{ display:flex; align-items:center; gap:12px; min-width:0; }
.mm-sub-ic{ width:44px; height:44px; border-radius:16px; color:#fff; display:grid; place-items:center; flex:none; box-shadow:var(--sh-md); background:linear-gradient(135deg,#34BBA3,#159C88); }
.mm-sub.overdue .mm-sub-ic{ background:linear-gradient(135deg,#FBBF24,#F59E0B); }
.mm-sub h3{ font-family:var(--display); font-weight:800; font-size:16.5px; color:var(--d-ink); margin:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-sub-badge{ flex:none; font-size:11px; font-weight:700; border-radius:999px; padding:4px 10px; color:var(--d-teal-600); background:var(--d-teal-50); box-shadow:0 0 0 1px rgba(21,156,136,.25); }
.mm-sub.overdue .mm-sub-badge{ color:#b45309; background:#FEF3C7; box-shadow:0 0 0 1px rgba(245,158,11,.3); }
.mm-sub p{ font-size:13.5px; font-weight:500; line-height:1.5; color:var(--d-ink2); margin:0; }
.mm-sub p strong{ color:var(--d-ink); }
.mm-sub p .tealtext{ font-weight:700; color:var(--d-teal-600); }
.mm-bar{ margin-top:16px; height:10px; border-radius:999px; overflow:hidden; background:var(--d-line); }
.mm-bar > i{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#34BBA3,#159C88); }
.mm-sub.overdue .mm-bar > i{ background:linear-gradient(90deg,#FBBF24,#F59E0B); }
.mm-sub-stats{ margin-top:8px; display:flex; align-items:center; justify-content:space-between; font-size:12px; font-weight:700; }
.mm-sub-stats .a{ color:var(--d-muted); } .mm-sub-stats .a b{ color:var(--d-ink2); }
.mm-sub-stats .b{ color:var(--d-teal-600); } .mm-sub.overdue .mm-sub-stats .b{ color:#d97706; }
.mm-sub-cta{ margin-top:16px; width:100%; height:48px; border-radius:16px; border:0; cursor:pointer; color:#fff; text-decoration:none; font-family:var(--ui); font-weight:700; font-size:14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--brand-500); box-shadow:0 12px 22px -10px rgba(249,115,22,.5); }
.mm-sub-cta:hover{ background:var(--brand-600); }

/* ---- Mobile drawer bits (hidden on desktop) ---- */
.mm-backdrop{ display:none; }

/* Empty-state avatar: solid Megaminds-orange block (edge-to-edge), no inner icon / letter / initials */
.mm-av-fb{ width:36px; height:36px; border-radius:11px; display:block; flex:none;
  background:linear-gradient(135deg,#FB7C3C,#E2560A); box-shadow:0 0 0 2px rgba(255,255,255,.4); }
.mm-dhero-av .mm-av-fb{ width:92px; height:92px; border-radius:24px; box-shadow:0 0 0 4px #fff, var(--sh-md); }
:root[data-theme="dark"] .mm-dhero-av .mm-av-fb{ box-shadow:0 0 0 4px #2b2018, var(--sh-md); }

/* ---- Responsive ---- */
@media (min-width:1024px){
  .mm-dgrid{ grid-template-columns:2fr 1fr; align-items:start; }
  .mm-dhero-grid{ grid-template-columns:minmax(0,1fr) clamp(260px,30%,400px); gap:clamp(16px,2vw,32px); }
  .mm-dhero-art{ display:block; }
}
/* Topbar menu toggle — hidden on desktop (sidebar is always visible there). */
.mm-burger{ display:none; }
.mm-drawer-x{ display:none; }   /* mobile drawer close (X) — revealed only on mobile */

@media (max-width:767px){
  /* ── MOBILE NAVIGATION ──────────────────────────────────────────────
     The sidebar is a hidden off-canvas DRAWER (no persistent rail), so the
     content gets the full device width. The topbar menu button slides it in
     over the page; a backdrop sits behind it; it never pushes/resizes content. */
  /* ── MOBILE DRAWER (decoupled from the desktop collapse state) ──────────────
     Two states only: CLOSED (off-canvas) / OPEN (.is-open). The desktop `is-collapsed`
     machinery is scoped to >=768px, so it has ZERO effect here — the drawer is always
     full width with full labels (never an icon-only rail, never a stuck mid state). */
  .mm-burger{ display:inline-flex; }                              /* topbar menu button opens the drawer */
  .mm-side{ position:fixed; top:0; inset-inline-start:0; height:100dvh; width:min(80vw,380px); z-index:60;
            transform:translateX(-100%); transition:transform .26s cubic-bezier(.4,0,.2,1); box-shadow:none; }
  [dir="rtl"] .mm-side{ transform:translateX(100%); }              /* RTL: drawer slides from the start (right) edge */
  .mm-side.is-open{ transform:translateX(0); box-shadow:18px 0 60px -18px rgba(120,45,18,.6); }
  .mm-side-toggle{ display:none; }                                /* desktop collapse control — not part of the mobile drawer */
  .mm-drawer-x{ display:grid; place-items:center; margin-inline-start:auto; flex:none;
    width:38px; height:38px; border:0; border-radius:50%; background:rgba(255,255,255,.16); color:#fff; cursor:pointer;
    -webkit-appearance:none; appearance:none; -webkit-tap-highlight-color:transparent; transition:background var(--fast); }
  .mm-drawer-x:hover, .mm-drawer-x:active{ background:rgba(255,255,255,.28); }
  .mm-drawer-x::-moz-focus-inner{ border:0; padding:0; }
  .mm-main{ padding-inline-start:0; }                              /* no reserved rail -> full-width content */
  .mm-backdrop{ display:block; position:fixed; inset:0; z-index:50; background:rgba(20,10,4,.45);
                -webkit-backdrop-filter:blur(2px); backdrop-filter:blur(2px); opacity:0; pointer-events:none; transition:opacity .25s; }
  .mm-backdrop.is-open{ opacity:1; pointer-events:auto; }
}
@media (max-width:640px){
  .mm-search .mm-kbd{ display:none; }
  .mm-tbtn.lang{ display:none; }

  /* ── Mobile dashboard optimization: compact, full-width, tight spacing ── */
  .mm-content{ padding:12px 8px 26px; gap:13px; }     /* minimal side padding, tighter rhythm */
  .mm-dgrid{ gap:13px; }
  .mm-d-pad{ padding:14px; }

  /* Hero: compact height; avatar BESIDE the welcome text (not stacked) */
  .mm-dhero-in{ padding:13px 12px; }
  .mm-dhero-top{ flex-direction:row; align-items:center; gap:12px; }
  .mm-dhero-av .mm-av-fb{ width:50px; height:50px; border-radius:15px; box-shadow:0 0 0 3px #fff, var(--sh-sm); }
  .mm-dhero-av img{ width:50px; height:50px; border-radius:15px; }
  :root[data-theme="dark"] .mm-dhero-av .mm-av-fb{ box-shadow:0 0 0 3px #2b2018, var(--sh-sm); }
  .mm-dhero-av .vchk{ width:18px; height:18px; border-radius:7px; bottom:-2px; inset-inline-end:-2px; box-shadow:0 0 0 2.5px #fff; }
  .mm-dhero h1{ font-size:17px; line-height:1.12; }
  .mm-dhero .lead{ font-size:11.5px; margin-top:2px; }

  /* Student info cards: three in ONE row, compact */
  .mm-chiprow{ flex-wrap:nowrap; gap:6px; margin-top:11px; }
  .mm-ichip{ flex:1 1 0; min-width:0; padding:6px 8px; border-radius:11px; }
  .mm-ichip .k{ font-size:8px; letter-spacing:.01em; gap:2px; }
  .mm-ichip .k svg{ display:none; }
  .mm-ichip .v{ font-size:11px; gap:4px; margin-top:1px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .mm-ichip .v svg{ display:none; }
  .mm-ichip .v .mono{ font-size:11px; }
  .mm-dot{ width:7px; height:7px; }

  /* Meta row (Egypt / joined / email) stays visible, compact */
  .mm-meta{ margin-top:10px; gap:5px 14px; font-size:11.5px; }
  .mm-meta svg{ width:13px; height:13px; }

  /* Today's sessions: keep the card, hide the black "Upcoming sessions" pill */
  .mm-pill-dark{ display:none; }
  .mm-sess-head{ margin-bottom:12px; }
  /* Session card: icon top-aligned; code + status on one line; date/time stacked; buttons full-width stacked (Join over Copy) */
  .mm-sesrow{ align-items:flex-start; flex-wrap:wrap; gap:10px 12px; }
  .mm-ses-ic{ width:48px; height:48px; }
  .mm-ses-tags{ flex-wrap:nowrap; }
  /* date beside the session name (right), time under the name, instructor under the date; tight gaps */
  .mm-ses-grid{ grid-template-columns:1fr auto; grid-template-areas:"topic date" "time instr"; column-gap:8px; row-gap:2px; align-items:center; }
  .mm-ses-date, .mm-ses-instr{ justify-self:end; }
  .mm-ses-instr .mm-sep{ display:none; }
  .mm-ses-actions{ flex-basis:100%; flex-direction:column-reverse; gap:8px; }
  .mm-ses-actions .mm-sbtn{ width:100%; justify-content:center; }
  .mm-sbtn.copy{ display:inline-flex; }

  /* Motivation card: hidden on mobile */
  .mm-motiv{ display:none; }
}

/* (avatar empty-state styles moved above the responsive section so mobile overrides apply) */
/* (legacy drawer close button removed; the sidebar's orange toggle is visible at all breakpoints) */

/* ============================================================
   STUDENT PORTAL — PHASE 3  (Progress / Feedback / Support)
   SCOPED: every rule is confined to the authenticated portal shell
   (`.mm-app`) and, where page-specific, to its page root
   (`.mm-page-sessions|feedback|support`, set on the .mm-app element).
   This keeps these rules off the public Login / Signup / Student-Info /
   Student-Selection pages (which have NO `.mm-app`) so their shared form
   classes (.mm-field wrapper, .mm-seg progress bar, .chip, .mm-stars ...)
   are never overridden. Surfaces use soft hairline+shadow (no heavy borders);
   dashed borders only for "not started" states. Tone fills use color-mix
   so they adapt to light/dark.
   ============================================================ */
[x-cloak]{ display:none !important; }
@keyframes chipFloat{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(-9px); } }
@keyframes sparkPop{ 0%,100%{ opacity:.35; transform:scale(.75) rotate(0); } 50%{ opacity:1; transform:scale(1.12) rotate(12deg); } }
@keyframes tPing{ 0%{ box-shadow:0 0 0 0 color-mix(in srgb,var(--brand-500) 60%,transparent); } 70%,100%{ box-shadow:0 0 0 6px transparent; } }

/* ---- Page hero (shared by Progress/Feedback/Support) ---- */
.mm-app .mm-phero{ position:relative; border-radius:26px; overflow:hidden; box-shadow:0 0 0 1px var(--d-line), var(--d-shadow);
  background:
    radial-gradient(80% 140% at 88% 0%, rgba(255,177,120,.30) 0%, transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(53,187,163,.12) 0%, transparent 55%),
    linear-gradient(120deg, #FFF6EC 0%, #FFEFE0 100%); }
:root[data-theme="dark"] .mm-app .mm-phero{
  background:
    radial-gradient(80% 140% at 88% 0%, rgba(249,115,22,.22) 0%, transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(21,156,136,.16) 0%, transparent 55%),
    linear-gradient(120deg, #241C15 0%, #2B2018 100%); }
.mm-app .mm-phero-in{ position:relative; z-index:1; padding:clamp(20px,3vw,28px); }
.mm-app .mm-phero-grid{ display:grid; grid-template-columns:1fr; gap:8px; align-items:center; }
.mm-app .mm-phero-txt{ min-width:0; }
.mm-app .mm-phero h1{ font-family:var(--display); font-weight:800; font-size:clamp(22px,3vw,30px); letter-spacing:-.02em; line-height:1.15; color:var(--d-ink); margin:0; }
.mm-app .mm-phero .lead{ margin:6px 0 0; font-size:14px; font-weight:500; color:var(--d-muted); max-width:460px; }
.mm-app .mm-phero-lead{ display:flex; align-items:center; gap:16px; min-width:0; }
.mm-app .mm-phero-ic{ width:64px; height:64px; border-radius:22px; flex:none; display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,#34BBA3,#0C7C6E); box-shadow:0 14px 26px -12px rgba(12,124,110,.6); }
.mm-app .mcp-on-teal .mcp-line{ stroke:rgba(21,156,136,.26); } .mm-app .mcp-on-teal .mcp-dot{ fill:rgba(21,156,136,.42); } .mm-app .mcp-on-teal .mcp-spark{ fill:rgba(249,115,22,.5); }
.mm-app .mm-phero-art{ position:relative; display:none; min-height:150px; }
/* Feedback / Support hero mascot — STATIC. Decorative float removed (perf); art/size/position/color/shadow
   unchanged. RTL flip dropped for the same reason as the dashboard mascot: the float animation overrode it,
   so the live RTL mascot already rendered unflipped — preserving that exact current appearance. */
.mm-app .mm-phero-mascot{ position:absolute; inset:0; margin:auto; width:150px; height:150px; object-fit:contain; filter:drop-shadow(0 16px 22px rgba(120,45,18,.28)); }
.mm-app .mm-chipf{ position:absolute; width:40px; height:40px; border-radius:14px; display:grid; place-items:center; color:var(--brand-500);
  background:var(--d-card); box-shadow:0 0 0 1px var(--d-line), var(--sh-sm); animation:chipFloat 5s ease-in-out infinite; }
.mm-app .mm-chipf.teal{ color:var(--d-teal-600); }
.mm-app .mm-chipf.c1{ inset-block-start:6px; inset-inline-start:6px; animation-delay:.2s; }
.mm-app .mm-chipf.c2{ inset-block-start:2px; inset-inline-end:8px; animation-delay:1.1s; }
.mm-app .mm-sparkf{ position:absolute; color:#f59e0b; animation:sparkPop 2.6s ease-in-out infinite; }
.mm-app .mm-sparkf.s1{ inset-block-start:10px; inset-inline-start:8px; animation-delay:.2s; }
.mm-app .mm-sparkf.s2{ inset-block-end:18px; inset-inline-start:30px; color:var(--brand-400,#FFA371); animation-delay:1.2s; }
.mm-app .mm-h3-lg{ font-size:20px; font-weight:800; }

/* ---- Star rating (shared: progress feedback + feedback history) ---- */
.mm-app .mm-stars{ display:inline-flex; align-items:center; gap:2px; }
.mm-app .mm-stars i{ display:inline-flex; color:var(--d-line2); }
.mm-app .mm-stars i.on{ color:#f59e0b; }
.mm-app .mm-stars-input{ display:inline-flex; gap:4px; margin:2px 0 4px; }
.mm-app .mm-stars-input button{ border:0; background:transparent; padding:2px; cursor:pointer; color:var(--d-line2); transition:transform .14s ease, color .14s ease; }
.mm-app .mm-stars-input button:hover{ transform:scale(1.18); }
.mm-app .mm-stars-input button.on{ color:#f59e0b; }

/* ---- Form atoms (shared by Feedback + Support, inside the shell only) ---- */
.mm-app .mm-flabel{ display:block; margin:16px 0 7px; font-size:12.5px; font-weight:800; color:var(--d-ink2); }
.mm-app .mm-flabel span{ color:var(--d-faint); font-weight:600; }
.mm-app .mm-field{ width:100%; height:44px; padding:0 14px; border-radius:13px; border:0; outline:none; font-family:var(--ui); font-size:13.5px; color:var(--d-ink);
  background:var(--d-soft2); box-shadow:inset 0 0 0 1px var(--d-line2); transition:box-shadow var(--fast); }
.mm-app textarea.mm-field{ height:auto; padding:12px 14px; line-height:1.5; resize:vertical; }
.mm-app .mm-field::placeholder{ color:var(--d-faint); }
.mm-app .mm-field:focus{ box-shadow:inset 0 0 0 2px var(--ring); }
.mm-app .mm-field.err{ box-shadow:inset 0 0 0 1px #f43f5e; }
.mm-app .mm-fselect{ position:relative; }
.mm-app .mm-fselect select{ appearance:none; -webkit-appearance:none; padding-inline-end:38px; cursor:pointer; }
.mm-app .mm-fselect .ic{ position:absolute; inset-inline-end:12px; top:50%; transform:translateY(-50%); color:var(--d-faint); pointer-events:none; }
.mm-app .mm-ftext{ position:relative; }
.mm-app .mm-ftext .cnt{ position:absolute; bottom:10px; inset-inline-end:12px; font-size:11px; font-weight:700; color:var(--d-faint); }
.mm-app .mm-cta-brand{ margin-top:18px; width:100%; height:48px; border-radius:16px; border:0; cursor:pointer; color:#fff; font-family:var(--ui); font-weight:800; font-size:14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:var(--brand-500); box-shadow:0 12px 22px -10px rgba(249,115,22,.5); transition:background var(--fast); }
.mm-app .mm-cta-brand:hover{ background:var(--brand-600); }
.mm-app .mm-empty-lg{ display:flex; flex-direction:column; align-items:center; gap:6px; padding:34px 20px; text-align:center; }
.mm-app .mm-empty-ic{ color:var(--d-faint); margin-bottom:4px; }
.mm-app .mm-empty-lg b{ font-family:var(--display); font-size:15px; font-weight:800; color:var(--d-ink2); }
.mm-app .mm-empty-lg span{ font-size:12.5px; color:var(--d-muted); max-width:300px; }

/* ============================ PROGRESS (page-scoped) ============================ */
.mm-page-sessions .mm-stats{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
/* compacted KPI card (~31% shorter than before; same structure + MCP styling) */
.mm-page-sessions .mm-stat{ background:var(--d-card); border-radius:18px; box-shadow:0 0 0 1px var(--d-line), var(--d-shadow); padding:12px 14px; transition:transform .22s ease, box-shadow .22s ease; }
.mm-page-sessions .mm-stat:hover{ transform:translateY(-3px); box-shadow:0 0 0 1px var(--d-line), 0 16px 34px -20px rgba(120,45,18,.4); }
.mm-page-sessions .mm-stat-ic{ width:32px; height:32px; border-radius:10px; display:grid; place-items:center; }
.mm-page-sessions .mm-stat-ic svg{ width:17px; height:17px; }
.mm-page-sessions .mm-stat-ic.emerald{ background:color-mix(in srgb,#10b981 12%,var(--d-card)); color:#059669; box-shadow:0 0 0 1px color-mix(in srgb,#10b981 22%,transparent); }
.mm-page-sessions .mm-stat-ic.sky{ background:color-mix(in srgb,#0ea5e9 12%,var(--d-card)); color:#0284c7; box-shadow:0 0 0 1px color-mix(in srgb,#0ea5e9 22%,transparent); }
.mm-page-sessions .mm-stat-ic.teal{ background:var(--d-teal-50); color:var(--d-teal-600); box-shadow:0 0 0 1px color-mix(in srgb,#159C88 22%,transparent); }
.mm-page-sessions .mm-stat-ic.brand{ background:var(--d-brand-50); color:var(--brand-500); box-shadow:0 0 0 1px var(--d-brand-100); }
.mm-page-sessions .mm-stat-v{ margin-top:7px; font-family:var(--display); font-size:24px; font-weight:800; line-height:1; color:var(--d-ink); }
.mm-page-sessions .mm-stat-l{ margin-top:4px; font-size:12px; font-weight:700; line-height:1.2; color:var(--d-ink2); }
.mm-page-sessions .mm-stat-s{ margin-top:2px; font-size:10.5px; line-height:1.2; color:var(--d-faint); }
.mm-page-sessions .mm-track-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:18px; }
.mm-page-sessions .mm-track-head p{ margin:2px 0 0; font-size:12.5px; color:var(--d-muted); }
.mm-page-sessions .mm-track-rank{ flex:none; font-size:11.5px; font-weight:800; color:var(--d-brand-700); background:var(--d-brand-50); box-shadow:0 0 0 1px var(--d-brand-100); border-radius:999px; padding:6px 12px; }
.mm-page-sessions .mm-track-row{ display:grid; grid-template-columns:repeat(var(--n,4),minmax(0,1fr)); gap:10px; }
.mm-page-sessions .mm-tcard{ position:relative; border-radius:14px; padding:13px; display:flex; flex-direction:column; min-height:128px; box-shadow:0 0 0 1px var(--d-line); background:var(--d-card); }
.mm-page-sessions .mm-tcard.is-current{ background:linear-gradient(150deg,var(--d-brand-50),var(--d-card)); box-shadow:0 0 0 1px var(--d-brand-100), 0 0 0 4px color-mix(in srgb,var(--brand-500) 14%,transparent), 0 0 22px -4px color-mix(in srgb,var(--brand-500) 45%,transparent); }
.mm-page-sessions .mm-tcard.is-done{ background:var(--d-soft); opacity:.82; }
.mm-page-sessions .mm-tcard.is-upcoming{ background:var(--d-card); box-shadow:none; border:1px dashed var(--d-line2); opacity:.85; }
.mm-page-sessions .mm-tcard-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:6px; }
.mm-page-sessions .mm-tnum{ width:24px; height:24px; border-radius:8px; display:grid; place-items:center; font-size:11px; font-weight:800; background:var(--d-line); color:var(--d-muted); }
.mm-page-sessions .mm-tcard.is-current .mm-tnum{ background:var(--brand-500); color:#fff; }
.mm-page-sessions .mm-tcard.is-done .mm-tnum{ background:#a8a29e; color:#fff; }
.mm-page-sessions .mm-tlive{ display:inline-flex; align-items:center; gap:5px; font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; color:var(--d-brand-700); }
.mm-page-sessions .mm-tlive i{ position:relative; width:6px; height:6px; border-radius:50%; background:var(--brand-500); box-shadow:0 0 0 0 var(--brand-500); animation:tPing 1.6s ease-out infinite; }
.mm-page-sessions .mm-tname-row{ margin-top:10px; display:flex; align-items:baseline; justify-content:space-between; gap:8px; }
.mm-page-sessions .mm-tname{ font-size:12.5px; font-weight:700; line-height:1.2; color:var(--d-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.mm-page-sessions .mm-tcard:not(.is-current) .mm-tname{ color:var(--d-muted); font-weight:600; }
.mm-page-sessions .mm-tcount{ flex:none; font-size:12px; font-weight:800; color:#059669; }
.mm-page-sessions .mm-tcount span{ color:var(--d-faint); font-weight:600; font-size:10.5px; }
.mm-page-sessions .mm-tsub{ margin-top:3px; font-size:10.5px; color:var(--d-faint); }
.mm-page-sessions .mm-tcard.is-current .mm-tsub{ color:var(--d-muted); }
.mm-page-sessions .mm-tfoot{ margin-top:auto; padding-top:10px; }
.mm-page-sessions .mm-tfoot-l{ display:flex; align-items:center; justify-content:space-between; font-size:10px; text-transform:uppercase; letter-spacing:.05em; font-weight:800; margin-bottom:5px; }
.mm-page-sessions .mm-tfoot-l span:first-child{ color:var(--d-faint); } .mm-page-sessions .mm-tfoot-l span:last-child{ color:var(--d-brand-700); }
.mm-page-sessions .mm-tbar{ height:6px; border-radius:999px; background:var(--d-line); overflow:hidden; }
.mm-page-sessions .mm-tbar > i{ display:block; height:100%; background:var(--brand-500); }
.mm-page-sessions .mm-tmeta{ font-size:10.5px; color:var(--d-faint); }
.mm-page-sessions .mm-tconn{ position:absolute; top:50%; inset-inline-end:-13px; transform:translateY(-50%); z-index:2; width:20px; height:20px; border-radius:50%; display:grid; place-items:center; background:var(--d-card); box-shadow:0 0 0 1px var(--d-line2); color:var(--d-faint); }
.mm-page-sessions .mm-tconn.past{ background:var(--brand-500); color:#fff; box-shadow:none; }
[dir="rtl"] .mm-page-sessions .mm-tconn svg{ transform:scaleX(-1); }
.mm-page-sessions .mm-seg{ display:inline-flex; background:var(--d-soft2); border-radius:13px; padding:4px; box-shadow:0 0 0 1px var(--d-line); flex:none; }
.mm-page-sessions .mm-seg button, .mm-page-sessions .mm-seg a{ height:32px; padding:0 16px; border:0; background:transparent; border-radius:9px; cursor:pointer; text-decoration:none; display:inline-flex; align-items:center; font-family:var(--ui); font-size:12.5px; font-weight:700; color:var(--d-muted); transition:background var(--fast), color var(--fast); }
.mm-page-sessions .mm-seg button.on, .mm-page-sessions .mm-seg a.on{ background:var(--d-card); color:var(--d-brand-700); box-shadow:var(--sh-sm); }

/* ---- Shared portal list pager (Progress Sessions + Feedback History) ----
   Scoped to .mm-app so every paginated portal list gets the identical MCP-styled
   Prev / Page X of Y / Next controls (no browser-default pagination anywhere). */
.mm-app .mm-pager{ display:flex; align-items:center; justify-content:center; gap:12px; margin-top:18px; }
.mm-app .mm-pager-btn{ display:inline-flex; align-items:center; gap:6px; height:36px; padding:0 14px; border:0; border-radius:12px; cursor:pointer; text-decoration:none;
  font-family:var(--ui); font-weight:700; font-size:12.5px; color:var(--d-ink2); background:var(--d-card); box-shadow:0 0 0 1px var(--d-line), var(--sh-sm); transition:background var(--fast); }
.mm-app .mm-pager-btn:hover{ background:var(--d-soft); }
.mm-app .mm-pager-btn.disabled{ opacity:.42; pointer-events:none; box-shadow:0 0 0 1px var(--d-line); }
[dir="rtl"] .mm-app .mm-pager-btn svg{ transform:scaleX(-1); }
.mm-app .mm-pager-ind{ font-size:12.5px; font-weight:600; color:var(--d-muted); }
.mm-app .mm-pager-ind b{ color:var(--d-ink); font-weight:800; }
.mm-page-sessions .mm-prow{ position:relative; border-radius:14px; box-shadow:0 0 0 1px var(--d-line); background:var(--d-card); }
.mm-page-sessions .mm-prow.led-card{ background:linear-gradient(135deg,#FFF7EE 0%,#FFFFFF 60%); box-shadow:0 0 0 1px rgba(234,88,12,.35); animation:ledPulse 2.6s ease-in-out infinite; }
:root[data-theme="dark"] .mm-page-sessions .mm-prow.led-card{ background:linear-gradient(135deg,#2A2017 0%,#221B15 60%); }
.mm-page-sessions .mm-prow-main{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:14px; }
.mm-page-sessions .mm-prow-ic{ width:48px; height:48px; border-radius:14px; display:grid; place-items:center; flex:none; }
.mm-page-sessions .mm-prow-ic.scheduled{ background:var(--d-brand-50); color:var(--brand-500); box-shadow:0 0 0 1px var(--d-brand-100); }
.mm-page-sessions .mm-prow-ic.attended{ background:color-mix(in srgb,#10b981 12%,var(--d-card)); color:#059669; box-shadow:0 0 0 1px color-mix(in srgb,#10b981 20%,transparent); }
.mm-page-sessions .mm-prow-ic.absent{ background:color-mix(in srgb,#f43f5e 12%,var(--d-card)); color:#e11d48; box-shadow:0 0 0 1px color-mix(in srgb,#f43f5e 20%,transparent); }
.mm-page-sessions .mm-prow-ic.pending{ background:color-mix(in srgb,#f59e0b 12%,var(--d-card)); color:#b45309; box-shadow:0 0 0 1px color-mix(in srgb,#f59e0b 22%,transparent); }
.mm-page-sessions .mm-prow-ic.canceled{ background:var(--d-soft); color:var(--d-faint); box-shadow:0 0 0 1px var(--d-line); }
.mm-page-sessions .mm-prow-ic.done{ background:var(--d-soft); color:var(--d-muted); box-shadow:0 0 0 1px var(--d-line); }
.mm-page-sessions .mm-prow-body{ min-width:0; flex:1; }
.mm-page-sessions .mm-prow-t{ display:flex; align-items:center; gap:8px; min-width:0; }
.mm-page-sessions .mm-prow-t h4{ margin:0; min-width:0; font-family:var(--display); font-size:15px; font-weight:700; color:var(--d-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-page-sessions .mm-prow-m{ margin-top:5px; display:flex; align-items:center; gap:14px; flex-wrap:wrap; font-size:12.5px; font-weight:600; color:var(--d-muted); }
.mm-page-sessions .mm-prow-m span{ display:inline-flex; align-items:center; gap:5px; }
.mm-page-sessions .mm-prow-m svg{ color:var(--brand-400,#FB7C3C); flex:none; }
.mm-page-sessions .mm-prow-m .fb{ color:var(--d-brand-700); font-weight:700; }
.mm-page-sessions .mm-prow-m .fb svg{ color:var(--d-brand-700); }
/* Session-content / Assessment / Feedback chips are the collapsible-panel toggles (replaces the removed arrow + whole-row click). */
.mm-page-sessions .mm-prow-m button.fb{ display:inline-flex; align-items:center; gap:5px; appearance:none; -webkit-appearance:none; border:0; background:none; margin:0; padding:0; font-family:inherit; font-size:inherit; line-height:inherit; cursor:pointer; }
.mm-page-sessions .mm-prow-m button.fb:hover{ text-decoration:underline; }
.mm-page-sessions .mm-prow-m button.fb[aria-expanded="true"]{ text-decoration:underline; }
.mm-page-sessions .mm-prow-m button.fb:focus-visible{ outline:2px solid var(--brand-500); outline-offset:3px; border-radius:6px; }
.mm-page-sessions .mm-prow-instr{ text-align:end; flex:none; }
.mm-page-sessions .mm-prow-instr .mm-code{ display:inline-block; margin-bottom:5px; }
.mm-page-sessions .mm-prow-instr .k{ font-size:10px; text-transform:uppercase; letter-spacing:.05em; font-weight:800; color:var(--d-faint); }
.mm-page-sessions .mm-prow-instr .v{ font-size:12.5px; font-weight:700; color:var(--d-ink); }
.mm-page-sessions .mm-prow-act{ display:flex; align-items:center; gap:8px; flex:none; }
.mm-page-sessions .mm-spill{ display:inline-flex; align-items:center; gap:6px; height:26px; padding:0 11px; border-radius:999px; font-size:11.5px; font-weight:800; flex:none; }
.mm-page-sessions .mm-spill .mm-dot{ width:7px; height:7px; }
.mm-page-sessions .mm-spill.scheduled{ color:#0284c7; background:color-mix(in srgb,#0ea5e9 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#0ea5e9 26%,transparent); } .mm-page-sessions .mm-spill.scheduled .mm-dot{ background:#0ea5e9; }
.mm-page-sessions .mm-spill.attended{ color:#059669; background:color-mix(in srgb,#10b981 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 26%,transparent); } .mm-page-sessions .mm-spill.attended .mm-dot{ background:#10b981; }
.mm-page-sessions .mm-spill.absent{ color:#e11d48; background:color-mix(in srgb,#f43f5e 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f43f5e 26%,transparent); } .mm-page-sessions .mm-spill.absent .mm-dot{ background:#f43f5e; }
.mm-page-sessions .mm-spill.pending{ color:#b45309; background:color-mix(in srgb,#f59e0b 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f59e0b 26%,transparent); } .mm-page-sessions .mm-spill.pending .mm-dot{ background:#f59e0b; }
.mm-page-sessions .mm-spill.canceled{ color:#be123c; background:color-mix(in srgb,#f43f5e 8%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f43f5e 18%,transparent); } .mm-page-sessions .mm-spill.canceled .mm-dot{ background:#fb7185; }
.mm-page-sessions .mm-spill.done{ color:var(--d-muted); background:var(--d-soft); box-shadow:0 0 0 1px var(--d-line); } .mm-page-sessions .mm-spill.done .mm-dot{ background:var(--d-faint); }
.mm-page-sessions .mm-prow-fb{ padding:0 14px 14px; }
.mm-page-sessions .mm-prow-fb::before{ content:''; display:block; height:1px; background:var(--d-line); margin-bottom:14px; }
.mm-page-sessions .mm-fb-grid{ display:grid; grid-template-columns:1fr; gap:16px; }
.mm-page-sessions .mm-fb-h{ display:flex; align-items:center; gap:8px; margin-bottom:6px; }
.mm-page-sessions .mm-fb-h .lbl{ font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; color:var(--d-faint); }
.mm-page-sessions .mm-fb-note p{ margin:0; font-size:13px; line-height:1.55; color:var(--d-ink2); }
.mm-page-sessions .mm-fb-note p.muted{ color:var(--d-faint); font-style:italic; }
.mm-page-sessions .mm-fb-note .by{ margin-top:6px; font-size:11.5px; color:var(--d-faint); }
.mm-page-sessions .mm-fb-tags{ display:flex; flex-direction:column; gap:10px; }
.mm-page-sessions .mm-fb-tags .gh{ font-size:10.5px; text-transform:uppercase; letter-spacing:.06em; font-weight:800; margin-bottom:5px; }
.mm-page-sessions .mm-fb-tags .gh.ok{ color:#059669; } .mm-page-sessions .mm-fb-tags .gh.warn{ color:#b45309; }
.mm-page-sessions .mm-fb-tags .chips{ display:flex; flex-wrap:wrap; gap:6px; }
.mm-page-sessions .chip{ font-size:11.5px; font-weight:700; border-radius:999px; padding:3px 10px; }
.mm-page-sessions .chip.ok{ color:#047857; background:color-mix(in srgb,#10b981 13%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 22%,transparent); }
.mm-page-sessions .chip.warn{ color:#b45309; background:color-mix(in srgb,#f59e0b 14%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f59e0b 24%,transparent); }
.mm-page-sessions .mm-fb-absent{ display:flex; align-items:flex-start; gap:12px; }
.mm-page-sessions .mm-fb-absent .ic{ width:32px; height:32px; border-radius:50%; flex:none; display:grid; place-items:center; color:#e11d48; background:color-mix(in srgb,#f43f5e 14%,var(--d-card)); }
.mm-page-sessions .mm-fb-absent .t{ font-size:12.5px; font-weight:800; color:#e11d48; }
.mm-page-sessions .mm-fb-absent p{ margin:4px 0 0; font-size:13px; line-height:1.55; color:var(--d-ink2); }
/* Session content from the program's course session: short description under the
   session number, then Session summary · Materials · Homework inside the panel. */
.mm-page-sessions .mm-prow-desc{ font-size:13.5px; font-weight:600; color:var(--d-ink2); }
.mm-page-sessions .mm-sc{ display:grid; grid-template-columns:1fr; gap:14px; }
.mm-page-sessions .mm-sc-grp{ min-width:0; }
.mm-page-sessions .mm-sc-n{ min-width:18px; height:18px; padding:0 6px; border-radius:999px; display:inline-grid; place-items:center; font-size:10.5px; font-weight:800; color:var(--d-muted); background:var(--d-soft); box-shadow:0 0 0 1px var(--d-line); }
.mm-page-sessions .mm-sc-files{ list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.mm-page-sessions .mm-sc-item{ display:flex; align-items:center; gap:10px; min-height:44px; padding:6px 10px; border-radius:12px; text-decoration:none; color:var(--d-ink); background:var(--d-card); box-shadow:inset 0 0 0 1px var(--d-line2); transition:background var(--fast), box-shadow var(--fast); }
.mm-page-sessions .mm-sc-item:hover{ background:var(--d-soft); }
.mm-page-sessions .mm-sc-item:focus-visible{ outline:2px solid var(--brand-500); outline-offset:2px; }
.mm-page-sessions .mm-sc-item.disabled{ opacity:.5; pointer-events:none; }
.mm-page-sessions .mm-sc-item .ic{ width:32px; height:32px; border-radius:10px; flex:none; display:grid; place-items:center; color:var(--brand-500); background:var(--d-brand-50); }
.mm-page-sessions .mm-sc-sum .ic{ color:#0d9488; background:color-mix(in srgb,#14b8a6 13%,var(--d-card)); }
.mm-page-sessions .mm-sc-homework .mm-sc-item .ic{ color:#b45309; background:color-mix(in srgb,#f59e0b 14%,var(--d-card)); }
:root[data-theme="dark"] .mm-page-sessions .mm-sc-homework .mm-sc-item .ic{ color:#fbbf24; }
:root[data-theme="dark"] .mm-page-sessions .mm-prow-m .fb, :root[data-theme="dark"] .mm-page-sessions .mm-prow-m .fb svg{ color:#fb923c; }
.mm-page-sessions .mm-sc-item .b{ min-width:0; flex:1; display:flex; flex-direction:column; gap:1px; }
.mm-page-sessions .mm-sc-item .t{ font-size:13px; font-weight:700; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; text-align:-webkit-match-parent; text-align:match-parent; }
.mm-page-sessions .mm-sc-item .m{ font-size:11.5px; font-weight:600; color:var(--d-faint); text-align:-webkit-match-parent; text-align:match-parent; }
.mm-page-sessions .mm-sc-item .go{ flex:none; display:grid; place-items:center; color:var(--d-muted); }
.mm-page-sessions .mm-sc-sep{ margin-top:14px; }
.mm-page-sessions .mm-sc-sep::before{ content:''; display:block; height:1px; background:var(--d-line); margin-bottom:14px; }
@media (min-width:768px){
  .mm-page-sessions .mm-sc{ grid-template-columns:repeat(auto-fit,minmax(240px,1fr)); }
}

/* ============================ FEEDBACK (page-scoped) ============================ */
.mm-page-feedback .mm-fbgrid{ display:grid; grid-template-columns:1fr; gap:20px; align-items:start; }
.mm-page-feedback .mm-fbform-head{ display:flex; align-items:center; gap:12px; margin-bottom:4px; }
.mm-page-feedback .mm-fbform-head p{ margin:2px 0 0; font-size:12px; color:var(--d-muted); }
.mm-page-feedback .mm-fnote{ margin-top:16px; display:flex; align-items:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--d-muted); background:var(--d-soft2); box-shadow:0 0 0 1px var(--d-line); border-radius:13px; padding:11px 14px; }
.mm-page-feedback .mm-fnote .hrt{ color:#f43f5e; }
.mm-page-feedback .mm-fbhist{ display:flex; flex-direction:column; gap:16px; }
.mm-page-feedback .mm-fbhist-head p{ margin:2px 0 0; font-size:12.5px; color:var(--d-muted); }
.mm-page-feedback .mm-fcard{ background:var(--d-card); border-radius:22px; box-shadow:0 0 0 1px var(--d-line), var(--d-shadow); padding:18px; display:flex; align-items:flex-start; gap:14px; transition:transform .22s ease, box-shadow .22s ease; }
.mm-page-feedback .mm-fcard:hover{ transform:translateY(-3px); box-shadow:0 0 0 1px var(--d-line), 0 16px 34px -20px rgba(120,45,18,.4); }
.mm-page-feedback .mm-fcard-ic{ width:44px; height:44px; border-radius:14px; flex:none; display:grid; place-items:center; }
.mm-page-feedback .mm-fcard-ic.emerald{ background:color-mix(in srgb,#10b981 12%,var(--d-card)); color:#059669; }
.mm-page-feedback .mm-fcard-ic.sky{ background:color-mix(in srgb,#0ea5e9 12%,var(--d-card)); color:#0284c7; }
.mm-page-feedback .mm-fcard-ic.amber{ background:color-mix(in srgb,#f59e0b 14%,var(--d-card)); color:#b45309; }
.mm-page-feedback .mm-fcard-ic.brand{ background:var(--d-brand-50); color:var(--brand-500); }
.mm-page-feedback .mm-fcard-ic.rose{ background:color-mix(in srgb,#f43f5e 12%,var(--d-card)); color:#e11d48; }
.mm-page-feedback .mm-fcard-body{ min-width:0; flex:1; }
.mm-page-feedback .mm-fcard-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.mm-page-feedback .mm-fcard-tt .w{ font-family:var(--display); font-size:15px; font-weight:800; color:var(--d-ink); }
.mm-page-feedback .mm-fcard-tt .m{ margin-top:2px; font-size:12px; color:var(--d-muted); }
.mm-page-feedback .mm-fcard-rate{ display:flex; align-items:center; gap:8px; flex:none; }
.mm-page-feedback .mm-rword{ font-size:11px; font-weight:800; border-radius:999px; padding:2px 10px; }
.mm-page-feedback .mm-rword.emerald{ color:#047857; background:color-mix(in srgb,#10b981 13%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 26%,transparent); }
.mm-page-feedback .mm-rword.sky{ color:#0369a1; background:color-mix(in srgb,#0ea5e9 13%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#0ea5e9 26%,transparent); }
.mm-page-feedback .mm-rword.amber{ color:#b45309; background:color-mix(in srgb,#f59e0b 14%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f59e0b 26%,transparent); }
.mm-page-feedback .mm-rword.brand{ color:var(--d-brand-700); background:var(--d-brand-50); box-shadow:0 0 0 1px var(--d-brand-100); }
.mm-page-feedback .mm-rword.rose{ color:#be123c; background:color-mix(in srgb,#f43f5e 13%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f43f5e 26%,transparent); }

/* ── Student → Instructor feedback: flash, errors, auto-session, Positive/Negative ── */
.mm-page-feedback [x-cloak]{ display:none !important; }
.mm-page-feedback .mm-flash{ display:flex; align-items:center; gap:8px; border-radius:14px; padding:12px 16px; margin-bottom:14px; font-size:13px; font-weight:700; }
.mm-page-feedback .mm-flash.ok{ color:#047857; background:color-mix(in srgb,#10b981 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 24%,transparent); }
.mm-page-feedback .mm-ferr{ color:#be123c; font-size:12px; font-weight:700; margin-top:6px; }
.mm-page-feedback .mm-field.err{ box-shadow:0 0 0 1px color-mix(in srgb,#f43f5e 45%,transparent); }

.mm-page-feedback .mm-fsession{ margin-top:10px; }
.mm-page-feedback .mm-fsession-ok{ display:flex; align-items:center; gap:10px; padding:11px 14px; border-radius:14px; background:color-mix(in srgb,var(--brand-500) 7%,var(--d-card)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand-500) 22%,transparent); }
.mm-page-feedback .mm-fsession-ok .ic{ color:var(--brand-600); flex:none; display:grid; place-items:center; }
.mm-page-feedback .mm-fsession-ok .lbl{ font-size:10.5px; font-weight:800; color:var(--d-faint); text-transform:uppercase; letter-spacing:.05em; }
.mm-page-feedback .mm-fsession-ok .val{ font-size:13.5px; color:var(--d-ink); margin-top:1px; }
.mm-page-feedback .mm-fsession-ok .val b{ font-weight:800; }
.mm-page-feedback .mm-fsession-none{ display:flex; align-items:center; gap:8px; padding:11px 14px; border-radius:14px; font-size:12.5px; font-weight:700; color:#b45309; background:color-mix(in srgb,#f59e0b 11%,var(--d-card)); box-shadow:inset 0 0 0 1px color-mix(in srgb,#f59e0b 26%,transparent); }
.mm-page-feedback .mm-fsession-none svg{ flex:none; }

.mm-page-feedback .mm-posneg{ display:flex; gap:10px; margin:4px 0 2px; }
.mm-page-feedback .mm-posneg-btn{ flex:1; display:inline-flex; align-items:center; justify-content:center; gap:8px; height:48px; border-radius:14px; cursor:pointer; font-family:var(--ui); font-weight:800; font-size:14px; color:var(--d-faint); background:var(--d-card); border:1.5px solid var(--d-line); transition:color var(--fast) ease, background var(--fast) ease, border-color var(--fast) ease; }
.mm-page-feedback .mm-posneg-btn svg{ width:20px; height:20px; }
.mm-page-feedback .mm-posneg-btn:hover{ color:var(--d-ink); border-color:var(--d-line2); }
.mm-page-feedback .mm-posneg-btn.pos.on{ color:#047857; background:color-mix(in srgb,#10b981 12%,var(--d-card)); border-color:color-mix(in srgb,#10b981 55%,transparent); }
.mm-page-feedback .mm-posneg-btn.neg.on{ color:#be123c; background:color-mix(in srgb,#f43f5e 12%,var(--d-card)); border-color:color-mix(in srgb,#f43f5e 55%,transparent); }

.mm-page-feedback .mm-cta-brand:disabled{ opacity:.5; cursor:not-allowed; box-shadow:none; }
.mm-page-feedback .mm-cta-brand:disabled:hover{ background:var(--brand-500); }
.mm-page-feedback .mm-fquote{ margin:12px 0 0; font-size:13px; font-style:italic; line-height:1.55; color:var(--d-ink2); background:var(--d-soft2); border-radius:13px; padding:10px 14px; border-inline-start:3px solid var(--brand-500); }
.mm-page-feedback .mm-fquote.emerald{ border-color:#10b981; } .mm-page-feedback .mm-fquote.sky{ border-color:#0ea5e9; } .mm-page-feedback .mm-fquote.amber{ border-color:#f59e0b; } .mm-page-feedback .mm-fquote.rose{ border-color:#f43f5e; }
.mm-page-feedback .mm-fbhist-foot{ display:flex; align-items:center; justify-content:center; gap:8px; font-size:12.5px; font-weight:600; color:var(--d-muted); background:var(--d-soft2); box-shadow:0 0 0 1px var(--d-line); border-radius:14px; padding:11px 14px; }
.mm-page-feedback .mm-fbhist-foot svg{ color:var(--brand-400,#FB7C3C); }

/* ============================ SUPPORT (page-scoped) ============================ */
.mm-page-support .mm-supgrid{ display:grid; grid-template-columns:1fr; gap:20px; align-items:stretch; }
.mm-page-support .mm-supcard, .mm-page-support .mm-supform{ display:flex; flex-direction:column; }
.mm-page-support .mm-tag{ display:inline-flex; align-items:center; width:fit-content; font-size:11.5px; font-weight:800; border-radius:999px; padding:5px 12px; }
.mm-page-support .mm-tag.ok{ color:#047857; background:color-mix(in srgb,#10b981 13%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 26%,transparent); }
.mm-page-support .mm-tag.brand{ color:var(--d-brand-700); background:var(--d-brand-50); box-shadow:0 0 0 1px var(--d-brand-100); }
.mm-page-support .mm-supcard-row{ margin-top:16px; display:flex; align-items:flex-start; gap:16px; }
.mm-page-support .mm-supcard-row h3{ margin:0; } .mm-page-support .mm-supcard-row p{ margin:6px 0 0; font-size:13.5px; color:var(--d-muted); }
.mm-page-support .mm-supcard-ic{ width:64px; height:64px; border-radius:22px; flex:none; display:grid; place-items:center; }
.mm-page-support .mm-supcard-ic.wa{ color:#1FBA59; background:color-mix(in srgb,#25D366 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#25D366 24%,transparent); }
.mm-page-support .mm-supcard-meta{ margin-top:12px; display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; color:var(--d-ink2); }
.mm-page-support .mm-supcard-meta svg{ color:var(--d-teal-600); }
.mm-page-support .mm-supform-sub{ margin:6px 0 0; font-size:13px; color:var(--d-muted); }
.mm-page-support .mm-supform .mm-cta-brand{ margin-top:auto; }
.mm-page-support .mm-cta-wa{ margin-top:auto; width:100%; height:52px; border-radius:16px; text-decoration:none; color:#fff; font-family:var(--ui); font-weight:800; font-size:14px; display:inline-flex; align-items:center; justify-content:center; gap:8px; background:#25D366; box-shadow:0 12px 22px -10px rgba(37,211,102,.5); transition:background var(--fast); }
.mm-page-support .mm-cta-wa:hover{ background:#1FBA59; }
.mm-page-support .mm-flash{ display:flex; align-items:center; gap:8px; border-radius:14px; padding:12px 16px; font-size:13px; font-weight:700; }
.mm-page-support .mm-flash.ok{ color:#047857; background:color-mix(in srgb,#10b981 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 24%,transparent); }
.mm-page-support .mm-tickets-head{ margin-bottom:6px; }
.mm-page-support .mm-tickets-head h3{ display:flex; align-items:center; gap:10px; }
.mm-page-support .mm-icbox.sm{ width:36px; height:36px; border-radius:12px; }
.mm-page-support .mm-ticket{ display:flex; align-items:center; gap:14px; padding:14px 0; box-shadow:inset 0 -1px 0 var(--d-line); }
.mm-page-support .mm-ticket:last-child{ box-shadow:none; }
.mm-page-support .mm-ticket-ic{ width:44px; height:44px; border-radius:14px; flex:none; display:grid; place-items:center; }
.mm-page-support .mm-ticket-ic.amber{ background:var(--d-brand-50); color:var(--brand-500); box-shadow:0 0 0 1px var(--d-brand-100); }
.mm-page-support .mm-ticket-ic.emerald{ background:color-mix(in srgb,#10b981 12%,var(--d-card)); color:#059669; box-shadow:0 0 0 1px color-mix(in srgb,#10b981 20%,transparent); }
.mm-page-support .mm-ticket-body{ min-width:0; flex:1; }
.mm-page-support .mm-ticket-body .num{ font-family:ui-monospace,Menlo,monospace; font-size:12px; font-weight:700; color:var(--d-ink2); }
.mm-page-support .mm-ticket-body .subj{ font-size:13.5px; font-weight:700; color:var(--d-ink); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-page-support .mm-ticket-date{ font-size:12.5px; font-weight:600; color:var(--d-muted); flex:none; }
.mm-page-support .mm-ticket-st{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:800; border-radius:999px; padding:4px 11px; flex:none; }
.mm-page-support .mm-ticket-st .mm-dot{ width:7px; height:7px; }
.mm-page-support .mm-ticket-st.amber{ color:#b45309; background:color-mix(in srgb,#f59e0b 14%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#f59e0b 26%,transparent); } .mm-page-support .mm-ticket-st.amber .mm-dot{ background:#f59e0b; }
.mm-page-support .mm-ticket-st.emerald{ color:#047857; background:color-mix(in srgb,#10b981 12%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 26%,transparent); } .mm-page-support .mm-ticket-st.emerald .mm-dot{ background:#10b981; }

/* ---- Phase-3 responsive (scoped) ---- */
@media (min-width:768px){
  .mm-page-sessions .mm-stats{ grid-template-columns:repeat(4,minmax(0,1fr)); }
  .mm-app .mm-phero-grid{ grid-template-columns:1fr auto; gap:24px; }
  .mm-app .mm-phero-art{ display:block; width:190px; }
  .mm-page-support .mm-supgrid{ grid-template-columns:1fr 1fr; }
}
@media (min-width:1024px){
  .mm-page-feedback .mm-fbgrid{ grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); }
}
@media (max-width:767px){
  .mm-app .mm-phero-in{ padding:16px 14px; }
  .mm-app .mm-phero h1{ font-size:19px; } .mm-app .mm-phero .lead{ font-size:12.5px; }
  .mm-app .mm-phero-ic{ width:48px; height:48px; border-radius:16px; }
  /* KPI/stat cards are hidden on mobile so the page stays focused on hero + sessions */
  .mm-page-sessions .mm-stats{ display:none; }
  .mm-page-sessions .mm-track-row{ grid-template-columns:repeat(2,minmax(0,1fr)); }
  .mm-page-sessions .mm-tconn{ display:none; }
  .mm-page-sessions .mm-seg button, .mm-page-sessions .mm-seg a{ padding:0 14px; }
  /* tab switch (?scope=…#sessions) lands the Sessions heading just BELOW the sticky
     topbar (≈68px) instead of behind it, so the section title is fully visible */
  .mm-page-sessions #sessions, .mm-page-feedback #feedback-history{ scroll-margin-top:80px; }
  /* compact mobile card — Row1:[icon][badge]  Row2:name+desc  Row3:date·time  Row4:actions */
  .mm-page-sessions .mm-prow-main{ gap:8px 10px; padding:12px; align-items:center; }
  .mm-page-sessions .mm-prow-ic{ order:1; width:38px; height:38px; border-radius:12px; }
  .mm-page-sessions .mm-spill{ order:2; }
  .mm-page-sessions .mm-prow-body{ order:3; flex-basis:100%; }
  .mm-page-sessions .mm-prow-instr{ display:none; }
  .mm-page-sessions .mm-prow-t h4{ font-size:14.5px; }
  .mm-page-sessions .mm-prow-act{ order:4; flex-basis:100%; }
  .mm-page-sessions .mm-prow-act .mm-sbtn{ flex:1; justify-content:center; }
  .mm-page-sessions .mm-fb-grid{ gap:14px; }
  .mm-page-sessions .mm-prow-desc{ font-size:12.5px; }
  .mm-app .mm-pager{ margin-top:14px; gap:10px; }
  .mm-app .mm-pager-btn{ padding:0 12px; }
}
@media (min-width:560px){
  .mm-page-sessions .mm-fb-grid{ grid-template-columns:1fr 220px; }
}

/* ============================================================
   VERY-NARROW PHONES (<=360px) — make the LAYOUT itself fit (not via clip).
   At 320px the 84px sidebar rail leaves only ~220px for content, so the
   dashboard subscription/quick-action cards and the feedback form/history
   cards were ~10-30px too wide. Slim the rail to 72px and tighten content
   padding so everything fits with room to spare; min-width:0 lets the grid
   items shrink to their track. Verified: scrollWidth == viewport at 320px
   with NO overflow-x guard. Scoped <=360 so 390/430 keep the 84px rail.
   ============================================================ */
@media (max-width:360px){
  /* content is full-width now (sidebar is an off-canvas drawer); just keep grid items shrinkable */
  .mm-dgrid, .mm-drail, .mm-d-card{ min-width:0; }
}

/* ============================================================
   MY PROFILE modal (Phase 5) — extends .mm-confirm + .mm-acct.
   Desktop: centered modal · Mobile: full-height bottom sheet.
   Everything scoped to .mm-profile / .mm-pf-* (no global leakage).
   Reuses existing atoms: .mm-input .mm-btn .mm-phone .mm-av-fb .mm-hint .mm-err
   ============================================================ */
.mm-pf-back{ position:fixed; inset:0; z-index:80; background:rgba(20,10,4,.5);
  -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); opacity:0; pointer-events:none; transition:opacity var(--base) var(--ease); }
.mm-pf-back.is-open{ opacity:1; pointer-events:auto; }
.mm-profile{ position:fixed; z-index:81; left:50%; top:50%; width:min(94vw,700px); max-height:90vh;
  display:flex; flex-direction:column; overflow:hidden; background:var(--surface); color:var(--ink);
  border:1px solid var(--line); border-radius:var(--r-lg); box-shadow:var(--sh-lg);
  opacity:0; visibility:hidden; pointer-events:none; transform:translate(-50%,-48%) scale(.97);
  transition:opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s; }
.mm-profile.is-open{ opacity:1; visibility:visible; pointer-events:auto; transform:translate(-50%,-50%) scale(1);
  transition:opacity .2s var(--ease), transform .2s var(--ease); }
.mm-profile .mm-input:hover:not(:focus):not(:disabled){ border-color:color-mix(in srgb,var(--brand-500) 38%,var(--field-line)); }
.mm-pf-file{ display:none; }
.mm-pf-grip{ display:none; }

/* header */
.mm-pf-head{ position:relative; flex:none; padding:18px 18px 16px;
  background:radial-gradient(90% 160% at 92% -10%, rgba(255,177,120,.34) 0%, transparent 55%), linear-gradient(120deg,#FFF6EC,#FFEFE0); }
:root[data-theme="dark"] .mm-pf-head{ background:radial-gradient(90% 160% at 92% -10%, rgba(249,115,22,.22) 0%, transparent 55%), linear-gradient(120deg,#241C15,#2B2018); }
.mm-pf-head-row{ display:flex; align-items:center; gap:15px; padding-inline-end:40px; }
.mm-pf-av{ position:relative; flex:none; width:72px; height:72px; }
.mm-pf-av .mm-av-fb{ width:72px; height:72px; border-radius:20px; box-shadow:0 0 0 4px #fff, var(--sh-md); }
:root[data-theme="dark"] .mm-pf-av .mm-av-fb{ box-shadow:0 0 0 4px #2b2018, var(--sh-md); }
.mm-pf-photo-img{ width:72px; height:72px; border-radius:20px; object-fit:cover; display:block; box-shadow:0 0 0 4px #fff, var(--sh-md); }
:root[data-theme="dark"] .mm-pf-photo-img{ box-shadow:0 0 0 4px #2b2018, var(--sh-md); }
.mm-pf-cam{ position:absolute; bottom:-5px; inset-inline-end:-5px; width:28px; height:28px; border-radius:10px; border:0; cursor:pointer;
  display:grid; place-items:center; color:#fff; background:var(--brand-500); box-shadow:0 0 0 3px #fff, var(--sh-brand); }
:root[data-theme="dark"] .mm-pf-cam{ box-shadow:0 0 0 3px #2b2018, var(--sh-brand); }
.mm-pf-cam:disabled{ opacity:.75; cursor:default; }
.pfspin{ width:13px; height:13px; border-radius:50%; border:2px solid color-mix(in srgb,var(--brand-500) 30%,transparent); border-top-color:var(--brand-500); animation:pfspin .7s linear infinite; flex:none; }
.mm-pf-cam .pfspin, .mm-btn.primary .pfspin{ border-color:rgba(255,255,255,.45); border-top-color:#fff; }
@keyframes pfspin{ to{ transform:rotate(360deg); } }
.mm-pf-x{ position:absolute; top:14px; inset-inline-end:14px; width:32px; height:32px; border:0; cursor:pointer; border-radius:10px;
  display:grid; place-items:center; color:var(--ink-soft); background:var(--surface); box-shadow:var(--sh-sm); transition:background var(--fast); }
.mm-pf-x:hover{ background:var(--surface-2); }

/* identity */
.mm-pf-id{ min-width:0; flex:1; }
.mm-pf-nrow{ display:flex; align-items:center; gap:9px; min-width:0; }
.mm-pf-name{ font-family:var(--display); font-weight:800; font-size:20px; letter-spacing:-.01em; color:var(--head);
  min-width:0; flex:0 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-pf-status{ flex:none; display:inline-flex; align-items:center; gap:6px; font-size:11.5px; font-weight:800; color:#0C7C6E;
  background:var(--teal-50); box-shadow:0 0 0 1px color-mix(in srgb,var(--teal-500) 30%,transparent); border-radius:999px; padding:3px 10px; }
:root[data-theme="dark"] .mm-pf-status{ background:#0e2a26; color:#34BBA3; }
.mm-pf-status i{ width:7px; height:7px; border-radius:50%; background:#10b981; box-shadow:0 0 7px 1px rgba(16,185,129,.6); }
.mm-pf-metarow{ margin-top:7px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 9px; font-family:var(--ui); font-size:12.5px; font-weight:600; color:var(--ink-soft); }
.mm-pf-metarow > span{ display:inline-flex; align-items:center; gap:5px; min-width:0; }
.mm-pf-metarow svg{ color:var(--brand-500); flex:none; opacity:.9; }
.mm-pf-metarow .sep{ color:var(--faint); }
.mm-pf-metarow .id{ font-family:ui-monospace,Menlo,monospace; font-weight:700; letter-spacing:-.01em; }
.mm-pf-photoctl{ margin-top:9px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; min-height:18px; }
.mm-pf-link{ border:0; background:transparent; cursor:pointer; font-family:var(--ui); font-weight:700; font-size:12px;
  color:var(--brand-600); display:inline-flex; align-items:center; gap:5px; padding:2px 0; }
.mm-pf-link:disabled{ opacity:.6; cursor:default; }
.mm-pf-l .wa{ color:var(--wa-500); }
.mm-pf-upst{ font-size:11.5px; font-weight:700; display:inline-flex; align-items:center; gap:6px; color:var(--brand-600); }
.mm-pf-upst.err{ color:var(--err); }

/* body */
.mm-pf-body{ overflow-y:auto; padding:16px 18px 6px; display:flex; flex-direction:column; gap:16px; }
.mm-pf-body::-webkit-scrollbar{ width:8px; } .mm-pf-body::-webkit-scrollbar-thumb{ background:var(--line-2); border-radius:999px; }
.mm-pf-sec-t{ font-family:var(--ui); font-weight:800; font-size:11px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin:0 2px 10px; }
.mm-pf-l{ display:block; font-family:var(--ui); font-size:14px; font-weight:700; color:var(--ink); margin-bottom:7px; letter-spacing:-.01em; }
.mm-pf-l.ico{ display:flex; align-items:center; gap:6px; }
.mm-pf-f + .mm-pf-f{ margin-top:13px; }
.mm-pf-grid{ display:grid; grid-template-columns:1fr 1fr; gap:13px; }

/* current password — the readable copy, masked behind an eye toggle.
   The readable field and the "cannot be displayed" note are mutually exclusive
   branches of the same row, so they must not inherit the field-to-field gap
   from each other — the hidden one would otherwise leave 13px of dead space. */
.mm-pf-pwrow + .mm-pf-pwrow{ margin-top:0; }
.mm-pf-pw{ position:relative; }
/* Monospace in BOTH states, not just the revealed one: Cairo (--ui) draws U+2022
   as a SQUARE, so the masked value came out as a row of little boxes rather than
   password dots. It also earns its place when revealed — a credential is read
   aloud and retyped, and proportional glyphs make look-alikes ambiguous — and
   one font across the toggle stops the field reflowing when the eye is pressed. */
.mm-pf-pw .mm-input{ padding-inline-end:52px; cursor:default; font-family:ui-monospace,Menlo,monospace; }
.mm-pf-pw .mm-input.is-shown{ font-weight:700; letter-spacing:.02em; }
.mm-pf-pw .mm-input:not(.is-shown){ font-size:17px; letter-spacing:.1em; }
.mm-pf-pw-eye{ position:absolute; inset-inline-end:6px; top:50%; transform:translateY(-50%);
  width:38px; height:38px; border:0; border-radius:11px; cursor:pointer; background:transparent; color:var(--muted);
  display:grid; place-items:center; transition:background var(--fast), color var(--fast); }
.mm-pf-pw-eye:hover{ background:color-mix(in srgb,var(--brand-500) 9%,transparent); color:var(--brand-600); }
.mm-pf-pw-eye:focus-visible{ outline:2px solid var(--brand-500); outline-offset:2px; }
.mm-pf-pw-eye span{ display:grid; place-items:center; }
/* fallback: nothing readable stored (pre-existing students) */
.mm-pf-pw-none{ display:flex; align-items:flex-start; gap:9px; padding:13px 14px; border-radius:var(--r-md);
  background:var(--surface-2); box-shadow:0 0 0 1px var(--line);
  font-family:var(--ui); font-size:12.5px; font-weight:600; line-height:1.6; color:var(--ink-soft); }
.mm-pf-pw-none svg{ flex:none; color:var(--muted); margin-top:1px; }

/* security accordion */
.mm-pf-f + .mm-pf-acc{ margin-top:14px; }
.mm-pf-acc{ border-radius:16px; background:var(--surface-2); box-shadow:0 0 0 1px var(--line); overflow:hidden; }
.mm-pf-acc-head{ width:100%; border:0; cursor:pointer; background:transparent; display:flex; align-items:center; gap:12px; padding:13px 14px;
  font-family:var(--ui); text-align:start; color:var(--ink); transition:background var(--fast); }
.mm-pf-acc-head:hover{ background:color-mix(in srgb,var(--brand-500) 5%,var(--surface-2)); }
.mm-pf-acc-ic{ width:34px; height:34px; border-radius:11px; flex:none; display:grid; place-items:center; background:var(--teal-50); color:var(--teal-600); }
:root[data-theme="dark"] .mm-pf-acc-ic{ background:#0e2a26; color:#34BBA3; }
.mm-pf-acc-tt{ flex:1; min-width:0; line-height:1.2; }
.mm-pf-acc-tt b{ display:block; font-size:14px; font-weight:700; color:var(--ink); }
.mm-pf-acc-tt small{ font-size:11.5px; color:var(--muted); }
.mm-pf-acc-cv{ flex:none; color:var(--muted); transition:transform var(--base) var(--ease); }
.mm-pf-acc.is-open .mm-pf-acc-cv{ transform:rotate(180deg); }
.mm-pf-acc-body{ display:none; padding:2px 14px 16px; }
.mm-pf-acc.is-open .mm-pf-acc-body{ display:block; }

/* footer */
.mm-pf-foot{ flex:none; display:flex; flex-direction:column; gap:9px; padding:14px 18px calc(15px + env(safe-area-inset-bottom));
  border-top:1px solid var(--line); background:var(--surface); }
.mm-pf-foot-btns{ display:flex; gap:10px; }
.mm-pf-foot-btns .mm-btn.primary{ flex:1 1 0; }
.mm-pf-foot-btns .mm-btn.ghost{ flex:0 0 auto; min-width:120px; }
.mm-pf-saveerr{ font-family:var(--ui); font-size:12.5px; font-weight:600; color:var(--err); display:flex; align-items:center; gap:6px; }
.mm-pf-saveerr::before{ content:""; width:5px; height:5px; border-radius:9px; background:var(--err); flex:none; }

/* mobile: full-height bottom sheet */
@media (max-width:767px){
  .mm-profile{ inset-inline:0; left:0; right:0; bottom:0; top:auto; width:auto; max-width:none; max-height:94vh;
    border:0; border-radius:22px 22px 0 0; transform:translateY(100%); transition:transform .3s var(--ease); }
  .mm-profile.is-open{ transform:translateY(0); }
  .mm-pf-grip{ display:block; width:40px; height:4px; border-radius:999px; background:var(--line-2); margin:9px auto 0; }
  .mm-pf-head{ padding-top:8px; }
  .mm-pf-grid{ grid-template-columns:1fr; }
}

/* ============================================================
   CERTIFICATES (Phase 6) — approved MCP design. All scoped .mm-cert-*,
   reusing the portal --d-* tokens + .mm-d-card / .mm-phero. No animations.
   ============================================================ */
.mm-cert-root{ display:flex; flex-direction:column; gap:16px; }

/* hero */
.mm-cert-hero-in{ position:relative; z-index:1; display:grid; grid-template-columns:1fr; gap:16px; align-items:center; }
.mm-cert-hero-l{ display:flex; align-items:center; gap:16px; min-width:0; }
.mm-cert-hero-ic{ width:62px; height:62px; border-radius:22px; flex:none; display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,#FCE48B,#E0A400); box-shadow:0 14px 26px -12px rgba(224,164,0,.6); }
.mm-cert-hero-tx{ min-width:0; }
.mm-cert-hero-tx h1{ font-family:var(--display); font-weight:800; font-size:clamp(22px,3vw,30px); letter-spacing:-.02em; line-height:1.15; color:var(--d-ink); margin:0; }
.mm-cert-hero-tx .lead{ margin:5px 0 0; font-size:14px; font-weight:500; color:var(--d-muted); }
.mm-cert-hero-r{ display:flex; align-items:center; gap:14px; justify-content:flex-end; }
.mm-cert-mascot{ width:148px; height:148px; object-fit:contain; flex:none; display:none; filter:drop-shadow(0 14px 22px rgba(120,45,18,.22)); }
.mm-cert-earned{ flex:none; text-align:center; border-radius:18px; padding:14px 18px; background:color-mix(in srgb,var(--d-card) 86%,transparent); box-shadow:0 0 0 1px var(--d-line), var(--d-shadow); }
.mm-cert-earned-ic{ width:36px; height:36px; margin:0 auto 6px; border-radius:12px; display:grid; place-items:center; background:var(--d-brand-50); color:var(--brand-500); }
.mm-cert-earned-v{ font-family:var(--display); font-weight:800; font-size:26px; line-height:1; color:var(--d-ink); }
.mm-cert-earned-l{ margin-top:5px; font-size:10.5px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--d-muted); line-height:1.25; }

/* next certificate */
.mm-cert-next{ position:relative; overflow:hidden; }
.mm-cert-next-in{ position:relative; z-index:1; display:flex; flex-direction:column; gap:14px; }
.mm-cert-next-ic{ width:62px; height:62px; border-radius:22px; flex:none; display:grid; place-items:center; color:#fff;
  background:linear-gradient(135deg,#FFC68C,#F97316); box-shadow:0 14px 26px -12px rgba(249,115,22,.6); }
.mm-cert-next-body{ min-width:0; flex:1; }
.mm-cert-next-top{ display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.mm-cert-next-tag{ font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--d-brand-700); background:var(--d-brand-50); box-shadow:0 0 0 1px var(--d-brand-100); border-radius:999px; padding:3px 10px; }
.mm-cert-next-rem{ font-size:11.5px; font-weight:700; color:var(--d-faint); }
.mm-cert-next-course{ margin-top:7px; font-family:var(--display); font-weight:800; font-size:18px; color:var(--d-ink); }
.mm-cert-next-bar-row{ margin-top:11px; display:flex; align-items:center; gap:12px; }
.mm-cert-next-bar{ flex:1; height:10px; border-radius:999px; background:var(--d-line); overflow:hidden; }
.mm-cert-next-bar > i{ display:block; height:100%; border-radius:999px; background:linear-gradient(90deg,#FFB877,#F97316); }
.mm-cert-next-pct{ flex:none; font-weight:800; font-size:13px; color:var(--d-ink); }
.mm-cert-next-sub{ margin-top:7px; font-size:12px; font-weight:500; color:var(--d-muted); }

/* cards */
.mm-cert-grid{ display:grid; grid-template-columns:1fr; gap:14px; }
.mm-cert-card{ position:relative; overflow:hidden; background:var(--d-card); border-radius:24px; box-shadow:0 0 0 1px var(--d-line), var(--d-shadow); padding:18px;
  transition:transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease; }   /* hover lift, per approved MCP design (.cert-card) — interaction feedback only, no looping animation */
.mm-cert-card:hover{ transform:translateY(-7px); box-shadow:0 0 0 1px var(--d-line), 0 24px 46px -22px rgba(120,45,18,.5); }
:root[data-theme="dark"] .mm-cert-card:hover{ box-shadow:0 0 0 1px var(--d-line), 0 24px 46px -20px rgba(0,0,0,.65); }
@media (prefers-reduced-motion:reduce){ .mm-cert-card{ transition:box-shadow .28s ease; } .mm-cert-card:hover{ transform:none; } }
.mm-cert-card-glow{ position:absolute; top:-48px; inset-inline-end:-48px; width:128px; height:128px; border-radius:50%; background:radial-gradient(circle, var(--glow), transparent 70%); pointer-events:none; }
.mm-cert-card-top{ position:relative; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.mm-cert-ic{ width:56px; height:56px; border-radius:18px; flex:none; display:grid; place-items:center; color:#fff; box-shadow:0 10px 22px -8px rgba(120,45,18,.4); }
.mm-cert-badge{ flex:none; display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:800; color:#047857; background:color-mix(in srgb,#10b981 13%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,#10b981 26%,transparent); border-radius:999px; padding:4px 10px; }
.mm-cert-name{ position:relative; margin-top:15px; font-family:var(--display); font-weight:800; font-size:16px; line-height:1.3; color:var(--d-ink); }
.mm-cert-chip{ position:relative; margin-top:8px; display:inline-flex; align-items:center; gap:5px; font-size:12px; font-weight:800; border-radius:999px; padding:3px 11px; }
.mm-cert-card.lvl-beginner .mm-cert-chip{ color:var(--d-brand-700); background:var(--d-brand-50); box-shadow:0 0 0 1px var(--d-brand-100); }
.mm-cert-card.lvl-bronze   .mm-cert-chip{ color:#A4642B; background:#F6E7D6; box-shadow:0 0 0 1px #E6C9A8; }
.mm-cert-card.lvl-silver   .mm-cert-chip{ color:#64748B; background:#EEF1F6; box-shadow:0 0 0 1px #D4DBE6; }
.mm-cert-card.lvl-gold     .mm-cert-chip{ color:#9A6E08; background:#FBF1CC; box-shadow:0 0 0 1px #F0DA8E; }
.mm-cert-card.lvl-platinum .mm-cert-chip{ color:#5C7C9C; background:#ECF4FB; box-shadow:0 0 0 1px #D2E0EE; }
:root[data-theme="dark"] .mm-cert-card .mm-cert-chip:not(.lvl-beginner *){ background:color-mix(in srgb,currentColor 17%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,currentColor 32%,transparent); }
.mm-cert-meta{ position:relative; margin-top:15px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.mm-cert-meta .end{ text-align:end; }
.mm-cert-meta .k{ display:block; font-size:11.5px; font-weight:700; color:var(--d-faint); }
.mm-cert-meta .v{ display:block; margin-top:2px; font-size:12.5px; font-weight:800; color:var(--d-ink); }
.mm-cert-meta .v.mono{ font-family:ui-monospace,Menlo,monospace; font-size:11.5px; font-weight:700; color:var(--d-ink2); }
.mm-cert-actions{ position:relative; margin-top:16px; display:flex; flex-direction:column; }   /* single primary CTA (full-width) */
.mm-cert-btn{ height:40px; border:0; cursor:pointer; border-radius:13px; font-family:var(--ui); font-weight:700; font-size:12.5px; display:inline-flex; align-items:center; justify-content:center; gap:7px; text-decoration:none; transition:background var(--fast); }
.mm-cert-btn.primary{ color:#fff; background:var(--brand-500); box-shadow:0 10px 20px -10px rgba(249,115,22,.5); }
.mm-cert-btn.primary:hover{ background:var(--brand-600); }
.mm-cert-btn.ghost{ color:var(--d-ink2); background:var(--d-soft2); box-shadow:inset 0 0 0 1px var(--d-line2); }
.mm-cert-btn.ghost:hover{ background:var(--d-soft); }
.mm-cert-empty-ic{ width:54px; height:54px; border-radius:18px; display:grid; place-items:center; margin-bottom:10px; background:var(--d-brand-50); color:var(--brand-500); }

/* responsive */
@media (min-width:768px){
  .mm-cert-root{ gap:20px; }
  .mm-cert-hero-in{ grid-template-columns:1fr auto; }
  .mm-cert-grid{ grid-template-columns:1fr 1fr; }
  .mm-cert-next-in{ flex-direction:row; align-items:center; }
  .mm-cert-mascot{ display:block; }
}
@media (min-width:1100px){ .mm-cert-grid{ grid-template-columns:repeat(4, 1fr); } }
@media (max-width:767px){
  .mm-cert-earned{ flex:1; }
}

/* ============================================================
   PAYMENTS (Phase 7) — finance overview, sub-tabs, expandable
   rows. Reuses .mm-d-card / .mm-empty / .mm-pager. Scoped .mm-pay-*.
   Money figures come from the admin Student-Finance logic (reused).
   ============================================================ */
.mm-pay-hero-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:14px; }
.mm-pay-bal-grid{ margin-top:16px; display:grid; grid-template-columns:minmax(0,300px) 1fr; gap:14px; align-items:stretch; }
@media (max-width:720px){ .mm-pay-bal-grid{ grid-template-columns:1fr; } }

.mm-pay-bal{ border-radius:20px; padding:16px 18px; display:flex; flex-direction:column; justify-content:center; gap:7px;
  box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--brand-500) 16%,transparent); }
.mm-pay-bal.is-owed{ background:var(--d-brand-50); }
.mm-pay-bal.is-settled{ background:color-mix(in srgb,var(--teal-500) 12%,var(--d-card)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--teal-500) 24%,transparent); }
.mm-pay-bal .k{ font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--d-muted); }
.mm-pay-bal .v{ font-family:var(--display); font-size:30px; font-weight:800; line-height:1; color:var(--d-brand-700); }
.mm-pay-bal.is-settled .v{ color:var(--teal-600); }

.mm-pay-badge{ display:inline-flex; align-items:center; gap:5px; font-size:11.5px; font-weight:800; border-radius:999px; padding:3px 11px; }
.mm-pay-badge.warn{ background:color-mix(in srgb,var(--warn) 16%,var(--d-card)); color:var(--warn); }
.mm-pay-badge.ok{ background:color-mix(in srgb,var(--teal-500) 16%,var(--d-card)); color:var(--teal-600); }
.mm-pay-badge.soon{ background:var(--d-soft2); color:var(--d-muted); box-shadow:inset 0 0 0 1px var(--d-line); }

.mm-pay-comp{ border-radius:20px; padding:16px 18px; background:var(--d-card); box-shadow:inset 0 0 0 1px var(--d-line); display:flex; flex-direction:column; justify-content:center; }
.mm-pay-comp .k{ font-size:10.5px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; color:var(--d-muted); }
.mm-pay-bar{ margin-top:12px; height:10px; border-radius:999px; overflow:hidden; display:flex; background:var(--d-soft2); }
.mm-pay-bar i{ height:100%; display:block; }
.mm-pay-bar i.s{ background:var(--brand-500); }
.mm-pay-bar i.k{ background:var(--teal-500); }
.mm-pay-comp-legend{ margin-top:12px; display:grid; grid-template-columns:1fr 1fr; gap:8px; }
@media (max-width:520px){ .mm-pay-comp-legend{ grid-template-columns:1fr; } }
.mm-pay-comp-legend > div{ display:flex; align-items:center; gap:8px; font-size:12px; font-weight:600; color:var(--d-ink2); min-width:0; }
.mm-pay-comp-legend b{ margin-inline-start:auto; font-weight:800; color:var(--d-ink); }
.mm-pay-comp-legend .dot{ width:9px; height:9px; border-radius:50%; flex:none; }
.mm-pay-comp-legend .dot.s{ background:var(--brand-500); }
.mm-pay-comp-legend .dot.k{ background:var(--teal-500); }
.mm-pay-allset{ margin-top:10px; display:flex; align-items:center; gap:8px; font-size:13px; font-weight:700; color:var(--teal-600); }

.mm-pay-kpis{ margin-top:18px; display:grid; grid-template-columns:1fr 1fr; gap:14px; }
@media (max-width:520px){ .mm-pay-kpis{ gap:12px; } }
.mm-pay-kpi .top{ display:flex; align-items:center; gap:10px; }
.mm-pay-kpi .top .ic{ width:34px; height:34px; border-radius:11px; display:grid; place-items:center; flex:none;
  background:color-mix(in srgb,var(--teal-500) 14%,var(--d-card)); color:var(--teal-600); }
.mm-pay-kpi .top .l{ font-size:12.5px; font-weight:800; color:var(--d-ink2); }
.mm-pay-kpi .v{ margin-top:10px; font-family:var(--display); font-size:19px; font-weight:800; color:var(--d-ink); line-height:1; }
.mm-pay-kpi .s{ margin-top:5px; font-size:11.5px; color:var(--d-muted); }
.mm-pay-kpi .top .ic.ok{ background:color-mix(in srgb,var(--ok) 15%,var(--d-card)); color:var(--ok); }
.mm-pay-kpi .top .ic.teal{ background:color-mix(in srgb,var(--teal-500) 14%,var(--d-card)); color:var(--teal-600); }
.mm-pay-kpi .top .ic.brand{ background:var(--d-brand-50); color:var(--d-brand-700); }

/* IA refinement (Phase 7.1): page header · 3-up primary summary · overview band · standalone breakdown */
.mm-pay-summary{ display:grid; grid-template-columns:repeat(4, 1fr); gap:14px; align-items:stretch; }
@media (max-width:900px){ .mm-pay-summary{ grid-template-columns:repeat(2, 1fr); } }
@media (max-width:520px){ .mm-pay-summary{ grid-template-columns:1fr; gap:12px; } }

/* Summary card hover — restores the MCP .fb-card micro-interaction (matches .mm-stat / .mm-fcard) */
.mm-page-payments .mm-pay-kpi{ transition:transform .22s ease, box-shadow .22s ease; }
.mm-page-payments .mm-pay-kpi:hover{ transform:translateY(-3px); box-shadow:0 0 0 1px var(--d-line), 0 16px 34px -20px rgba(120,45,18,.4); }

/* Current Balance — the PRIMARY KPI: tinted bg + ring + stronger number + solid icon + ringed badge */
.mm-pay-kpi.is-balance.is-owed{ background:linear-gradient(135deg, var(--d-brand-50), color-mix(in srgb,var(--d-brand-50) 55%,var(--d-card))); box-shadow:0 0 0 1px color-mix(in srgb,var(--brand-500) 26%,transparent), var(--d-shadow); }
.mm-pay-kpi.is-balance.is-settled{ background:color-mix(in srgb,var(--teal-500) 9%,var(--d-card)); box-shadow:0 0 0 1px color-mix(in srgb,var(--teal-500) 26%,transparent), var(--d-shadow); }
.mm-pay-kpi.is-balance .v{ font-size:26px; }
.mm-pay-kpi.is-balance.is-owed .v{ color:var(--d-brand-700); }
.mm-pay-kpi.is-balance.is-settled .v{ color:var(--teal-600); }
.mm-pay-kpi.is-balance .top .ic{ color:#fff; }
.mm-pay-kpi.is-balance.is-owed .top .ic{ background:var(--brand-500); box-shadow:var(--sh-brand); }
.mm-pay-kpi.is-balance.is-settled .top .ic{ background:var(--teal-500); box-shadow:0 8px 18px -8px color-mix(in srgb,var(--teal-500) 55%,transparent); }
.mm-pay-kpi.is-balance .mm-pay-badge{ box-shadow:inset 0 0 0 1px color-mix(in srgb,currentColor 32%,transparent); }
.mm-page-payments .mm-pay-kpi.is-balance.is-owed:hover{ box-shadow:0 0 0 1px color-mix(in srgb,var(--brand-500) 26%,transparent), 0 16px 34px -20px rgba(120,45,18,.4); }
.mm-page-payments .mm-pay-kpi.is-balance.is-settled:hover{ box-shadow:0 0 0 1px color-mix(in srgb,var(--teal-500) 26%,transparent), 0 16px 34px -20px rgba(120,45,18,.4); }
.mm-pay-summary .mm-pay-kpi{ min-width:0; }
/* Subscription Type holds text, not a number: smaller, wrap-safe, clamped to 2 lines */
.mm-pay-kpi.is-text .v{ font-size:15.5px; line-height:1.25; white-space:normal; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.mm-pay-kpi .v.is-empty{ color:var(--d-muted); font-weight:700; font-size:15px; }

/* Section 2 — current balance, as a compact band inside the orange hero */
.mm-pay-hero{ margin-top:16px; }
.mm-pay-overview{ position:relative; z-index:1; display:flex; align-items:center; justify-content:space-between; gap:14px; flex-wrap:wrap; }
.mm-pay-overview .k{ font-size:10.5px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--d-muted); }
.mm-pay-overview .v{ margin-top:4px; font-family:var(--display); font-size:34px; font-weight:800; line-height:1; }
.mm-pay-overview.is-owed .v{ color:var(--d-brand-700); }
.mm-pay-overview.is-settled .v{ color:var(--teal-600); }

/* Balance breakdown card — spacing comes from the .mm-content 20px gap (portal-consistent) */

/* Section 4 — client-side transactions tabs wrapper + button-based pager (spacing via .mm-content 20px gap) */
.mm-pay-tx .mm-pay-tabs{ margin-top:0; }
.mm-app .mm-pager button.mm-pager-btn{ -webkit-appearance:none; appearance:none; }

.mm-pay-sub-head{ display:flex; align-items:center; gap:10px; }
.mm-pay-sub-head .ic{ width:32px; height:32px; border-radius:10px; display:grid; place-items:center; flex:none; background:var(--d-brand-50); color:var(--d-brand-700); }
.mm-pay-sub-head .mm-pay-badge{ margin-inline-start:auto; }
.mm-pay-sub-note{ margin:11px 0 0; font-size:13px; line-height:1.6; color:var(--d-muted); }
.mm-pay-sub-chips{ margin-top:12px; display:flex; flex-wrap:wrap; gap:8px; }
.mm-pay-sub-chip{ font-size:12px; font-weight:700; color:var(--d-muted); background:var(--d-soft); border-radius:999px; padding:6px 12px; box-shadow:inset 0 0 0 1px var(--d-line); }

.mm-pay-tabs{ margin-top:18px; display:flex; gap:6px; padding:6px; border-radius:18px; background:var(--d-soft); box-shadow:inset 0 0 0 1px var(--d-line); overflow-x:auto; scrollbar-width:none; }
.mm-pay-tabs::-webkit-scrollbar{ display:none; }
.mm-pay-tab{ flex:1; min-width:max-content; display:inline-flex; align-items:center; justify-content:center; gap:8px; height:42px; padding:0 16px; border-radius:13px;
  font-family:var(--ui); font-weight:800; font-size:13px; color:var(--d-muted); text-decoration:none; transition:background var(--fast), color var(--fast); }
.mm-pay-tab:hover{ color:var(--d-ink); }
.mm-pay-tab.on{ background:var(--d-card); color:var(--d-ink); box-shadow:var(--sh-sm); }
.mm-pay-tab-c{ min-width:20px; height:20px; padding:0 6px; border-radius:999px; display:grid; place-items:center; font-size:11px; font-weight:800; background:var(--d-soft2); color:var(--d-muted); }
.mm-pay-tab.on .mm-pay-tab-c{ background:var(--d-brand-50); color:var(--d-brand-700); }

.mm-pay-panel{ margin-top:14px; overflow:hidden; }
.mm-pay-panel-head{ display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:16px 18px; border-bottom:1px solid var(--d-line); }
.mm-pay-panel-head p{ margin:3px 0 0; font-size:12px; color:var(--d-muted); }
.mm-pay-panel-ic{ color:var(--d-faint); flex:none; }
.mm-pay-panel .mm-empty{ margin:18px; }
.mm-pay-panel .mm-pager{ padding:14px 18px; }

.mm-pay-list{ display:flex; flex-direction:column; }
.mm-pay-list > *{ border-bottom:1px solid var(--d-line); }
.mm-pay-list > *:last-child{ border-bottom:0; }

/* flat payment row */
.mm-pay-prow{ display:flex; align-items:center; gap:12px; padding:14px 18px; }
.mm-pay-prow-ic{ width:36px; height:36px; border-radius:11px; display:grid; place-items:center; flex:none; background:color-mix(in srgb,var(--teal-500) 14%,var(--d-card)); color:var(--teal-600); }
.mm-pay-prow-b{ min-width:0; flex:1; }
.mm-pay-prow-b .t{ font-size:13.5px; font-weight:800; color:var(--d-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-pay-prow-b .m{ margin-top:2px; font-size:11.5px; color:var(--d-muted); display:flex; align-items:center; gap:7px; }
.mm-pay-prow-b .m .sep{ color:var(--d-faint); }
.mm-pay-prow-amt{ font-weight:800; font-size:14px; flex:none; }

/* expandable row (package / invoice / buckets) */
.mm-pay-row-head{ width:100%; display:flex; align-items:center; gap:11px; padding:13px 18px; background:transparent; border:0; cursor:pointer;
  text-align:start; font-family:var(--ui); color:var(--d-ink); }
.mm-pay-row-head:hover{ background:var(--d-soft); }
.mm-pay-chev{ color:var(--d-faint); flex:none; transition:transform var(--base) var(--ease); }
.mm-pay-chev.on{ transform:rotate(90deg); }
[dir="rtl"] .mm-pay-chev{ transform:scaleX(-1); }
[dir="rtl"] .mm-pay-chev.on{ transform:scaleX(-1) rotate(90deg); }
.mm-pay-row-ic{ width:36px; height:36px; border-radius:11px; display:grid; place-items:center; flex:none; }
.mm-pay-row-ic.teal{ background:color-mix(in srgb,var(--teal-500) 14%,var(--d-card)); color:var(--teal-600); }
.mm-pay-row-ic.brand{ background:var(--d-brand-50); color:var(--d-brand-700); }
.mm-pay-row-ic.muted{ background:var(--d-soft2); color:var(--d-muted); }
.mm-pay-row-b{ min-width:0; flex:1; display:flex; flex-direction:column; }
.mm-pay-row-b .t{ font-size:13.5px; font-weight:800; color:var(--d-ink); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mm-pay-row-b .m{ margin-top:2px; font-size:11.5px; color:var(--d-muted); }
.mm-pay-pill{ font-size:10.5px; font-weight:800; text-transform:capitalize; color:var(--d-muted); background:var(--d-soft2); border-radius:999px; padding:3px 9px; flex:none; }
.mm-pay-pill.ok{ background:color-mix(in srgb,var(--teal-500) 14%,var(--d-card)); color:var(--teal-600); }
.mm-pay-row-amt{ font-weight:800; font-size:14px; flex:none; }
@media (max-width:560px){ .mm-pay-pill{ display:none; } }

.mm-pay-row-body{ padding:2px 18px 14px; background:var(--d-soft); }
.mm-pay-sub-row{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding:8px 0; border-top:1px solid var(--d-line); font-size:12.5px; }
.mm-pay-sub-row .l{ min-width:0; display:flex; flex-direction:column; gap:2px; }
.mm-pay-sub-row .nm{ font-weight:700; color:var(--d-ink2); }
.mm-pay-sub-row .dt{ font-size:11px; color:var(--d-muted); }
.mm-pay-item{ display:grid; grid-template-columns:1fr auto auto auto; align-items:center; gap:12px; padding:8px 0; border-top:1px solid var(--d-line); font-size:12.5px; }
.mm-pay-item .nm{ font-weight:700; color:var(--d-ink2); min-width:0; overflow:hidden; text-overflow:ellipsis; }
.mm-pay-item .qty, .mm-pay-item .up{ color:var(--d-muted); }
.mm-pay-item .lt{ font-weight:800; color:var(--d-ink); }
@media (max-width:560px){ .mm-pay-item{ grid-template-columns:1fr auto; } .mm-pay-item .qty, .mm-pay-item .up{ display:none; } }
.mm-pay-adj{ margin-top:8px; padding:8px 11px; border-radius:10px; background:var(--d-soft2); font-size:12px; color:var(--d-muted); display:flex; gap:8px; flex-wrap:wrap; }
.mm-pay-adj .sep{ color:var(--d-faint); }
.mm-pay-sub-tot{ margin-top:10px; padding-top:10px; border-top:1px solid var(--d-line); display:flex; align-items:center; justify-content:space-between; font-size:12.5px; color:var(--d-muted); }
.mm-pay-sub-tot b{ color:var(--d-ink); font-size:13.5px; }

/* signed amounts — non-alarming: credit = teal, charge = strong ink (no red) */
.mm-pay-list .is-credit{ color:var(--teal-600); }
.mm-pay-list .is-debt{ color:var(--d-ink); }

/* ---- Online payments: the booking form's payment-method cards (shared partial) ---- */
.mm-pay-methods-head{ display:flex; align-items:center; gap:11px; }
.mm-pay-methods-head .ic{ width:32px; height:32px; border-radius:10px; display:grid; place-items:center; flex:none; background:var(--d-brand-50); color:var(--d-brand-700); }
.mm-pay-methods-head .tt{ min-width:0; flex:1; }
.mm-pay-methods-head .tt p{ margin:2px 0 0; font-size:12px; color:var(--d-muted); }
.mm-pay-online-body{ margin-top:16px; }
/* Wide card: methods on the start side, the "after you pay" WhatsApp step beside them. */
@media (min-width:900px){
  .mm-pay-online-body{ display:grid; grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); column-gap:28px; align-items:start;
    grid-template-areas:"label div" "methods after" "methods send" "methods secure" "methods ."; grid-template-rows:auto auto auto auto 1fr; }
  .mm-pay-online-body > .mm-pay-label{ grid-area:label; }
  .mm-pay-online-body > .mm-pay-methods{ grid-area:methods; }
  .mm-pay-online-body > .mm-pay-div{ grid-area:div; margin:0 0 12px; align-self:end; }
  .mm-pay-online-body > .mm-pay-after{ grid-area:after; }
  .mm-pay-online-body > .mm-pay-send{ grid-area:send; }
  .mm-pay-online-body > .mm-pay-secure{ grid-area:secure; }
  .mm-pay-online-body > .mm-pay-empty{ grid-column:1 / -1; max-width:460px; margin-inline:auto; }
}

/* ---- Renewal warning modal (orange · urgent · NOT an error) ---- */
.mm-renew-back{ position:fixed; inset:0; z-index:90; background:rgba(20,10,4,.55); -webkit-backdrop-filter:blur(3px); backdrop-filter:blur(3px); opacity:0; pointer-events:none; transition:opacity var(--base) var(--ease); }
.mm-renew-back.is-open{ opacity:1; pointer-events:auto; }
.mm-renew{ position:fixed; z-index:91; left:50%; top:50%; width:min(94vw,440px); background:var(--d-card); border-radius:24px; overflow:hidden; box-shadow:var(--sh-lg);
  opacity:0; visibility:hidden; pointer-events:none; transform:translate(-50%,-46%) scale(.97);
  transition:opacity .2s var(--ease), transform .2s var(--ease), visibility 0s linear .2s; }
.mm-renew.is-open{ opacity:1; visibility:visible; pointer-events:auto; transform:translate(-50%,-50%) scale(1); transition:opacity .2s var(--ease), transform .2s var(--ease); }
.mm-renew-glow{ position:absolute; inset:0 0 auto; height:120px; background:radial-gradient(120% 150% at 50% -30%, rgba(249,115,22,.32), transparent 65%); pointer-events:none; }
.mm-renew-in{ position:relative; padding:26px 24px 20px; text-align:center; max-height:min(90vh,780px); overflow-y:auto; }
.mm-renew-ic{ width:60px; height:60px; border-radius:18px; display:grid; place-items:center; margin:0 auto 14px; color:#fff; background:linear-gradient(135deg,#FB923C,#F97316); box-shadow:0 14px 28px -10px rgba(249,115,22,.6); }
.mm-renew-badge{ display:inline-block; font-size:11px; font-weight:800; letter-spacing:.05em; text-transform:uppercase; color:var(--d-brand-700); background:var(--d-brand-50); border-radius:999px; padding:4px 12px; margin-bottom:10px; }
.mm-renew h3{ font-family:var(--display); font-size:20px; font-weight:800; color:var(--d-ink); margin:0 0 8px; }
.mm-renew-msg{ font-size:13.5px; line-height:1.55; color:var(--d-ink2); margin:0 0 12px; }
.mm-renew-next{ display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:700; color:var(--d-brand-700); background:var(--d-brand-50); border-radius:12px; padding:8px 12px; margin-bottom:12px; }
.mm-renew-warn{ font-size:12px; line-height:1.5; color:var(--d-muted); background:var(--d-soft); border-radius:12px; padding:10px 12px; margin:0 0 18px; }
/* Package + renewal-price summary (reuses the modal's --d-* tokens) */
.mm-renew-summary{ text-align:start; background:var(--d-soft); border:1px solid var(--d-line); border-radius:14px; padding:12px 14px; margin:0 0 14px; display:flex; flex-direction:column; gap:8px; }
.mm-renew-row{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; font-size:13px; }
.mm-renew-row .k{ color:var(--d-muted); font-weight:600; flex-shrink:0; }
.mm-renew-row .v{ color:var(--d-ink); font-weight:700; text-align:end; }
.mm-renew-price{ display:flex; align-items:center; justify-content:space-between; gap:12px; padding-top:10px; margin-top:2px; border-top:1px dashed var(--d-line); }
.mm-renew-price .k{ font-size:12.5px; font-weight:700; color:var(--d-ink2); }
.mm-renew-price .v{ line-height:1; white-space:nowrap; }
.mm-renew-price .num{ font-family:var(--display); font-weight:800; font-size:26px; color:var(--d-ink); }
.mm-renew-price .cur{ font-family:var(--display); font-weight:600; font-size:13px; color:var(--d-muted); }
/* Payment methods (shared booking-form component) revealed by the CTA */
.mm-renew-pay{ text-align:start; margin:2px 0 16px; }
.mm-renew-pay .mm-pay-label{ margin-bottom:10px; }
.mm-renew-act{ display:flex; gap:10px; }
.mm-renew-btn{ flex:1; height:46px; border-radius:14px; border:0; cursor:pointer; text-decoration:none; font-family:var(--ui); font-weight:800; font-size:13.5px; display:inline-flex; align-items:center; justify-content:center; gap:8px; }
.mm-renew-btn.ghost{ background:var(--d-soft2); color:var(--d-ink2); box-shadow:inset 0 0 0 1px var(--d-line); }
.mm-renew-btn.ghost:hover{ background:var(--d-soft); }
.mm-renew-btn.primary{ color:#fff; background:var(--brand-500); box-shadow:0 12px 22px -10px rgba(249,115,22,.55); }
.mm-renew-btn.primary:hover{ background:var(--brand-600); }
@media (max-width:520px){
  .mm-renew{ left:0; right:0; bottom:0; top:auto; width:auto; max-width:none; border-radius:22px 22px 0 0; transform:translateY(100%); }
  .mm-renew.is-open{ transform:translateY(0); }
  .mm-renew-act{ flex-direction:column-reverse; }
}

/* ===================== Native app frame (safe areas) =====================
   The Megaminds app (Capacitor, megaminds-app/) draws the portal edge to edge:
   env(safe-area-inset-top) is the status bar / notch, env(safe-area-inset-bottom)
   the home indicator / Android navigation buttons. Two fixed bars in the page's
   own colour sit over those strips so scrolled content never runs under the clock
   or the buttons, and the shell's chrome is pushed clear of them. In a desktop or
   Android browser both insets are 0; iPhone Safari only reports the bottom one
   while its toolbar is collapsed, which gets the same thin bar there. */
html{ --mm-bar-bg:color-mix(in srgb,#ec6420 92%,transparent); }
:root[data-theme="dark"]{ --mm-bar-bg:color-mix(in srgb,#b14c16 92%,transparent); }
html:has(.mm-app){ --mm-bar-bg:color-mix(in srgb,#FDF5EA 92%,transparent); }
:root[data-theme="dark"]:has(.mm-app){ --mm-bar-bg:color-mix(in srgb,#14110D 92%,transparent); }
html::before, html::after{ content:""; position:fixed; inset-inline:0; z-index:45; pointer-events:none;
  background:var(--mm-bar-bg); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
html::before{ top:0; height:env(safe-area-inset-top); }
html::after{ bottom:0; height:env(safe-area-inset-bottom); }
/* .mm-app is its own stacking context, so the bars would sit over the drawer and
   the sheets; while one is open, it (or its backdrop) owns those strips instead. */
html:has(.mm-side.is-open, .mm-acct.is-open, .mm-profile.is-open, .mm-renew.is-open, .mm-confirm-back:not([style*="none"]))::before,
html:has(.mm-side.is-open, .mm-acct.is-open, .mm-profile.is-open, .mm-renew.is-open, .mm-confirm-back:not([style*="none"]))::after{ opacity:0; }
.mm-topbar{ padding-top:env(safe-area-inset-top); }
.mm-page-sessions #sessions, .mm-page-feedback #feedback-history{ scroll-margin-top:calc(80px + env(safe-area-inset-top)); }
@media (max-width:767px){
  .mm-side{ padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
  .mm-content{ padding-bottom:calc(26px + env(safe-area-inset-bottom)); }
  /* a closed bottom sheet sits just below the screen; its upward shadow used to
     leak back in as a grey smudge along the bottom edge */
  .mm-acct:not(.is-open), .mm-profile:not(.is-open){ box-shadow:none; }
}
@media (max-width:520px){ .mm-renew:not(.is-open){ box-shadow:none; } }
