/* ============================================================================
   Numu Executive PWA — design system
   Extracted 1:1 from the Numu admin dashboard (public/assets/admin/css/app.css)
   and adapted into a mobile, installable app shell (top header + bottom nav).
   No redesign — same tokens, cards, badges, tables, forms, modals, buttons.
   ============================================================================ */

:root {
  /* Brand tokens (identical to the dashboard) */
  --na-primary: #3D1A5B;
  --na-primary-soft: #5a2d80;
  --na-accent: #F4D17E;
  --na-bg: #f6f4fb;
  --na-surface: #ffffff;
  --na-text: #1f1235;
  --na-muted: #6b6783;
  --na-border: #e6e1ee;
  --na-radius: 12px;
  --na-shadow: 0 18px 48px rgba(61, 26, 91, 0.08);
  --na-shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px -8px rgba(15,23,42,.08);

  /* Entity accents (startup = cyan, investor = violet) */
  --startup-accent: #0ea5e9; --startup-soft: #ecfeff; --startup-strong: #0e7490; --startup-line: #a5f3fc;
  --investor-accent: #6366f1; --investor-soft: #e0e7ff; --investor-strong: #4338ca; --investor-line: #c7d2fe;

  /* Semantic status */
  --ok: #047857; --ok-soft: #ecfdf5; --ok-line: #a7f3d0;
  --warn: #b45309; --warn-soft: #fff7ed; --warn-line: #fed7aa;
  --danger: #b91c1c; --danger-soft: #fef2f2; --danger-line: #fecaca;
  --info: #1d4ed8; --info-soft: #dbeafe;
  --slate: #475569; --slate-soft: #e2e8f0;

  --header-h: 56px;
  --nav-h: 62px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--na-text);
  background: var(--na-bg);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
[dir="rtl"] body { font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
[x-cloak], [hidden] { display: none !important; }

/* ── App shell (mobile: header + scrollable main + bottom nav) ────────────── */
.app {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 640px;           /* tablet cap; phone = full width */
  margin: 0 auto;
  background: var(--na-bg);
}
.app-header {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--safe-top);
  background: var(--na-surface);
  border-bottom: 1px solid var(--na-border);
}
.app-header__bar {
  height: var(--header-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
}
.app-header__back {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--na-border);
  background: var(--na-surface); color: var(--na-text);
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.app-header__title { font-size: 17px; font-weight: 800; letter-spacing: -.01em; margin: 0; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-header__logo { height: 26px; }
.app-header__action { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--na-border);
  background: var(--na-surface); color: var(--na-muted); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.app-header__badge { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--danger); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center; }

.app-main {
  flex: 1;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 20px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bottom navigation */
.app-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  max-width: 640px; margin: 0 auto;
  background: var(--na-surface);
  border-top: 1px solid var(--na-border);
  padding-bottom: var(--safe-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.app-nav__item {
  height: var(--nav-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--na-muted); font-size: 10.5px; font-weight: 700;
}
.app-nav__item svg { width: 22px; height: 22px; }
.app-nav__item.is-active { color: var(--na-primary); }
.app-nav__item.is-active .app-nav__dot { opacity: 1; }
.app-nav__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--na-primary); opacity: 0; margin-top: -1px; }

/* ── Page bits ───────────────────────────────────────────────────────────── */
.page-title { margin: 2px 0 14px; font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
.page-sub { margin: -8px 0 16px; color: var(--na-muted); font-size: 13.5px; }
.section-label { font-size: 11px; font-weight: 800; color: var(--na-muted); text-transform: uppercase; letter-spacing: .06em; margin: 20px 2px 10px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card { background: var(--na-surface); border: 1px solid var(--na-border); border-radius: var(--na-radius); box-shadow: var(--na-shadow-sm); }
.card--pad { padding: 16px; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid #f1f5f9; }
.card__title { margin: 0; font-size: 14px; font-weight: 800; color: var(--na-text); display: inline-flex; align-items: center; gap: 9px; }
.card__icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: var(--investor-soft); color: var(--investor-strong); flex: 0 0 auto; }
.card__body { padding: 14px 16px; }
.card__foot { padding: 12px 16px; border-top: 1px solid #f1f5f9; background: #fafbfc; display: flex; justify-content: space-between; gap: 10px; }

/* Collapsible card (rd-card pattern) */
.acc { background: var(--na-surface); border: 1px solid var(--na-border); border-radius: var(--na-radius); box-shadow: var(--na-shadow-sm); overflow: hidden; margin-bottom: 12px; }
.acc__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; padding: 15px 16px; background: none; border: 0; text-align: start; color: inherit; }
.acc__title { display: inline-flex; align-items: center; gap: 11px; margin: 0; font-size: 15px; font-weight: 800; }
.acc__chevron { color: #94a3b8; transition: transform .25s; }
.acc[data-open="false"] .acc__chevron { transform: rotate(-90deg); }
.acc__body-wrap { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .28s ease; }
.acc[data-open="false"] > .acc__body-wrap { grid-template-rows: 0fr; }
.acc__body { overflow: hidden; min-height: 0; padding: 2px 16px 16px; }
.acc[data-open="false"] .acc__body { padding-top: 0; padding-bottom: 0; }

/* ── Metric cards (dashboard) ────────────────────────────────────────────── */
.metric-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric { display: flex; gap: 12px; align-items: center; padding: 14px; background: var(--na-surface); border: 1px solid var(--na-border); border-radius: var(--na-radius); box-shadow: var(--na-shadow-sm); }
.metric__icon { width: 40px; height: 40px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; background: var(--investor-soft); color: var(--investor-strong); flex: 0 0 auto; }
.metric__icon--startup { background: var(--startup-soft); color: var(--startup-strong); }
.metric__icon--ok { background: var(--ok-soft); color: var(--ok); }
.metric__icon--warn { background: var(--warn-soft); color: var(--warn); }
.metric__icon--danger { background: var(--danger-soft); color: var(--danger); }
.metric__body { min-width: 0; }
.metric__label { font-size: 11.5px; font-weight: 600; color: var(--na-muted); }
.metric__value { font-size: 22px; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.metric__delta { font-size: 11px; font-weight: 700; }
.metric__delta--up { color: var(--ok); } .metric__delta--down { color: var(--danger); } .metric__delta--flat { color: var(--na-muted); }

/* ── Badges & pills (dashboard .badge + .md-pill) ────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; background: var(--badge-color, #9aa0b4); color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--pill-bg, #f1f5f9); color: var(--pill-fg, #475569); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: currentColor; opacity: .9; }
.pill--plain::before { display: none; }
.pill--ok { --pill-bg: var(--ok-soft); --pill-fg: var(--ok); }
.pill--warn { --pill-bg: var(--warn-soft); --pill-fg: var(--warn); }
.pill--danger { --pill-bg: var(--danger-soft); --pill-fg: var(--danger); }
.pill--info { --pill-bg: var(--info-soft); --pill-fg: var(--info); }
.pill--slate { --pill-bg: var(--slate-soft); --pill-fg: var(--slate); }
.pill--startup { --pill-bg: var(--startup-soft); --pill-fg: var(--startup-strong); }
.pill--investor { --pill-bg: var(--investor-soft); --pill-fg: var(--investor-strong); }

/* ── Buttons (dashboard btn-* ) ──────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 11px; font-size: 14px; font-weight: 700; border: 1px solid transparent; }
.btn--primary { background: var(--na-primary); color: #fff; border-color: var(--na-primary); }
.btn--primary:active { background: var(--na-primary-soft); }
.btn--secondary { background: var(--na-surface); color: var(--na-text); border-color: var(--na-border); }
.btn--danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn--ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn--ghost { background: transparent; color: var(--na-primary); }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; background: var(--na-bg); border: 1px solid var(--na-border); color: var(--na-text); display: inline-flex; align-items: center; justify-content: center; }
.icon-btn--v { background: var(--investor-soft); color: var(--investor-strong); border-color: var(--investor-line); }

/* ── Search + filter chips ───────────────────────────────────────────────── */
.search { position: relative; margin-bottom: 12px; }
.search input { width: 100%; padding: 12px 14px 12px 40px; border: 1px solid var(--na-border); border-radius: 12px; font-size: 15px; background: var(--na-surface); color: var(--na-text); }
.search input:focus { outline: none; border-color: var(--na-primary); box-shadow: 0 0 0 3px rgba(61,26,91,.12); }
.search__icon { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-start: 13px; color: var(--na-muted); pointer-events: none; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: var(--na-surface); border: 1px solid var(--na-border); border-radius: 999px; color: var(--na-muted); font-size: 13px; font-weight: 700; }
.chip.is-active { background: var(--investor-soft); border-color: var(--investor-line); color: var(--investor-strong); }

/* ── List rows (mobile replacement for data-table) ───────────────────────── */
.list { display: grid; gap: 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--na-surface); border: 1px solid var(--na-border); border-radius: var(--na-radius); box-shadow: var(--na-shadow-sm); }
.row:active { background: #fafbfd; }
.row__avatar { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; color: #fff; flex: 0 0 auto; background: linear-gradient(135deg, var(--investor-accent), #818cf8); }
.row__avatar--startup { background: linear-gradient(135deg, var(--startup-accent), #06b6d4); }
.row__body { min-width: 0; flex: 1; }
.row__title { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row__sub { font-size: 12.5px; color: var(--na-muted); margin-top: 2px; display: flex; gap: 8px; flex-wrap: wrap; }
.row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.row__chev { color: #cbd5e1; flex: 0 0 auto; }

/* ── Detail hero (rd-hero / md-hero) ─────────────────────────────────────── */
.hero { display: flex; gap: 16px; align-items: flex-start; padding: 18px; background: var(--na-surface); border: 1px solid var(--na-border); border-radius: 16px; box-shadow: var(--na-shadow-sm); margin-bottom: 14px; }
.hero__avatar { width: 64px; height: 64px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 24px; flex: 0 0 auto; background: linear-gradient(135deg, var(--investor-accent), #818cf8); }
.hero__avatar--startup { background: linear-gradient(135deg, var(--startup-accent), #06b6d4); }
.hero__body { min-width: 0; flex: 1; }
.hero__title { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.015em; line-height: 1.2; word-break: break-word; }
.hero__sub { margin: 4px 0 0; font-size: 13px; color: var(--na-muted); }
.hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
/* Date tile (meeting hero) */
.date-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 64px; padding: 10px 12px; background: linear-gradient(180deg,#f8fafc,#f1f5f9); border: 1px solid #e2e8f0; border-radius: 12px; line-height: 1; }
.date-tile__mon { font-size: 11px; font-weight: 800; color: var(--investor-strong); text-transform: uppercase; letter-spacing: .08em; }
.date-tile__day { font-size: 26px; font-weight: 800; margin: 4px 0 2px; }
.date-tile__year { font-size: 11px; font-weight: 600; color: var(--na-muted); }

/* KV rows in detail cards */
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 8px 12px; font-size: 13.5px; }
.kv dt { color: var(--na-muted); } .kv dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ── Forms (dashboard .form-field) ───────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label { font-size: 13px; font-weight: 700; }
.field .req { color: var(--danger); margin-inline-start: 3px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--na-border); border-radius: 11px; font-size: 15px; background: var(--na-surface); color: var(--na-text); font-family: inherit; }
.field textarea { resize: vertical; min-height: 100px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--na-primary); box-shadow: 0 0 0 3px rgba(61,26,91,.12); }
.field__hint { font-size: 11.5px; color: var(--na-muted); }
.form-actions { display: flex; gap: 10px; margin-top: 8px; }
/* Toggle switch */
.switch { position: relative; display: inline-block; width: 44px; height: 26px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch__t { position: absolute; inset: 0; background: var(--na-border); border-radius: 999px; transition: .2s; }
.switch__t::before { content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .switch__t { background: var(--na-primary); }
.switch input:checked + .switch__t::before { transform: translateX(18px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }

/* Selectable list (attendees) */
.pick { display: grid; gap: 8px; max-height: 320px; overflow-y: auto; }
.pick__item { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--na-border); border-radius: 11px; background: var(--na-surface); }
.pick__item.is-on { border-color: var(--investor-line); background: var(--investor-soft); }
.pick__check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--na-border); display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: 0 0 auto; }
.pick__item.is-on .pick__check { background: var(--investor-strong); border-color: var(--investor-strong); }

/* ── Initial DD lanes (rd-dd-category) ───────────────────────────────────── */
.dd-cat { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid #f1f5f9; }
.dd-cat:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }
.dd-cat__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dd-cat__icon { width: 30px; height: 30px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.dd-cat__icon--legal { background: var(--investor-soft); color: var(--investor-strong); }
.dd-cat__icon--financial { background: var(--ok-soft); color: var(--ok); }
.dd-cat__icon--other { background: #f1f5f9; color: var(--slate); }
.dd-cat__title { font-size: 12.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; flex: 1; }
.dd-cat__count { min-width: 24px; padding: 3px 9px; background: var(--investor-soft); color: var(--investor-strong); border-radius: 999px; font-size: 11px; font-weight: 800; text-align: center; }

/* ── Modal / drawer (bottom sheet) ───────────────────────────────────────── */
.sheet-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(31,18,53,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 640px; max-height: 92dvh; background: var(--na-surface); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 40px rgba(0,0,0,.2); display: flex; flex-direction: column; padding-bottom: var(--safe-bottom); animation: sheetUp .22s ease; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet__grip { width: 40px; height: 4px; border-radius: 999px; background: #d8d3e4; margin: 10px auto 4px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px 12px; border-bottom: 1px solid var(--na-border); }
.sheet__title { margin: 0; font-size: 17px; font-weight: 800; }
.sheet__x { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--na-border); background: var(--na-surface); color: var(--na-muted); display: inline-flex; align-items: center; justify-content: center; }
.sheet__body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet__foot { padding: 12px 16px calc(12px + var(--safe-bottom)); border-top: 1px solid var(--na-border); display: flex; gap: 10px; background: var(--na-surface); }

/* ── States ──────────────────────────────────────────────────────────────── */
.empty { text-align: center; padding: 48px 20px; color: var(--na-muted); }
.empty__icon { width: 56px; height: 56px; border-radius: 16px; background: var(--investor-soft); color: var(--investor-strong); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.empty__title { font-size: 15px; font-weight: 800; color: #334155; margin: 0 0 4px; }
.skel { background: linear-gradient(90deg,#efeaf6 25%,#f6f2fb 37%,#efeaf6 63%); background-size: 400% 100%; animation: skel 1.2s ease infinite; border-radius: 10px; }
@keyframes skel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.spinner { width: 26px; height: 26px; border: 3px solid var(--na-border); border-top-color: var(--na-primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 24px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-bottom) + 14px); background: #0f172a; color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 13.5px; font-weight: 600; z-index: 80; box-shadow: 0 10px 30px rgba(0,0,0,.3); }

/* Session-expired */
.gate { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px; gap: 14px; }
.gate__logo { height: 40px; margin-bottom: 6px; }

/* Utilities */
.muted { color: var(--na-muted); } .strong { font-weight: 800; }
.stack { display: grid; gap: 12px; } .flex { display: flex; align-items: center; gap: 8px; }
.between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.tnum { font-variant-numeric: tabular-nums; }

/* ── Dark mode ───────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --na-bg: #14101d; --na-surface: #1e1830; --na-text: #ece9f5; --na-muted: #9b95b4; --na-border: #322a48;
    --na-shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --investor-soft: #2a2350; --ok-soft: #10251c; --warn-soft: #2a1c0c; --danger-soft: #2a1214; --info-soft: #16223f; --slate-soft: #232a36; --startup-soft: #0c2530;
  }
  .search input, .field input, .field select, .field textarea { background: #17122a; }
  .row:active, .acc__head:hover, .card__foot { background: #241d38; }
  .diag th { color: var(--na-muted); }
}

/* ── PWA chrome: offline bar, install FAB, update toast, sync bar, diagnostics ─ */
.offline-bar {
  position: sticky; top: 0; z-index: 50;
  padding: calc(var(--safe-top) + 8px) 16px 8px;
  background: var(--warn); color: #3a2a06;
  font-size: 12.5px; font-weight: 700; text-align: center;
}
.install-fab {
  position: fixed; z-index: 70;
  inset-inline-end: 16px; bottom: calc(var(--nav-h) + var(--safe-bottom) + 16px);
  display: inline-flex; align-items: center; gap: 7px;
  padding: 11px 16px; border: none; border-radius: 999px;
  background: var(--na-primary); color: #fff; font-size: 13.5px; font-weight: 700;
  box-shadow: 0 8px 24px rgba(61,26,91,.34);
}
.install-fab:active { transform: scale(.97); }
.toast--action { display: inline-flex; align-items: center; gap: 12px; }
.toast--action button {
  border: none; background: rgba(255,255,255,.16); color: #fff;
  padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
}
/* Thin indeterminate progress line while data syncs (executive loading cue). */
.app-header.is-syncing::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--na-primary), transparent);
  background-size: 40% 100%; background-repeat: no-repeat;
  animation: numuSync 1.1s ease-in-out infinite;
}
@keyframes numuSync { 0% { background-position: -40% 0; } 100% { background-position: 140% 0; } }

.ios-steps { margin: 0; padding-inline-start: 20px; display: grid; gap: 10px; font-size: 14px; }
.ios-steps li { line-height: 1.5; }

.diag { width: 100%; border-collapse: collapse; font-size: 13px; }
.diag th, .diag td { text-align: start; padding: 9px 4px; border-bottom: 1px solid var(--na-border); vertical-align: middle; }
.diag th { font-weight: 600; color: var(--na-muted); white-space: nowrap; width: 46%; }
.diag td { font-weight: 700; font-variant-numeric: tabular-nums; }
.diag tr:last-child th, .diag tr:last-child td { border-bottom: none; }
.pill--ok { --pill-bg: var(--ok-soft); --pill-fg: var(--ok); }

/* Prevent iOS rubber-band pull-to-refresh on the shell (Task 10). */
html.is-standalone, html.is-standalone body { overscroll-behavior: none; overflow: hidden; height: 100dvh; }
html.is-standalone .app-main { scroll-behavior: smooth; }

/* ── Dynamic RTL/LTR (Task 1) ─────────────────────────────────────────────── */
/* Auto-direct user CONTENT per string (Arabic → RTL, Latin → LTR) without
   flipping the surrounding executive chrome. `unicode-bidi: plaintext` picks
   direction from each element's first strong character — the CSS equivalent of
   dir="auto" — so mixed Arabic/English data always reads correctly. */
.row__title, .row__sub, .acc__title, .kv dd, .bidi, [dir="auto"] {
  unicode-bidi: plaintext;
  text-align: start;
}
/* Mirror directional glyphs in RTL so back/next chevrons point the right way. */
[dir="rtl"] .app-header__back svg,
[dir="rtl"] .row__chev { transform: scaleX(-1); }
/* Arabic UI uses the Arabic type stack even when a single element is LTR. */
html[lang="ar"] body { font-family: 'Tajawal', 'Cairo', 'Segoe UI', sans-serif; }

/* ── Utility classes (inline-style → class refactor, CSP style-src 'self'). ──
   !important preserves the original inline-style precedence exactly. ── */
.u1 { width: 42px !important; height: 42px !important; border-radius: 12px !important; }
.u2 { width: 60% !important; height: 13px !important; }
.u3 { width: 40% !important; height: 11px !important; margin-top: 8px !important; }
.u4 { background: var(--danger-soft) !important; color: var(--danger) !important; }
.u5 { margin-top: 12px !important; }
.u6 { width: 56px !important; height: 56px !important; }
.u7 { margin: 0 !important; font-size: 19px !important; font-weight: 800 !important; }
.u8 { margin: 0 !important; max-width: 280px !important; }
.u9 { margin-top: 8px !important; }
.u10 { vertical-align: -3px !important; }
.u11 { font-size: 12.5px !important; }
.u12 { font-size: 13px !important; }
.u13 { width: 38px !important; height: 38px !important; }
.u14 { font-size: 11px !important; }
.u15 { margin-top: 2px !important; }
.u16 { height: 8px !important; }
.u17 { width: 40px !important; height: 40px !important; border-radius: 11px !important; }
.u18 { flex: 1 !important; }
.u19 { width: 70% !important; height: 11px !important; }
.u20 { width: 45% !important; height: 20px !important; margin-top: 8px !important; }
.u21 { margin: 0 0 12px !important; font-size: 13.5px !important; line-height: 1.6 !important; }
.u22 { margin-top: 4px !important; }
.u23 { width: 38px !important; height: 38px !important; background: #fee2e2 !important; color: #b91c1c !important; }
.u24 { padding: 0 !important; }
.u25 { box-shadow: none !important; padding: 11px 12px !important; }
.u26 { font-size: 13.5px !important; }
.u27 { margin-bottom: 12px !important; }
.u28 { margin-top: 10px !important; height: 8px !important; background: var(--na-bg) !important; border-radius: 999px !important; overflow: hidden !important; }
.u29 { font-size: 11.5px !important; margin-top: 6px !important; }
.u30 { margin: 0 0 8px !important; }
.u31 { margin: 0 !important; font-size: 13.5px !important; line-height: 1.6 !important; white-space: pre-wrap !important; }
.u32 { margin: 0 !important; flex: 1 !important; }
.u33 { box-shadow: none !important; padding: 10px 12px !important; }
.u34 { width: 36px !important; height: 36px !important; font-size: 14px !important; }
.u35 { font-size: 14px !important; }
.u36 { margin-bottom: 14px !important; }
.u37 { margin-top: 0 !important; }
.u38 { gap: 8px !important; }
.u39 { gap: 6px !important; margin: 8px 0 !important; }
.u40 { font-size: 12.5px !important; margin: 0 0 6px !important; }
.u41 { box-shadow: none !important; }
.u42 { font-weight: 500 !important; }
.u43 { width: 8px !important; height: 8px !important; border-radius: 50% !important; background: var(--na-primary) !important; }
.u44 { display: flex !important; gap: 10px !important; margin-top: 14px !important; flex-wrap: wrap !important; }
.u45 { font-size: 11.5px !important; margin-top: 14px !important; }

/* Initial-DD progress bar fill — height/background fixed; width set at runtime
   via CSSOM (UI.hydrate reads data-w), so no inline style attribute is needed. */
.dd-bar__fill { height: 100%; width: 0; background: var(--startup-accent); }
