/* =========================================================
   TechLight — Fraud Prevention Course · Shared Styles
   ========================================================= */

/* ---------------------------------------------------------
   RESPONSIVE BREAKPOINT SCALE (single source of truth)
   Apply these consistently to all NEW / edited media queries.
   CSS custom-media isn't natively supported and there's no CSS
   build step, so this lives as a documented legend — not vars.
     phone        ≤480px   single-col, smallest type
     large-phone  ≤600px   grid/form/OTP stacking
     tablet       ≤768px   card-stack tables, drawers
     small-laptop ≤960px   sidebars collapse (legacy uses 900)
   RTL rule: prefer logical props (padding-inline, inset-inline-*,
   text-align:start). Never set overflow-x:hidden on html/body —
   it kills sticky; the body uses overflow-x:clip on purpose.
   --------------------------------------------------------- */

:root {
  --tl-cyan: #2cc1ff;
  --tl-cyan-soft: #7fd9ff;
  --tl-blue: #0d7cd9;
  --tl-deep: #062f6e;
  --tl-ink: #04102b;
  --tl-chrome: #b9d8ee;

  --bg: #03070f;
  --bg-1: #070b18;
  --bg-2: #0c1428;
  --bg-card: rgba(20, 36, 71, 0.42);
  --bg-card-strong: rgba(20, 36, 71, 0.72);

  --border: rgba(140, 180, 255, 0.14);
  --border-strong: rgba(140, 180, 255, 0.32);
  --border-cyan: rgba(44, 193, 255, 0.45);

  --text: #eaf1ff;
  --text-dim: #a3b5d6;
  --text-mute: #6d80a8;

  --warn: #ff4d6d;
  --warn-deep: #b9143d;
  --ok: #29d391;
  --gold: #ffd86b;

  --grad-blue: linear-gradient(135deg, #2cc1ff 0%, #0d7cd9 45%, #062f6e 100%);
  --grad-text: linear-gradient(135deg, #b9e5ff 0%, #2cc1ff 50%, #0d7cd9 100%);
  --grad-warn: linear-gradient(135deg, #ff7a8e 0%, #b9143d 100%);
  --grad-glass: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.01));

  --radius-s: 12px;
  --radius-m: 18px;
  --radius-l: 28px;
  --radius-xl: 36px;

  --shadow-glow: 0 24px 60px -20px rgba(44, 193, 255, 0.45);
  --shadow-soft: 0 18px 40px -12px rgba(4, 16, 43, 0.6);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: 'Heebo', 'Assistant', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* Ambient background painted directly on the root element so it is always
   the deepest paint layer regardless of any stacking-context shenanigans
   downstream. Fixed attachment keeps it locked to the viewport on scroll.
   Desaturated ~60% from the original cyan pull — reads as a sophisticated
   gray-navy with subtle hint of blue rather than a saturated cyan glow. */
html {
  background:
    radial-gradient(80vw 70vh at 50% -10%,  rgba(120,150,180,.22), transparent 65%),
    radial-gradient(70vw 65vh at 100% 50%,  rgba(90,120,160,.20),  transparent 60%),
    radial-gradient(70vw 65vh at 0%   60%,  rgba(90,120,160,.18),  transparent 60%),
    radial-gradient(65vw 60vh at 50% 110%,  rgba(120,150,180,.14), transparent 65%),
    linear-gradient(180deg, #1a1f2c 0%, #131722 35%, #0d1019 70%, #07090f 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}
body { background: transparent; }
/* `overflow-x: hidden` on html/body breaks `position: sticky` for any
   descendant, but `overflow-x: clip` does NOT (it creates no scroll
   container). Clip on BOTH html and body: same horizontal-scroll prevention,
   sticky still works, AND it contains the off-canvas drawers that park just
   past the inline edge (a right-parked fixed drawer would otherwise widen the
   page by its own width). */
html, body { overflow-x: clip; }

body {
  direction: rtl;
  /* 17px on desktop (identical), ~15.5px on phones for readability. */
  font-size: clamp(15px, 1.2vw + 12px, 17px);
  line-height: 1.55;
}

::selection { background: rgba(44, 193, 255, 0.35); color: #fff; }

/* Site-wide canonical scrollbar (matches the admin body.is-app treatment):
   6px, transparent track, translucent-cyan rounded thumb. Intentional
   "hidden bar" strips (.faq-nav, .acct-sidenav) override this via their own
   class selectors (scrollbar-width:none / ::-webkit-scrollbar{display:none})
   which win by specificity, so they stay hidden. */
html { scrollbar-width: thin; scrollbar-color: rgba(44,193,255,.16) transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(44,193,255,.16); border-radius: 10px; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

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

/* =========================================================
   Atmospheric background — global
   ========================================================= */
/* Constant ambient background — base navy + persistent multi-radial wash so
   the page never looks pitch black. Layer order: base color → broad blue wash
   (covers the whole viewport) → corner pools. */
.bg-atmos {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  /* Viewport-proportional radial pools so the cyan ambient scales with the
     display. Absolute-pixel gradients shrank to a center spot on 4K screens
     and the edges went flat black. */
  background:
    radial-gradient(80vw 70vh at 50% -10%,  rgba(44,193,255,.50), transparent 65%),
    radial-gradient(70vw 65vh at 100% 50%,  rgba(13,124,217,.48), transparent 60%),
    radial-gradient(70vw 65vh at 0%   60%,  rgba(13,124,217,.42), transparent 60%),
    radial-gradient(65vw 60vh at 50% 110%,  rgba(44,193,255,.34), transparent 65%),
    linear-gradient(180deg, #102352 0%, #0a1838 30%, #07112a 65%, #050b1e 100%);
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(140,180,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140,180,255,.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 35%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 35%, transparent 85%);
  opacity: .9;
}

/* Floating orbs — gradient-based glow (filter:blur was unreliable at 4K
   sizes; gradient gives the same look with predictable rendering). */
/* Fixed full-viewport clip layer: the orbs deliberately peek in from the
   corners (negative offsets), which previously pushed the page wider than the
   viewport and caused horizontal scroll / cropping on phones. Wrapping them in
   a fixed `overflow:hidden` field clips that bleed at the source — keeping the
   look while leaving genuine content overflow still detectable. */
.orb-field {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: orbFloat 22s ease-in-out infinite;
  will-change: transform;
}
/* Orbs scale with viewport so they stay ambient on 4K displays — at fixed
   px sizes they shrink to dots on wide monitors. */
/* clamp() floors lowered so phones don't get a 640px orb larger than the
   screen (the vw term already exceeds the old floor on desktop, so desktop
   sizing is unchanged). */
.orb-1 {
  width: clamp(280px, 55vw, 1500px); height: clamp(280px, 55vw, 1500px);
  background: radial-gradient(circle, rgba(44,193,255,.55) 0%, rgba(44,193,255,.18) 40%, transparent 70%);
  top: -18vh; right: -12vw;
}
.orb-2 {
  width: clamp(260px, 48vw, 1300px); height: clamp(260px, 48vw, 1300px);
  background: radial-gradient(circle, rgba(13,124,217,.55) 0%, rgba(13,124,217,.16) 42%, transparent 72%);
  top: 30%; left: -14vw; animation-delay: -7s;
}
.orb-3 {
  width: clamp(240px, 42vw, 1180px); height: clamp(240px, 42vw, 1180px);
  background: radial-gradient(circle, rgba(95,211,255,.32) 0%, rgba(95,211,255,.10) 42%, transparent 72%);
  top: 62%; right: -10vw; animation-delay: -14s;
}
/* Lighter, cheaper ambient on phones. */
@media (max-width: 600px) { .orb { opacity: .6; } }

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -40px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

/* =========================================================
   Glass utility
   ========================================================= */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.glass::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-glass);
  pointer-events: none;
  border-radius: inherit;
}
.glass-strong {
  background: var(--bg-card-strong);
  border-color: var(--border-strong);
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 17px;
  border: 1px solid transparent;
  transition: transform .25s cubic-bezier(.2,.7,.3,1.2), box-shadow .25s, background .3s, color .3s, border-color .3s;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.2px;
  background: transparent;
  color: var(--text);
}
.btn-primary {
  background: linear-gradient(135deg, #7fd9ff 0%, #2cc1ff 32%, #1493e0 66%, #0d7cd9 100%);
  color: #04102b;
  font-weight: 800;
  border: 1px solid rgba(127,217,255,.5);
  box-shadow:
    0 12px 30px -10px rgba(44,193,255,.7),
    0 0 22px -6px rgba(127,217,255,.42),
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -2px 7px rgba(6,47,110,.22);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px rgba(44,193,255,.92), 0 0 34px -4px rgba(127,217,255,.6), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 7px rgba(6,47,110,.22); }
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover { background: rgba(44,193,255,.1); border-color: var(--border-cyan); }

.btn-warn {
  background: var(--grad-warn);
  color: #fff;
}

.btn-lg { padding: 20px 40px; font-size: 19px; }
.btn-xl { padding: 22px 48px; font-size: 22px; }

/* =========================================================
   Type
   ========================================================= */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(44,193,255,.08);
  border: 1px solid rgba(44,193,255,.25);
  color: var(--tl-cyan);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
}
.eyebrow.warn { color: var(--warn); background: rgba(255,77,109,.08); border-color: rgba(255,77,109,.3); }
.eyebrow.ok { color: var(--ok); background: rgba(41,211,145,.08); border-color: rgba(41,211,145,.3); }
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.warn-text { color: var(--warn); }
.cyan-text { color: var(--tl-cyan); }
.ok-text { color: var(--ok); }
.dim { color: var(--text-dim); }
.mute { color: var(--text-mute); }

/* =========================================================
   Page transitions — full-screen fade in/out between navigations.
   Gate on `html.has-transition` so non-JS users still see the page.
   The inline script in layout.php sets that class synchronously
   before paint, so we avoid a flash of unstyled body.
   ========================================================= */
html.has-transition body {
  opacity: 0;
  transition: opacity .35s ease;
}
html.has-transition body.is-ready { opacity: 1; }
html.has-transition body.is-leaving {
  opacity: 0;
  transition-duration: .22s;
}
@media (prefers-reduced-motion: reduce) {
  html.has-transition body,
  html.has-transition body.is-leaving {
    opacity: 1 !important;
    transition: none !important;
  }
}

h1, h2, h3, h4 { margin: 0; line-height: 1.1; font-weight: 800; letter-spacing: -.5px; }

.h1 { font-size: clamp(40px, 6vw, 84px); font-weight: 900; line-height: 1; letter-spacing: -1.5px; }
.h2 { font-size: clamp(32px, 4.5vw, 60px); font-weight: 800; line-height: 1.05; letter-spacing: -1px; }
.h3 { font-size: clamp(22px, 2.4vw, 32px); font-weight: 700; }
.h4 { font-size: clamp(18px, 1.6vw, 22px); font-weight: 700; }
.lead { font-size: clamp(18px, 1.6vw, 24px); color: var(--text-dim); line-height: 1.55; font-weight: 400; }

/* =========================================================
   Scroll fade-in
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s cubic-bezier(.2,.65,.25,1), transform .9s cubic-bezier(.2,.65,.25,1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: translateY(0); }

.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }
.reveal-d4 { transition-delay: .32s; }
.reveal-d5 { transition-delay: .40s; }
.reveal-d6 { transition-delay: .48s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .orb { animation: none; }
}

/* =========================================================
   Layout
   ========================================================= */
.container {
  max-width: 1280px;
  margin: 0 auto;
  /* Fluid gutter: hits the 32px max at ≥640px viewport (desktop identical),
     shrinks to 16px on phones so content stops getting cropped. Logical
     property keeps it correct in RTL. */
  padding-inline: clamp(16px, 5vw, 32px);
}
.section { padding: clamp(48px, 9vw, 100px) 0; position: relative; }
.section-tight { padding: clamp(32px, 6vw, 60px) 0; }

/* =========================================================
   Logo lockup
   ========================================================= */
/* =========================================================
   Top navigation — global on every page. Always-on backdrop
   blur (no see-through on scroll), polished link hover with
   underline-sweep, scrolled state tightens the border + glow.
   ========================================================= */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 14px 0;
  background: rgba(7, 11, 24, 0.78);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  border-bottom: 1px solid rgba(255,255,255,.04);
  transition:
    background .35s ease,
    border-color .35s ease,
    box-shadow .35s ease,
    padding .35s ease;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(5, 9, 20, 0.88);
  border-bottom-color: rgba(127,217,255,.18);
  box-shadow:
    0 12px 32px -16px rgba(0,0,0,.6),
    0 0 24px -8px rgba(44,193,255,.18);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: nowrap;
}
.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  flex-wrap: nowrap;
}
.nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-mute);
  border-radius: 999px;
  white-space: nowrap;
  transition:
    color .25s ease,
    background .25s ease,
    transform .25s cubic-bezier(.2,.7,.3,1.2);
  isolation: isolate;
}
/* Underline-sweep: starts at 0 width, expands to ~50% on hover. */
.nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--tl-cyan), transparent);
  transform: translateX(-50%);
  transition: width .35s cubic-bezier(.2,.7,.3,1.2);
}
.nav-link:hover {
  color: var(--text);
  background: rgba(127,217,255,.06);
  transform: translateY(-1px);
}
.nav-link:hover::after { width: 60%; }
.nav-link.active {
  color: var(--tl-cyan);
  background: rgba(44,193,255,.08);
}
.nav-link.active::after { width: 50%; }
.nav-link:focus-visible {
  outline: 2px solid var(--tl-cyan);
  outline-offset: 2px;
}
.nav-cta-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
}

/* ============= Logged-in user menu (<details> dropdown) ============= */
.nav-user {
  position: relative;
}
.nav-user > summary { list-style: none; cursor: pointer; }
.nav-user > summary::-webkit-details-marker { display: none; }
.nav-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border-radius: 100px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(127,217,255,.18);
  color: var(--text-dim);
  font-weight: 600;
  font-size: 14px;
  transition: background .25s ease, border-color .25s ease, color .25s ease;
}
.nav-user[open] .nav-user-toggle,
.nav-user-toggle:hover {
  background: rgba(44,193,255,.08);
  border-color: rgba(127,217,255,.4);
  color: var(--text);
}
.nav-user-toggle svg { transition: transform .3s ease; }
.nav-user[open] .nav-user-toggle svg { transform: rotate(180deg); }
.nav-user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tl-cyan), #0d7cd9);
  color: #04102b;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 900;
  font-size: 12px;
}
.nav-user-menu {
  position: absolute;
  top: calc(100% + 10px);
  /* The toggle sits at the bar's inline-end corner, so anchor the menu there and
     let it open inward. Anchoring to inline-start pushed it off the viewport edge
     in RTL → clipped/"cropped" bottom corner. */
  inset-inline-end: 0;
  inset-inline-start: auto;
  min-width: 240px;
  padding: 8px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01)),
    rgba(7, 11, 24, 0.96);
  border: 1px solid rgba(127,217,255,.22);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 24px 60px -16px rgba(0,0,0,.7), 0 0 32px -10px rgba(44,193,255,.3);
  z-index: 60;
  animation: navUserMenuIn .25s cubic-bezier(.2,.7,.3,1.2);
}
@keyframes navUserMenuIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.nav-user-head {
  padding: 10px 12px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.nav-user-name { font-weight: 800; font-size: 14px; color: var(--text); }
.nav-user-email {
  font-size: 12px; color: var(--text-mute); margin-top: 2px;
  direction: ltr; text-align: right;
}
.nav-user-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, transform .2s cubic-bezier(.2,.7,.3,1.2);
}
.nav-user-item svg { color: var(--text-mute); transition: color .2s ease, transform .25s cubic-bezier(.2,.7,.3,1.4); }
.nav-user-item:hover {
  background: rgba(44,193,255,.08);
  color: var(--text);
  transform: translateX(-2px);
}
.nav-user-item:hover svg { color: var(--tl-cyan); transform: scale(1.1); }
.nav-user-item--danger { color: var(--warn); }
.nav-user-item--danger svg { color: var(--warn); }
.nav-user-item--danger:hover {
  background: rgba(255,77,109,.08);
  color: #ff8a9b;
}
.nav-user-item--danger:hover svg { color: #ff8a9b; }
.nav-user-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}
@media (max-width: 1024px) { .nav-links { display: none; } }

.logo-lockup {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  transition: transform .3s cubic-bezier(.2,.7,.3,1.2), filter .3s ease;
}
.logo-lockup:hover { transform: translateY(-1px); }
.logo-lockup img {
  width: 48px; height: 48px;
  object-fit: contain;
  mix-blend-mode: screen;
  filter:
    brightness(1.2) contrast(1.05)
    drop-shadow(0 0 14px rgba(44,193,255,.55))
    drop-shadow(0 0 28px rgba(44,193,255,.25));
  transition: filter .3s ease;
  /* Asset protection — block dragging & selection. */
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}
.logo-lockup:hover img {
  filter:
    brightness(1.35) contrast(1.05)
    drop-shadow(0 0 18px rgba(44,193,255,.75))
    drop-shadow(0 0 36px rgba(44,193,255,.35));
}
.logo-lockup .wm {
  font-weight: 900;
  letter-spacing: 4px;
  font-size: 21px;
  background: var(--grad-text);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  direction: ltr;
  text-shadow: 0 0 24px rgba(44,193,255,.25);
}

/* =========================================================
   Currency symbol (₪) — globally enforce a visible cyan color
   so it doesn't inherit a parent's `color: transparent` with
   `background-clip: text` (which leaves the glyph rendered with
   a gradient that starts near-black). Reset both background and
   color so the symbol shows everywhere.
   ========================================================= */
.currency {
  background: none !important;
  -webkit-background-clip: initial !important;
          background-clip: initial !important;
  -webkit-text-fill-color: var(--tl-cyan) !important;
  color: var(--tl-cyan) !important;
  text-shadow: 0 0 18px rgba(44,193,255,.35);
}

/* =========================================================
   Lucrative buy buttons (shared mega-button) — globally loaded
   so every page (landing, FAQ, checkout, login, dashboard) renders
   .buy-* CTAs with the same gradient flow + breathing glow +
   shimmer sweep + outer aura ring. Two sizes: large (hero, main,
   final, faq-cta) and compact (nav-buy, sticky).
   ========================================================= */
.buy-hero, .buy-main, .buy-final, .buy-cta, .buy-sticky, .nav-buy {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  white-space: nowrap;       /* never wrap to a second line */
  background:
    linear-gradient(135deg, #7fd9ff 0%, #2cc1ff 28%, #0d7cd9 62%, #062f6e 100%) !important;
  background-size: 250% 250% !important;
  color: #04102b !important;
  box-shadow:
    0 26px 70px -16px rgba(44,193,255,.85),
    0 0 0 1px rgba(127,217,255,.5),
    0 0 30px rgba(127,217,255,.3),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -3px 0 rgba(6,47,110,.32) !important;
  /* Smooth slow gradient flow + property transitions for hover. No discrete
     pulse animation — the prior keyframe-driven box-shadow change was visible
     as a "pop". The shadow is now constant and bright. */
  animation: buyShift 9s ease-in-out infinite;
  transition:
    transform .35s cubic-bezier(.2,.7,.3,1.2),
    box-shadow .45s ease;
  border: none !important;
}
.buy-hero  { padding: 22px 30px !important; font-size: 19px !important; letter-spacing: .3px; }
.buy-main  { padding: 26px 32px !important; font-size: 21px !important; letter-spacing: .3px; }
.buy-final { padding: 26px 36px !important; font-size: 22px !important; letter-spacing: .3px; }
.buy-cta   { padding: 20px 32px !important; font-size: 17px !important; letter-spacing: .2px; }
.buy-sticky, .nav-buy {
  padding: 12px 22px !important;
  font-size: 14px !important;
  box-shadow:
    0 16px 40px -12px rgba(44,193,255,.8),
    0 0 0 1px rgba(127,217,255,.45),
    0 0 20px rgba(127,217,255,.28),
    inset 0 1px 0 rgba(255,255,255,.55),
    inset 0 -2px 0 rgba(6,47,110,.3) !important;
}
@keyframes buyShift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
/* Seamless shimmer — translate a child highlight band rather than
   animating background-position (which is wrap-around-sensitive and can
   visibly pop at the boundary). The band lives off-screen on the right at
   start, travels across, and exits off-screen on the left. Since it's
   absolutely-positioned and overflow-hidden on the parent, the reset from
   off-left → off-right is completely invisible. */
.buy-hero::before, .buy-main::before, .buy-final::before,
.buy-cta::before,  .buy-sticky::before, .nav-buy::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  left: -50%;
  background: linear-gradient(110deg,
    transparent 0%,
    rgba(255,255,255,.4) 45%,
    rgba(255,255,255,.75) 50%,
    rgba(255,255,255,.4) 55%,
    transparent 100%);
  pointer-events: none;
  mix-blend-mode: overlay;
  animation: buyMegaShimmer 7s linear infinite;
  z-index: 1;
  border-radius: inherit;
}
@keyframes buyMegaShimmer {
  0%   { transform: translateX(0); }     /* start off-screen left (-50% offset) */
  100% { transform: translateX(400%); }  /* exit off-screen right */
}
/* Constant soft outer glow — no animated ring (the prior pulsing ring was
   what the user saw as "popping"). */
.buy-hero::after, .buy-main::after, .buy-final::after, .buy-cta::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: linear-gradient(135deg,
    rgba(127,217,255,.4) 0%,
    rgba(44,193,255,.3) 50%,
    rgba(127,217,255,.4) 100%);
  z-index: -1;
  filter: blur(10px);
  opacity: .7;
}
.buy-hero > *, .buy-main > *, .buy-final > *,
.buy-cta > *, .buy-sticky > *, .nav-buy > * {
  position: relative;
  z-index: 2;
}
.buy-hero svg, .buy-main svg, .buy-final svg,
.buy-cta svg, .buy-sticky svg, .nav-buy svg {
  filter: drop-shadow(0 1px 0 rgba(6,47,110,.25));
}
/* Strikethrough "before" price used inside buy buttons — keeps the
   urgency that the user is getting a discount. */
.buy-hero .price-old, .buy-main .price-old, .buy-final .price-old,
.buy-cta .price-old, .buy-sticky .price-old, .nav-buy .price-old {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(6,47,110,.65);
  opacity: .55;
  font-weight: 600;
  font-size: .75em;
  margin: 0 4px;
  vertical-align: middle;
}
.buy-hero:hover, .buy-main:hover, .buy-final:hover, .buy-cta:hover {
  transform: translateY(-3px) scale(1.015);
  box-shadow:
    0 34px 78px -14px rgba(44,193,255,.95),
    0 0 0 1px rgba(127,217,255,.65),
    0 0 50px rgba(127,217,255,.45),
    inset 0 1px 0 rgba(255,255,255,.7),
    inset 0 -3px 0 rgba(6,47,110,.32) !important;
}
.buy-sticky:hover, .nav-buy:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 22px 50px -12px rgba(44,193,255,.95),
    0 0 0 1px rgba(127,217,255,.65),
    0 0 30px rgba(127,217,255,.45),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -2px 0 rgba(6,47,110,.3) !important;
}
@media (prefers-reduced-motion: reduce) {
  .buy-hero, .buy-main, .buy-final, .buy-cta, .buy-sticky, .nav-buy,
  .buy-hero::before, .buy-main::before, .buy-final::before,
  .buy-cta::before, .buy-sticky::before, .nav-buy::before,
  .buy-hero::after, .buy-main::after, .buy-final::after, .buy-cta::after {
    animation: none !important;
  }
}

/* =========================================================
   Glass cards — unified hover system
   Any card that gets the .glass-card class (or qualifies via the
   list below — stat-card, chapter, testimonial, principle, pattern,
   demo-side) shares the same smooth liftoff + cursor-reactive radial
   glow on hover. JS in page-landing.js writes --mx/--my so a soft
   spotlight follows the pointer.
   ========================================================= */
.glass-card,
.stat-card,
.chapter,
.testimonial,
.principle,
.reframe-locks .pattern,
.demo-side {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Stronger glass: deeper blur + saturation + soft inner highlight. */
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  background:
    linear-gradient(135deg, rgba(255,255,255,.035), rgba(255,255,255,.005)),
    rgba(10, 16, 36, 0.55);
  box-shadow:
    0 12px 32px -16px rgba(0,0,0,.6),
    inset 0 1px 0 rgba(255,255,255,.05);
  transition:
    transform   .45s cubic-bezier(.2,.7,.3,1.2),
    border-color .35s ease,
    box-shadow  .45s cubic-bezier(.2,.7,.3,1.2),
    background  .35s ease !important;
  --mx: 50%;
  --my: 50%;
}
/* Cursor-tracked border-glow only (no fill — kept clean per user feedback).
   A masked radial outline follows the pointer along the card's edge. */
.glass-card::after,
.stat-card::after,
.chapter::after,
.testimonial::after,
.principle::after,
.reframe-locks .pattern::after,
.demo-side::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.5px;
  background: radial-gradient(
    300px circle at var(--mx) var(--my),
    rgba(127,217,255,.55),
    transparent 45%
  );
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  z-index: 0;
}
/* Inner content sits above the hover layers. */
.glass-card > *,
.stat-card > *,
.chapter > *,
.testimonial > *,
.principle > *,
.reframe-locks .pattern > *,
.demo-side > * {
  position: relative;
  z-index: 1;
}
.glass-card:hover,
.stat-card:hover,
.chapter:hover,
.testimonial:hover,
.principle:hover,
.reframe-locks .pattern:hover,
.demo-side:hover {
  transform: translateY(-6px);
  border-color: rgba(127,217,255,.35) !important;
  box-shadow:
    0 30px 60px -22px rgba(44,193,255,.55),
    0 1px 0 rgba(255,255,255,.06) inset,
    0 0 0 1px rgba(255,255,255,.04) inset !important;
}
/* Warn-flavored cards (stat-card.warn etc.) inherit the same cyan hover
   treatment as the rest — only their static gradient text stays red, but
   the lift/glow animation is identical across the board. */
.glass-card:hover::after,
.stat-card:hover::after,
.chapter:hover::after,
.testimonial:hover::after,
.principle:hover::after,
.reframe-locks .pattern:hover::after,
.demo-side:hover::after  { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .glass-card, .stat-card, .chapter, .testimonial, .principle,
  .reframe-locks .pattern, .demo-side {
    transition: none !important;
  }
  .glass-card:hover, .stat-card:hover, .chapter:hover, .testimonial:hover,
  .principle:hover, .reframe-locks .pattern:hover, .demo-side:hover {
    transform: none !important;
  }
}

/* =========================================================
   Footer — global so every page (landing, login, checkout,
   FAQ, legal, course panel) renders identically.
   ========================================================= */
.footer {
  position: relative;
  padding: 72px 0 44px;
  border-top: 1px solid rgba(127,217,255,.1);
  color: var(--text-mute);
  font-size: 13px;
  /* Solid opaque base — nothing bleeds through (the buy button used to be
     visible behind it). Subtle cyan ambient pool over the top for depth. */
  background:
    radial-gradient(800px 220px at 50% 100%, rgba(44,193,255,.08), transparent 70%),
    linear-gradient(180deg, rgba(7,11,24,.92), rgba(3,7,15,.98) 60%, #03070f);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  z-index: 1;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}
.footer-brand img { transition: filter .4s ease; }
.footer-brand:hover img { filter: brightness(1.25) drop-shadow(0 0 18px rgba(44,193,255,.55)); }

.footer-links {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.footer-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1px;
  text-decoration: none;
  border-radius: 100px;
  transition:
    color .35s ease,
    background .35s ease,
    transform .35s cubic-bezier(.2,.7,.3,1.2);
  isolation: isolate;
}
.footer-link::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--tl-cyan);
  box-shadow: 0 0 10px rgba(44,193,255,.7);
  opacity: 0;
  transform: scale(0);
  transition: opacity .35s ease, transform .4s cubic-bezier(.2,.7,.3,1.4);
}
.footer-link span { position: relative; display: inline-block; }
.footer-link span::after {
  content: '';
  position: absolute;
  right: 0; bottom: -3px;
  height: 1.5px;
  width: 0;
  background: linear-gradient(90deg, var(--tl-cyan), rgba(127,217,255,.4));
  transition: width .4s cubic-bezier(.2,.7,.3,1.2);
  border-radius: 1px;
}
.footer-link:hover {
  color: var(--text);
  background: rgba(44,193,255,.06);
  transform: translateY(-1px);
}
.footer-link:hover::before { opacity: 1; transform: scale(1); }
.footer-link:hover span::after { width: 100%; }
.footer-link:focus-visible {
  outline: 2px solid var(--tl-cyan);
  outline-offset: 2px;
}

.footer-meta {
  margin-top: 36px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-mute);
  font-size: 12px;
}
.footer-secure {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 100px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: .5px;
  transition: border-color .35s ease, color .35s ease, background .35s ease;
}
.footer-secure:hover {
  border-color: rgba(127,217,255,.35);
  background: rgba(44,193,255,.05);
  color: var(--text-dim);
}
.footer-secure svg { color: var(--ok); }
.footer-secure b {
  color: var(--text-dim);
  font-weight: 800;
  letter-spacing: 1.5px;
}
@media (max-width: 768px) {
  .footer-grid, .footer-meta { justify-content: center; text-align: center; }
  .footer-links { justify-content: center; }
}

/* =========================================================
   Sticky footer (global) — short pages were leaving the
   footer floating mid-viewport. Make <body> a flex column
   and let <main> grow.
   ========================================================= */
html, body { min-height: 100vh; }
body {
  display: flex;
  flex-direction: column;
}
main#main {
  flex: 1 0 auto;
  padding-bottom: clamp(48px, 6vw, 96px);
}
.footer { flex-shrink: 0; }

/* =========================================================
   Variable aliases — earlier auth/checkout pages were
   authored against a different token set. Map them onto the
   live design tokens so existing inline styles render.
   ========================================================= */
:root {
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-7: 32px;
  --sp-8: 40px;
  --sp-9: 56px;

  --accent-cyan:   var(--tl-cyan);
  --accent-blue:   var(--tl-blue);
  --accent-danger: var(--warn);
  --accent-warn:   var(--gold);
  --accent-ok:     var(--ok);

  --text-0: #ffffff;
  --text-1: var(--text);
  --text-2: var(--text-dim);
  --text-3: var(--text-mute);

  --t-xs: 12px;
  --t-sm: 13px;
  --t-md: 15px;
  --t-lg: 17px;
  --t-xl: 22px;
}

/* =========================================================
   Auth / secondary pages — shared shell + card + form
   controls (password change, reset, checkout success/failed).
   Visual language matches login.php's .login-card.
   ========================================================= */
.auth-shell {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 130px 24px 80px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.auth-card {
  width: 100%;
  max-width: min(460px, 100%);
  padding: 44px 40px 36px;
  position: relative;
  z-index: 1;
  border-radius: 24px;
  background:
    radial-gradient(circle at 100% 0%, rgba(44,193,255,.08), transparent 55%),
    rgba(7, 11, 24, 0.82);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(127,217,255,.18);
  box-shadow:
    0 40px 100px -30px rgba(44,193,255,.35),
    0 0 0 1px rgba(255,255,255,.03) inset,
    0 1px 0 rgba(255,255,255,.08) inset;
}
.auth-card__head {
  text-align: center;
  margin-bottom: 24px;
}
.auth-card__icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(44,193,255,.18), rgba(13,124,217,.08));
  border: 1px solid var(--border-cyan);
  color: var(--tl-cyan);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 28px rgba(44,193,255,.3), inset 0 1px 0 rgba(255,255,255,.1);
  animation: authIconPulse 3s ease-in-out infinite;
}
.auth-card__icon svg { width: 26px; height: 26px; }
.auth-card__icon--ok {
  background: linear-gradient(135deg, rgba(41,211,145,.22), rgba(41,211,145,.06));
  border-color: rgba(41,211,145,.45);
  color: var(--ok);
  box-shadow: 0 0 28px rgba(41,211,145,.3);
  animation: authIconPulseOk 3s ease-in-out infinite;
}
.auth-card__icon--danger {
  background: linear-gradient(135deg, rgba(255,77,109,.22), rgba(255,77,109,.06));
  border-color: rgba(255,138,155,.45);
  color: var(--warn);
  box-shadow: 0 0 28px rgba(255,77,109,.3);
  animation: authIconPulseDanger 3s ease-in-out infinite;
}
@keyframes authIconPulse {
  0%, 100% { box-shadow: 0 0 28px rgba(44,193,255,.3), inset 0 1px 0 rgba(255,255,255,.1); }
  50%      { box-shadow: 0 0 40px rgba(44,193,255,.5), inset 0 1px 0 rgba(255,255,255,.1); }
}
@keyframes authIconPulseOk {
  0%, 100% { box-shadow: 0 0 28px rgba(41,211,145,.3); }
  50%      { box-shadow: 0 0 40px rgba(41,211,145,.5); }
}
@keyframes authIconPulseDanger {
  0%, 100% { box-shadow: 0 0 28px rgba(255,77,109,.3); }
  50%      { box-shadow: 0 0 40px rgba(255,77,109,.5); }
}
.auth-card h1 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.5px;
  margin: 0 0 8px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-align: center;
}
.auth-card__sub {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0;
  text-align: center;
  line-height: 1.55;
}
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-submit { margin-top: 8px; }
.auth-cancel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--text-mute);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color .2s ease, background .2s ease;
}
.auth-cancel:hover { color: var(--text); background: rgba(255,255,255,.04); }
.auth-cancel svg { transition: transform .25s cubic-bezier(.2,.7,.3,1.2); }
.auth-cancel:hover svg { transform: translateX(3px); }
[dir="rtl"] .auth-cancel:hover svg { transform: translateX(-3px); }
.auth-card__footer {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--text-mute);
}
.auth-card__footer a {
  color: var(--tl-cyan);
  font-weight: 600;
  transition: color .2s;
}
.auth-card__footer a:hover { color: var(--tl-cyan-soft); }

/* Form field — static label above input. */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: .2px;
}
.input {
  width: 100%;
  padding: 14px 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.input:focus {
  border-color: var(--border-cyan);
  background: rgba(44,193,255,.04);
  box-shadow: 0 0 0 3px rgba(44,193,255,.12);
}
.input.ltr { direction: ltr; text-align: left; }
.input::placeholder { color: var(--text-mute); }

/* Inline alert banner (errors, warnings, success). */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
}
.banner svg { flex-shrink: 0; }
.banner--error   { background: rgba(255,77,109,.08);  border: 1px solid rgba(255,77,109,.3);  color: var(--warn); }
.banner--warning { background: rgba(255,216,107,.08); border: 1px solid rgba(255,216,107,.3); color: var(--gold); }
.banner--ok      { background: rgba(41,211,145,.08);  border: 1px solid rgba(41,211,145,.3);  color: var(--ok); }

/* BEM aliases — pages were authored with double-dash modifiers
   while design.css ships single-dash. Map both. */
.btn--primary {
  background: linear-gradient(135deg, #7fd9ff 0%, #2cc1ff 32%, #1493e0 66%, #0d7cd9 100%);
  color: #04102b;
  font-weight: 800;
  border: 1px solid rgba(127,217,255,.5);
  box-shadow:
    0 12px 30px -10px rgba(44,193,255,.7),
    0 0 22px -6px rgba(127,217,255,.42),
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -2px 7px rgba(6,47,110,.22);
}
.btn--primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.42) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
  pointer-events: none;
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 44px -10px rgba(44,193,255,.92), 0 0 34px -4px rgba(127,217,255,.6), inset 0 1px 0 rgba(255,255,255,.55), inset 0 -2px 7px rgba(6,47,110,.22); }
.btn--primary:hover::after { transform: translateX(120%); }
.btn--ghost {
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255,255,255,.02);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover { background: rgba(44,193,255,.1); border-color: var(--border-cyan); }
.btn--block { width: 100%; }

/* Card entrance animation. */
.anim { animation: cardFadeIn .55s cubic-bezier(.2,.7,.3,1) both; }
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Soft pulsing glow — checkout success/failed icon circles use this. */
@keyframes logoGlow {
  0%, 100% { box-shadow: 0 0 32px rgba(44,193,255,.30); }
  50%      { box-shadow: 0 0 48px rgba(44,193,255,.55); }
}

/* =========================================================
   Utilities — spacing, layout, text helpers used by the
   auth/checkout pages.
   ========================================================= */
.muted { color: var(--text-mute); }
.text-center { text-align: center; }

.flex        { display: flex; }
.flex-center { align-items: center; justify-content: center; }
.grow        { flex: 1 1 0; min-width: 0; }

/* Linear progress bar — used by dashboard course cards. */
.progress {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
}
.progress__bar {
  height: 100%;
  background: linear-gradient(90deg, var(--tl-cyan), var(--tl-blue));
  border-radius: 100px;
  transition: width .6s cubic-bezier(.2,.7,.3,1);
  box-shadow: 0 0 12px rgba(44,193,255,.5);
}

/* Circular progress (progress_arc helper output) */
.progress-arc {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.progress-arc svg {
  transform: rotate(-90deg);
  width: 100%; height: 100%;
}
.progress-arc__track {
  stroke: rgba(140,180,255,.12);
}
.progress-arc__fill {
  stroke: var(--tl-cyan);
  filter: drop-shadow(0 0 4px rgba(44,193,255,.6));
  transition: stroke-dashoffset .8s cubic-bezier(.2,.7,.3,1);
}
.progress-arc__label {
  position: absolute;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

/* Container widths */
.container--wide   { max-width: 1480px; }
.container--narrow { max-width: 760px; }

/* Card hover lift */
.card--hover {
  transition: transform .25s cubic-bezier(.2,.7,.3,1.2), border-color .3s, box-shadow .3s;
}
.card--hover:hover {
  transform: translateY(-3px);
  border-color: rgba(127,217,255,.3);
  box-shadow: 0 28px 60px -28px rgba(44,193,255,.45);
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 24px; }
.mt-6 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 24px; }
.mb-6 { margin-bottom: 32px; }

/* =========================================================
   Admin shell — sidebar + main area. Authored against a
   design system that wasn't wired in; this fills the gap so
   admin pages render with structure instead of raw HTML.
   ========================================================= */
.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

.app-side {
  position: sticky;
  top: 0;
  z-index: 2;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  gap: 20px;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(44,193,255,.07), transparent 60%),
    linear-gradient(180deg, rgba(10,20,48,.92), rgba(4,7,18,.95)),
    rgba(7,11,24,.85);
  border-inline-start: 1px solid rgba(127,217,255,.1);
  backdrop-filter: blur(22px) saturate(150%);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
}

.app-side__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-weight: 900;
  font-size: 15px;
  letter-spacing: .5px;
  text-decoration: none;
  transition: color .2s ease;
}
.app-side__brand:hover { color: var(--tl-cyan); }
.app-side__brand img {
  width: 34px; height: 34px;
  filter: brightness(1.2) drop-shadow(0 0 14px rgba(44,193,255,.55));
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -4px;
  padding: 0 4px;
  scrollbar-width: thin;
}
.app-nav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background .25s ease,
    color .25s ease,
    transform .35s cubic-bezier(.2,.7,.3,1.2),
    box-shadow .35s ease;
  white-space: nowrap;
}
.app-nav a svg {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--text-mute);
  transition: color .2s, transform .35s cubic-bezier(.2,.7,.3,1.4);
}
.app-nav a:hover {
  background: rgba(44,193,255,.06);
  color: var(--text);
  transform: translateX(-2px);
}
[dir="ltr"] .app-nav a:hover { transform: translateX(2px); }
.app-nav a:hover svg { color: var(--tl-cyan); transform: scale(1.08); }

.app-nav a.is-active {
  color: #04102b;
  background: linear-gradient(135deg, #7fd9ff 0%, #2cc1ff 50%, #0d7cd9 100%);
  box-shadow:
    0 14px 30px -14px rgba(44,193,255,.65),
    inset 0 1px 0 rgba(255,255,255,.45),
    inset 0 -2px 0 rgba(6,47,110,.3);
  transform: translateX(0);
}
.app-nav a.is-active:hover { color: #04102b; transform: translateX(0); }
.app-nav a.is-active svg { color: #04102b; transform: scale(1); }

.app-side__footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
}
.app-side__footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--text-mute);
  text-decoration: none;
  transition: background .25s ease, color .25s ease;
}
.app-side__footer a:hover { color: var(--text); background: rgba(44,193,255,.06); }
.app-side__footer svg { width: 13px; height: 13px; flex-shrink: 0; }

.app-main {
  padding: 36px clamp(24px, 4vw, 56px) 60px;
  position: relative;
  z-index: 0;
  min-width: 0;
}
.app-main > h1,
.app-main > h2:first-child {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--text);
}
.app-main .container { padding: 0; max-width: none; }

/* ≤1024px: the 264px sidebar becomes an off-canvas drawer (slides from the
   inline-start edge — right in RTL) toggled by the admin burger. Replaces the
   old horizontal-scroll strip, which was awkward with 9 destinations. */
@media (max-width: 1024px) {
  .app-shell { grid-template-columns: 1fr; }
  .app-side {
    position: fixed;
    inset-block: 0;
    inset-inline-start: 0;
    z-index: 70;
    width: min(84vw, 300px);
    max-height: none;
    height: 100%;
    flex-direction: column;
    gap: 18px;
    padding: 20px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border-inline-start: 0;
    border-inline-end: 1px solid rgba(127,217,255,.14);
    box-shadow: 24px 0 60px -20px rgba(0,0,0,.7);
    transform: translateX(100%);              /* RTL: parked off the right edge */
    transition: transform .32s cubic-bezier(.2,.7,.3,1.2);
  }
  [dir="ltr"] .app-side { transform: translateX(-100%); box-shadow: -24px 0 60px -20px rgba(0,0,0,.7); }
  .app-side.is-open { transform: translateX(0); }
  .app-nav { flex-direction: column; overflow-y: auto; flex: 1; }
  .app-side__footer { flex-direction: column; padding-top: 14px; }

  /* Burger + scrim only exist on mobile/tablet. */
  .app-burger { display: inline-flex; }
  .app-main { padding-top: 76px; }            /* room for the fixed burger bar */
}

/* =========================================================
   Admin pages — kpi cards, section cards, tables, pills,
   form rows, empty states, dropzones. Visual language
   inherits from landing.php: glass cards, cyan accents,
   gradient text on titles.
   ========================================================= */
.app-main__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.app-main__header > div.muted,
.app-main__header > p.muted { margin: 4px 0 0; }
.app-main__title {
  margin: 0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.5px;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* KPI grid */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.kpi {
  position: relative;
  padding: 22px 24px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0%, rgba(44,193,255,.10), transparent 60%),
    rgba(10,16,32,.78);
  border: 1px solid rgba(127,217,255,.18);
  box-shadow:
    0 20px 44px -22px rgba(4,16,43,.7),
    inset 0 1px 0 rgba(255,255,255,.05);
  animation-delay: var(--delay, 0s);
  overflow: hidden;
  transition:
    border-color .35s ease,
    transform .45s cubic-bezier(.2,.7,.3,1.2),
    box-shadow .45s cubic-bezier(.2,.7,.3,1.2);
}
.kpi:hover {
  border-color: rgba(127,217,255,.4);
  transform: translateY(-3px);
  box-shadow:
    0 30px 60px -22px rgba(44,193,255,.5),
    inset 0 1px 0 rgba(255,255,255,.07);
}
.kpi::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,50%), rgba(127,217,255,.18), transparent 50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .5s ease;
}
.kpi:hover::before { opacity: 1; }
.kpi__label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-mute);
  letter-spacing: 1px;
  text-transform: uppercase;
  position: relative;
}
.kpi__value {
  margin-top: 8px;
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -.6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;   /* a money KPI like "₪ 64,342.63" must stay on one line */
  background: linear-gradient(135deg, #ffffff 0%, #d6f1ff 60%, #2cc1ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
}
.kpi__delta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-dim);
  position: relative;
}
.kpi .sparkline {
  position: absolute;
  inset-inline-end: 18px;
  bottom: 16px;
  width: 96px;
  height: 38px;
  opacity: .9;
  pointer-events: none;
}

/* Sections */
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 18px;
}
.admin-section {
  padding: 24px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(13,124,217,.06), transparent 55%),
    rgba(10,16,32,.82);
  border: 1px solid rgba(127,217,255,.14);
  box-shadow:
    0 24px 56px -28px rgba(4,16,43,.7),
    inset 0 1px 0 rgba(255,255,255,.03);
  animation-delay: var(--delay, 0s);
  transition: border-color .35s ease, box-shadow .45s cubic-bezier(.2,.7,.3,1.2);
}
.admin-section:hover {
  border-color: rgba(127,217,255,.3);
  box-shadow:
    0 30px 64px -24px rgba(44,193,255,.35),
    inset 0 1px 0 rgba(255,255,255,.05);
}
/* Uniform breathing room between TOP-LEVEL stacked admin blocks (dashboard,
   list/detail pages, settings tabs that sit directly in the main column).
   Scoped to .app-main's DIRECT children on purpose: section columns living
   inside .admin-grid / .editor-grid and the tabbed settings form keep their
   own tighter grid gaps and are NOT pushed apart by this. Adjacent block
   margins collapse, so a legacy bottom/top margin on a neighbour just settles
   on the larger value — never a doubled gap. This is the single source of truth
   for section separation; pages no longer need ad-hoc margins between sections. */
.app-main > .admin-section + .admin-section,
.app-main > .admin-grid    + .admin-section,
.app-main > .admin-section + .admin-grid,
.app-main > .admin-grid    + .admin-grid {
  margin-top: 28px;
}
.admin-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 18px;
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -.2px;
}
.admin-section__title a {
  color: var(--tl-cyan);
  font-weight: 700;
  font-size: 12px;
  transition: color .2s, transform .2s;
  text-decoration: none;
}
.admin-section__title a:hover { color: var(--tl-cyan-soft); transform: translateX(-2px); }
[dir="ltr"] .admin-section__title a:hover { transform: translateX(2px); }

/* Tables */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.table thead th {
  text-align: start;
  padding: 10px 12px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-mute);
  letter-spacing: .8px;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: rgba(255,255,255,.015);
}
.table tbody td {
  padding: 12px;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(140,180,255,.06);
  vertical-align: middle;
  transition: background .25s ease;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(44,193,255,.04); color: var(--text); }
.table .actor { color: var(--text); font-weight: 600; }
.table .action {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  color: var(--tl-cyan);
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(44,193,255,.08);
  border: 1px solid rgba(127,217,255,.22);
  display: inline-block;
}
.table .payload { color: var(--text-mute); font-size: 11px; font-family: 'JetBrains Mono', ui-monospace, monospace; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Translations table */
.translations-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.translations-table th { text-align: start; padding: 10px 12px; color: var(--text-mute); font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; border-bottom: 1px solid var(--border); }
.translations-table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid rgba(140,180,255,.06); }
.translations-table .t-key { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text); white-space: nowrap; }
.translations-table .t-input { width: 100%; }
.translations-table .t-val { color: var(--text-dim); }
.translations-table .t-missing { background: rgba(255,216,107,.04); }
.translations-table .t-missing .t-val { color: var(--gold); }

/* Lesson rows (admin/courses sortable list) */
.lesson-row {
  display: grid;
  grid-template-columns: auto 60px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(20,36,71,.32);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: background .2s, border-color .2s, transform .15s;
}
.lesson-row:hover { background: rgba(44,193,255,.05); border-color: rgba(127,217,255,.25); }
.lesson-row__drag { cursor: grab; color: var(--text-mute); user-select: none; }
.lesson-row__drag:active { cursor: grabbing; }
.lesson-row__pos { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-mute); }
.lesson-row__title { color: var(--text); font-weight: 500; }
.lesson-row .badge-free { display: inline-block; margin-inline-start: 8px; padding: 2px 8px; border-radius: 100px; background: rgba(41,211,145,.12); border: 1px solid rgba(41,211,145,.3); color: var(--ok); font-size: 10px; font-weight: 700; letter-spacing: .5px; }

/* Pills (status, role badges) */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .3px;
  white-space: nowrap;
}
.pill--ok   { background: rgba(41,211,145,.12);  border: 1px solid rgba(41,211,145,.3);  color: var(--ok); }
.pill--warn { background: rgba(255,216,107,.10); border: 1px solid rgba(255,216,107,.35); color: var(--gold); }
.pill--bad  { background: rgba(255,77,109,.10);  border: 1px solid rgba(255,77,109,.35);  color: var(--warn); }
.pill--info { background: rgba(44,193,255,.10);  border: 1px solid rgba(127,217,255,.32); color: var(--tl-cyan); }

/* Form row layouts (admin forms) */
.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.items-center { align-items: center; }
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  font-size: 14px;
}
.checkbox-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--tl-cyan); flex-shrink: 0; }

.textarea,
textarea.input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  resize: vertical;
  min-height: 100px;
  transition: border-color .2s, background .2s;
}
.textarea:focus,
textarea.input:focus { border-color: var(--border-cyan); background: rgba(44,193,255,.04); }

.select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color .2s, background .2s;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-mute) 50%), linear-gradient(135deg, var(--text-mute) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 32px;
}
[dir="rtl"] .select {
  background-position: 18px 50%, 13px 50%;
  padding-inline-end: 16px;
  padding-inline-start: 32px;
}
.select:focus { border-color: var(--border-cyan); background-color: rgba(44,193,255,.04); }

/* =========================================================
   Unified input hover — EVERY text field / textarea / select across the CMS
   highlights its border cyan on hover, matching .tl-select__trigger:hover (the
   reference). Lighter than :focus (border only, no ring/fill); :focus still
   owns the active look via :not(:focus). Covers the shared form components
   (.input/.textarea/.select — admin, account, auth) AND the floating-label
   field wrappers (.fld — cart, checkout, contact) and the notes composer.
   ========================================================= */
.input:hover:not(:focus),
textarea.input:hover:not(:focus),
.textarea:hover:not(:focus),
.select:hover:not(:focus),
.fld input:hover:not(:focus),
.fld select:hover:not(:focus),
.fld textarea:hover:not(:focus),
.compose-textarea:hover:not(:focus) {
  border-color: var(--border-cyan);
}

/* =========================================================
   Custom select — progressive enhancement of a native <select>
   inside [data-tl-select]. Ported from mdshare's glass dropdown,
   recolored to the TechLight cyan theme. JS: assets/js/tl-select.js
   (the menu is portaled to <body> so card overflow can't clip it).
   ========================================================= */
.tl-select { position: relative; }
.tl-select > select { /* hidden once JS builds the trigger; still submits */ }
.tl-select.is-enhanced > select {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); border: 0; opacity: 0; pointer-events: none;
}
.tl-select__trigger {
  display: none;
  width: 100%; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,.025);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit; font-size: 14px;
  cursor: pointer; text-align: start;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.tl-select.is-enhanced > .tl-select__trigger { display: flex; }
.tl-select__trigger:hover { border-color: var(--border-cyan); }
.tl-select.is-open > .tl-select__trigger,
.tl-select__trigger:focus-visible {
  border-color: var(--border-cyan);
  background: rgba(44,193,255,.04);
  box-shadow: 0 0 0 3px rgba(44,193,255,.12);
  outline: none;
}
.tl-select__value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-select__chev { flex: none; color: var(--text-mute); transition: transform .25s ease; }
.tl-select.is-open .tl-select__chev { transform: rotate(180deg); }

.tl-select__menu {
  position: fixed; z-index: 1000;
  background: linear-gradient(135deg, rgba(255,255,255,.04), rgba(255,255,255,.01)), rgba(10,16,36,.94);
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--border-strong, rgba(255,255,255,.1));
  border-radius: 12px;
  padding: 5px;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 24px 56px rgba(0,0,0,.55);
  max-height: 280px; overflow-y: auto;
  opacity: 0; transform: translateY(-6px) scale(.985); transform-origin: top center;
  transition: opacity .14s ease, transform .14s ease;
  pointer-events: none;
}
.tl-select__menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.tl-select__option {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 11px;
  font-family: inherit; font-size: 14px; text-align: start;
  border: 0; border-radius: 8px; background: transparent;
  color: var(--text-dim); cursor: pointer;
  transition: background .12s, color .12s;
}
.tl-select__option:hover,
.tl-select__option.is-active { background: rgba(255,255,255,.05); color: var(--text); }
.tl-select__option.is-selected { background: rgba(44,193,255,.1); color: var(--text); }
.tl-select__check { margin-inline-start: auto; flex: none; color: var(--tl-cyan); opacity: 0; }
.tl-select__option.is-selected .tl-select__check { opacity: 1; }

.code-editor {
  width: 100%;
  min-height: 280px;
  padding: 14px 16px;
  background: #050914;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
  resize: vertical;
  transition: border-color .2s;
}
.code-editor:focus { border-color: var(--border-cyan); }

/* Email preview — dark-glass chrome wrapping a neutral email canvas. */
.email-preview { display: flex; flex-direction: column; gap: 12px; }
.email-preview__device {
  display: flex; flex-direction: column;
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--border); background: #0b0f1c;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.email-preview__bar {
  display: flex; align-items: center; gap: 7px; padding: 10px 14px;
  background: linear-gradient(180deg, rgba(20,30,60,.95), rgba(12,18,37,.95));
  border-bottom: 1px solid var(--border);
}
.email-preview__dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.18); }
.email-preview__dot:nth-child(1) { background: #ff5f57; }
.email-preview__dot:nth-child(2) { background: #febc2e; }
.email-preview__dot:nth-child(3) { background: #28c840; }
.email-preview__meta {
  padding: 12px 16px; background: rgba(8,12,26,.92);
  border-bottom: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.email-preview__from {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: var(--t-xs, 12px); color: var(--text-mute, #93a1c2);
}
.email-preview__from-name { color: var(--text-dim, #c4cee6); font-weight: 600; }
.email-preview__from-addr { font-family: 'JetBrains Mono', ui-monospace, monospace; opacity: .85; }
.email-preview__subject {
  font-size: 15px; font-weight: 700; line-height: 1.35;
  color: var(--text, #f0f3fb); overflow-wrap: anywhere;
}
.email-preview__canvas {
  background: #f3f4f7; padding: 20px;
  max-height: 70vh; overflow: auto; -webkit-overflow-scrolling: touch;
}
.email-preview__frame {
  display: block; width: 100%; max-width: 600px; margin: 0 auto;
  min-height: 280px; border: 0; border-radius: 8px;
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12);
}
@media (max-width: 1024px) { .email-preview__canvas { max-height: 60vh; } }

/* Editor grid (forms with main + side panel) */
.editor-grid {
  display: grid;
  /* Side column is minmax(0,420px) so it shrinks instead of forcing the grid
     wider than its container (the ~420px fixed track was overflowing at
     768–1024px once the admin sidebar ate into the viewport). Desktop still
     renders the full 420px side panel whenever there's room. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  gap: 18px;
  align-items: start;
}
/* Collapse to a single column early enough that the side panel never
   competes with the main form on tablets. */
@media (max-width: 1024px) { .editor-grid { grid-template-columns: 1fr; } }

/* Dropzone (uploads) */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 28px;
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  background: rgba(44,193,255,.03);
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.dropzone:hover, .dropzone.is-drag {
  border-color: var(--border-cyan);
  background: rgba(44,193,255,.07);
}
.dropzone__icon { color: var(--tl-cyan); width: 32px; height: 32px; }
.dropzone__title { color: var(--text); font-weight: 700; font-size: 14px; }
.dropzone__hint { color: var(--text-mute); font-size: 12px; }

/* Empty states */
.empty {
  padding: 56px 32px;
  text-align: center;
  border-radius: 18px;
  background: rgba(10,16,32,.5);
  border: 1px dashed var(--border);
}
.empty__icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(44,193,255,.08);
  border: 1px solid rgba(127,217,255,.25);
  color: var(--tl-cyan);
}
.empty__title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.empty p, .empty + p { color: var(--text-mute); font-size: 13px; }

/* Text utilities used by admin */
.text-mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
/* A single atomic value (money "₪ 648.05", a date "2026-02-03 13:37", an id) must never wrap
   mid-value onto a second line — it's ugly. Keep mono values on one line; a too-narrow cell
   scrolls inside its .table-scroll instead. EXCEPTION: long tokens (uuid / low-profile id /
   tax id) carry an explicit inline overflow-wrap and are allowed to break as before. */
.text-mono { white-space: nowrap; }
.text-mono[style*="overflow-wrap"], .text-mono.is-wrap { white-space: normal; }
.text-ltr  { direction: ltr; text-align: start; unicode-bidi: isolate; }

/* Banner success variant (admin flash) */
.banner--success { background: rgba(41,211,145,.08); border: 1px solid rgba(41,211,145,.3); color: var(--ok); }

/* =====================================================================
   ADMIN · darkSite ("Serverlands") skin — SCOPED to body.is-app ONLY.
   The admin shell sets <body class="is-app">; the public RTL site never
   has it, so this re-skins ONLY the admin. Mostly a design-token remap
   (the admin CSS is token-driven), plus the signature gradient-border
   glass halo, the missing button variants, and an ambient backdrop.
   Font stays Heebo — the admin is Hebrew/RTL.
   ===================================================================== */
body.is-app {
  /* periwinkle-blue + teal accents, richer status palette */
  --tl-cyan: #2cc1ff;
  --tl-cyan-soft: #7fd9ff;
  --tl-blue: #0d7cd9;
  --tl-deep: #062f6e;
  --tl-ink: #050810;
  /* surfaces */
  --bg: #050810;
  --bg-1: #080c1a;
  --bg-2: #0c1225;
  --bg-card: rgba(12,18,37,.65);
  --bg-card-strong: rgba(20,30,60,.92);
  /* borders */
  --border: rgba(255,255,255,.05);
  --border-strong: rgba(44,193,255,.18);
  --border-cyan: rgba(44,193,255,.30);
  /* text — brightened for readability (the darkSite muted tones were too dim) */
  --text: #f0f3fb;
  --text-dim: #c4cee6;
  --text-mute: #93a1c2;
  /* status */
  --ok: #c3e88d;
  --gold: #ffcb6b;
  --warn: #ff5370;
  /* gradients */
  --grad-blue: linear-gradient(135deg,#2cc1ff,#0d7cd9);
  --grad-text: linear-gradient(135deg,#2cc1ff 0%,#7fd9ff 50%,#c792ea 100%);
  /* shape + glow */
  --radius-m: 14px;
  --radius-l: 20px;
  --radius-xl: 28px;
  --shadow-glow: 0 0 30px rgba(44,193,255,.10);
  --accent-purple: #c792ea;
  --accent-coral: #f78c6c;
  --radius-s: 10px;
  --grad-halo: linear-gradient(135deg,#2cc1ff,#7fd9ff,#c792ea);
  --ease-out-expo: cubic-bezier(.16,1,.3,1);
  --transition-fast: .2s cubic-bezier(.4,0,.2,1);
  --transition-smooth: .5s cubic-bezier(.16,1,.3,1);
  --sidebar-width: 264px;
}

/* signature gradient-border halo + lift on cards */
body.is-app .admin-section,
body.is-app .kpi,
body.is-app .card,
body.is-app .raw-panel {
  transition: border-color .5s ease-in-out, background .5s ease-in-out, box-shadow .5s ease-in-out, transform .45s cubic-bezier(.2,.7,.3,1);
}
body.is-app .admin-section::after,
body.is-app .kpi::after,
body.is-app .card::after {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: var(--grad-halo);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
  opacity: 0; transition: opacity .5s ease-in-out; z-index: 0;
}
body.is-app .admin-section::before,
body.is-app .kpi::before,
body.is-app .card::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(44,193,255,.07), transparent 70%);
  opacity: 0; transition: opacity .5s ease-in-out;
}
body.is-app .admin-section, body.is-app .kpi, body.is-app .card { position: relative; }
body.is-app .admin-section:hover, body.is-app .kpi:hover, body.is-app .card:hover {
  transform: translateY(-2px); border-color: rgba(44,193,255,.25); box-shadow: var(--shadow-glow);
}
body.is-app .admin-section:hover::after, body.is-app .kpi:hover::after, body.is-app .card:hover::after { opacity: .6; }
body.is-app .admin-section:hover::before, body.is-app .kpi:hover::before, body.is-app .card:hover::before { opacity: 1; }

/* buttons — add the variants the markup uses but design.css never defined
   (.btn--sm/.btn--danger/.btn--subtle), and darkSite-ify primary/ghost */
body.is-app .btn { border-radius: 10px; padding: 10px 22px; font-size: 14px; font-weight: 600; transition: all .3s ease; }
body.is-app .btn--sm { padding: 7px 14px; font-size: 13px; border-radius: 9px; }
body.is-app .btn--primary { background: var(--grad-blue); color: #050810; box-shadow: 0 0 12px rgba(44,193,255,.12); }
body.is-app .btn--primary:hover { transform: translateY(-1px); box-shadow: 0 6px 22px rgba(44,193,255,.32); color: #050810; }
body.is-app .btn--ghost { background: rgba(44,193,255,.05); color: var(--text-dim); border: 1px solid rgba(44,193,255,.10); }
body.is-app .btn--ghost:hover { background: rgba(44,193,255,.10); color: var(--text); border-color: rgba(44,193,255,.22); }
body.is-app .btn--subtle { background: rgba(255,255,255,.03); color: var(--text-dim); border: 1px solid var(--border); padding: 7px 14px; font-size: 13px; border-radius: 9px; }
body.is-app .btn--subtle:hover { color: var(--text); border-color: var(--border-strong); }
body.is-app .btn--danger { background: rgba(255,83,112,.08); color: #ff5370; border: 1px solid rgba(255,83,112,.18); padding: 7px 14px; font-size: 13px; border-radius: 9px; }
body.is-app .btn--danger:hover { background: rgba(255,83,112,.16); }

/* sidebar active chip = darkSite blue→teal */
body.is-app .app-nav a.is-active { background: linear-gradient(135deg,#2cc1ff,#0d7cd9); color: #050810; box-shadow: 0 4px 18px rgba(44,193,255,.28); }

/* slimmer cool scrollbar */
body.is-app ::-webkit-scrollbar { width: 6px; height: 6px; }
body.is-app ::-webkit-scrollbar-thumb { background: rgba(44,193,255,.16); border-radius: 10px; }

/* ===== Course Curriculum (darkSite-style builder) ===== */
body.is-app .cd-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:4px 0 16px; }
body.is-app .cd-toolbar__title { font-size:16px; font-weight:800; color:var(--text); }
body.is-app .cd-curriculum { display:flex; flex-direction:column; gap:12px; }
body.is-app .cd-chapter { border:1px solid var(--border); border-radius:14px; overflow:hidden; background:rgba(255,255,255,.012); transition:border-color .4s ease, box-shadow .4s ease; }
body.is-app .cd-chapter:hover { border-color:rgba(44,193,255,.16); box-shadow:0 0 22px rgba(44,193,255,.05); }
body.is-app .cd-chapter__header { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:13px 18px; background:rgba(44,193,255,.05); border-bottom:1px solid var(--border); }
body.is-app .cd-chapter__info { display:flex; align-items:center; gap:10px; flex-wrap:wrap; min-width:0; }
body.is-app .cd-chapter__num { font-family:'JetBrains Mono',monospace; font-size:11px; font-weight:700; color:var(--tl-cyan); background:rgba(44,193,255,.12); padding:3px 9px; border-radius:6px; }
body.is-app .cd-chapter__title { font-weight:700; color:var(--text); font-size:15px; }
body.is-app .cd-chapter__meta { font-size:12px; color:var(--text-mute); }
body.is-app .cd-chapter__actions { display:flex; gap:6px; flex-shrink:0; }
body.is-app .cd-lessons { padding:4px 0; overflow:hidden; max-height:2000px; opacity:1; transition:max-height .42s cubic-bezier(.4,0,.2,1), opacity .3s ease, padding .42s ease; }
body.is-app .cd-lesson { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:9px 24px 9px 16px; border-bottom:1px solid rgba(44,193,255,.05); transition:background .2s ease; }
body.is-app .cd-lesson:last-child { border-bottom:none; }
body.is-app .cd-lesson:hover { background:rgba(44,193,255,.05); }
body.is-app .cd-lesson.dragging { opacity:.4; }
body.is-app .cd-lesson__info { display:flex; align-items:center; gap:9px; min-width:0; flex:1; }
body.is-app .cd-lesson__drag { cursor:grab; color:var(--text-mute); font-size:14px; flex-shrink:0; }
body.is-app .cd-lesson__num { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text-mute); min-width:34px; }
body.is-app .cd-lesson__icon { color:var(--text-mute); display:inline-flex; flex-shrink:0; }
body.is-app .cd-lesson__title { font-size:14px; color:var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.is-app .cd-lesson__right { display:flex; align-items:center; gap:7px; flex-shrink:0; }
body.is-app .cd-lesson__duration { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text-dim); }
body.is-app .btn--xs { padding:3px 9px; font-size:11px; border-radius:7px; line-height:1.4; }
body.is-app .badge { display:inline-flex; align-items:center; font-size:10px; font-weight:700; font-family:'JetBrains Mono',monospace; padding:2px 9px; border-radius:100px; }
body.is-app .badge--cyan { background:rgba(127,219,202,.14); color:#0d7cd9; border:1px solid rgba(127,219,202,.22); }
body.is-app .badge--type { background:rgba(44,193,255,.10); color:var(--text-dim); border:1px solid var(--border); }

/* ===== Tables: centered, readable, RTL-aligned, clean full-row hover ===== */
body.is-app .table { width:100%; border-collapse:collapse; }
body.is-app .table th { text-align:center; padding:13px 18px; font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:1px; color:var(--text-mute); border-bottom:1px solid var(--border); white-space:nowrap; background:transparent; }
body.is-app .table td { padding:14px 18px; font-size:14px; color:var(--text-dim); border:none; border-bottom:1px solid rgba(44,193,255,.06); border-radius:0; text-align:center; vertical-align:middle; }
/* full-row highlight (every cell gets the same bg → one clean band, no floating boxes) */
body.is-app .table tbody tr { transition: background .18s ease; }
body.is-app .table tbody tr:hover td { background:rgba(44,193,255,.07); }
body.is-app .table tr:last-child td { border-bottom:none; }
/* Cells MUST stay table cells. A content/helper class (.text-mono, .text-ltr, .action…)
   landing on a <td> previously collapsed it to inline-block, so the row never filled its
   width and the hover band skipped parts. Force table-cell and center; chips go on inner spans. */
body.is-app .table:not(.is-stack) thead th, body.is-app .table:not(.is-stack) tbody td { display:table-cell !important; }
body.is-app .table td .pill, body.is-app .table td .badge, body.is-app .table td .action,
body.is-app .table td .text-mono, body.is-app .table td .text-ltr { display:inline-flex; align-items:center; }
body.is-app .table .action {
  display:inline-flex; align-items:center; width:auto; max-width:100%;
  padding:3px 10px; border-radius:7px;
  background:rgba(44,193,255,.10); border:1px solid rgba(44,193,255,.20);
  color:var(--tl-cyan); font-family:inherit; font-size:12px; font-weight:600; white-space:nowrap;
}
body.is-app .table .actor { color:var(--text); font-weight:600; }
body.is-app .table .payload { color:var(--text-mute); white-space:normal; max-width:460px; overflow:visible; }

/* ===== Course builder: form controls (segmented / switch / dropdown / select) ===== */
body.is-app [hidden] { display:none !important; }

/* segmented control (lesson type, video source) */
body.is-app .seg { display:inline-flex; gap:4px; padding:4px; background:rgba(44,193,255,.06); border:1px solid var(--border); border-radius:12px; }
body.is-app .seg__btn { appearance:none; border:0; background:transparent; color:var(--text-dim); font:inherit; font-size:13px; font-weight:600; padding:7px 18px; border-radius:9px; cursor:pointer; transition:background .18s ease, color .18s ease, box-shadow .18s ease; }
body.is-app .seg__btn:hover { color:var(--text); background:rgba(44,193,255,.09); }
body.is-app .seg__btn.is-active { background:var(--grad-blue); color:#05101f; box-shadow:0 2px 12px rgba(44,193,255,.28); }

/* toggle switch (free preview, quiz video) — RTL: off=right, on=left */
body.is-app .switch { display:inline-flex; align-items:center; gap:10px; cursor:pointer; user-select:none; }
body.is-app .switch input { position:absolute; opacity:0; width:0; height:0; }
body.is-app .switch__track { position:relative; width:44px; height:24px; border-radius:999px; background:rgba(44,193,255,.14); border:1px solid var(--border-strong); transition:background .22s ease, border-color .22s ease; flex-shrink:0; }
body.is-app .switch__track::after { content:""; position:absolute; top:2px; right:2px; width:18px; height:18px; border-radius:50%; background:var(--text-dim); transition:transform .22s cubic-bezier(.4,0,.2,1), background .22s ease; }
body.is-app .switch input:checked + .switch__track { background:var(--grad-blue); border-color:transparent; }
body.is-app .switch input:checked + .switch__track::after { transform:translateX(-20px); background:#05101f; }
body.is-app .switch input:focus-visible + .switch__track { box-shadow:0 0 0 3px rgba(44,193,255,.28); }
body.is-app .switch__lbl { font-size:14px; color:var(--text-dim); }
body.is-app .switch--sm .switch__track { width:36px; height:20px; }
body.is-app .switch--sm .switch__track::after { width:14px; height:14px; }
body.is-app .switch--sm input:checked + .switch__track::after { transform:translateX(-16px); }

/* custom category dropdown */
body.is-app .tlc-dd { position:relative; }
body.is-app .tlc-dd__btn { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:11px 14px; background:var(--bg-card); border:1px solid var(--border-strong); border-radius:11px; color:var(--text); font:inherit; font-size:14px; cursor:pointer; transition:border-color .18s ease; }
body.is-app .tlc-dd__btn:hover { border-color:var(--border-cyan); }
body.is-app .tlc-dd__btn svg { color:var(--text-mute); flex-shrink:0; }
body.is-app .tlc-dd__menu { position:absolute; z-index:40; top:calc(100% + 6px); right:0; left:0; max-height:300px; overflow:auto; padding:6px; background:var(--bg-card-strong); border:1px solid var(--border-cyan); border-radius:12px; box-shadow:0 18px 50px rgba(0,0,0,.5); }
body.is-app .tlc-dd__opt { display:block; width:100%; text-align:right; padding:9px 12px; background:transparent; border:0; border-radius:8px; color:var(--text-dim); font:inherit; font-size:14px; cursor:pointer; transition:background .14s ease, color .14s ease; }
body.is-app .tlc-dd__opt:hover { background:rgba(44,193,255,.12); color:var(--text); }
body.is-app .tlc-dd__new { display:flex; gap:6px; margin-top:6px; padding-top:8px; border-top:1px solid var(--border); }
body.is-app .tlc-dd__new .input { flex:1; }

/* native select, admin-skinned */
body.is-app .select { appearance:none; -webkit-appearance:none; padding:8px 30px 8px 12px; background:var(--bg-card); border:1px solid var(--border-strong); border-radius:9px; color:var(--text); font:inherit; font-size:13px; cursor:pointer; }
body.is-app .select:focus { outline:none; border-color:var(--border-cyan); }

/* quiz editor */
body.is-app .qz-q { border:1px solid var(--border); border-radius:14px; padding:16px; margin-bottom:14px; background:rgba(44,193,255,.03); transition:border-color .25s ease; }
body.is-app .qz-q:hover { border-color:rgba(44,193,255,.15); }
body.is-app .qz-q__head { display:flex; align-items:center; gap:10px; margin-bottom:10px; }
body.is-app .qz-q__num { font-weight:700; color:var(--tl-cyan); font-size:13px; }
body.is-app .qz-q__head .qz-kind { margin-inline-start:auto; }
body.is-app .qz-q > .textarea { margin-bottom:10px; }
body.is-app .qz-opts { display:flex; flex-direction:column; gap:7px; }
body.is-app .qz-opt { display:flex; align-items:center; gap:9px; }
body.is-app .qz-opt .input { flex:1; }
body.is-app .qz-correct { position:relative; flex-shrink:0; cursor:pointer; display:inline-flex; }
body.is-app .qz-correct input { position:absolute; opacity:0; width:0; height:0; }
body.is-app .qz-correct__box { display:inline-flex; align-items:center; justify-content:center; width:26px; height:26px; border-radius:8px; border:1.5px solid var(--border-strong); color:transparent; background:rgba(44,193,255,.05); transition:background .16s ease, border-color .16s ease, color .16s ease; }
body.is-app .qz-correct input:checked + .qz-correct__box { background:var(--ok); border-color:var(--ok); color:#05140a; }
body.is-app .qz-correct:hover .qz-correct__box { border-color:var(--ok); }

/* lesson materials file list (download link + delete; canonical cyan tint) */
body.is-app .mat-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:var(--sp-2); }
body.is-app .mat-row { display:flex; align-items:center; justify-content:space-between; gap:var(--sp-3); padding:var(--sp-2) var(--sp-3); border:1px solid var(--border); border-radius:10px; background:rgba(44,193,255,.05); }
body.is-app .mat-row__name { flex:1; min-width:0; display:flex; align-items:center; gap:var(--sp-2); color:var(--text); font-size:var(--t-sm); text-decoration:none; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.is-app .mat-row__name:hover { color:var(--tl-cyan); }

/* Lesson/quiz editor — small-screen anti-overflow (relocated from courses.php
   inline <style>; desktop untouched: all behind max-width). */
@media (max-width: 600px) {
  /* segmented controls (lesson type / video source) wrap & fill instead of overflowing */
  body.is-app .editor-grid .seg { display: flex; flex-wrap: wrap; }
  body.is-app .editor-grid .seg__btn { flex: 1 1 auto; padding-inline: 12px; }
  /* quiz question header: select + delete wrap below the label */
  body.is-app #quizEditor .qz-q__head { flex-wrap: wrap; }
  body.is-app #quizEditor .qz-q__head .qz-kind { flex: 1 1 140px; }
  /* materials list: let the filename link shrink/ellipsize instead of pushing the delete button out */
  body.is-app .editor-grid aside li > a { min-width: 0; flex: 1; }
  body.is-app .mat-row__name { min-width: 0; flex: 1; }
}

/* collapsible chapter caret + header layout (caret + info on the start side, actions at the end) */
body.is-app .cd-chapter__header { justify-content:flex-start; }
body.is-app .cd-chapter__actions { margin-inline-start:auto; }
body.is-app .cd-chapter__caret { appearance:none; border:0; background:transparent; color:var(--text-mute); cursor:pointer; display:inline-flex; padding:4px; border-radius:7px; flex-shrink:0; transition:transform .3s cubic-bezier(.4,0,.2,1), color .18s ease, background .18s ease; }
body.is-app .cd-chapter__caret:hover { color:var(--tl-cyan); background:rgba(44,193,255,.1); }
body.is-app .cd-chapter.is-collapsed .cd-chapter__caret { transform:rotate(-90deg); }
body.is-app .cd-chapter.is-collapsed .cd-lessons { max-height:0; opacity:0; padding-top:0; padding-bottom:0; }
body.is-app .cd-free-sw { margin-inline-end:2px; }

/* Curriculum builder — small-screen stacking (relocated from courses.php inline
   <style>; desktop untouched: all behind max-width). */
@media (max-width: 600px) {
  /* toolbar: title + add-chapter button wrap instead of overflowing */
  body.is-app .cd-toolbar { flex-wrap: wrap; }
  /* chapter header: let the action buttons wrap to their own line, full width, start-aligned */
  body.is-app .cd-chapter__header { flex-wrap: wrap; }
  body.is-app .cd-chapter__actions { flex-wrap: wrap; margin-inline-start: 0; }
  body.is-app .cd-chapter__header { padding-inline: 14px; }
  /* lesson row: title block on top, controls wrap underneath — no horizontal overflow */
  body.is-app .cd-lesson { flex-wrap: wrap; padding-inline: 14px; }
  body.is-app .cd-lesson__info { flex: 1 1 100%; }
  body.is-app .cd-lesson__right { flex-wrap: wrap; margin-inline-start: auto; }
  body.is-app .cd-lesson__title { white-space: normal; }
}

/* ===== Admin modal (replaces native confirm / prompt) ===== */
body.is-app .tlm { position:fixed; inset:0; z-index:1000; display:flex; align-items:center; justify-content:center; }
body.is-app .tlm__backdrop { position:absolute; inset:0; background:rgba(2,5,12,.6); backdrop-filter:blur(4px); opacity:0; transition:opacity .16s ease; }
body.is-app .tlm__card { position:relative; width:min(440px,calc(100vw - 40px)); background:var(--bg-card-strong); border:1px solid var(--border-cyan); border-radius:var(--radius-l,18px); box-shadow:0 30px 80px rgba(0,0,0,.55); padding:22px; transform:translateY(10px) scale(.98); opacity:0; transition:transform .18s cubic-bezier(.4,0,.2,1), opacity .18s ease; }
body.is-app .tlm.is-open .tlm__backdrop { opacity:1; }
body.is-app .tlm.is-open .tlm__card { transform:none; opacity:1; }
body.is-app .tlm__title { margin:0 0 8px; font-size:17px; font-weight:700; color:var(--text); }
body.is-app .tlm__msg { margin:0 0 16px; font-size:14px; color:var(--text-dim); line-height:1.6; }
body.is-app .tlm__input { width:100%; margin-bottom:16px; }
body.is-app .tlm__actions { display:flex; gap:10px; justify-content:flex-start; }

/* ===== Content modal / sheet (Phase 3) — header, scroll body, footer, tabs ===== */
/* Confirm/prompt singleton always sits above content sheets. */
body.is-app #tlModalRoot { z-index:1200; }
/* tl-select menus portal to <body>; keep them above the modal layer. */
body.is-app .tl-select__menu { z-index:1300; }

body.is-app .tlm--sheet { align-items:flex-start; padding:max(28px,5vh) 16px; overflow-y:auto; }
body.is-app .tlm__card--wide  { width:min(760px, calc(100vw - 32px)); padding:0; }
body.is-app .tlm__card--panel { width:min(900px, calc(100vw - 32px)); padding:0; }
body.is-app .tlm--sheet .tlm__card { display:flex; flex-direction:column; max-height:calc(100vh - max(56px,10vh)); }

body.is-app .tlm__header {
  display:flex; align-items:center; gap:12px;
  padding:18px 22px; border-bottom:1px solid var(--border);
  flex-shrink:0;
}
body.is-app .tlm__header .tlm__title { margin:0; flex:1; min-width:0; font-size:17px; }
body.is-app .tlm__hicon {
  width:36px; height:36px; flex-shrink:0; border-radius:11px;
  display:grid; place-items:center; color:var(--tl-cyan);
  background:rgba(44,193,255,.1); border:1px solid rgba(44,193,255,.22);
}
body.is-app .tlm__hicon svg { width:18px; height:18px; }
body.is-app .tlm__close {
  flex-shrink:0; width:34px; height:34px; border-radius:10px;
  display:grid; place-items:center; cursor:pointer;
  color:var(--text-mute); background:transparent; border:1px solid transparent;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
body.is-app .tlm__close:hover { color:var(--text); background:rgba(255,255,255,.05); border-color:var(--border); }

body.is-app .tlm__body { padding:22px; overflow-y:auto; flex:1; min-height:0; }
body.is-app .tlm__body > :first-child { margin-top:0; }
body.is-app .tlm__body > :last-child  { margin-bottom:0; }

body.is-app .tlm__footer {
  display:flex; gap:10px; justify-content:flex-start; align-items:center;
  padding:16px 22px; border-top:1px solid var(--border); flex-shrink:0;
  background:rgba(4,7,18,.3);
}
body.is-app .tlm__footer .tlm__footer-spacer { margin-inline-start:auto; }

body.is-app .tlm__loading { display:grid; place-items:center; min-height:160px; }
body.is-app .tlm__spinner {
  width:30px; height:30px; border-radius:50%;
  border:2.5px solid rgba(44,193,255,.18); border-top-color:var(--tl-cyan);
  animation:tlm-spin .7s linear infinite;
}
@keyframes tlm-spin { to { transform:rotate(360deg); } }

body.is-app .btn.is-loading { position:relative; color:transparent !important; pointer-events:none; }
body.is-app .btn.is-loading::after {
  content:''; position:absolute; inset:0; margin:auto; width:16px; height:16px; border-radius:50%;
  border:2px solid rgba(255,255,255,.35); border-top-color:#fff; animation:tlm-spin .6s linear infinite;
}

/* Tabs (modal + section) */
body.is-app .tlm-tabs__nav { display:flex; gap:4px; border-bottom:1px solid var(--border); margin-bottom:18px; flex-wrap:wrap; }
body.is-app .tlm-tabs__nav [data-tab] {
  appearance:none; cursor:pointer; background:transparent; border:0;
  padding:9px 14px; font-size:13.5px; font-weight:600; color:var(--text-mute);
  border-bottom:2px solid transparent; margin-bottom:-1px;
  transition:color .2s ease, border-color .2s ease;
}
body.is-app .tlm-tabs__nav [data-tab]:hover { color:var(--text); }
body.is-app .tlm-tabs__nav [data-tab].is-active { color:var(--tl-cyan); border-bottom-color:var(--tl-cyan); }
body.is-app [data-tabpanel][hidden] { display:none; }

/* ===== Shared admin components (Phase 4) ===== */
/* In-card toolbar: title/meta on one edge, search + actions on the other */
body.is-app .table-toolbar { display:flex; align-items:center; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
body.is-app .table-toolbar__title { font-size:15px; font-weight:700; color:var(--text); margin:0; }
body.is-app .table-toolbar__meta { font-size:12.5px; color:var(--text-mute); }
body.is-app .table-toolbar__spacer { margin-inline-start:auto; }
body.is-app .table-toolbar__actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* Form-aware filter / toolbar bar — the canonical home for GET filter <form>s
   (replaces the repeated inline `flex; gap; align-items:flex-end; flex-wrap;
   margin-bottom`). Aligns controls by their baseline so labelled .field inputs
   line up with the submit button. */
body.is-app .toolbar,
body.is-app .admin-filters { display:flex; gap:var(--sp-3); align-items:flex-end; flex-wrap:wrap; margin-block-end:var(--sp-4); }
body.is-app .toolbar__spacer,
body.is-app .admin-filters__spacer { margin-inline-start:auto; }

/* Compact icon button + row-action cluster (last table cell) */
body.is-app .icon-btn {
  width:34px; height:34px; flex-shrink:0; border-radius:10px;
  display:inline-grid; place-items:center; cursor:pointer;
  color:var(--text-mute); background:rgba(255,255,255,.03); border:1px solid var(--border);
  transition:color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
body.is-app .icon-btn:hover { color:var(--tl-cyan); border-color:var(--border-cyan); background:rgba(44,193,255,.08); transform:translateY(-1px); }
body.is-app .icon-btn svg { width:15px; height:15px; }
body.is-app .icon-btn--danger:hover { color:#ff7676; border-color:rgba(255,118,118,.4); background:rgba(255,118,118,.08); }
body.is-app .row-actions { display:inline-flex; gap:6px; justify-content:center; align-items:center; }

/* Numbered pager with ellipsis */
body.is-app .pager { display:flex; gap:6px; justify-content:center; align-items:center; margin-top:22px; flex-wrap:wrap; }
body.is-app .pager a, body.is-app .pager span {
  min-width:36px; height:36px; padding:0 11px; border-radius:10px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:600; text-decoration:none;
  color:var(--text-dim); background:rgba(255,255,255,.03); border:1px solid var(--border);
  transition:color .18s ease, background .18s ease, border-color .18s ease;
}
body.is-app .pager a:hover { color:var(--text); border-color:var(--border-cyan); background:rgba(44,193,255,.07); }
body.is-app .pager .is-active { color:#04102b; background:linear-gradient(135deg,#7fd9ff,#2cc1ff); border-color:transparent; }
body.is-app .pager .pager__gap { border:0; background:transparent; color:var(--text-mute); min-width:auto; padding:0 2px; }
body.is-app .pager .is-disabled { opacity:.4; pointer-events:none; }

/* Prev/Next pagination bar (info on one edge, prev/next buttons on the other) —
   the canonical home for the §5A pattern repeated inline in contact/sessions. */
body.is-app .pagination { display:flex; gap:var(--sp-3); align-items:center; justify-content:space-between; flex-wrap:wrap; margin-block-start:var(--sp-4); }
body.is-app .pagination__info { font-size:var(--t-sm); color:var(--text-mute); }

/* Key/value detail grid + metric cards (modal bodies) */
body.is-app .detail-grid { display:grid; grid-template-columns:auto 1fr; gap:11px 18px; align-items:baseline; }
body.is-app .detail-grid dt { font-size:12.5px; font-weight:600; color:var(--text-mute); white-space:nowrap; }
/* RTL readability: right-align the value so each row reads as a tight
   "label  value" pair on the right instead of the value flung to the far left.
   .text-ltr values keep LTR digit/char order (direction:ltr) but the block
   aligns right — same fix as .u-stats-grid. */
body.is-app .detail-grid dd { margin:0; font-size:14px; color:var(--text); word-break:break-word; text-align:right; }
@media (max-width: 600px) {
  /* stack label-over-value on phones so neither side is cramped */
  body.is-app .detail-grid { grid-template-columns:1fr; gap:2px 0; }
  body.is-app .detail-grid dt { margin-top:10px; }
}
body.is-app .detail-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(140px,1fr)); gap:12px; }
body.is-app .detail-card { padding:14px; border-radius:12px; background:rgba(255,255,255,.02); border:1px solid var(--border); }
body.is-app .detail-card__label { font-size:11px; font-weight:600; color:var(--text-mute); text-transform:uppercase; letter-spacing:.05em; margin-bottom:6px; }
body.is-app .detail-card__value { font-size:18px; font-weight:700; color:var(--text); }

/* Vertical timeline (order/audit history) — RTL aware */
body.is-app .timeline { list-style:none; margin:0; padding:0; position:relative; }
body.is-app .timeline::before { content:''; position:absolute; inset-inline-start:6px; top:4px; bottom:4px; width:2px; background:var(--border); }
body.is-app .timeline__item { position:relative; padding-inline-start:28px; padding-bottom:18px; }
body.is-app .timeline__item:last-child { padding-bottom:0; }
body.is-app .timeline__dot { position:absolute; inset-inline-start:0; top:2px; width:14px; height:14px; border-radius:50%; background:var(--bg-card-strong); border:2px solid var(--tl-cyan); }
body.is-app .timeline__time { font-size:11.5px; color:var(--text-mute); }
body.is-app .timeline__text { font-size:13.5px; color:var(--text); margin-top:2px; }

/* Expandable table row — animated fade + height (never pop) */
body.is-app tr.exp-row > td { padding:0 !important; border:0 !important; }
body.is-app .exp-row__inner { max-height:0; opacity:0; overflow:hidden; padding:0 18px;
  transition:max-height .35s cubic-bezier(.16,1,.3,1), opacity .3s ease, padding .35s ease; }
body.is-app tr.exp-row.is-open .exp-row__inner { max-height:700px; opacity:1; padding:16px 18px; }
body.is-app .exp-toggle svg { transition:transform .3s ease; }
body.is-app .exp-toggle.is-open svg { transform:rotate(180deg); }

/* KPI semantic value colors */
body.is-app .kpi__value--good { color:#5ee0a8; }
body.is-app .kpi__value--warn { color:#ffcf6b; }
body.is-app .kpi__value--bad  { color:#ff8585; }

/* ===== Custom tooltip (no native title flash) ===== */
body.is-app .tltip { position:fixed; z-index:1100; pointer-events:none; max-width:280px; padding:6px 10px; font-size:12px; line-height:1.45; color:var(--text); background:var(--bg-card-strong); border:1px solid var(--border-cyan); border-radius:8px; box-shadow:0 8px 24px rgba(0,0,0,.45); }

/* ===== Categories management + assignment ===== */
body.is-app .cat-list { display:flex; flex-direction:column; gap:8px; }
body.is-app .cat-row { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--border); border-radius:11px; background:rgba(44,193,255,.03); transition:border-color .2s ease, background .2s ease; }
body.is-app .cat-row:hover { border-color:rgba(44,193,255,.16); }
body.is-app .cat-row.dragging { opacity:.4; }
body.is-app .cat-row__drag { cursor:grab; color:var(--text-mute); font-size:14px; }
body.is-app .cat-row__name { font-weight:600; color:var(--text); font-size:14px; }
body.is-app .cat-row__sp { flex:1; }
body.is-app .assign-list { display:flex; flex-direction:column; gap:6px; }
body.is-app .assign-row { display:flex; align-items:center; gap:12px; padding:8px 4px; border-bottom:1px solid rgba(44,193,255,.06); }
body.is-app .assign-row:last-child { border-bottom:none; }
body.is-app .assign-row__title { flex:1; min-width:0; font-size:14px; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.is-app .assign-row .tlc-dd { width:220px; flex-shrink:0; }
body.is-app .tlc-dd.is-saving .tlc-dd__btn { opacity:.6; }
body.is-app .tlc-dd.is-saved .tlc-dd__btn { border-color:var(--ok); }

/* ===== Player: per-lesson completion timer + quiz divider (public, not .is-app) ===== */
.lesson-timer { display:inline-flex; align-items:center; gap:12px; margin:0 0 18px; padding:8px 14px; border:1px solid rgba(44,193,255,.25); border-radius:999px; background:rgba(44,193,255,.06); }
.lesson-timer__face { display:inline-flex; align-items:center; gap:7px; color:var(--tl-cyan,#2cc1ff); font-family:'JetBrains Mono',ui-monospace,monospace; font-weight:700; font-size:15px; }
.lesson-timer__btn { appearance:none; border:0; cursor:pointer; padding:6px 16px; border-radius:999px; font:inherit; font-size:13px; font-weight:700; color:#05101f; background:linear-gradient(135deg,#2cc1ff,#0d7cd9); transition:filter .15s ease; }
.lesson-timer__btn:hover { filter:brightness(1.08); }
.lesson-timer__note { font-size:12px; font-weight:600; color:var(--tl-cyan,#2cc1ff); }
.lesson-timer.is-low .lesson-timer__face { color:#ff5370; animation:tlTimerPulse 1s ease-in-out infinite; }
.lesson-timer.is-up { border-color:#ff5370; background:rgba(255,83,112,.08); }
.lesson-timer.is-up .lesson-timer__face, .lesson-timer.is-up .lesson-timer__note { color:#ff5370; }
@keyframes tlTimerPulse { 50% { opacity:.45; } }
.lesson-quiz-sep { display:flex; align-items:center; gap:12px; margin:26px 0 14px; }
.lesson-quiz-sep span { font-size:15px; font-weight:800; color:var(--tl-cyan,#2cc1ff); white-space:nowrap; }
.lesson-quiz-sep::after { content:""; flex:1; height:1px; background:linear-gradient(90deg,rgba(44,193,255,.3),transparent); }

/* ===== Audit: human-readable payload chips ===== */
body.is-app .table .payload .kvchips { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
body.is-app .kvchip { display:inline-flex; align-items:center; gap:6px; padding:3px 8px; border-radius:7px; background:rgba(44,193,255,.06); border:1px solid var(--border); font-size:11px; }
body.is-app .kvchip__k { color:var(--text-mute); }
body.is-app .kvchip__v { color:var(--text); font-weight:600; font-family:'JetBrains Mono',ui-monospace,monospace; direction:ltr; }

/* ===== Sidebar sub-menu (e.g. Categories under Courses) ===== */
body.is-app .app-nav__sub { display:flex; flex-direction:column; gap:2px; margin:2px 14px 6px; padding-inline-start:14px; border-inline-start:1.5px solid var(--border-strong); }
body.is-app .app-nav__sub a { font-size:13px; padding:8px 10px; opacity:.9; }
body.is-app .app-nav__sub a svg { width:14px; height:14px; }

/* ===== Sidebar IA: group labels, count badges, user footer (Phase 2) ===== */
body.is-app .app-nav__group {
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  color: var(--text-mute); text-transform: uppercase;
  padding: 14px 14px 6px; user-select: none;
}
body.is-app .app-nav__group:first-child { padding-top: 2px; }
body.is-app .app-nav__count {
  margin-inline-start: auto;
  min-width: 22px; height: 20px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  line-height: 1; border-radius: 999px;
  background: rgba(44,193,255,.12); color: #7fd9ff;
  border: 1px solid rgba(44,193,255,.22);
  transition: background .25s ease, color .25s ease, border-color .25s ease;
}
body.is-app .app-nav a.is-active .app-nav__count {
  background: rgba(4,16,43,.22); color: #04102b; border-color: rgba(4,16,43,.2);
}
body.is-app .app-nav a:hover .app-nav__count { border-color: rgba(44,193,255,.4); }

body.is-app .app-side__user {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px; margin-top: 4px;
  border-radius: 14px;
  background: rgba(44,193,255,.05);
  border: 1px solid var(--border);
}
body.is-app .app-side__avatar {
  flex-shrink: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800; color: #04102b;
  background: linear-gradient(135deg, #7fd9ff 0%, #2cc1ff 55%, #0d7cd9 100%);
  box-shadow: 0 4px 14px -4px rgba(44,193,255,.6), inset 0 1px 0 rgba(255,255,255,.4);
}
body.is-app .app-side__user-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
body.is-app .app-side__user-name {
  font-size: 13.5px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
body.is-app .app-side__user-rank {
  font-size: 11px; font-weight: 600; color: var(--tl-cyan);
  letter-spacing: .02em;
}

/* =========================================================
   MOBILE / TABLET RESPONSIVE OVERHAUL
   Shared primitives consumed across pages + admin. Desktop is
   untouched — every rule lives behind a max-width breakpoint
   or only lowers a small-screen floor. RTL-safe (logical props,
   dir-aware transforms). See the breakpoint legend at the top.
   ========================================================= */

/* ---- Small-screen form / list stacking ---- */
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }            /* admin 2-col forms → 1-col */
  .lesson-row { grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 8px; padding: 10px; }
  /* Admin section header toolbars (title + search field + action buttons):
     let the button groups wrap and the inline min-width:220px search field
     go fluid so the header never overflows on phones. */
  .app-main__header .flex { flex-wrap: wrap; }
  .app-main__header form { width: 100%; }
  .app-main__header .input { min-width: 0 !important; flex: 1 1 140px; }
}
@media (max-width: 480px) {
  .auth-card { padding: 32px 22px 28px; }
  .auth-shell { padding-inline: 16px; }
}

/* ---- Responsive admin tables ---- */
/* Baseline: any wide table wrapped in .table-scroll scrolls instead of
   pushing the page wider than the viewport. */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) {
  /* bleed the scroll area toward the card edges so the scrollbar isn't cramped */
  .table-scroll { margin-inline: calc(-1 * clamp(12px, 4vw, 20px)); padding-inline: clamp(12px, 4vw, 20px); }
}

/* Card-stack: each row becomes a labelled card. Needs data-label="…" on each
   <td> (added in the section PHP). Columns flow in document order so this is
   RTL-correct automatically. */
@media (max-width: 768px) {
  /* The table/tbody must go block too, otherwise the table-layout algorithm
     keeps sizing the element to its cells' min-content and the "cards" render
     wider than the viewport. */
  /* Scoped with body.is-app + !important so these win over the desktop
     display:table-cell !important rule at the top of the admin table block
     (which is otherwise higher-specificity). Without this the cards never
     stack — see ADMN-01. */
  body.is-app .table.is-stack,
  .table.is-stack,
  body.is-app .table.is-stack tbody,
  .table.is-stack tbody { display: block !important; width: 100%; }
  body.is-app .table.is-stack thead,
  .table.is-stack thead {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
  .table.is-stack tbody tr {
    display: block; margin-bottom: 12px; padding: 6px 12px;
    border: 1px solid var(--border); border-radius: var(--radius-s);
    background: rgba(20,36,71,.32);
  }
  .table.is-stack tbody tr:hover td { background: transparent; color: var(--text-dim); }
  body.is-app .table.is-stack tbody td,
  .table.is-stack tbody td {
    display: block !important; padding: 8px 0; white-space: normal;
    border-bottom: 1px solid rgba(140,180,255,.08);
  }
  body.is-app .table.is-stack tbody td[data-label],
  .table.is-stack tbody td[data-label] {
    display: grid !important; grid-template-columns: minmax(64px, 38%) 1fr; gap: 12px; align-items: start;
  }
  .table.is-stack tbody tr td:last-child { border-bottom: 0; }
  .table.is-stack tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--text-mute); font-size: 10px; font-weight: 800;
    letter-spacing: .6px; text-transform: uppercase;
  }
  .table.is-stack .payload { max-width: none; white-space: normal; overflow: visible; text-overflow: clip; }
}

/* ---- Public nav: hamburger + off-canvas drawer (≤1024px) ---- */
.nav-burger { display: none; }
.nav-drawer, .nav-scrim { display: none; }

@media (max-width: 1024px) {
  .nav-cta-wrap { display: none; }                       /* desktop CTAs hidden; drawer owns them */
  .nav-burger {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 5px; width: 44px; height: 44px; flex-shrink: 0;
    border: 1px solid var(--border-strong); border-radius: 12px;
    background: rgba(255,255,255,.04); color: var(--text);
  }
  .nav-burger__bar { width: 22px; height: 2px; background: currentColor; border-radius: 2px;
                     transition: transform .25s ease, opacity .2s ease; }
  .nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(2) { opacity: 0; }
  .nav-burger[aria-expanded="true"] .nav-burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .nav-scrim {
    display: block; position: fixed; inset: 0; z-index: 55;
    background: rgba(3,7,15,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
  }
  .nav-scrim.is-open { opacity: 1; pointer-events: auto; }

  .nav-drawer {
    display: flex; flex-direction: column; gap: 6px;
    position: fixed; inset-block: 0; inset-inline-end: 0;   /* RTL → left edge (same side as burger) */
    width: min(82vw, 360px); z-index: 60;
    padding: 84px clamp(18px, 6vw, 26px) 26px;
    background: linear-gradient(180deg, rgba(10,20,48,.98), rgba(4,7,18,.99));
    border-inline-start: 1px solid var(--border-strong);
    box-shadow: -24px 0 60px -20px rgba(0,0,0,.7);
    transform: translateX(-100%);                          /* parked off the inline-end edge */
    transition: transform .32s cubic-bezier(.2,.7,.3,1.2);
    overflow-y: auto; overscroll-behavior: contain;
  }
  [dir="ltr"] .nav-drawer { transform: translateX(100%); box-shadow: 24px 0 60px -20px rgba(0,0,0,.7); }
  .nav-drawer.is-open { transform: translateX(0); }

  .nav-drawer__links { display: flex; flex-direction: column; gap: 2px; }
  .nav-drawer .nav-link { padding: 14px; font-size: 16px; color: var(--text-dim); border-radius: 12px; white-space: normal; }
  .nav-drawer .nav-link::after { content: none; }          /* drop desktop underline-sweep */
  .nav-drawer .nav-link:hover { background: rgba(127,217,255,.07); color: var(--text); transform: none; }

  .nav-drawer__cta { margin-top: auto; display: flex; flex-direction: column; gap: 10px;
                     padding-top: 16px; border-top: 1px solid var(--border); }
  .nav-drawer__cta .btn { width: 100%; justify-content: center; }
  .nav-drawer__uhead { padding: 2px 4px 6px; }
  .nav-drawer__uname { font-weight: 800; font-size: 15px; color: var(--text); }
  .nav-drawer__umail { font-size: 12px; color: var(--text-mute); direction: ltr; text-align: start; }
  .nav-drawer__item { display: flex; align-items: center; gap: 10px; padding: 12px 14px;
                      border-radius: 12px; color: var(--text-dim); font-size: 15px; font-weight: 600; }
  .nav-drawer__item svg { color: var(--text-mute); flex-shrink: 0; }
  .nav-drawer__item:hover { background: rgba(127,217,255,.07); color: var(--text); }
  .nav-drawer__item--danger { color: var(--warn); }
  .nav-drawer__item--danger svg { color: var(--warn); }

  body.nav-open { overflow: hidden; }                      /* scroll-lock while drawer open */
}

/* ---- Admin off-canvas drawer toggle (burger + scrim, ≤1024px) ----
   The .app-side drawer slide itself is defined in the admin-shell block
   above; these add the trigger + dimmer. */
.app-burger { display: none; }
.app-scrim { display: none; }

@media (max-width: 1024px) {
  .app-burger {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    position: fixed; top: 14px; inset-inline-start: 14px; z-index: 72;
    width: 44px; height: 44px;
    border: 1px solid var(--border-strong); border-radius: 12px;
    background: rgba(7,11,24,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    color: var(--text);
  }
  .app-burger__bar { width: 22px; height: 2px; background: currentColor; border-radius: 2px;
                     transition: transform .25s ease, opacity .2s ease; }
  .app-burger[aria-expanded="true"] .app-burger__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .app-burger[aria-expanded="true"] .app-burger__bar:nth-child(2) { opacity: 0; }
  .app-burger[aria-expanded="true"] .app-burger__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .app-scrim {
    display: block; position: fixed; inset: 0; z-index: 69;
    background: rgba(2,5,12,.6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity .3s ease;
  }
  .app-scrim.is-open { opacity: 1; pointer-events: auto; }

  body.app-nav-open { overflow: hidden; }
}

/* ===== Impersonation banner (fixed bottom bar — shown on the public/student side) ===== */
.imp-banner { position:fixed; bottom:0; left:0; right:0; z-index:100000; display:flex; align-items:center; justify-content:center; gap:18px; padding:9px 16px; background:linear-gradient(90deg,#ff9a3c,#ff5370); color:#1a0b00; font-weight:700; font-size:14px; box-shadow:0 -6px 24px rgba(0,0,0,.4); flex-wrap:wrap; }
.imp-banner span { display:inline-flex; align-items:center; gap:7px; }
.imp-banner a { color:#1a0b00; text-decoration:underline; display:inline-flex; align-items:center; gap:5px; font-weight:800; }
.imp-banner svg { stroke:#1a0b00; }
body.has-imp { padding-bottom:46px; }

/* ===== Per-user progress bars + note cards (admin) ===== */
body.is-app .prog-row__top { display:flex; justify-content:space-between; align-items:center; margin-bottom:6px; gap:10px; }
body.is-app .prog-row__title { font-weight:600; color:var(--text); font-size:14px; }
body.is-app .prog-row__meta { font-size:12px; color:var(--text-mute); white-space:nowrap; }
body.is-app .prog-bar { height:8px; border-radius:99px; background:rgba(44,193,255,.1); overflow:hidden; }
body.is-app .prog-bar__fill { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#2cc1ff,#0d7cd9); transition:width .5s cubic-bezier(.4,0,.2,1); }
body.is-app .note-card { border:1px solid var(--border); border-radius:11px; padding:10px 12px; background:rgba(44,193,255,.03); }
body.is-app .note-card__head { display:flex; align-items:center; gap:8px; margin-bottom:6px; font-size:12px; color:var(--text-mute); flex-wrap:wrap; }
body.is-app .note-card__cat { color:var(--text-dim); font-weight:600; }
body.is-app .note-dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
body.is-app .note-card__time { font-size:11px; }
body.is-app .note-card__body { font-size:14px; color:var(--text-dim); line-height:1.6; }

/* ===== Analytics: funnel + horizontal bar rows + per-user IP list ===== */
body.is-app .funnel { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
body.is-app .funnel__step { flex:1; min-width:110px; text-align:center; padding:16px 12px; border:1px solid var(--border); border-radius:14px; background:rgba(44,193,255,.04); }
/* Funnel: the "paid" step is the positive outcome → green; earlier steps stay cyan. */
body.is-app .funnel__step--win { border-color:rgba(41,211,145,.4); background:linear-gradient(180deg,rgba(41,211,145,.13),rgba(41,211,145,.03)); box-shadow:0 8px 28px -16px rgba(41,211,145,.55); }
body.is-app .funnel__step--win .funnel__n { color:#5ee0a8; }
body.is-app .funnel__step--win .funnel__pct { color:#5ee0a8; }
body.is-app .funnel__n { font-size:26px; font-weight:800; color:var(--text); }
body.is-app .funnel__l { font-size:12px; color:var(--text-mute); margin-top:4px; }
body.is-app .funnel__pct { font-size:12px; font-weight:700; color:var(--tl-cyan); margin-top:4px; }
body.is-app .funnel__arrow { color:var(--text-mute); font-size:20px; flex:0 0 auto; }
/* The funnel reads in DOM order; in RTL the steps flow right→left, so the → glyph must point
   left to follow the flow. Mirror it (only in RTL — LTR keeps the literal →). */
[dir="rtl"] body.is-app .funnel__arrow { display:inline-block; transform:scaleX(-1); }
/* Sessions "user" cell: name on its own line, email muted BELOW it. The email must not use
   .text-ltr (that gets display:inline-flex inside a table cell and mashes onto the name line). */
/* Dot is a vertically-centred leading indicator; name + email stack as one block
   so their start edges line up (previously the inline dot shoved only the name
   line inward, leaving the email hanging out past it). */
.sess-user { display:inline-flex; align-items:center; gap:8px; vertical-align:middle; text-align:start; }
.sess-user .status-dot { flex:0 0 auto; }
.sess-user-meta { display:inline-flex; flex-direction:column; align-items:flex-start; min-width:0; line-height:1.35; }
.sess-user-name { font-weight:600; }
.sess-user-mail { display:block; margin-top:2px; font-size:var(--t-xs); color:var(--text-mute); text-align:start; unicode-bidi:isolate; }
body.is-app .bar-row { display:flex; align-items:center; gap:10px; padding:6px 0; }
body.is-app .bar-row__label { flex:0 0 40%; font-size:13px; color:var(--text-dim); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.is-app .bar-row__track { flex:1; height:8px; border-radius:99px; background:rgba(44,193,255,.08); overflow:hidden; }
body.is-app .bar-row__fill { display:block; height:100%; border-radius:99px; background:linear-gradient(90deg,#2cc1ff,#0d7cd9); }
body.is-app .bar-row__n { flex:0 0 auto; font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text-dim); min-width:42px; text-align:left; }
/* RTL bar charts: label + value sit on the RIGHT (Hebrew reads right→left) in FIXED-WIDTH
   columns so every bar starts at the same x and shares one baseline (no ragged floating
   bars), and the bar fills leftward from there. */
body.is-app .bar-row { gap:14px; padding:7px 0; }
body.is-app .bar-row__label { order:1; flex:0 0 34%; min-width:0; text-align:start; }
body.is-app .bar-row__n     { order:2; flex:0 0 64px; text-align:start; color:var(--text); }
body.is-app .bar-row__meta  { order:3; flex:0 0 56px; text-align:start; }
body.is-app .bar-row__track { order:4; flex:1 1 auto; min-width:60px; }
@media (max-width:760px) { body.is-app .bar-row__label { flex-basis:42%; } }
/* Livelier fill: brighter multi-stop cyan + a soft glow. */
body.is-app .bar-row__fill { background:linear-gradient(-90deg,#6fd9ff 0%,#2cc1ff 50%,#0d7cd9 100%); box-shadow:0 0 10px rgba(44,193,255,.4); }
/* Column-header row (bar_chart_head): titles the label / value / bar columns like a table. */
body.is-app .bar-head { border-bottom:1px solid var(--border); padding-bottom:8px; margin-bottom:6px; cursor:default; }
/* The value column (.bar-row__n) renders DATA in JetBrains Mono (tabular numbers),
   but the column HEADER is a word ("צפיות"/"מבקרים") — so it must use the same UI
   font (Heebo) as the sibling "עמוד"/"זמן ממוצע" headers, otherwise the Hebrew title
   renders in the Latin mono face and looks like a different font. font-family:inherit
   pulls it back to the body UI font; the data rows below keep their mono override. */
body.is-app .bar-head .bar-row__label, body.is-app .bar-head .bar-row__n, body.is-app .bar-head .bar-row__meta { font-family:inherit; font-size:11px; font-weight:700; letter-spacing:.3px; text-transform:uppercase; color:var(--text-mute); }
body.is-app .bar-head .bar-row__track { background:transparent !important; box-shadow:none !important; }

/* ── Admin interactivity engine (assets/js/admin-charts.js) ──────────────────
   Consistent hover + sort affordances for every chart & table in the panel. */
.bar-row--ix { border-radius:8px; padding-inline:8px; margin-inline:-8px; transition:background .15s ease; cursor:default; }
.bar-row--ix.is-hot { background:rgba(44,193,255,.08); }
.bar-row--ix .bar-row__fill { transition:filter .15s ease; }
.bar-row--ix.is-hot .bar-row__fill { filter:brightness(1.3) saturate(1.12); }
.funnel__step--ix { transition:transform .18s cubic-bezier(.2,.7,.3,1.3), opacity .15s ease; cursor:default; }
.funnel.has-hot .funnel__step--ix:not(.is-hot) { opacity:.5; }
.funnel__step--ix.is-hot { transform:translateY(-3px); }
.sparkline--ix { cursor:crosshair; }
.spark-dot { filter:drop-shadow(0 0 4px rgba(44,193,255,.85)); }
/* Sortable column headers (click to sort; ▲/▼ shows direction, ⇅ = sortable). */
body.is-app .table th.th-sort, body.is-app .mini-table th.th-sort { cursor:pointer; user-select:none; white-space:nowrap; transition:color .15s ease; }
body.is-app .table th.th-sort:hover, body.is-app .mini-table th.th-sort:hover { color:var(--tl-cyan); }
body.is-app .table th.th-sort::after, body.is-app .mini-table th.th-sort::after { content:'⇅'; opacity:.3; margin-inline-start:5px; font-size:.85em; }
body.is-app .table th.th-sort--asc::after, body.is-app .mini-table th.th-sort--asc::after { content:'▲'; opacity:1; color:var(--tl-cyan); }
body.is-app .table th.th-sort--desc::after, body.is-app .mini-table th.th-sort--desc::after { content:'▼'; opacity:1; color:var(--tl-cyan); }
body.is-app .ip-row { display:flex; align-items:center; gap:10px; padding:7px 10px; border:1px solid var(--border); border-radius:9px; background:rgba(44,193,255,.03); margin-bottom:6px; flex-wrap:wrap; }
body.is-app .ip-row__addr { font-family:'JetBrains Mono',monospace; font-size:12px; color:var(--text); }
body.is-app .ip-row__geo { font-size:12px; color:var(--text-mute); }
body.is-app .ip-row__meta { margin-inline-start:auto; font-size:11px; color:var(--text-mute); font-family:'JetBrains Mono',monospace; }

/* RTL: stat blocks (label over value) — right-align the value to match its label.
   The date keeps LTR digit order via .text-ltr, but the block aligns to the RTL start (right). */
body.is-app .u-stats-grid > div { text-align: right; }
body.is-app .u-stats-grid .text-ltr,
body.is-app .u-stats-grid .text-mono { text-align: right; }

/* =========================================================
   QA SWEEP FIXES (2026-06-02) — global toast, admin grid,
   impersonation banner on phones.
   ========================================================= */

/* ---- Global toast notifications (assets/js/toast.js → #toast-host) ----
   The toast component the admin modal runtime relies on for success/error
   feedback shipped with NO styles, so toasts rendered as unstyled plain text
   in document flow (below the footer). Scoped to #toast-host so it can't
   collide with the course player's own page-scoped `.toast` (page-course.css). */
#toast-host {
  position: fixed;
  z-index: 120000;                                   /* above imp-banner (100000) + modals */
  inset-block-end: calc(16px + env(safe-area-inset-bottom, 0px));
  inset-inline-end: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
body.has-imp #toast-host { inset-block-end: calc(62px + env(safe-area-inset-bottom, 0px)); }
#toast-host .toast {
  pointer-events: auto;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  background: linear-gradient(180deg, rgba(20,36,71,.96), rgba(10,18,40,.97));
  border: 1px solid var(--border-strong);
  border-inline-start: 3px solid var(--tl-cyan);
  box-shadow: 0 18px 42px -12px rgba(0,0,0,.65);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  word-break: break-word;
  animation: toastIn .28s cubic-bezier(.2,.7,.3,1.2);
}
#toast-host .toast--success { border-inline-start-color: var(--ok); }
#toast-host .toast--error   { border-inline-start-color: var(--warn); }
#toast-host .toast--info    { border-inline-start-color: var(--tl-cyan); }
#toast-host .toast.leaving  { animation: toastOut .3s ease forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastOut { to   { opacity: 0; transform: translateY(8px); } }
@media (max-width: 600px) {
  #toast-host { inset-inline: 12px; width: auto; }   /* full-width toasts on phones */
}

/* ---- Admin 2-up grid: the repeat(auto-fit,minmax(360px,1fr)) floor exceeds a
   360–390px content box, so the single column was forced to 360px and clipped
   (html overflow-x:clip hides the scrollbar). Drop to one fluid column. ---- */
@media (max-width: 600px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }   /* minmax(0,…) not 1fr: the auto floor was locking the track to the section's 418px min-content */
  .admin-grid > * { min-width: 0; }
}

/* ---- Impersonation banner on phones: it's a fixed bottom bar that wraps; the
   long impersonated email could push it to 2–3 lines and overlap content past
   the fixed 46px reserve. Keep it one line (truncate the email) + a bit more
   reserve. ---- */
@media (max-width: 600px) {
  .imp-banner { gap: 10px; padding: 8px 12px; font-size: 12.5px; }
  .imp-banner > span { min-width: 0; }
  .imp-banner .text-ltr {
    display: inline-block; vertical-align: bottom; max-width: 44vw;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  body.has-imp { padding-bottom: 60px; }
}

/* =========================================================
   RECOMMENDED-NEXT POLISH (2026-06-02)
   ========================================================= */

/* Confirm / prompt modal (#tlModalRoot): cap height so a long message or a
   landscape phone fits. Flex column keeps the title + action buttons pinned
   while only the message scrolls — buttons stay reachable without scrolling. */
body.is-app #tlModalRoot .tlm__card {
  max-height: calc(100vh - 28px);
  max-height: calc(100dvh - 28px);
  display: flex;
  flex-direction: column;
}
body.is-app #tlModalRoot .tlm__msg { overflow-y: auto; min-height: 0; }

/* Touch tap targets: bump the smallest controls to ~40-44px on phones so they
   are comfortable to tap (modal action buttons, icon buttons, modal close,
   pager links were ~30-36px). */
@media (max-width: 600px) {
  body.is-app .tlm__actions .btn { min-height: 44px; }
  body.is-app .icon-btn { min-width: 40px; min-height: 40px; }
  body.is-app .tlm__close { width: 40px; height: 40px; }
  body.is-app .pager a,
  body.is-app .pager button { min-width: 40px; min-height: 40px; }
}

/* Touch tap targets (tablet + phone): give the smallest admin controls a
   ≥40-44px hit area so they're comfortable on touch. Scoped to ≤1024 so the
   compact desktop chips/links (≥1025) are completely untouched.
   - SHELL-01: admin section-header "view all →" links (13px tall) — flagged
     across the whole tablet range incl. tablet-landscape (1024), so ≤1024.
   - ADMN-04: .btn--xs, .pill chips + affiliates date-range / automation /
     logs-filter pills (~23-25px tall). */
@media (max-width: 1024px) {
  /* SHELL-01: section-header / "view all" links (flagged up to 1024) */
  body.is-app .admin-section__title a {
    display: inline-flex; align-items: center;
    min-height: 44px; padding-block: 8px;
  }
}
@media (max-width: 1024px) {
  /* ADMN-04: compact chips/pills get a touch-comfortable height + padding.
     ≤1024 (not 768) so the affiliates date-range / logs-filter pills are also
     comfortable on tablet-landscape, where admin is already in drawer mode. */
  body.is-app .btn--xs,
  body.is-app .pill,
  body.is-app .pill--ok,
  body.is-app .btn.btn--subtle.btn--xs {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 40px; padding-block: 6px;
  }
}

/* ==========================================================================
   ADMIN MONITOR — shared primitives for Traffic / Sessions / Logs
   (live dot, status dots, big-number stat tiles, time-ago, mini-table,
    log-level + session-event badge variants). Reuses the existing cyan/glass
    tokens and the .pill palette. RTL-safe (logical properties only).
   New, additive block — does not modify any rule above.
   ========================================================================== */

/* Pulsing "live" dot — sits next to a "Online now / live" label. */
.live-dot {
  display: inline-block;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(41, 211, 145, .55);
  animation: tlLivePulse 1.6s ease-out infinite;
  vertical-align: middle;
  margin-inline-end: 6px;
  flex: none;
}
@keyframes tlLivePulse {
  0%   { box-shadow: 0 0 0 0 rgba(41, 211, 145, .55); }
  70%  { box-shadow: 0 0 0 8px rgba(41, 211, 145, 0); }
  100% { box-shadow: 0 0 0 0 rgba(41, 211, 145, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

/* Static status dots for table rows: active (green) / away (gold) / offline. */
.status-dot {
  display: inline-block;
  inline-size: 8px;
  block-size: 8px;
  border-radius: 50%;
  background: var(--text-mute);
  margin-inline-end: 7px;
  vertical-align: middle;
  flex: none;
}
.status-dot.is-online { background: var(--ok);   box-shadow: 0 0 8px rgba(41, 211, 145, .6); }
.status-dot.is-away   { background: var(--gold);  box-shadow: 0 0 8px rgba(255, 216, 107, .5); }
.status-dot.is-offline{ background: var(--text-mute); }

/* Big-number stat tile — a denser variant of .kpi for the "right now" cards.
   Pairs with the existing .admin-kpis grid. */
.stat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-radius: var(--radius-s);
  background: var(--grad-glass), var(--bg-card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.stat-tile__label {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--text-mute);
}
.stat-tile__value {
  font-size: clamp(26px, 4vw, 34px);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Crisp solid value (for dates/strings, not big numbers) — neutralizes the
   gradient text-clip so an explicit color (e.g. var(--warn)) can show through. */
.stat-tile__value--plain { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text); }
.stat-tile__sub { font-size: 12px; color: var(--text-dim); }
.stat-tile--accent { border-color: var(--border-cyan); box-shadow: var(--shadow-glow); }

/* Relative "time-ago" stamp — muted, tabular, never wraps. */
.time-ago {
  color: var(--text-mute);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Compact mini-table used inside cards (top pages, browsers, longest sessions).
   Lighter than the full .table; still RTL-aware via logical text-align. */
.mini-table {
  inline-size: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.mini-table th {
  text-align: start;
  padding: 6px 10px;
  color: var(--text-mute);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  border-block-end: 1px solid var(--border);
  white-space: nowrap;
}
.mini-table td {
  padding: 8px 10px;
  border-block-end: 1px solid var(--border);
  color: var(--text-dim);
  vertical-align: middle;
}
.mini-table tr:last-child td { border-block-end: 0; }
.mini-table tbody tr { transition: background .18s ease; }
.mini-table tbody tr:hover { background: rgba(44, 193, 255, .05); }
.mini-table .num { font-variant-numeric: tabular-nums; text-align: end; color: var(--text); font-weight: 700; }

/* Log-level badges — map onto the existing .pill palette.
   DEBUG = neutral grey · INFO = cyan · WARN = gold · ERROR = red. */
.pill--debug {
  background: rgba(140, 180, 255, .08);
  border: 1px solid var(--border);
  color: var(--text-mute);
}
.pill--info-log  { background: rgba(44, 193, 255, .10);  border: 1px solid rgba(127, 217, 255, .32); color: var(--tl-cyan); }
.pill--warn-log  { background: rgba(255, 216, 107, .10); border: 1px solid rgba(255, 216, 107, .35); color: var(--gold); }
.pill--error-log { background: rgba(255, 77, 109, .10);  border: 1px solid rgba(255, 77, 109, .35);  color: var(--warn); }

/* "Online now" KPI — subtle cyan live accent; intensifies once the first poll
   lands (JS adds .is-live). Layers on a fully-styled .kpi card. */
.kpi--live { border-color: var(--border-cyan); }
.kpi--live .kpi__label { color: var(--tl-cyan); }
.kpi--live.is-live { box-shadow: var(--shadow-glow); }

/* Session-event badges — login/extended ok, logout/expired neutral,
   blocked/failed bad, ip_change warn. */
.pill--evt-login    { background: rgba(41, 211, 145, .12);  border: 1px solid rgba(41, 211, 145, .3);  color: var(--ok); }
.pill--evt-extended { background: rgba(41, 211, 145, .10);  border: 1px solid rgba(41, 211, 145, .28); color: var(--ok); }
.pill--evt-logout   { background: rgba(140, 180, 255, .08); border: 1px solid var(--border);          color: var(--text-dim); }
.pill--evt-expired  { background: rgba(140, 180, 255, .06); border: 1px solid var(--border);          color: var(--text-mute); }
.pill--evt-ipchange { background: rgba(255, 216, 107, .10); border: 1px solid rgba(255, 216, 107, .35); color: var(--gold); }
.pill--evt-blocked,
.pill--evt-failed   { background: rgba(255, 77, 109, .10);  border: 1px solid rgba(255, 77, 109, .35);  color: var(--warn); }

/* Time-left coloring for active sessions (ok / warning / critical). */
.time-left.is-ok   { color: var(--ok); }
.time-left.is-warn { color: var(--gold); }
.time-left.is-crit { color: var(--warn); }

/* Lightweight refresh/poll spinner for live tabs. */
.poll-spin {
  display: inline-block;
  inline-size: 13px;
  block-size: 13px;
  border-radius: 50%;
  border: 2px solid rgba(44, 193, 255, .25);
  border-block-start-color: var(--tl-cyan);
  animation: tlPollSpin .7s linear infinite;
  vertical-align: middle;
}
@keyframes tlPollSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .poll-spin { animation: none; }
}

/* ── Affiliate leaderboard rows (admin + member dashboard; global, not is-app-scoped) ── */
.lb-row{display:flex;align-items:center;gap:12px;padding:9px 4px;border-bottom:1px solid var(--border)}
.lb-row:last-child{border-bottom:0}
.lb-row--me{background:rgba(44,193,255,.07);border-radius:8px;padding-inline:10px}
.lb-rank{flex:0 0 auto;width:26px;height:26px;border-radius:50%;display:grid;place-items:center;font-size:12px;font-weight:800;background:rgba(255,255,255,.06);color:var(--text-dim)}
.lb-rank--1{background:linear-gradient(135deg,#ffd76b,#f0a500);color:#3a2600}
.lb-rank--2{background:linear-gradient(135deg,#e3e8f0,#aab4c4);color:#2a2f38}
.lb-rank--3{background:linear-gradient(135deg,#e8a87c,#c87f43);color:#3a1f00}
.lb-name{flex:1;min-width:0;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-name a{color:var(--tl-cyan);text-decoration:none}
.lb-metric{flex:0 0 auto;font-weight:700;color:var(--text);font-variant-numeric:tabular-nums}

/* ── Contact inbox (admin contact section + view modal) ──────────────────────── */
.cm-snippet a{color:var(--text);text-decoration:none;display:inline-block;max-width:42ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;transition:color .18s ease}
.cm-snippet a:hover{color:var(--tl-cyan);text-decoration:none}
/* Unread rows: soft tint + bold instead of a harsh full-height cyan bar (which read
   as a jarring stripe, esp. on the all-unread notifications list). */
tr.is-unread td{font-weight:600;background:rgba(44,193,255,.05)}
tr.is-unread:hover td{background:rgba(44,193,255,.09)}
.cm-view__top{margin-block-end:14px}
.cm-view__meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.cm-view__fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px 24px;margin:0 0 16px;padding:14px;border:1px solid var(--border);border-radius:var(--radius-s);background:rgba(44,193,255,.03)}
.cm-view__fields dt{font-size:var(--t-xs,12px);color:var(--text-mute);margin-block-end:2px}
.cm-view__fields dd{margin:0;font-size:var(--t-sm,13px);color:var(--text);word-break:break-word}
.cm-view__fields dd a{color:var(--tl-cyan);text-decoration:none}
.cm-view__fields dd a:hover{text-decoration:underline}
.cm-view__msg-label{font-size:var(--t-xs,12px);margin-block-end:6px}
.cm-view__msg{padding:14px 16px;border:1px solid var(--border);border-radius:var(--radius-s);background:rgba(255,255,255,.02);line-height:1.65;color:var(--text-dim);white-space:normal;max-height:46vh;overflow:auto}
.cm-view .tlm__actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-block-start:18px}
/* Contact-modal alert banners, topic, and the in-panel reply composer + live email
   preview. These MUST live in this stylesheet, not in the AJAX-loaded fragment: a
   fragment <style> can't carry the page's CSP nonce, so style-src would block it. */
.cm-view__alert{display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:var(--radius-s);font-size:var(--t-sm);margin-bottom:12px;font-weight:600}
.cm-view__alert--bad{background:rgba(220,38,38,.10);color:#ff8a9b;border:1px solid rgba(220,38,38,.25)}
.cm-view__alert--new{background:rgba(44,193,255,.10);color:var(--tl-cyan);border:1px solid rgba(44,193,255,.25)}
.cm-view__fields dt{display:flex;align-items:center;gap:6px}
.cm-view__fields dt .icon{flex:0 0 auto;opacity:.7}
.cm-view__topic{display:inline-flex;align-items:center;gap:6px;font-weight:700;font-size:var(--t-md,1rem)}
.cm-reply{margin-top:18px;border-top:1px solid var(--border);padding-top:14px}
.cm-reply__grid{display:flex;flex-direction:column;gap:14px}
.cm-reply textarea{min-height:140px;resize:vertical;width:100%}
.cm-reply__sigtoggle{display:flex;align-items:center;gap:9px;font-size:var(--t-sm);color:var(--text-dim);cursor:pointer;user-select:none;margin:2px 0}
.cm-reply__sigtoggle input{position:absolute;opacity:0;width:0;height:0}
.cm-reply__sw{position:relative;flex:0 0 auto;width:38px;height:22px;border-radius:999px;background:rgba(127,127,127,.3);border:1px solid var(--border);transition:background .2s ease}
.cm-reply__sw::after{content:'';position:absolute;top:2px;inset-inline-start:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform .2s ease}
.cm-reply__sigtoggle input:checked + .cm-reply__sw{background:linear-gradient(135deg,var(--tl-cyan),var(--tl-blue));border-color:transparent}
.cm-reply__sigtoggle input:checked + .cm-reply__sw::after{transform:translateX(-16px)}
[dir="ltr"] .cm-reply__sigtoggle input:checked + .cm-reply__sw::after{transform:translateX(16px)}
.cm-reply__sigtoggle input:focus-visible + .cm-reply__sw{outline:2px solid var(--tl-cyan);outline-offset:2px}
.cm-reply__preview{direction:rtl;text-align:right;border:1px solid var(--border);border-radius:var(--radius-s);padding:16px 18px;background:#fff;color:#16203a;font-size:14px;line-height:1.7;overflow:auto;min-height:120px;font-family:Arial,Helvetica,'Segoe UI',sans-serif}
.cm-reply__preview p{margin:0 0 10px}
.cm-reply__preview hr{border:none;border-top:1px solid #e2e8f0;margin:16px 0}
.cm-reply__preview a{color:#0d7cd9}
.cm-reply__preview-empty{color:#94a3b8}

/* =========================================================
   GLOBAL ADMIN NOTIFICATION BELL (partials/admin_notifications.php)
   Fixed bell + unread badge + dropdown panel + AJAX poller. Shown for
   is_admin() on every page (public + admin). Cyan-glass, RTL-safe logical
   props. z-index sits BELOW toasts (#toast-host = 120000) and clears the
   impersonation banner (.imp-banner = 100000) when present.
   ========================================================= */
/* Bell button — lives in the public top nav (.nav-cta-wrap) and the admin
   sidebar header (.app-side__top). Admins only. */
.app-side__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.app-side__top .app-side__brand { flex: 1 1 auto; min-width: 0; }

.tl-noti-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  flex: none;
  border-radius: 50%;
  color: var(--text-dim);
  cursor: pointer;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background .18s ease;
}
.tl-noti-bell:hover { color: var(--tl-cyan); border-color: var(--border-cyan); background: rgba(44,193,255,.08); }
.tl-noti-bell:focus-visible { outline: 2px solid var(--tl-cyan); outline-offset: 2px; }
.tl-noti-bell.has-unread { color: var(--tl-cyan); border-color: var(--border-cyan); }
.tl-noti-bell--side { width: 38px; height: 38px; }

.tl-noti-bell__badge {
  position: absolute;
  inset-block-start: -5px;
  inset-inline-end: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  background: var(--grad-warn);
  border: 2px solid var(--bg-1);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(185,20,61,.55);
}

/* Notification modal — opened by the bell; closable ONLY via the X button. */
.tl-noti-modal {
  position: fixed;
  inset: 0;
  z-index: 110000;                 /* above nav + imp-banner(100000), below toasts(120000) */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: clamp(16px, 8vh, 90px) 16px 16px;
}
.tl-noti-modal[hidden] { display: none; }
.tl-noti-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,16,.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.tl-noti-modal__card {
  position: relative;
  width: min(520px, 100%);
  max-height: min(640px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--text);
  background: linear-gradient(180deg, rgba(20,36,71,.98), rgba(10,18,40,.99));
  border: 1px solid var(--border-cyan);
  border-radius: var(--radius-l);
  box-shadow: 0 40px 90px -24px rgba(0,0,0,.8), var(--shadow-glow);
  animation: tlNotiIn .22s cubic-bezier(.2,.7,.3,1.1);
}
@keyframes tlNotiIn { from { opacity: 0; transform: translateY(-12px) scale(.985); } to { opacity: 1; transform: none; } }

.tl-noti-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-block-end: 1px solid var(--border);
}
.tl-noti-modal__actions { display: inline-flex; align-items: center; gap: 8px; }
.tl-noti-modal__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  flex: none;
  border-radius: 50%;
  color: var(--text-dim);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: color .15s ease, border-color .15s ease, background .15s ease;
}
.tl-noti-modal__close:hover { color: var(--warn); border-color: rgba(255,77,109,.4); background: rgba(255,77,109,.08); }
.tl-noti-modal__close:focus-visible { outline: 2px solid var(--tl-cyan); outline-offset: 2px; }
.tl-noti__title { font-size: 16px; font-weight: 800; }
.tl-noti__markall {
  font-size: 12px;
  font-weight: 700;
  color: var(--tl-cyan);
  background: none;
  border: 0;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
}
.tl-noti__markall:hover { color: var(--tl-cyan-soft); text-decoration: underline; }

.tl-noti__list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 6px;
}

.tl-noti__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius-s);
  color: inherit;
  text-decoration: none;
  transition: background .15s ease;
}
.tl-noti__item + .tl-noti__item { margin-block-start: 2px; }
a.tl-noti__item { cursor: pointer; }
a.tl-noti__item:hover { background: rgba(44,193,255,.08); }
.tl-noti__item.is-unread { background: rgba(44,193,255,.06); }

.tl-noti__dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  margin-block-start: 5px;
  border-radius: 50%;
  background: var(--text-mute);
}
.tl-noti__item.sev-info    .tl-noti__dot { background: var(--tl-cyan); }
.tl-noti__item.sev-success .tl-noti__dot { background: var(--ok); }
.tl-noti__item.sev-warning .tl-noti__dot { background: var(--gold); }
.tl-noti__item.sev-danger  .tl-noti__dot { background: var(--warn); }
.tl-noti__item.is-unread .tl-noti__dot { box-shadow: 0 0 0 3px rgba(44,193,255,.18); }

.tl-noti__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.tl-noti__itemtitle { font-size: 13px; font-weight: 700; line-height: 1.35; }
.tl-noti__itemtext {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tl-noti__time { font-size: 11px; color: var(--text-mute); font-variant-numeric: tabular-nums; }

.tl-noti__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 30px 18px;
  color: var(--text-mute);
  font-size: 13px;
  text-align: center;
}
.tl-noti__empty[hidden] { display: none; }   /* the rule above sets display:flex, which would otherwise beat [hidden] */
.tl-noti__empty-icon { opacity: .55; }

.tl-noti__foot { padding: 11px 16px; border-block-start: 1px solid var(--border); text-align: center; }
.tl-noti__all { font-size: 12px; font-weight: 700; color: var(--tl-cyan); text-decoration: none; }
.tl-noti__all:hover { color: var(--tl-cyan-soft); text-decoration: underline; }

@media (max-width: 600px) {
  .tl-noti-modal { padding: 12px; align-items: stretch; }
  .tl-noti-modal__card { width: 100%; max-height: calc(100vh - 24px); }
  .tl-noti-bell { width: 38px; height: 38px; }
}

/* ============================================================================
   Admin consistency additions (2026-06) — utility classes the sections rely on,
   a unified card-hover (matches the affiliates leaderboard feel) and the small
   components used by the Automation/Contact sections. All scoped so they only
   affect the admin shell where needed. See ADMIN_REWORK_PLAN.md.
   ========================================================================== */

/* A1 — typographic + layout utilities (were referenced but never defined) */
.t-sm { font-size: var(--t-sm); }
.t-xs { font-size: var(--t-xs); }
.text-cyan { color: var(--tl-cyan); }
.uppercase { text-transform: uppercase; }
.flex-col { display: flex; flex-direction: column; }
.section-count { font-weight: 400; font-size: var(--t-xs); color: var(--text-mute); }
body.is-app .input--compact { padding: 5px 8px; }
body.is-app .cell--good { color: var(--ok); font-weight: 700; }

/* A2 — the amber/warn badge variant (orders test badge etc.) */
body.is-app .badge--warn { background: rgba(255,216,107,.12); color: var(--gold); border: 1px solid rgba(255,216,107,.38); }

/* A3 — classes referenced by users.php but never defined */
body.is-app .note-card__ctx { flex:1; min-width:0; font-size:var(--t-xs); color:var(--text-mute); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
body.is-app .u-stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:var(--sp-4); margin-top:var(--sp-4); }

/* Unified card hover — every KPI tile + card lifts like the affiliates page.
   .admin-section already has its own halo+lift; this extends the same feel to
   the smaller surfaces so the whole panel reacts consistently to the pointer. */
body.is-app .kpi, body.is-app .card {
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s ease, border-color .25s ease;
}
body.is-app .kpi:hover, body.is-app .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 42px -20px rgba(44,193,255,.5);
  border-color: rgba(44,193,255,.35);
}
@media (prefers-reduced-motion: reduce) {
  body.is-app .kpi, body.is-app .card { transition: none; }
  body.is-app .kpi:hover, body.is-app .card:hover { transform: none; }
}

/* Page-header: title+subtitle stack + an inline title icon (Automation header) */
.app-main__head-titles { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.is-app .app-main__title-icon { color: var(--tl-cyan); vertical-align: -4px; margin-inline-end: 6px; }

/* Section header bar — title on one side, an action button on the other */
body.is-app .admin-section__bar { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom: var(--sp-3); }
body.is-app .admin-section__bar .admin-section__title { margin: 0; }

/* Dimmed table row (a disabled automation rule) */
body.is-app tr.is-dim { opacity: .5; }

/* admin-note — an inline informational strip / link (e.g. contact → automation) */
body.is-app .admin-note {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: var(--radius, 14px);
  background: rgba(44,193,255,.06); border: 1px solid rgba(44,193,255,.22);
  color: var(--text); font-size: var(--t-sm);
}
body.is-app .admin-note svg { color: var(--tl-cyan); flex: 0 0 auto; }
body.is-app .admin-note > span { flex: 1; min-width: 0; }
body.is-app a.admin-note--link { text-decoration: none; transition: border-color .2s, background .2s, transform .2s; }
body.is-app a.admin-note--link:hover { background: rgba(44,193,255,.1); border-color: rgba(44,193,255,.4); transform: translateY(-1px); }

/* =========================================================
   PULSE — Live Schedule Matrix (admin/automation cron console)
   A shared-axis Gantt: every job is one full-width lane
   [identity rail | 24h timeline track | countdown rail]; one neon
   now-needle sweeps all lanes; hover ignites a lane and fades its
   next-3 fires in over the track. The middle 1fr is the timeline,
   so there is no dead gap by construction. Tier colour rides one
   --tier var; --warn (red) means fault only, never a frequency.
   RTL-first (logical props); time axis is an LTR island. All
   motion gated behind prefers-reduced-motion.
   ========================================================= */
.cron-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-3); }
.cron-bar__title { margin: 0; }
.cron-bar__live { display: inline-flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.cron-clock { font-size: var(--t-sm); color: var(--text-dim); letter-spacing: .5px; min-inline-size: 64px; }
.cron-eye.is-active { background: rgba(44,193,255,.12); border-color: var(--border-cyan); color: var(--tl-cyan); }
.cron-sort { flex-wrap: wrap; }
.kpi__label svg { vertical-align: -1px; }

/* Summary ribbon — compact stat chips, no fat empty cards */
.cron-summary { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-block: 0 var(--sp-3); }
.cron-summary__chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border-radius: 100px; background: rgba(255,255,255,.03); border: 1px solid var(--border); font-size: var(--t-xs); color: var(--text-mute); }
.cron-summary__v { color: var(--text); font-weight: 800; font-size: var(--t-sm); font-variant-numeric: tabular-nums; }

/* Hero pair: live NEXT (ring + job + command) and 24h LOAD (heat-row + sparkline) */
.cron-hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: var(--sp-4); }
.cron-hero__next { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; padding: 16px 20px; }
.cron-hero__ring { position: relative; display: inline-flex; align-items: center; justify-content: center; --tier: var(--tl-cyan); flex: none; }
.cron-hero__ring .progress-arc__fill { stroke: var(--tier); transition: none; }     /* live ring tracks the 1s tick, not the .8s lag */
.cron-hero__ring .progress-arc__label { display: none; }
.cron-hero__ring .cron-kpi__when { position: absolute; inset: 0; margin: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 900; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cron-hero__body { display: flex; flex-direction: column; gap: 6px; min-inline-size: 0; }
.cron-hero__title { display: flex; align-items: center; gap: 9px; min-inline-size: 0; }
.cron-hero__name { font-size: var(--t-md); font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cron-hero__cmd { display: block; font-size: var(--t-xs); color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 8px; padding: 5px 9px; }
.cron-hero__cmd:empty { display: none; }
.cron-hero__load { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; justify-content: center; }
.cron-load__head { display: flex; align-items: baseline; gap: 8px; }
.cron-load__head .cron-summary__v { font-size: 22px; }
.cron-load__note { font-size: var(--t-xs); }
.cron-load__spark { display: block; inline-size: 100%; block-size: 32px; opacity: .9; }
.cron-load__axis { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-mute); }
/* Hero "next" countdown text escapes the .kpi__value gradient-clip (color:transparent + nowrap). */
.cron-kpi__when { color: var(--text); }

/* 24h heat-row (density-mixed cells) — fallback first, then color-mix */
.cron-heatrow { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.cron-heatrow i { block-size: 16px; border-radius: 3px; background: rgba(255,255,255,.05); }
.cron-heatrow i { background: color-mix(in srgb, var(--tl-cyan) calc(var(--d, 0) * 1%), rgba(255,255,255,.05)); }

/* Cadence filter chips */
.cron-filters { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.cron-chip { --c: var(--tl-cyan); display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 100px; font-size: var(--t-xs); font-weight: 700; color: var(--text-dim); background: rgba(255,255,255,.03); border: 1px solid var(--border); cursor: pointer; transition: color .18s ease, background .18s ease, border-color .18s ease; }
.cron-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cron-chip.is-active { color: var(--tl-cyan-soft); background: rgba(44,193,255,.12); border-color: var(--border-cyan); } /* fallback if color-mix unsupported */
.cron-chip.is-active { color: color-mix(in srgb, var(--c) 78%, #fff); background: color-mix(in srgb, var(--c) 14%, transparent); border-color: color-mix(in srgb, var(--c) 45%, transparent); }
.cron-chip__n { font-variant-numeric: tabular-nums; font-size: 11px; padding: 1px 7px; border-radius: 100px; background: rgba(255,255,255,.06); color: inherit; }
.cron-chip--minute { --c: var(--gold); } .cron-chip--frequent { --c: var(--tl-cyan); } .cron-chip--hourly { --c: var(--tl-blue); } .cron-chip--daily { --c: var(--ok); } .cron-chip--weekly { --c: var(--text-mute); }

/* ── THE MATRIX ───────────────────────────────────────────
   One shared grid template (id rail | 1fr track | countdown rail)
   inherited by the axis ruler, the now-overlay and every lane, so
   columns + the now-needle line up pixel-for-pixel without measuring. */
.cron-matrix { --cron-id-w: clamp(190px, 16vw, 252px); --cron-end-w: 150px; --cron-now: 0%; scrollbar-gutter: stable; }
.cron-matrix__axis,
.cron-matrix__overlay,
.cron-lane { display: grid; grid-template-columns: var(--cron-id-w) 1fr var(--cron-end-w); gap: var(--sp-3); align-items: center; }
.cron-matrix__axis { margin-bottom: 6px; }
.cron-axis__track { position: relative; block-size: 14px; }
.cron-axis__track i { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--text-mute); font-family: 'JetBrains Mono', ui-monospace, monospace; }
.cron-axis__end { font-size: 9px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--text-mute); }
.cron-matrix__body { position: relative; }
/* shared now-needle: one element, swept by the single --cron-now var (O(1)/tick) */
.cron-matrix__overlay { position: absolute; inset: 0; pointer-events: none; }
.cron-matrix__nowcol { position: relative; }
.cron-matrix__now { position: absolute; inset-block: -2px; inset-inline-start: var(--cron-now); inline-size: 2px; background: var(--tl-cyan); box-shadow: 0 0 10px var(--tl-cyan); }
.cron-matrix__now::before { content: ''; position: absolute; inset-block-start: -3px; inset-inline-start: -3px; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--tl-cyan); box-shadow: 0 0 8px var(--tl-cyan); }

.cron-item { position: relative; }
.cron-item.is-hidden { display: none; }
.cron-lane { inline-size: 100%; block-size: 38px; background: transparent; border: 0; border-block-end: 1px solid var(--border); text-align: start; color: var(--text); cursor: pointer; font-family: inherit; }
.cron-item:last-child .cron-lane { border-block-end: 0; }
.cron-lane::before { content: ''; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(to left, color-mix(in srgb, var(--tier) 12%, transparent), transparent 60%); opacity: 0; pointer-events: none; }
.cron-lane:focus-visible { outline: 2px solid var(--tl-cyan); outline-offset: -2px; border-radius: 8px; }

/* ① identity rail */
.cron-lane__id { display: flex; align-items: center; gap: var(--sp-2); min-inline-size: 0; }
.cron-dot { inline-size: 11px; block-size: 11px; border-radius: 50%; background: var(--tier, var(--text-mute)); box-shadow: 0 0 8px color-mix(in srgb, var(--tier, var(--text-mute)) 65%, transparent); flex: none; }
.cron-glyph { display: inline-flex; align-items: center; justify-content: center; inline-size: 30px; block-size: 30px; border-radius: var(--radius-s); background: rgba(127,217,255,.07); border: 1px solid var(--border); color: var(--text-dim); flex: none; }
.cron-id__main { display: flex; flex-direction: column; gap: 0; min-inline-size: 0; }
.cron-id__name { font-size: var(--t-sm); font-weight: 700; color: var(--text); white-space: nowrap; line-height: 1.25; }
.cron-id__human { font-size: var(--t-xs); color: var(--text-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; line-height: 1.2; }
.cron-id__raw { display: none; font-size: var(--t-xs); color: var(--tl-cyan-soft); line-height: 1.2; }
.cron-matrix.show-raw .cron-id__human { display: none; }
.cron-matrix.show-raw .cron-id__raw { display: block; }
.cron-dows { display: inline-flex; gap: 3px; margin-top: 2px; }
.cron-dows i { font-style: normal; inline-size: 12px; block-size: 12px; line-height: 12px; text-align: center; font-size: 8px; border-radius: 3px; color: var(--text-mute); background: rgba(255,255,255,.05); }
.cron-dows i.is-on { color: #05101f; background: var(--tier); font-weight: 800; }

/* ② timeline track — the reclaimed dead gap */
.cron-track { position: relative; block-size: 24px; border-radius: 8px; background: rgba(255,255,255,.02); border: 1px solid var(--border); overflow: hidden; unicode-bidi: isolate; }
.cron-track::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(to right, transparent 0 calc(100% / 8 - 1px), rgba(140,180,255,.09) calc(100% / 8 - 1px) calc(100% / 8)); }
.cron-track__wash { position: absolute; inset-block: 0; background: color-mix(in srgb, var(--gold) 12%, transparent); }
.cron-track__tick { position: absolute; inset-block: 5px; inline-size: 2px; border-radius: 2px; background: var(--tier); box-shadow: 0 0 6px color-mix(in srgb, var(--tier) 55%, transparent); opacity: .6; }
.cron-track__band { position: absolute; inset-block: 6px; min-inline-size: 2px; border-radius: 5px; background: color-mix(in srgb, var(--tier) 16%, transparent); border-block: 1px solid color-mix(in srgb, var(--tier) 32%, transparent); opacity: .65; }

/* ③ countdown rail */
.cron-when { display: flex; flex-direction: column; gap: 0; min-inline-size: 0; }
.cron-when__rel { font-size: var(--t-sm); font-weight: 800; color: var(--text); letter-spacing: -.2px; font-variant-numeric: tabular-nums; white-space: nowrap; line-height: 1.25; }
.cron-when__abs { font-size: var(--t-xs); color: var(--text-mute); white-space: nowrap; line-height: 1.2; }
.cron-when__abs:empty { display: none; }

/* hover/focus reveal — floating glass HUD over the track, fades the next-3 in */
.cron-lane__reveal { position: absolute; inset-block: 4px; inset-inline-start: calc(var(--cron-id-w) + var(--sp-3)); inset-inline-end: calc(var(--cron-end-w) + var(--sp-3)); display: flex; align-items: center; justify-content: center; gap: 10px; border-radius: 8px; background: linear-gradient(90deg, rgba(20,36,71,.78), rgba(12,20,40,.92)); border: 1px solid var(--border-cyan); box-shadow: 0 8px 24px -12px rgba(4,16,43,.8); padding-inline: 12px; pointer-events: none; }
.cron-lane__next-lbl { font-size: 10px; font-weight: 700; letter-spacing: .4px; color: var(--text-mute); white-space: nowrap; }
.cron-lane__next { font-size: var(--t-xs); color: var(--tl-cyan-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fade-rise { opacity: 0; visibility: hidden; }
.cron-item:hover .fade-rise, .cron-item:focus-within .fade-rise { opacity: 1; visibility: visible; }
/* lane ignite: bg tint, track brightens, siblings recede */
.cron-item:hover .cron-lane::before, .cron-item:focus-within .cron-lane::before { opacity: 1; }
.cron-item:hover .cron-track__tick, .cron-item:focus-within .cron-track__tick,
.cron-item:hover .cron-track__band, .cron-item:focus-within .cron-track__band { opacity: 1; filter: brightness(1.25) saturate(1.15); }
.cron-matrix__body:hover .cron-item:not(:hover):not(:focus-within) { opacity: .62; }

/* deep detail (click to expand) */
.cron-detail { padding: var(--sp-3) var(--sp-2) var(--sp-4); border-block-end: 1px solid var(--border); }
.cron-item:last-child .cron-detail { border-block-end: 0; }
.cron-detail__row { display: flex; gap: var(--sp-3); align-items: baseline; padding-block: 5px; }
.cron-detail__row--cmd { padding-block-end: var(--sp-2); }
.cron-detail__k { flex: none; min-inline-size: 88px; font-size: var(--t-xs); font-weight: 700; color: var(--text-mute); }
.cron-detail__cmd { color: var(--text); background: rgba(255,255,255,.03); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; word-break: break-word; font-size: var(--t-xs); flex: 1; }
.cron-detail__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--sp-2) var(--sp-4); }
.cron-detail__next { color: var(--tl-cyan-soft); }

/* Footer note */
.cron-foot { display: flex; align-items: center; gap: 7px; margin: var(--sp-4) 0 0; font-size: var(--t-xs); color: var(--text-mute); }
.cron-foot svg { color: var(--text-mute); flex: none; }

/* Motion — only when the user hasn't asked to reduce it */
@media (prefers-reduced-motion: no-preference) {
  .cron-lane::before { transition: opacity .24s ease; }
  .cron-track__tick, .cron-track__band { transition: opacity .22s ease, filter .22s ease; }
  .cron-item { transition: opacity .26s ease; }
  .fade-rise { transform: translateY(4px); transition: opacity .22s ease, transform .26s cubic-bezier(.2,.7,.3,1.2), visibility 0s linear .26s; }
  .cron-item:hover .fade-rise, .cron-item:focus-within .fade-rise { transform: none; transition-delay: 0s; }
  /* leave is slightly slower so it reads as a real fade-OUT */
  .cron-lane__reveal { transition-duration: .34s; }
  .cron-item[data-tier="minute"] .cron-dot { animation: cronPulse 2s ease-out infinite; }
  @keyframes cronPulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tier) 55%, transparent); } 70% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--tier) 0%, transparent); } 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tier) 0%, transparent); } }
  .cron-item.is-fired .cron-lane { animation: cronFire 2.4s ease-out; }
  @keyframes cronFire { 0% { background: color-mix(in srgb, var(--tier) 26%, transparent); } 100% { background: transparent; } }
}

/* Responsive */
@media (max-width: 1200px) { .cron-matrix { --cron-id-w: clamp(170px, 18vw, 230px); } }
@media (max-width: 960px) {
  .cron-hero { grid-template-columns: 1fr; }
  .cron-matrix { --cron-end-w: 124px; }
}
@media (max-width: 768px) {
  .cron-filters { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cron-filters::-webkit-scrollbar { display: none; }
  .cron-chip { flex: none; }
  /* matrix degrades to a stacked list: identity row / full-width track / countdown row */
  .cron-matrix__axis, .cron-matrix__overlay { display: none; }
  .cron-lane { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "id when" "track track"; row-gap: var(--sp-2); block-size: auto; padding-block: var(--sp-3); align-items: center; }
  .cron-lane__id { grid-area: id; } .cron-when { grid-area: when; align-items: flex-end; } .cron-track { grid-area: track; }
  /* touch has no hover; tapping a lane opens the full detail panel instead, so the hover HUD is hidden */
  .cron-lane__reveal { display: none; }
}
@media (max-width: 480px) { .cron-hero__next { grid-template-columns: 1fr; text-align: center; } .cron-hero__ring { margin-inline: auto; } }

/* ───────────────────────── Lead campaigns (admin builder) ───────────────────────── */
/* Day-sequence builder cards (native HTML5 drag-reorder, mirrors .cd-lesson).
   Lives in the global sheet because the admin shell loads no page-*.css.
   The PUBLIC landing styles live in assets/css/page-lead.css. */
.lead-steps { display: flex; flex-direction: column; gap: 8px; }
.lead-step {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(127,217,255,.14);
  transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.lead-step:hover { border-color: rgba(127,217,255,.32); box-shadow: 0 8px 24px -16px rgba(44,193,255,.5); }
.lead-step.dragging { opacity: .55; border-style: dashed; }
.lead-step.is-off { opacity: .5; }
.lead-step__drag { cursor: grab; color: var(--text-mute); font-size: 18px; line-height: 1; user-select: none; }
.lead-step__drag:active { cursor: grabbing; }
.lead-step__day {
  flex: none; min-width: 64px; font-weight: 800; font-size: 13px; color: var(--tl-cyan);
}
.lead-step__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lead-step__subject { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-step__meta { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-step__actions { flex: none; display: flex; align-items: center; gap: 4px; }
.lead-preview__frame { color-scheme: light; }
@media (max-width: 640px) {
  .lead-step { flex-wrap: wrap; }
  .lead-step__main { flex-basis: 100%; order: 3; }
}
