/* Movvent Admin: tokens, the shell and the UI kit (lane A). Lanes add their own files (analytics.css, queues.css,
   waitlist.css, moderation.css), with class names that start with their prefix (.an-, .q-, .wl-, .mod-).

   Brand: Volt #C6F432 and Forest #0C2219 (the V-sign hand, 2026-10-24). Volt is never text on white: it is a fill under
   Forest text, or text on Forest. Neutrals follow movvent.com. Every text pair below is WCAG AA (4.5:1) or better:
   Forest on white 16.7, muted #4A5A51 on white 7.3 and on the canvas 6.7, Deep green #0B6B45 on white 6.6,
   Volt on Forest 13.0; dark: ink #EAF2EC on #07140E 16.5, muted #A7B8AE on the surface 8.1, Volt on the surface 13.1.
   No inline styles anywhere (the CSP has no 'unsafe-inline'): sizes that depend on data go through SVG attributes. */

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(../fonts/plex-arabic-400-v1.woff2) format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AB, U+00B7, U+00BB, U+00D7, U+060C, U+061B, U+061F, U+0621-065F, U+0660-066D, U+0670, U+067E, U+0686, U+06A4, U+06AF, U+06CC, U+200C-200F, U+2010-2027, U+2066-2069;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(../fonts/plex-arabic-700-v1.woff2) format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AB, U+00B7, U+00BB, U+00D7, U+060C, U+061B, U+061F, U+0621-065F, U+0660-066D, U+0670, U+067E, U+0686, U+06A4, U+06AF, U+06CC, U+200C-200F, U+2010-2027, U+2066-2069;
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(../fonts/plex-sans-latin-v1.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

:root {
  color-scheme: light dark;

  --volt: #C6F432;
  --forest: #0C2219;
  --deep-green: #0B6B45;

  --bg: #F5F6F2;
  --surface: #FFFFFF;
  --surface-2: #EEF1EA;
  --surface-3: #E3E8DF;
  --ink: #0C2219;
  --ink-muted: #4A5A51;
  --ink-faint: #5C6B62;
  --line: rgb(12 34 25 / .12);
  --line-strong: rgb(12 34 25 / .24);
  --field-bg: #FFFFFF;
  --field-border: #8A978F;
  --accent: #0B6B45;
  --accent-soft: #E3F2D0;
  --on-accent-soft: #0C2219;
  --focus: #0B6B45;
  --primary: #0C2219;
  --on-primary: #C6F432;
  --primary-hover: #183B2C;
  --danger: #B4382A;
  --on-danger: #FFFFFF;
  --danger-soft: #FBE7E3;
  --on-danger-soft: #8A2418;
  --warning-soft: #FDF1C9;
  --on-warning-soft: #6B4D12;
  --success: #1E7A55;
  --success-soft: #E1F3E9;
  --on-success-soft: #145A3E;
  --info-soft: #E5EEF9;
  --on-info-soft: #1F4A7A;
  --attention: #0C2219;

  --sidebar-bg: #0C2219;
  --sidebar-ink: #EAF2EC;
  --sidebar-muted: #9DB0A5;
  --sidebar-hover: rgb(234 242 236 / .08);
  --sidebar-line: rgb(234 242 236 / .12);

  --shadow-card: 0 1px 2px rgb(12 34 25 / .05), 0 4px 16px rgb(12 34 25 / .04);
  --shadow-float: 0 12px 40px rgb(12 34 25 / .18);
  --shadow-scroll: rgb(12 34 25 / .16);
  --scrim: rgb(7 20 14 / .55);

  --font-ar: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-en: 'IBM Plex Sans', 'IBM Plex Sans Arabic', system-ui, 'Segoe UI', Helvetica, Arial, sans-serif;
  --font: var(--font-en);
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-full: 999px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --sidebar-w: 264px;
  --gutter: 32px;
  --dur: 160ms;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07140E;
    --surface: #0F2119;
    --surface-2: #142A20;
    --surface-3: #1B352A;
    --ink: #EAF2EC;
    --ink-muted: #A7B8AE;
    --ink-faint: #93A69B;
    --line: rgb(234 242 236 / .12);
    --line-strong: rgb(234 242 236 / .24);
    --field-bg: #0B1A13;
    --field-border: #5E7368;
    --accent: #C6F432;
    --accent-soft: rgb(198 244 50 / .14);
    --on-accent-soft: #DDF98A;
    --focus: #C6F432;
    --primary: #C6F432;
    --on-primary: #0C2219;
    --primary-hover: #D4F86A;
    --danger: #FF8A7A;
    --on-danger: #2A0B06;
    --danger-soft: rgb(255 138 122 / .14);
    --on-danger-soft: #FFB3A8;
    --warning-soft: rgb(242 193 78 / .14);
    --on-warning-soft: #F2C14E;
    --success: #7ED3A6;
    --success-soft: rgb(126 211 166 / .14);
    --on-success-soft: #9EE2BD;
    --info-soft: rgb(132 176 230 / .14);
    --on-info-soft: #A9C8EE;
    --attention: #C6F432;
    --sidebar-bg: #0C2219;
    --shadow-card: 0 1px 2px rgb(0 0 0 / .3);
    --shadow-float: 0 16px 48px rgb(0 0 0 / .5);
    --shadow-scroll: rgb(0 0 0 / .55);
    --scrim: rgb(0 0 0 / .6);
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
html, body { overflow-x: clip; }
html[dir='rtl'] { --font: var(--font-ar); font-size: 106.25%; }
body {
  min-block-size: 100dvh;
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[dir='rtl'] body { line-height: 1.7; }
img, svg, video { display: block; max-inline-size: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 700; line-height: 1.3; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--accent); text-underline-offset: .2em; }
[hidden] { display: none !important; }
::selection { background: var(--volt); color: var(--forest); }
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}
.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.icon { inline-size: 20px; block-size: 20px; flex: none; }
.icon-inline { display: inline-block; inline-size: 14px; block-size: 14px; vertical-align: -2px; margin-inline-start: 4px; }
html[dir='rtl'] .icon-mirror { transform: scaleX(-1); }
.kbd {
  display: inline-block; min-inline-size: 1.6em; padding: 0 .4em; border: 1px solid var(--line-strong); border-block-end-width: 2px;
  border-radius: 6px; font: 600 .75rem/1.5 var(--mono); text-align: center; color: var(--ink-muted); background: var(--surface);
}
.num, .tile-value, table.data { font-variant-numeric: tabular-nums; }

/* ---------- boot ---------- */

.boot { min-block-size: 100dvh; display: grid; place-items: center; }
.boot-mark { inline-size: 40px; block-size: auto; opacity: .9; }
@media (prefers-reduced-motion: no-preference) {
  .boot-mark { animation: breathe 1.6s var(--ease) infinite alternate; }
  @keyframes breathe { from { opacity: .35; } to { opacity: .9; } }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-block-size: 40px; padding: 8px 18px; border: 1px solid transparent; border-radius: var(--r-full);
  font-weight: 600; font-size: .9375rem; line-height: 1.2; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.btn:disabled { cursor: not-allowed; opacity: .55; }
.btn[aria-busy='true'] { cursor: progress; opacity: .8; }
.btn[aria-busy='true']::after {
  content: ''; inline-size: 14px; block-size: 14px; border-radius: 50%; border: 2px solid currentColor; border-inline-end-color: transparent;
}
@media (prefers-reduced-motion: no-preference) { .btn[aria-busy='true']::after, .spinner { animation: spin .8s linear infinite; } }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-sm { min-block-size: 34px; padding: 6px 12px; font-size: .875rem; }
.btn-block { inline-size: 100%; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.btn-danger:hover:not(:disabled) { filter: brightness(1.06); }
.btn-icon { padding: 0; inline-size: 40px; min-block-size: 40px; }
.btn-icon.btn-sm { inline-size: 34px; min-block-size: 34px; }
.link-button {
  border: 0; padding: 4px 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer;
  text-decoration: underline; text-underline-offset: .2em; text-decoration-thickness: 1px;
}
.link-button:hover { text-decoration-thickness: 2px; }
.link { font-weight: 600; }

/* ---------- forms ---------- */

.field { display: grid; gap: 6px; }
.field-label { font-size: .875rem; font-weight: 600; color: var(--ink); }
.field-hint, .field-counter { font-size: .8125rem; color: var(--ink-muted); }
.field-counter { text-align: end; margin-block-start: -4px; }
.field-error { font-size: .8125rem; font-weight: 600; color: var(--danger); }
.input {
  inline-size: 100%; min-block-size: 44px; padding: 10px 14px; border: 1px solid var(--field-border); border-radius: var(--r-md);
  background: var(--field-bg); color: var(--ink); font-size: 1rem;
}
.input::placeholder { color: var(--ink-faint); opacity: 1; }
.input:hover { border-color: var(--ink-muted); }
.input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
.input[aria-invalid='true'] { border-color: var(--danger); }
.textarea { min-block-size: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: auto; padding-inline-end: 8px; }
.input-code { font: 600 1.375rem/1.2 var(--mono); letter-spacing: .3em; text-align: center; }
.input-group { position: relative; }
.input-group .input { padding-inline-end: 52px; }
.input-group .reveal { position: absolute; inset-block-start: 5px; inset-inline-end: 4px; }

/* ---------- surfaces ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card); padding: var(--s5); min-inline-size: 0; }
.card-title { font-size: 1rem; margin-block-end: var(--s4); }
.section { display: grid; gap: var(--s4); }
.section + .section { margin-block-start: var(--s6); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--s3); }
.section-title { font-size: 1.0625rem; }
.section-description { color: var(--ink-muted); font-size: .875rem; margin-block-start: 2px; }
.section-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); margin-block-end: var(--s5); }
.toolbar > :first-child { margin-inline-end: auto; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s3) var(--s5); }
.fact dt { font-size: .8125rem; color: var(--ink-muted); }
.fact dd { font-weight: 600; overflow-wrap: anywhere; }

/* ---------- badges ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-full);
  font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--surface-2); color: var(--ink-muted);
}
.badge.tone-success { background: var(--success-soft); color: var(--on-success-soft); }
.badge.tone-warning { background: var(--warning-soft); color: var(--on-warning-soft); }
.badge.tone-danger { background: var(--danger-soft); color: var(--on-danger-soft); }
.badge.tone-info { background: var(--info-soft); color: var(--on-info-soft); }
.badge.tone-brand { background: var(--volt); color: var(--forest); }

/* ---------- tiles ---------- */

.tiles { display: grid; gap: var(--s3); }
.tiles-queues { grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.tiles-figures { grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); }
.tile {
  position: relative; display: grid; align-content: start; gap: 4px; padding: var(--s4) var(--s5) var(--s5);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  color: var(--ink); text-decoration: none; min-inline-size: 0;
}
.tile-label { font-size: .875rem; font-weight: 600; color: var(--ink-muted); padding-inline-end: 24px; }
.tile-value { font-size: 2rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
html[dir='rtl'] .tile-value { letter-spacing: 0; }
.tile-hint { font-size: .8125rem; color: var(--ink-muted); }
.tile-note { justify-self: start; margin-block-start: 6px; padding: 2px 10px; border-radius: var(--r-full); font-size: .75rem; font-weight: 600; background: var(--surface-2); color: var(--ink-muted); }
.tile-go { position: absolute; inset-block-start: var(--s4); inset-inline-end: var(--s4); color: var(--ink-faint); transition: transform var(--dur) var(--ease); }
.tile.is-link { cursor: pointer; transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.tile.is-link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-float); }
.tile.is-link:hover .tile-go { color: var(--ink); }
.tile.tone-attention::before {
  content: ''; position: absolute; inset-block: 14px; inset-inline-start: 0; inline-size: 4px; border-radius: 0 4px 4px 0; background: var(--volt);
}
html[dir='rtl'] .tile.tone-attention::before { border-radius: 4px 0 0 4px; }
.tile.tone-quiet .tile-value { color: var(--ink-faint); }
/* Figures line up whatever their label's length: the label on top, the figure at the bottom. */
.tiles-figures .tile { grid-template-rows: 1fr auto; min-block-size: 112px; }
.tiles-figures .tile-value { align-self: end; }

/* ---------- tables ---------- */

/* A table wider than its card scrolls inside it (phones): a shadow marks each side that has more, and covers that move with
   the table hide it at either end, in both directions. */
.table-wrap {
  overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-card);
  background:
    linear-gradient(to right, var(--surface) 30%, transparent) left center / 40px 100% no-repeat local,
    linear-gradient(to left, var(--surface) 30%, transparent) right center / 40px 100% no-repeat local,
    linear-gradient(to right, var(--shadow-scroll), transparent) left center / 14px 100% no-repeat scroll,
    linear-gradient(to left, var(--shadow-scroll), transparent) right center / 14px 100% no-repeat scroll,
    var(--surface);
}
.table-wrap.is-empty { overflow: visible; }
table.data { inline-size: 100%; border-collapse: collapse; font-size: .875rem; }
table.data th, table.data td { padding: 10px 14px; text-align: start; vertical-align: middle; border-block-end: 1px solid var(--line); }
/* The last row has no rule under it, its row headers (th scope=row) included. */
table.data tbody tr:last-child > * { border-block-end: 0; }
table.data th { font-size: .75rem; font-weight: 600; color: var(--ink-muted); background: var(--surface-2); white-space: nowrap; position: sticky; inset-block-start: 0; }
html[dir='ltr'] table.data th { text-transform: uppercase; letter-spacing: .05em; }
table.data .is-end { text-align: end; }
table.data.is-dense th, table.data.is-dense td { padding: 6px 10px; }
table.data tbody tr:hover { background: var(--surface-2); }
.th-sort { all: unset; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.th-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sort-mark::after { content: '↕'; opacity: .35; }
th[aria-sort='descending'] .sort-mark::after { content: '↓'; opacity: 1; }
th[aria-sort='ascending'] .sort-mark::after { content: '↑'; opacity: 1; }
.row-link { color: var(--ink); font-weight: 600; text-decoration: none; }
.row-link:hover { text-decoration: underline; }
.load-more { display: flex; justify-content: center; padding-block: var(--s4); }

/* ---------- segmented filter ---------- */

.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: var(--r-full); background: var(--surface-2); }
.segment {
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 34px; padding: 4px 14px; border: 0; border-radius: var(--r-full);
  background: transparent; color: var(--ink-muted); font-weight: 600; font-size: .875rem; cursor: pointer;
}
.segment:hover { color: var(--ink); }
.segment[aria-pressed='true'] { background: var(--primary); color: var(--on-primary); }
.segment-count { font-size: .75rem; opacity: .8; }

/* ---------- states ---------- */

.state { display: grid; justify-items: center; gap: var(--s2); padding: var(--s7) var(--s5); text-align: center; color: var(--ink-muted); }
.state-title { font-weight: 700; color: var(--ink); max-inline-size: 48ch; }
.state-body { max-inline-size: 56ch; }
.state-action { margin-block-start: var(--s3); }
.state-icon { inline-size: 28px; block-size: 28px; }
.state-error .state-icon { color: var(--danger); }
.state-permission .state-icon { color: var(--ink-muted); }
.state-loading { grid-auto-flow: column; justify-content: center; align-items: center; }
.spinner { inline-size: 18px; block-size: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-block-start-color: var(--accent); }
.table-empty .state { padding-block: var(--s6); }

/* ---------- media ---------- */

.media { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--surface-2); min-block-size: 120px; display: grid; place-items: center; }
.media img, .media video { inline-size: 100%; block-size: auto; }
.media.is-loading::after { content: ''; inline-size: 18px; block-size: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-block-start-color: var(--accent); }
@media (prefers-reduced-motion: no-preference) { .media.is-loading::after { animation: spin .8s linear infinite; } }
.media-note { padding: var(--s4); font-size: .8125rem; color: var(--ink-muted); text-align: center; }

/* ---------- dialogs ---------- */

.dialog {
  margin: auto; inline-size: min(520px, calc(100vw - 32px)); max-block-size: calc(100dvh - 32px); padding: var(--s5); border: 0; border-radius: var(--r-xl);
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-float);
}
.dialog::backdrop { background: var(--scrim); }
.dialog-title { font-size: 1.1875rem; margin-block-end: var(--s3); }
.dialog-body { display: grid; gap: var(--s3); }
.dialog-text { color: var(--ink-muted); }
.dialog-note { font-size: .8125rem; color: var(--ink-muted); }
.dialog-target { display: grid; gap: 2px; padding: var(--s3) var(--s4); border-radius: var(--r-md); background: var(--surface-2); }
.dialog-target-label { font-size: .75rem; font-weight: 600; color: var(--ink-muted); }
.dialog-target-name { font-weight: 700; overflow-wrap: anywhere; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--s2); margin-block-start: var(--s5); }
.dialog-actions:empty { display: none; }
.dialog-unlock .gate-form { margin-block-start: var(--s2); }

/* ---------- toasts ---------- */

.toasts {
  position: fixed; inset-block-end: var(--s5); inset-inline: 0; z-index: 60; display: grid; justify-items: center; gap: var(--s2);
  padding-inline: var(--s4); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s3); max-inline-size: min(560px, 100%); padding: 10px 10px 10px 18px;
  border-radius: var(--r-md); background: var(--forest); color: #FFFFFF; box-shadow: var(--shadow-float); pointer-events: auto;
}
html[dir='rtl'] .toast { padding: 10px 18px 10px 10px; }
.toast.tone-success { background: var(--forest); }
.toast.tone-success::before { content: ''; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--volt); flex: none; }
.toast.tone-error { background: #8A2418; }
.toast-text { flex: 1; font-weight: 600; font-size: .875rem; }
.toast .btn-ghost { color: inherit; }
.toast .btn-ghost:hover { background: rgb(255 255 255 / .12); }
@media (prefers-reduced-motion: no-preference) {
  .toast { animation: rise var(--dur) var(--ease); }
  @keyframes rise { from { transform: translateY(8px); opacity: 0; } }
}

/* ---------- gate: sign-in, unlock, locked ---------- */

.gate { min-block-size: 100dvh; display: grid; place-items: center; padding: var(--s5) 16px; }
.gate-card {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); inline-size: min(940px, 100%); min-block-size: 560px;
  border-radius: 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-float);
}
.gate-brand {
  display: flex; flex-direction: column; gap: var(--s3); padding: var(--s7) var(--s6); background: var(--forest); color: var(--sidebar-ink);
}
.gate-lockup { inline-size: 236px; block-size: auto; margin-inline-start: -14px; }
.gate-product { font-size: 1.75rem; font-weight: 700; color: var(--volt); margin-block-start: var(--s2); }
.gate-points { list-style: none; padding: 0; display: grid; gap: var(--s3); margin-block-start: var(--s6); max-inline-size: 34ch; }
.gate-point { display: flex; align-items: flex-start; gap: var(--s3); color: var(--sidebar-ink); font-size: .9375rem; }
.gate-point .icon { color: var(--volt); margin-block-start: 2px; }
.gate-note { margin-block-start: auto; max-inline-size: 30ch; color: var(--sidebar-muted); font-size: .875rem; }
.gate-main { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s6) var(--s7) var(--s7); }
.gate-top { display: flex; justify-content: flex-end; }
.gate-title { font-size: 1.75rem; margin-block-start: var(--s5); }
.gate-lead { color: var(--ink-muted); }
.gate-form { display: grid; gap: var(--s4); }
.gate-message { padding: 10px 14px; border-radius: var(--r-md); font-size: .875rem; font-weight: 600; background: var(--danger-soft); color: var(--on-danger-soft); }
.gate-message[data-tone='info'] { background: var(--info-soft); color: var(--on-info-soft); }
.gate-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s3); }
.gate-fine { font-size: .8125rem; color: var(--ink-faint); text-align: center; }
@media (max-width: 760px) {
  .gate { place-items: start center; padding: 0; }
  .gate-card { grid-template-columns: 1fr; grid-template-rows: auto 1fr; min-block-size: 100dvh; border-radius: 0; border: 0; box-shadow: none; }
  .gate-brand { padding: var(--s5) 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); }
  .gate-lockup { inline-size: 132px; margin-inline-start: -8px; }
  .gate-product { font-size: 1.125rem; margin: 0; }
  .gate-note, .gate-points { flex-basis: 100%; margin: 0; max-inline-size: none; }
  .gate-points { display: none; }
  .gate-main { padding: var(--s4) 16px var(--s6); }
  .gate-title { margin-block-start: 0; font-size: 1.5rem; }
}

/* ---------- shell ---------- */

.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-block-size: 100dvh; }
.skip-link {
  position: absolute; inset-block-start: -100px; inset-inline-start: 16px; z-index: 80; padding: 10px 16px; border: 0;
  border-radius: 0 0 var(--r-md) var(--r-md); background: var(--volt); color: var(--forest); font-weight: 700;
}
.skip-link:focus { inset-block-start: 0; }
/* The brand and the account stay in view; the menu between them scrolls when the window is short. */
.sidebar {
  position: sticky; inset-block-start: 0; block-size: 100dvh; overflow: hidden; display: flex; flex-direction: column;
  background: var(--sidebar-bg); color: var(--sidebar-ink); padding: var(--s4) var(--s3);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); padding: var(--s1) var(--s2) var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s2); color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.brand-lockup { inline-size: 112px; block-size: auto; margin-inline-start: -6px; }
.brand-product { padding: 2px 10px; border-radius: var(--r-full); background: var(--volt); color: var(--forest); font-size: .75rem; font-weight: 700; }
.nav-close { display: none; color: var(--sidebar-ink); }
.nav-close:hover { background: var(--sidebar-hover) !important; }
.nav {
  display: grid; gap: var(--s4); align-content: start; flex: 1; min-block-size: 0; overflow-y: auto; overscroll-behavior: contain;
  /* Room for the focus ring inside the scrolling menu. */
  padding: 4px; margin: -4px; scrollbar-width: thin; scrollbar-color: var(--sidebar-line) transparent;
  --nav-fade-start: 0px; --nav-fade-end: 0px;
}
/* An edge with more of the menu out of view fades out (shell.js marks it), so a cut-off item reads as "scroll for more". */
.nav.has-more-before { --nav-fade-start: 28px; }
.nav.has-more-after { --nav-fade-end: 44px; }
.nav.has-more-before, .nav.has-more-after {
  mask-image: linear-gradient(to bottom, transparent, #000 var(--nav-fade-start), #000 calc(100% - var(--nav-fade-end)), transparent);
}
.nav-list { list-style: none; padding: 0; display: grid; gap: 2px; }
.nav-group-title { padding: 0 var(--s3) var(--s1); font-size: .75rem; font-weight: 600; color: var(--sidebar-muted); }
html[dir='ltr'] .nav-group-title { text-transform: uppercase; letter-spacing: .08em; }
.nav-link {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s2); min-block-size: 40px; padding: 8px var(--s3);
  border-radius: var(--r-md); color: var(--sidebar-ink); text-decoration: none; font-weight: 500;
  transition: background-color var(--dur) var(--ease);
}
.nav-link:hover { background: var(--sidebar-hover); }
.nav-link.is-active { background: var(--volt); color: var(--forest); font-weight: 700; }
.nav-link:focus-visible { outline-color: var(--volt); }
.nav-link.is-active:focus-visible { outline-color: var(--sidebar-ink); }
.nav-count { min-inline-size: 24px; padding: 0 8px; border-radius: var(--r-full); background: rgb(198 244 50 / .16); color: var(--volt); font-size: .75rem; font-weight: 700; text-align: center; }
.nav-link.is-active .nav-count { background: var(--forest); color: var(--volt); }
.sidebar-foot { display: grid; gap: var(--s3); margin-block-start: var(--s5); padding: var(--s4) var(--s2) 0; border-block-start: 1px solid var(--sidebar-line); }
.account-name { font-weight: 700; overflow-wrap: anywhere; }
.account-role { font-size: .8125rem; color: var(--sidebar-muted); }
/* The language and Sign out share one row in Arabic too (its longer words used to wrap them, which pushed the menu off screen). */
.sidebar-actions { display: flex; flex-wrap: wrap; gap: var(--s1); margin-inline: -8px; }
.sidebar-actions .btn { padding-inline: 8px; }
.btn.on-forest { color: var(--sidebar-ink); }
.btn.on-forest:hover:not(:disabled) { background: var(--sidebar-hover); }
.btn.on-forest:focus-visible, .sidebar :focus-visible { outline-color: var(--volt); }

.main { min-inline-size: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; inset-block-start: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  /* On a very wide window the bar's contents line up with the page's 1280 px column, centred like it. */
  min-block-size: 68px; padding-block: var(--s3); padding-inline: max(var(--gutter), calc((100% - 1280px) / 2));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-block-end: 1px solid var(--line);
}
.topbar-start, .topbar-end { display: flex; align-items: center; gap: var(--s3); min-inline-size: 0; }
.page-title { font-size: 1.375rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-title:focus { outline: none; }
.menu-toggle { display: none; }
.unlock-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: var(--r-full); background: var(--surface);
  border: 1px solid var(--line); font-size: .8125rem; font-weight: 600; color: var(--ink-muted); white-space: nowrap;
}
.unlock-dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
.unlock-short { display: none; }
.unlock-pill.is-soon { background: var(--warning-soft); color: var(--on-warning-soft); border-color: transparent; }
.unlock-pill.is-soon .unlock-dot { background: var(--on-warning-soft); box-shadow: none; }
.unlock-pill.is-locked { background: var(--surface-2); color: var(--ink-muted); }
.unlock-pill.is-locked .unlock-dot { background: var(--ink-faint); box-shadow: none; }
.content { flex: 1; padding: var(--s5) var(--gutter) var(--s7); }
.content:focus { outline: none; }
.page { max-inline-size: 1280px; margin-inline: auto; }
.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); }

/* ---------- Home ---------- */

.home-toolbar { margin-block-end: var(--s5); }
.home-updated { font-size: .8125rem; color: var(--ink-muted); }
.home-updated.is-warning { color: var(--on-warning-soft); font-weight: 600; }
.home-footer { margin-block-start: var(--s6); font-size: .875rem; color: var(--ink-muted); }

/* ---------- narrow screens ---------- */

@media (max-width: 960px) {
  :root { --gutter: 16px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 50; inline-size: min(300px, 86vw); block-size: 100dvh;
    visibility: hidden; transform: translateX(-100%);
  }
  html[dir='rtl'] .sidebar { transform: translateX(100%); }
  .nav-open .sidebar, html[dir='rtl'] .nav-open .sidebar { visibility: visible; transform: none; box-shadow: var(--shadow-float); }
  @media (prefers-reduced-motion: no-preference) {
    .sidebar { transition: transform 200ms var(--ease), visibility 0s linear 200ms; }
    .nav-open .sidebar { transition: transform 200ms var(--ease); }
  }
  .nav-close { display: inline-flex; }
  .menu-toggle { display: inline-flex; margin-inline-start: -8px; }
  .topbar { min-block-size: 60px; gap: var(--s2); }
  .topbar-start { gap: var(--s2); }
  .page-title { font-size: 1.125rem; }
  .lock-button .btn-label { display: none; }
  .lock-button { padding: 0; inline-size: 34px; }
}
@media (max-width: 520px) {
  .topbar-start .badge { display: none; }
  .unlock-pill { padding: 4px 10px; font-size: .75rem; }
  /* The pill shows the clock time alone (its words stay for screen readers), and a long title takes two lines. */
  .unlock-pill.has-short .unlock-text {
    position: absolute; inline-size: 1px; block-size: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
  }
  .unlock-pill.has-short .unlock-short { display: inline; }
  .page-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; line-height: 1.25; font-size: 1.0625rem; }
  .tiles-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { padding: var(--s3) var(--s4) var(--s4); }
  .tile-value { font-size: 1.625rem; }
  .content { padding-block-start: var(--s4); }
  .toolbar { gap: var(--s2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; animation: none !important; }
}
