/* ════════════════════════════════════════════════════════════════════
   ALAT App — Shared App Chrome
   --------------------------------------------------------------------
   Sidebar (collapsible) + topbar + app-shell layout + app-specific
   card / form / tile patterns. Built ON TOP of obsidian-shared.css
   (which provides tokens, reset, typography primitives, buttons,
   eyebrows, well containers).

   Pages link BOTH:
     <link rel="stylesheet" href="../../sites/alatlabs-website-static/assets/obsidian-shared.css">
     <link rel="stylesheet" href="assets/app-shared.css">

   And declare on body:
     <body data-app="true">                     — suppresses marketing aurora
     class="app-shell"                          — flex column wrapper
     data-active="<dashboard|saikati|settings>" — sidebar active key

   ════════════════════════════════════════════════════════════════════ */

/* Missing token aliases — pages were authored using --white-08, --white-12,
   --accent that obsidian-shared.css doesn't define. Without these, borders
   fall back to currentColor (bright white) and buttons render as black-on-
   transparent. Add the missing tokens here so existing usages render
   correctly without touching the upstream theme. */
:root {
  --white-08: rgba(255, 255, 255, 0.08);
  --white-12: rgba(255, 255, 255, 0.12);
  --accent: var(--violet-signal);
}


/* ───── App-shell base layout ───── */

html, body {
  /* Full-viewport app — no scrolling on body; scrolling lives inside
     .app-main and .sidebar__body. */
  height: 100%;
  overflow: hidden;
}

body.app-shell {
  display: flex;
  flex-direction: row;
}

/* Auth pages (no .app-shell sidebar) get scroll back so tall forms work
   on short viewports. Any page with data-app="true" but WITHOUT
   .app-shell class on body opts into scroll. */
body[data-app="true"]:not(.app-shell) {
  height: auto;
  overflow: auto;
}
html:has(body[data-app="true"]:not(.app-shell)) {
  height: auto;
  overflow: auto;
}


/* ───── Tab strip (settings + future surfaces) ───── */

.app-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--white-06);
  margin-bottom: 28px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.app-tabs::-webkit-scrollbar { display: none; }
.app-tab {
  padding: 12px 18px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--white-60);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.app-tab:hover { color: var(--white-100); }
.app-tab.is-active {
  color: var(--violet-bright);
  border-bottom-color: var(--violet-signal);
}
.app-tab-panel { display: none; }
.app-tab-panel.is-active { display: block; }


/* ───── Sub-nav strip (per-dashboard tabbed sections) ───── */
/* Available foundation class for new dashboard subnavs. The 4 existing
   per-dashboard subnavs (.courier-subnav, .customer-subnav,
   .merchant-subnav, .inv-subnav) are NOT auto-migrated — flagged for
   Kevin to decide. Override the active-pill accent per-dashboard via
   --app-subnav-accent (e.g. laddr yellow, etc.). */
.app-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  margin-bottom: 24px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
}
.app-subnav__btn {
  padding: 8px 14px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill-soft);
  color: var(--white-80);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
}
.app-subnav__btn:hover {
  background: var(--white-04);
  color: var(--white-100);
}
.app-subnav__btn.is-active {
  background: var(--app-subnav-accent, var(--violet-signal));
  color: #FFFFFF;
}


/* ───── Sidebar (left) ───── */

.sidebar {
  flex-shrink: 0;
  width: 264px;
  height: 100vh;
  background: var(--ink-2);
  border-right: 1px solid var(--white-06);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width .25s var(--ease);
  position: relative;
}
body.sidebar-collapsed .sidebar {
  width: 72px;
}

/* Sidebar brand row — wraps the logo link + retract toggle on one line.
   The retract is the primary collapse trigger per Kevin 2026-05-21. */
.sidebar__brand-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 10px;
  border-bottom: 1px solid var(--white-06);
}
.sidebar__brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 8px 18px 22px;
  text-decoration: none;
  color: inherit;
}
.sidebar__brand img {
  width: 32px; height: 32px;
  display: block;
  flex-shrink: 0;
}
.sidebar__brand-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--white-100);
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .15s var(--ease);
}
body.sidebar-collapsed .sidebar__brand-text { display: none; }

/* Retract button — small icon-only on the brand row. The chevron flips
   horizontally when the sidebar is collapsed so the affordance reads
   "expand" in collapsed state. */
.sidebar__retract {
  flex-shrink: 0;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--white-06);
  border-radius: 8px;
  color: var(--white-60);
  cursor: pointer;
  font-size: 12px;
  transition: all .15s var(--ease);
}
.sidebar__retract:hover {
  background: var(--white-04);
  color: var(--white-100);
  border-color: var(--white-12);
}
.sidebar__retract:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.sidebar__retract i { transition: transform .25s var(--ease); }
body.sidebar-collapsed .sidebar__retract i { transform: rotate(180deg); }

/* When collapsed, hide the retract button (the brand row shrinks too
   small to host it cleanly). The topbar menu button + footer toggle
   remain available to re-expand. */
body.sidebar-collapsed .sidebar__retract {
  opacity: 0;
  pointer-events: none;
}

/* Sidebar nav body (scrolls if long) */
.sidebar__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sidebar__body::-webkit-scrollbar { width: 3px; }
.sidebar__body::-webkit-scrollbar-thumb { background: var(--white-06); border-radius: 3px; }

/* Nav section labels */
.sidebar__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-40);
  padding: 16px 12px 8px;
  white-space: nowrap;
  opacity: 1;
  transition: opacity .15s var(--ease);
}
body.sidebar-collapsed .sidebar__label { display: none; }

/* Nav items */
.sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white-80);
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease);
  white-space: nowrap;
  position: relative;
}
.sidebar__item:hover {
  background: var(--white-04);
  color: var(--white-100);
}
.sidebar__item.is-active {
  background: var(--violet-soft);
  color: var(--violet-bright);
}
.sidebar__item.is-active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px;
  border-radius: 2px;
  background: var(--violet-signal);
}
.sidebar__item-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.sidebar__item-label {
  flex: 1;
  opacity: 1;
  transition: opacity .15s var(--ease);
}
body.sidebar-collapsed .sidebar__item-label { display: none; }
body.sidebar-collapsed .sidebar__item { justify-content: center; }
body.sidebar-collapsed .sidebar__item.is-active::before { left: 4px; }

/* Sidebar footer — user pill + collapse toggle */
.sidebar__footer {
  border-top: 1px solid var(--white-06);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sidebar__user {
  display: flex; align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  text-decoration: none;
  color: inherit;
}
.sidebar__user-avatar {
  width: 32px; height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--violet-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
}
.sidebar__user-text { flex: 1; min-width: 0; opacity: 1; transition: opacity .15s var(--ease); }
/* Stack name over role (both are <span>s — make them block so "Customer" sits
   below the name instead of running into it: "Ali SalminCustomer"). */
.sidebar__user-name { display: block; font-size: 13px; font-weight: 600; color: var(--white-100); line-height: 1.2; }
.sidebar__user-role { display: block; font-size: 11px; color: var(--white-60); margin-top: 2px; }
body.sidebar-collapsed .sidebar__user-text { display: none; }
body.sidebar-collapsed .sidebar__user { justify-content: center; padding: 8px 0; }

/* ─── Collapsed sidebar — icon alignment polish (Kevin 2026-05-21) ───
   When the sidebar shrinks to 72px, all icon-bearing rows (brand logo,
   nav items, retract spacer, footer user avatar, "+" hire action) need
   to align on the same vertical centerline. Without these overrides
   each row inherits its expanded-state padding and the icons drift
   left, looking misaligned. */
body.sidebar-collapsed .sidebar__brand-row {
  padding-right: 0;
  justify-content: center;
}
body.sidebar-collapsed .sidebar__brand {
  padding: 18px 0;
  justify-content: center;
  gap: 0;
}
body.sidebar-collapsed .sidebar__item {
  padding-left: 0;
  padding-right: 0;
}
body.sidebar-collapsed .sidebar__item-icon {
  width: 100%;
  justify-content: center;
}
body.sidebar-collapsed .sidebar__footer {
  padding: 10px 0;
  align-items: center;
}
body.sidebar-collapsed .sidebar__toggle {
  width: 40px;
}

.sidebar__toggle {
  display: flex; align-items: center; justify-content: center;
  width: 100%;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s var(--ease);
}
.sidebar__toggle:hover {
  background: var(--white-04);
  color: var(--white-100);
}


/* ───── App main (right of sidebar) ───── */

.app-main {
  flex: 1;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}


/* ───── Topbar ───── */

.topbar {
  flex-shrink: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--ink-1);
  border-bottom: 1px solid var(--white-06);
  z-index: 20;
}
.topbar__title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--white-100);
  letter-spacing: -0.01em;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
/* Menu button (hamburger) in the topbar — visible at ALL viewport sizes.
   On desktop (>720px) it toggles the sidebar collapsed state. On mobile
   it opens the slide-over drawer. Handler in app-shared.js branches on
   window.innerWidth at click-time. */
.topbar__btn--menu {
  /* Same shape as other .topbar__btn but always visible. The
     .topbar__btn--mobile legacy class is no longer needed; it still
     resolves to the same base styles so old pages don't break. */
}
.topbar__back-btn {
  margin-right: 2px;
  color: var(--white-60);
  border-color: transparent;
  background: transparent;
}
.topbar__back-btn:hover {
  color: var(--white-100);
  background: var(--white-06);
  border-color: var(--white-06);
}
.topbar__btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all .15s var(--ease);
  position: relative;
}
.topbar__btn:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--white-04);
  color: var(--white-100);
}
.topbar__btn--badge::after {
  content: '';
  position: absolute;
  top: 8px; right: 9px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--violet-signal);
  border: 2px solid var(--ink-1);
}

/* ───── K-W7.30 · Role pill + switcher ─────
   Sits in topbar__actions, between cart and account. Shows the active
   role; for multi-role users, exposes a dropdown menu below. Single-role
   users still see the pill (informational); they just don't get a chevron
   or clickable affordance. Mirrors what GET /api/auth/me will return
   once the cutover lands. */
.topbar__role-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.topbar__role-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: default;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all .15s var(--ease);
}
.topbar__role-pill--multi {
  cursor: pointer;
}
.topbar__role-pill--multi:hover {
  border-color: rgba(255,255,255,0.18);
  background: var(--white-04);
  color: var(--white-100);
}
.topbar__role-pill__icon {
  font-size: 13px;
  color: var(--violet-signal);
}
.topbar__role-pill__label {
  color: var(--white-100);
}
.topbar__role-pill__sub {
  padding-left: 8px;
  margin-left: 2px;
  border-left: 1px solid var(--white-06);
  color: var(--white-60, rgba(255,255,255,0.60));
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__role-pill__chev {
  font-size: 10px;
  color: var(--white-60, rgba(255,255,255,0.60));
  transition: transform .15s var(--ease);
}
.topbar__role-pill[aria-expanded="true"] .topbar__role-pill__chev {
  transform: rotate(180deg);
  color: var(--white-100);
}

.topbar__role-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 260px;
  background: var(--ink-2, #16161B);
  border: 1px solid var(--white-06);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.45);
  z-index: 50;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .12s var(--ease), transform .12s var(--ease);
}
.topbar__role-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.topbar__role-menu__label {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60, rgba(255,255,255,0.60));
  padding: 8px 10px 6px;
}
.topbar__role-menu__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 10px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--white-80);
  text-align: left;
  cursor: pointer;
  transition: background .12s var(--ease);
}
.topbar__role-menu__item:hover {
  background: var(--white-04);
  color: var(--white-100);
}
.topbar__role-menu__item--active {
  background: rgba(46, 182, 185, 0.08);
}
.topbar__role-menu__item--active:hover {
  background: rgba(46, 182, 185, 0.12);
}
.topbar__role-menu__item-icon {
  flex: 0 0 32px;
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--white-04);
  color: var(--violet-signal);
  font-size: 14px;
}
.topbar__role-menu__item--active .topbar__role-menu__item-icon {
  background: rgba(46, 182, 185, 0.12);
}
.topbar__role-menu__item-text {
  flex: 1 1 auto;
  min-width: 0;
}
.topbar__role-menu__item-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--white-100);
  letter-spacing: -0.01em;
}
.topbar__role-menu__item-sub {
  font-size: 12px;
  color: var(--white-60, rgba(255,255,255,0.60));
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__role-menu__item-check {
  flex: 0 0 auto;
  color: var(--violet-signal);
  font-size: 12px;
  margin-left: 4px;
}

/* Mobile (≤ 720px) — condense pill to icon-only + role label,
   drop the subtitle. Keeps the chevron for multi-role users so the
   tap target stays obvious. */
@media (max-width: 720px) {
  .topbar__role-pill {
    padding: 0 10px;
    gap: 6px;
  }
  .topbar__role-pill__sub { display: none; }
  .topbar__role-pill__label { display: none; }
  .topbar__role-menu { min-width: 240px; right: -8px; }
}


/* ───── Content area ───── */

.app-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 28px 32px 60px;
  background: var(--ink-1);
}
.app-content::-webkit-scrollbar { width: 8px; }
.app-content::-webkit-scrollbar-track { background: transparent; }
.app-content::-webkit-scrollbar-thumb { background: var(--white-06); border-radius: 4px; }
.app-content::-webkit-scrollbar-thumb:hover { background: var(--white-20, rgba(255,255,255,0.20)); }


/* ───── Page head pattern (eyebrow + h1 + lede) ───── */

.page-head {
  margin-bottom: 28px;
  max-width: var(--page-max-narrow, 720px);
}
.page-head .eyebrow {
  margin-bottom: 14px;
}
.page-head h1 {
  font-size: clamp(28px, 3vw, 36px);
  font-weight: 700;
  color: var(--white-100);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}
.page-head .lede {
  font-size: 15px;
  color: var(--white-80);
  line-height: 1.55;
}


/* ───── App card (the workhorse) ───── */

.app-card {
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  padding: 22px;
  position: relative;
  transition: border-color .15s var(--ease);
}
.app-card:hover {
  border-color: rgba(255, 255, 255, 0.12);
}
.app-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.app-card__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white-100);
}
.app-card__sub {
  font-size: 12px;
  color: var(--white-60);
  margin-top: 2px;
}


/* ───── KPI tiles ───── */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.kpi-tile {
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  padding: 20px 22px;
}
.kpi-tile__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Currency pill — small mono token next to the label so the .kpi-tile__value
   stays a clean number (Kevin 2026-05-21: "KES" was rendering as big as the
   number — moved to a label-row pill instead). K-W7.14n (2026-05-25):
   "all KES in cards put in pill on the header" — pumped contrast so the pill
   reads as a proper badge against the dark tile, not just smaller text. */
.kpi-tile__currency {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--violet-signal, #b8a8ff);
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.32);
  padding: 3px 8px 2px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
}
.kpi-tile__value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white-100);
  letter-spacing: -0.018em;
  line-height: 1.0;
}
.kpi-tile__delta {
  font-size: 12px;
  color: var(--white-60);
  margin-top: 8px;
}
.kpi-tile__delta--up { color: var(--state-ok, #5EEAB5); }
.kpi-tile__delta--down { color: var(--state-crit, #F97066); }


/* ───── Form fields (app context — denser than marketing) ───── */

.app-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.app-form-field label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-60);
}
.app-form-field input,
.app-form-field select,
.app-form-field textarea {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-input, 10px);
  padding: 12px 14px;
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 15px;
  transition: border-color .15s var(--ease);
}
.app-form-field input:focus,
.app-form-field select:focus,
.app-form-field textarea:focus {
  outline: none;
  border-color: var(--violet-signal);
}
.app-form-field input::placeholder,
.app-form-field textarea::placeholder { color: var(--white-40); }
/* Select option list — without this, the dropdown popup inherits the OS
   default (white-on-white in dark-mode browsers), making options invisible.
   Forcing ink background + white text keeps every option readable. */
.app-form-field select option {
  background: var(--ink-2, #16161B);
  color: var(--white-100);
}
.app-form-field select option:checked,
.app-form-field select option:hover {
  background: var(--ink-3, #1D1D23);
  color: var(--white-100);
}


/* ───── Auth shell (login / register / forgot) ───── */
/* Used when the page does NOT use the sidebar+topbar app-shell —
   for the auth surfaces themselves. */

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--ink-1);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card-lg);
  padding: 36px 32px 32px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.40);
}
.auth-card__brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
}
.auth-card__brand img {
  height: 40px; width: auto;
  filter: brightness(1.1);
  mix-blend-mode: lighten;
}
.auth-card__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--white-100);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  text-align: center;
}
.auth-card__sub {
  font-size: 14px;
  color: var(--white-60);
  text-align: center;
  margin-bottom: 24px;
}
.auth-card .btn-filled {
  width: 100%;
  justify-content: center;
  margin-top: 8px;
}
.auth-card__foot {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--white-06);
  text-align: center;
  font-size: 13px;
  color: var(--white-60);
}
.auth-card__foot a {
  color: var(--violet-signal);
  text-decoration: none;
  font-weight: 500;
}
.auth-card__foot a:hover { color: var(--violet-bright); }


/* ───── Mobile responsive ───── */

@media (max-width: 920px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .app-content { padding: 22px 20px 50px; }
  .topbar { padding: 0 18px; }
}

@media (max-width: 720px) {
  /* Sidebar goes off-canvas on mobile */
  body.app-shell .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    transition: left .26s var(--ease);
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.4);
  }
  body.app-shell.sidebar-mobile-open .sidebar {
    left: 0;
    width: 280px;  /* force full drawer width, override sidebar-collapsed */
    z-index: 40;   /* above the scrim */
  }
  body.app-shell .app-main {
    width: 100%;
  }
  /* Backdrop when mobile sidebar is open */
  body.app-shell.sidebar-mobile-open::before {
    content: '';
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 35;
    pointer-events: auto;
  }
  /* Lock body scroll behind the drawer */
  body.app-shell.sidebar-mobile-open { overflow: hidden; }
  /* Restore label visibility on the mobile drawer (no icon-rail mode).
     Now matches the display-based hiding pattern above so flex layout
     works the same in both states. */
  body.sidebar-collapsed.sidebar-mobile-open .sidebar__brand-text,
  body.sidebar-collapsed.sidebar-mobile-open .sidebar__label { display: block; }
  body.sidebar-collapsed.sidebar-mobile-open .sidebar__item-label,
  body.sidebar-collapsed.sidebar-mobile-open .sidebar__user-text { display: inline; }
  /* Brand row + sidebar items at full width even when collapsed-base */
  body.sidebar-collapsed.sidebar-mobile-open .sidebar__item {
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }
  body.sidebar-collapsed.sidebar-mobile-open .sidebar__brand-row {
    justify-content: space-between;
  }

  .topbar__title { font-size: 15px; }
  .auth-card { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
  .app-content { padding: 18px 16px 40px; }
  .page-head h1 { font-size: clamp(24px, 6vw, 32px); }
  .auth-card { padding: 24px 20px; }
}


/* ═══════════════════════════════════════════════════════════════════════
   Phase 3 primitives — added 2026-05-18 for role dashboards
   -----------------------------------------------------------------------
   Shared building blocks for customer / merchant / courier / investor
   dashboards + settings depth + Saikati polish. Pages may keep inline
   copies as fallback; these shared rules will be redundant-but-harmless,
   and page-level <style> blocks (loaded later in the cascade) win when
   they need to override locally.

   Tokens only — no hex literals. No !important.
   ═══════════════════════════════════════════════════════════════════════ */


/* ───── 1. KPI tile primitive + strip wrapper ─────
   Note: .kpi-tile is also defined above in the original block. These
   appended rules refine label/value/delta sizing for the role
   dashboards. Inline page styles can override either. */

.kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.kpi-tile {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  padding: 20px 22px;
  text-align: center; /* K-W7.8a — Kevin's call (2026-05-25): center the value + label + delta for visual balance across the KPI grid. */
}
.kpi-tile__label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-60);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.kpi-tile__value {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--white-100);
  letter-spacing: -0.02em;
  margin-top: 8px;
  line-height: 1.05;
  text-align: center;
}
.kpi-tile__delta {
  font-size: 13px;
  color: var(--white-60);
  margin-top: 8px;
  text-align: center;
}
.kpi-tile__sub {
  text-align: center;
}
.kpi-tile__delta--up { color: var(--state-ok); }
.kpi-tile__delta--down { color: var(--state-warn); }


/* ───── 2. Status pill ───── */

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--white-04);
  color: var(--white-80);
  border: 1px solid var(--white-06);
}
.status-pill::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
}
.status-pill--no-dot::before { display: none; }
.status-pill--ok    { color: var(--state-ok); }
.status-pill--info  { color: var(--state-info); }
.status-pill--warn  { color: var(--state-warn); }
.status-pill--crit  { color: var(--state-crit); }
.status-pill--muted { color: var(--white-40); }


/* ───── 3. Feed row (recent-activity feeds) ───── */

.feed-row {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--satin-line);
}
.feed-row:last-child { border-bottom: 0; }
.feed-row__icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--white-04);
  color: var(--white-80);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.feed-row__body {
  flex: 1;
  min-width: 0;
  line-height: 1.5;
}
.feed-row__title {
  color: var(--white-100);
  font-weight: 500;
}
.feed-row__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-60);
  margin-top: 2px;
}


/* ───── 4. Data row (generic tabular row) ───── */

.data-row {
  display: grid;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--satin-line);
  font-size: 14px;
  transition: background .12s var(--ease);
}
.data-row:last-child { border-bottom: 0; }
.data-row:hover { background: var(--white-04); }
.data-row__primary {
  color: var(--white-100);
  font-weight: 500;
}
.data-row__meta {
  color: var(--white-60);
}
.data-row__mono {
  font-family: var(--font-mono);
  color: var(--white-80);
}


/* ───── 5. Empty state ───── */

.empty-state {
  padding: 32px 24px;
  text-align: center;
  color: var(--white-60);
}
.empty-state__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--white-04);
  color: var(--white-60);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  font-size: 13px;
}
.empty-state__title {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--white-80);
  font-size: 16px;
  margin-bottom: 4px;
}
.empty-state__sub {
  font-size: 13px;
  color: var(--white-40);
  line-height: 1.5;
}


/* ───── 6. Toggle switch (settings / notifications) ───── */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.toggle__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}
.toggle__track {
  position: relative;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 999px;
  background: var(--white-06);
  transition: background .15s var(--ease);
}
.toggle__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--white-100);
  transition: transform .15s var(--ease);
}
.toggle__input:checked + .toggle__track {
  background: var(--violet-signal);
}
.toggle__input:checked + .toggle__track::after {
  transform: translateX(16px);
}
.toggle__input:focus-visible + .toggle__track {
  box-shadow: 0 0 0 2px var(--violet-glow);
}
.toggle__label {
  font-size: 14px;
  color: var(--white-80);
}
.toggle.is-disabled,
.toggle__input:disabled + .toggle__track {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ───── 7. Button set — .btn-app (dashboard-scoped) ───── */

.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 12px;
  font-family: var(--font-text);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-decoration: none;
  border: 0;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.btn-app--primary {
  background: var(--violet-signal);
  color: #FFFFFF;
}
.btn-app--primary:hover { background: var(--violet-bright); }

.btn-app--ghost {
  background: transparent;
  color: var(--white-100);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.btn-app--ghost:hover { background: var(--white-04); }

.btn-app--quiet {
  background: var(--white-04);
  color: var(--white-80);
}
.btn-app--quiet:hover { background: var(--white-06); }

.btn-app--danger {
  background: transparent;
  color: var(--state-crit);
}
.btn-app--danger:hover { background: rgba(249, 112, 102, 0.08); }


/* ───── 8. Section head (app variant) ───── */

.app-section {
  margin-bottom: 32px;
}
.app-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}
.app-section__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--white-100);
  letter-spacing: -0.012em;
}
.app-section__action {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-60);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.app-section__action:hover { color: var(--white-100); }


/* ───── 9. Mobile responsiveness for Phase 3 primitives ───── */

@media (max-width: 720px) {
  .kpi-strip {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .data-row {
    font-size: 13px;
  }
  .feed-row {
    flex-direction: column;
  }
}


/* ═══════════════════════════════════════════════════════════════════
   WAVE A PRIMITIVES — 2026-05-21
   (Per docs/ALAT_APP_WAVE_A_PLAN.md §13)
   --------------------------------------------------------------------
   Specialists vs Workspace Features distinction is the spine of Wave A:
     · .feature-card  → tools the user OPERATES (monochrome icon)
     · .specialist-tile → AI workers the user HIRES (per-agent prism)

   Per-agent prism palette (mirrors saikati/index.html .agent-chip--*):
     DAVID  = teal    (#2EB6B9 / #5EEAB5)
     ARKAM  = indigo  (#6366F1 / #A5B4FC)
     EVE    = amber   (#EAB308 / #FCD34D)
     ATLAS  = pink    (#EC4899 / #F9A8D4)
     HERMES = orange  (#F97316 / #FDBA74)
   ═══════════════════════════════════════════════════════════════════ */


/* ─── Per-agent accent variables (used by .specialist-tile[data-accent]) ─── */

.specialist-tile,
.hire-tray__card {
  --sp-accent-fg:     var(--white-100);
  --sp-accent-bg:     rgba(255, 255, 255, 0.06);
  --sp-accent-border: rgba(255, 255, 255, 0.18);
  --sp-accent-glow:   rgba(255, 255, 255, 0.10);
}
[data-accent="david"] {
  --sp-accent-fg:     #5EEAB5;
  --sp-accent-bg:     rgba(46, 182, 185, 0.10);
  --sp-accent-border: rgba(46, 182, 185, 0.28);
  --sp-accent-glow:   rgba(46, 182, 185, 0.18);
}
[data-accent="arkam"] {
  --sp-accent-fg:     #A5B4FC;
  --sp-accent-bg:     rgba(99, 102, 241, 0.12);
  --sp-accent-border: rgba(99, 102, 241, 0.30);
  --sp-accent-glow:   rgba(99, 102, 241, 0.20);
}
[data-accent="eve"] {
  --sp-accent-fg:     #FCD34D;
  --sp-accent-bg:     rgba(234, 179, 8, 0.10);
  --sp-accent-border: rgba(234, 179, 8, 0.28);
  --sp-accent-glow:   rgba(234, 179, 8, 0.16);
}
[data-accent="atlas"] {
  --sp-accent-fg:     #F9A8D4;
  --sp-accent-bg:     rgba(236, 72, 153, 0.10);
  --sp-accent-border: rgba(236, 72, 153, 0.28);
  --sp-accent-glow:   rgba(236, 72, 153, 0.16);
}
[data-accent="hermes"] {
  --sp-accent-fg:     #FDBA74;
  --sp-accent-bg:     rgba(249, 115, 22, 0.10);
  --sp-accent-border: rgba(249, 115, 22, 0.28);
  --sp-accent-glow:   rgba(249, 115, 22, 0.16);
}


/* ─── Feature cards (workspace features — NOT specialists) ───
   Monochrome by design: nothing competes with the specialist tiles.
   Three states: empty (primary CTA), partial (count + secondary action),
   full (data-first display). */

.feature-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
@media (max-width: 1100px) {
  .feature-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .feature-row { grid-template-columns: 1fr; }
}

.feature-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  min-height: 168px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.feature-card:hover {
  border-color: var(--white-20);
  background: var(--ink-3);
}
.feature-card:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.feature-card__icon {
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  color: var(--white-80);
  font-size: 16px;
}
.feature-card__label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--white-100);
  letter-spacing: -0.005em;
}
.feature-card__hint {
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--white-60);
  line-height: 1.45;
  flex: 1;
}
.feature-card__value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  color: var(--white-100);
  letter-spacing: -0.012em;
}
.feature-card__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  margin-top: auto;
  border: 0;
  border-radius: var(--radius-pill-soft);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.feature-card__action--primary {
  background: var(--violet-signal);
  color: #FFFFFF;
}
.feature-card__action--primary:hover { background: var(--violet-bright); }
.feature-card__action--quiet {
  background: var(--white-06);
  color: var(--white-80);
}
.feature-card__action--quiet:hover { background: var(--white-20); color: var(--white-100); }

/* State variants */
.feature-card--empty { /* primary CTA, slightly dimmer headline */ }
.feature-card--empty .feature-card__hint { color: var(--white-40); }
.feature-card--partial .feature-card__icon { color: var(--state-warn); }
.feature-card--full   .feature-card__icon { color: var(--violet-bright); }


/* ─── Specialist tiles (AI workers — colour-coded per-agent) ───
   Four states: available · hired-pending · active · paused. */

.specialist-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 720px) {
  .specialist-grid { grid-template-columns: 1fr; }
}
@media (min-width: 1280px) {
  .specialist-grid--catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.specialist-tile {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  grid-template-rows: auto auto auto;
  gap: 4px 14px;
  padding: 18px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-left: 2px solid var(--sp-accent-border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.specialist-tile:hover {
  background: var(--ink-3);
  border-color: var(--white-20);
  border-left-color: var(--sp-accent-fg);
  box-shadow: 0 4px 14px -8px var(--sp-accent-glow);
}
.specialist-tile:focus-visible {
  outline: 2px solid var(--sp-accent-fg);
  outline-offset: 2px;
}
.specialist-tile__avatar {
  grid-row: 1 / span 2;
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--sp-accent-bg);
  border: 1px solid var(--sp-accent-border);
  color: var(--sp-accent-fg);
  font-size: 18px;
}
.specialist-tile__name {
  grid-column: 2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: var(--white-100);
  letter-spacing: -0.005em;
}
.specialist-tile__tag {
  grid-column: 2; /* keep tag in the text column under name — fixes 'hired'
                    state where the auto-flow used to push the warning tag
                    into col 3 (the metric column) producing "SWIFT⚠eeds
                    setup" overlap. */
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--white-60);
  line-height: 1.45;
}
.specialist-tile__tag i {
  margin-right: 4px;
}
.specialist-tile__metric {
  grid-column: 3;
  grid-row: 1 / span 2;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-60);
  white-space: nowrap;
}
.specialist-tile__metric strong {
  display: block;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--white-100);
}
.specialist-tile__footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--white-06);
}
.specialist-tile__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  color: var(--violet-bright);
  text-decoration: none;
}
.specialist-tile__cta:hover { color: var(--violet-signal); }
.specialist-tile__menu {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--white-60);
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.specialist-tile__menu:hover { background: var(--white-06); color: var(--white-100); }
.specialist-tile__menu:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

/* State variants */
.specialist-tile--available .specialist-tile__metric { display: none; }
.specialist-tile--hired-pending {
  background: linear-gradient(0deg, var(--white-04), var(--white-04)), var(--ink-2);
}
.specialist-tile--active {
  border-left-color: var(--sp-accent-fg);
  box-shadow: inset 0 0 0 1px var(--sp-accent-glow);
}
.specialist-tile--paused {
  opacity: 0.72;
}
.specialist-tile--paused .specialist-tile__avatar {
  filter: grayscale(0.6);
}


/* ─── Welcome card (top-of-dashboard) ─── */

.welcome-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 22px;
  margin-bottom: 24px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
}
.welcome-card__icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  color: var(--white-80);
}
.welcome-card__body { flex: 1; min-width: 0; }
.welcome-card__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--white-100);
  letter-spacing: -0.005em;
}
.welcome-card__sub {
  margin-top: 2px;
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--white-60);
}

/* Primary variant — hero CTA for first-time merchants */
.welcome-card--primary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 28px 32px;
  background:
    linear-gradient(135deg, rgba(46, 182, 185, 0.10) 0%, rgba(123, 97, 255, 0.06) 100%),
    var(--ink-2);
  border: 1px solid rgba(46, 182, 185, 0.22);
  border-radius: var(--radius-card-lg);
}
.welcome-card--primary .welcome-card__title {
  font-size: 22px;
}
.welcome-card--primary .welcome-card__sub {
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 520px;
}
.welcome-card__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.welcome-card__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--violet-signal);
  color: #FFFFFF;
  border: 0;
  border-radius: var(--radius-pill-soft);
  font-family: var(--font-text);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s var(--ease), box-shadow .15s var(--ease);
}
.welcome-card__cta:hover {
  background: var(--violet-bright);
  box-shadow: 0 4px 14px -4px var(--violet-glow);
}
.welcome-card__cta:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 3px;
}
.welcome-card__skip {
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--white-60);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.welcome-card__skip:hover { color: var(--white-100); }
@media (max-width: 720px) {
  .welcome-card--primary {
    grid-template-columns: 1fr;
    padding: 22px;
  }
  .welcome-card__actions { flex-wrap: wrap; }
}


/* ─── Hire tray (bottom-of-dashboard recommendations) ─── */

.hire-tray {
  padding: 18px 20px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  margin-bottom: 28px;
}
.hire-tray__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.hire-tray__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--white-100);
}
.hire-tray__see-all {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  text-decoration: none;
  transition: color .15s var(--ease);
}
.hire-tray__see-all:hover { color: var(--white-100); }
.hire-tray__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.hire-tray__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-left: 2px solid var(--sp-accent-border);
  border-radius: var(--radius-card-soft);
  text-decoration: none;
  color: inherit;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.hire-tray__card:hover {
  background: var(--white-06);
  border-left-color: var(--sp-accent-fg);
}
.hire-tray__card:focus-visible {
  outline: 2px solid var(--sp-accent-fg);
  outline-offset: 2px;
}
.hire-tray__card-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--sp-accent-bg);
  border: 1px solid var(--sp-accent-border);
  color: var(--sp-accent-fg);
  flex-shrink: 0;
}
.hire-tray__card-text { min-width: 0; }
.hire-tray__card-name {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--white-100);
  margin-bottom: 2px;
}

/* ───── K-W7.1f · Collapsible card pattern
   Wrap any .app-card content in <details class="app-collapsible">
   for a borderless retractable section. Used across Settings sub-pages
   (Invoices, Billing address, Sessions, Login history, etc.) to cut
   noise from long tables. Use the .app-card__head DOM unchanged inside
   the <summary> — only style override is the chevron rotation.
   ──────────────────────────────────────────────────────────────── */
.app-collapsible {
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  overflow: hidden;
}
.app-collapsible__summary {
  cursor: pointer;
  padding: 18px 22px;
  list-style: none;
  display: block;
  outline: none;
}
.app-collapsible__summary::-webkit-details-marker { display: none; }
.app-collapsible__summary::marker { content: ''; }
.app-collapsible__summary:focus-visible {
  box-shadow: inset 0 0 0 2px var(--violet-glow);
}
.app-collapsible__summary .app-card__head {
  margin-bottom: 0;
  align-items: center;
}
.app-collapsible__chevron {
  color: var(--white-60);
  font-size: 12px;
  transition: transform .15s var(--ease);
  flex-shrink: 0;
}
.app-collapsible[open] > .app-collapsible__summary .app-collapsible__chevron {
  transform: rotate(180deg);
}
.app-collapsible[open] > .app-collapsible__summary {
  border-bottom: 1px solid var(--white-06);
}
.app-collapsible__body {
  padding: 18px 22px;
}

/* ───── K-W7.1f part 2 · ALAT.ui.paginate scroll style
   Activated by opts.style:'scroll'. Renders all rows inside the host
   with a capped height + fade-out at the bottom edge so the scrollbar
   IS the affordance (no button row). Pairs with the existing card
   border for a borderless "more below" feel Kevin called out. */
.app-paginate-scroll {
  max-height: 320px; /* ≈ 5 rows; tune per-page via inline style override */
  overflow-y: auto;
  -webkit-mask-image: linear-gradient(to bottom, black calc(100% - 32px), transparent);
  mask-image: linear-gradient(to bottom, black calc(100% - 32px), transparent);
  padding-bottom: 24px;
  scrollbar-width: thin;
  scrollbar-color: var(--white-12) transparent;
}
.app-paginate-scroll::-webkit-scrollbar { width: 6px; }
.app-paginate-scroll::-webkit-scrollbar-track { background: transparent; }
.app-paginate-scroll::-webkit-scrollbar-thumb {
  background: var(--white-12);
  border-radius: 4px;
}
.app-paginate-scroll::-webkit-scrollbar-thumb:hover { background: var(--white-12); }

/* ───── K-W7.3b · M-Pesa STK push modal
   Centered modal that mimics the Safaricom STK prompt customers see on
   their phone. Used by ALAT.orders.customerPay(). Mock for demo;
   real flow hits Daraja under A-W3.4. */
.mpesa-stk-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.66);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0; pointer-events: none;
  transition: opacity .2s var(--ease);
}
.mpesa-stk-scrim.is-open { opacity: 1; pointer-events: auto; }
.mpesa-stk-modal {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -48%);
  width: min(420px, calc(100vw - 32px));
  background: var(--ink-1, #0F1115);
  border: 1px solid var(--white-12);
  border-radius: 16px;
  padding: 24px 26px 18px;
  z-index: 9999;
  opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
  box-shadow: 0 32px 80px -16px rgba(0,0,0,0.75);
}
.mpesa-stk-modal.is-open {
  opacity: 1; pointer-events: auto;
  transform: translate(-50%, -50%);
}
.mpesa-stk-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.mpesa-stk-modal__logo {
  display: inline-block;
  padding: 4px 10px;
  background: #00A651;            /* Safaricom green */
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  border-radius: 4px;
}
.mpesa-stk-modal__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--state-warn, #F0A500);
  display: inline-flex; align-items: center; gap: 6px;
}
.mpesa-stk-modal__status::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: mpesaPulse 1.4s ease-in-out infinite;
}
@keyframes mpesaPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}
.mpesa-stk-modal__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--white-100);
  margin: 0 0 10px;
}
.mpesa-stk-modal__body {
  font-size: 13px;
  color: var(--white-80);
  line-height: 1.55;
  margin: 0 0 12px;
}
.mpesa-stk-modal__body strong {
  color: var(--white-100);
  font-weight: 600;
}
.mpesa-stk-modal__from {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--white-60);
  margin-bottom: 14px;
}
.mpesa-stk-modal__pin {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--white-12);
  background: var(--white-04);
  color: var(--white-100);
  font-family: var(--font-mono);
  font-size: 22px;
  letter-spacing: 0.5em;
  text-align: center;
  margin-bottom: 18px;
  outline: none;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.mpesa-stk-modal__pin:focus {
  border-color: var(--violet-signal, #7C5CFF);
  background: rgba(124, 92, 255, 0.08);
}
.mpesa-stk-modal__actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-bottom: 14px;
}
.mpesa-stk-modal__btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--white-12);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.mpesa-stk-modal__btn:hover {
  color: var(--white-100);
  border-color: var(--white-100);
}
.mpesa-stk-modal__btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.mpesa-stk-modal__btn--primary {
  background: #00A651;
  border-color: #00A651;
  color: #FFFFFF;
}
.mpesa-stk-modal__btn--primary:hover {
  background: #008542;
  border-color: #008542;
  color: #FFFFFF;
}
.mpesa-stk-modal__footer {
  font-size: 11px;
  color: var(--white-40);
  text-align: center;
  font-style: italic;
}
.hire-tray__card-tag {
  display: block;
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--white-60);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1100px) {
  .hire-tray__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .hire-tray__grid {
    grid-template-columns: 1fr;
    overflow-x: auto;
  }
}


/* ─── Sidebar additions — "Your team" group + sticky hire action ───
   The label uses .sidebar__label tokens (already defined). New
   .team-section is just a semantic wrapper for the dynamic group. */

.team-section { display: contents; }
.team-section__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-40);
  margin: 18px 12px 8px;
}

.sidebar-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 12px;
  padding: 10px 14px;
  background: var(--violet-soft);
  border: 1px dashed rgba(46, 182, 185, 0.30);
  border-radius: var(--radius-pill-soft);
  color: var(--violet-bright);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.sidebar-action:hover {
  background: rgba(46, 182, 185, 0.14);
  border-color: rgba(46, 182, 185, 0.50);
  border-style: solid;
}
.sidebar-action:focus-visible {
  outline: 2px solid var(--violet-bright);
  outline-offset: 2px;
}
body.sidebar-collapsed .sidebar-action {
  margin: 12px 8px;
  padding: 10px 8px;
}
body.sidebar-collapsed .sidebar-action__label { display: none; }


/* ─── Setup prompt (warn-tone "needs setup" strip) ─── */

.setup-prompt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.20);
  border-radius: var(--radius-pill-soft);
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--state-warn);
}
.setup-prompt__text { display: inline-flex; align-items: center; gap: 8px; }
.setup-prompt__action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--state-warn);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.setup-prompt__action:hover { color: #FFD888; }
.setup-prompt__action:focus-visible {
  outline: 2px solid var(--state-warn);
  outline-offset: 2px;
}


/* ─── Onboarding wizard primitives ─── */

.onboarding-card {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 36px 40px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card-lg);
}
@media (max-width: 720px) {
  .onboarding-card { padding: 24px 20px; }
}

.onboarding-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 28px;
}
.onboarding-progress__dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--white-20);
  transition: background .2s var(--ease), transform .2s var(--ease);
}
.onboarding-progress__dot.is-current {
  background: var(--violet-signal);
  transform: scale(1.2);
}
.onboarding-progress__dot.is-done {
  background: var(--violet-deep);
}


/* ─── Builder shell (merchant/builder/) — three-pane layout ─── */

.builder-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 280px;
  gap: 16px;
  height: 100%;
  min-height: 0;
}
.builder-shell__rail {
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  padding: 14px;
  overflow-y: auto;
}
.builder-shell__preview {
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.builder-shell__preview iframe {
  flex: 1;
  width: 100%;
  border: 0;
  background: var(--paper);
}

/* Mobile: tabs replace three-pane */
.builder-tabs { display: none; }
@media (max-width: 1024px) {
  .builder-shell { grid-template-columns: 1fr; }
  .builder-shell__rail--blocks,
  .builder-shell__rail--props { display: none; }
  .builder-shell__rail--blocks.is-active,
  .builder-shell__rail--props.is-active { display: block; }
  .builder-tabs {
    display: flex;
    gap: 4px;
    padding: 6px;
    background: var(--white-04);
    border: 1px solid var(--white-06);
    border-radius: var(--radius-card-soft);
    margin-bottom: 12px;
  }
  .builder-tabs__btn {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--white-60);
    font-family: var(--font-text);
    font-size: 13px;
    cursor: pointer;
  }
  .builder-tabs__btn.is-active {
    background: var(--ink-2);
    color: var(--white-100);
  }
}

.builder-block {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card-soft);
  margin-bottom: 8px;
  cursor: grab;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.builder-block:hover { background: var(--white-06); border-color: var(--white-20); }
.builder-block.is-selected {
  background: var(--violet-soft);
  border-color: rgba(46, 182, 185, 0.40);
}
.builder-block:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.builder-block__handle {
  color: var(--white-40);
  font-size: 14px;
  cursor: grab;
}
.builder-block__label {
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  color: var(--white-100);
}
.builder-block__moves {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}
.builder-block__move {
  width: 20px; height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 4px;
  color: var(--white-60);
  font-size: 10px;
  cursor: pointer;
}
.builder-block__move:hover { background: var(--white-06); color: var(--white-100); }
.builder-block__move:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 1px;
}

.builder-prop-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.builder-prop-panel__head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-40);
  margin-bottom: 4px;
}
.builder-prop-panel__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.builder-prop-panel__field label {
  font-family: var(--font-text);
  font-size: 12px;
  color: var(--white-60);
}
.builder-prop-panel__field input,
.builder-prop-panel__field textarea,
.builder-prop-panel__field select {
  padding: 8px 10px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-input);
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 13px;
}
.builder-prop-panel__field input:focus-visible,
.builder-prop-panel__field textarea:focus-visible,
.builder-prop-panel__field select:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 0;
  border-color: transparent;
}


/* ─── Catalog row (merchant/catalog/ inline-edit row) ─── */

.catalog-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 2fr) 100px 120px 60px 36px;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card-soft);
  margin-bottom: 6px;
  transition: border-color .15s var(--ease);
}
.catalog-row:hover { border-color: var(--white-20); }
.catalog-row--out-of-stock { opacity: 0.55; }
.catalog-row--out-of-stock .catalog-row__name { text-decoration: line-through; }
.catalog-row__thumb {
  width: 48px; height: 48px;
  border-radius: 10px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  object-fit: cover;
}
.catalog-row__name,
.catalog-row__price,
.catalog-row__category {
  padding: 6px 8px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 13px;
  width: 100%;
}
.catalog-row__name:focus-visible,
.catalog-row__price:focus-visible,
.catalog-row__category:focus-visible {
  background: var(--white-04);
  border-color: var(--violet-signal);
  outline: 0;
}
.catalog-row__toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.catalog-row__menu {
  width: 28px; height: 28px;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: var(--white-60);
  cursor: pointer;
}
.catalog-row__menu:hover { background: var(--white-06); color: var(--white-100); }
.catalog-row__menu:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
@media (max-width: 720px) {
  .catalog-row {
    grid-template-columns: 48px minmax(0, 1fr) 36px;
    grid-template-rows: auto auto auto;
  }
  .catalog-row__price,
  .catalog-row__category,
  .catalog-row__toggle { grid-column: 2 / 3; }
}


/* ─── Archived-specialist row (settings/data.html) ─── */

.archived-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 14px;
  padding: 14px 18px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
  margin-bottom: 8px;
}
.archived-row__icon {
  grid-row: 1 / span 2;
  width: 36px; height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  color: var(--white-60);
  filter: grayscale(1);
}
.archived-row__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--white-100);
}
.archived-row__meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-60);
}
.archived-row__meta--soon { color: var(--state-warn); }
.archived-row__actions {
  grid-row: 1 / span 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 720px) {
  .archived-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }
  .archived-row__actions {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-top: 8px;
    flex-wrap: wrap;
  }
}


/* ─── Extensions on existing primitives ─── */

/* KPI tile — empty state (greyscale + placeholder) */
.kpi-tile--empty .kpi-tile__value {
  color: var(--white-40);
}
.kpi-tile--empty .kpi-tile__label {
  color: var(--white-40);
}
.kpi-tile--empty .kpi-tile__delta {
  color: var(--white-40) !important;
  font-style: italic;
}

/* Status pill — paused variant */
.status-pill--paused {
  color: var(--white-60);
}
.status-pill--paused::before {
  background: var(--white-40);
  animation: none;
}

/* Feed row — empty variant */
.feed-row--empty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: var(--white-60);
  font-family: var(--font-text);
  font-size: 13px;
  font-style: italic;
}
.feed-row--empty__cta {
  margin-left: auto;
  font-style: normal;
  font-weight: 500;
  color: var(--violet-bright);
  text-decoration: none;
}
.feed-row--empty__cta:hover { color: var(--violet-signal); }

/* App tab with badge — count chip on tab label */
.app-tab--with-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.app-tab__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  background: var(--violet-signal);
  color: #FFFFFF;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0;
}
.app-tab__badge--quiet {
  background: var(--white-06);
  color: var(--white-60);
}


/* ─── Wave A — End ─── */


/* ═══════════════════════════════════════════════════════════════════
   WAVE A+ PRIMITIVES — 2026-05-21
   Per docs/ALAT_APP_WAVE_A1_PLAN.md §13 + §3 + §5 + §6 + §7
   Role-scope: merchant + customer + courier (investor deferred)
   ═══════════════════════════════════════════════════════════════════ */


/* ───── A+ · Specialist deep page primitives (§2) ───── */

.spec-header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 0 24px;
  border-bottom: 1px solid var(--white-06);
  margin-bottom: 24px;
}
.spec-header__avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--white-04);
  border: 1px solid var(--white-12);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--violet-signal);
  flex-shrink: 0;
}
.spec-header__id {
  flex: 1 1 240px;
  min-width: 0;
}
.spec-header__name {
  font-family: var(--font-display, var(--font-sans));
  font-size: 24px;
  font-weight: 600;
  color: var(--white-100);
  line-height: 1.2;
  margin: 0 0 6px;
}
.spec-header__meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.spec-header__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  color: var(--white-80);
  font-size: 11px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.spec-header__pill--active   { color: var(--state-ok,   #5EEAB5); border-color: rgba(94,234,181,0.30); }
.spec-header__pill--paused   { color: var(--state-warn, #FBBF24); border-color: rgba(251,191,36,0.30); }
.spec-header__pill--hired    { color: var(--violet-signal); border-color: rgba(124,58,237,0.30); }
.spec-header__pill--archived { color: var(--white-60); }
.spec-header__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.spec-header__menu {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s var(--ease);
}
.spec-header__menu:hover { color: var(--white-100); border-color: var(--white-12); background: var(--white-04); }
.spec-header__menu:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

.spec-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--white-80);
  max-width: 720px;
  margin: 0 0 32px;
}

/* ── First-call transcript ── */
.spec-firstcall {
  position: relative;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 24px 24px 28px;
  max-width: 720px;
  margin: 0 0 32px;
}
.spec-firstcall__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.spec-firstcall__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0;
}
.spec-firstcall__replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  font-size: 12px;
  cursor: pointer;
  transition: all .15s var(--ease);
}
.spec-firstcall__replay:hover { color: var(--white-100); border-color: var(--white-12); }
.spec-firstcall__replay:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.spec-firstcall__thread {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.spec-firstcall__msg {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(6px);
  animation: specFirstcallFadeIn .35s var(--ease) forwards;
}
@keyframes specFirstcallFadeIn {
  to { opacity: 1; transform: translateY(0); }
}
.spec-firstcall__msg--user { justify-content: flex-end; }
.spec-firstcall__msg--agent { justify-content: flex-start; }
.spec-firstcall__bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}
.spec-firstcall__msg--user .spec-firstcall__bubble {
  background: var(--violet-signal);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}
.spec-firstcall__msg--agent .spec-firstcall__bubble {
  background: var(--white-06);
  color: var(--white-100);
  border: 1px solid var(--white-06);
  border-bottom-left-radius: 4px;
}
.spec-firstcall__role {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 4px;
}

/* ── Capabilities / data-needed / handoff ── */
.spec-capabilities {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 24px;
  max-width: 720px;
}
.spec-capabilities li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--white-80);
}
.spec-capabilities li i {
  flex-shrink: 0;
  margin-top: 4px;
  font-size: 12px;
}
.spec-capabilities li.is-does    i { color: var(--state-ok, #5EEAB5); }
.spec-capabilities li.is-doesnt  i { color: var(--white-60); }

.spec-data-needed {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 20px 24px;
  max-width: 720px;
  margin: 0 0 32px;
}
.spec-data-needed h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0 0 14px;
}
.spec-data-needed__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--white-04);
}
.spec-data-needed__row:last-child { border-bottom: none; }
.spec-data-needed__label { font-size: 14px; color: var(--white-80); }
.spec-data-needed__value { font-size: 13px; color: var(--white-60); font-family: var(--font-mono); }

.spec-handoff {
  margin: 0 0 32px;
  max-width: 720px;
}
.spec-handoff h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0 0 12px;
}
.spec-handoff__strip {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.spec-handoff__tile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  text-decoration: none;
  color: var(--white-100);
  font-size: 13px;
  transition: all .15s var(--ease);
}
.spec-handoff__tile:hover { border-color: var(--white-12); background: var(--white-06); }
.spec-handoff__tile:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.spec-handoff__tile i { color: var(--violet-signal); }

.spec-settings,
.spec-output {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 20px 24px;
  max-width: 720px;
  margin: 0 0 24px;
}
.spec-settings h3,
.spec-output h3 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0 0 16px;
}
.spec-output__history {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  color: var(--violet-signal);
  font-size: 13px;
  text-decoration: none;
}
.spec-output__history:hover { text-decoration: underline; }


/* ───── A+ · Catalog OCR review modal (§1 — used by K-W2.1b) ───── */

.ocr-review {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--ink-1, #0A0A0F);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ocr-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--white-06);
  flex-shrink: 0;
}
.ocr-review__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px;
  color: var(--white-100);
  margin: 0;
}
.ocr-review__filename {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-60);
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ocr-review__close {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  font-size: 16px;
  transition: all .15s var(--ease);
}
.ocr-review__close:hover { color: var(--white-100); border-color: var(--white-12); }
.ocr-review__close:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

.ocr-review__body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  min-height: 0;
  overflow: hidden;
}
.ocr-review__preview {
  border-right: 1px solid var(--white-06);
  background: var(--ink-2, #06060A);
  padding: 24px;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}
.ocr-review__preview img,
.ocr-review__preview embed,
.ocr-review__preview iframe {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid var(--white-06);
}
.ocr-review__items {
  overflow-y: auto;
  padding: 24px;
}
.ocr-review__items-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.ocr-review__items-title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0;
}
.ocr-review__count { color: var(--white-100); font-family: var(--font-mono); font-size: 13px; }

.ocr-review__item-row {
  display: grid;
  grid-template-columns: 1fr 110px 130px 90px auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: var(--white-04);
  margin-bottom: 8px;
}
.ocr-review__item-row.is-dropped { opacity: 0.4; }
.ocr-review__item-row input,
.ocr-review__item-row select {
  background: transparent;
  border: 1px solid var(--white-06);
  color: var(--white-100);
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-family: var(--font-sans);
  width: 100%;
}
.ocr-review__item-row input:focus-visible,
.ocr-review__item-row select:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 1px;
  border-color: var(--violet-signal);
}
.ocr-review__item-actions {
  display: inline-flex;
  gap: 4px;
}
.ocr-review__item-action {
  width: 28px; height: 28px;
  border-radius: 6px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  font-size: 11px;
  transition: all .15s var(--ease);
}
.ocr-review__item-action:hover { color: var(--white-100); border-color: var(--white-12); }
.ocr-review__item-action:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

.ocr-confidence-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  font-weight: 600;
  border: 1px solid currentColor;
  background: transparent;
}
.ocr-confidence-pill--high { color: #5EEAB5; }
.ocr-confidence-pill--mid  { color: #FBBF24; }
.ocr-confidence-pill--low  { color: #F87171; }

.ocr-review__actions {
  flex-shrink: 0;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 16px 24px;
  border-top: 1px solid var(--white-06);
  background: var(--ink-2, #06060A);
}
.ocr-review__actions .btn-ghost,
.ocr-review__actions .btn-filled { white-space: nowrap; }


/* ───── A+ · Builder additions (§3) ───── */

.builder-prompt-panel {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.builder-prompt-panel__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 8px;
}
.builder-prompt-panel textarea {
  width: 100%;
  min-height: 70px;
  background: transparent;
  border: 1px solid var(--white-06);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--white-100);
  font-size: 13px;
  font-family: var(--font-sans);
  resize: vertical;
}
.builder-prompt-panel textarea:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 1px;
  border-color: var(--violet-signal);
}
.builder-prompt-panel__foot {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.builder-prompt-panel__hint {
  font-size: 11px;
  color: var(--white-60);
}
.builder-prompt-panel.is-working .builder-prompt-panel__hint {
  color: var(--violet-signal);
}
.builder-prompt-panel__apply {
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--violet-signal);
  color: #FFFFFF;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s var(--ease);
}
.builder-prompt-panel__apply:hover { opacity: 0.9; }
.builder-prompt-panel__apply:disabled { opacity: 0.4; cursor: not-allowed; }
.builder-prompt-panel__apply:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}


/* ───── A+ · Cart drawer (§5 — used by K-W2.1d) ───── */

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 380px;
  max-width: 100vw;
  background: var(--ink-1, #0A0A0F);
  border-left: 1px solid var(--white-06);
  z-index: 950;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s var(--ease);
  box-shadow: -16px 0 32px rgba(0,0,0,0.4);
}
.cart-drawer.is-open { transform: translateX(0); }
.cart-drawer__scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 949;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s var(--ease);
}
.cart-drawer__scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}
.cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--white-06);
  flex-shrink: 0;
}
.cart-drawer__head h2 {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px;
  color: var(--white-100);
  margin: 0;
}
.cart-drawer__close {
  width: 36px; height: 36px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  font-size: 14px;
  transition: all .15s var(--ease);
}
.cart-drawer__close:hover { color: var(--white-100); border-color: var(--white-12); }
.cart-drawer__close:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.cart-drawer__body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 16px 20px;
}
.cart-drawer__foot {
  flex-shrink: 0;
  padding: 16px 20px 20px;
  border-top: 1px solid var(--white-06);
  background: var(--ink-2, #06060A);
}
.cart-drawer__merchant {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0 0 12px;
}
.cart-drawer__section-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-40);
  margin: 0 0 8px;
}

/* ── Cart courier picker (COURIER-01) ──────────────────────────── */
.cart-courier { margin: 14px 0 4px; }
.cart-courier__opts { display: flex; flex-direction: column; gap: 6px; }
.cart-courier__opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--white-12);
  border-radius: 10px;
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.cart-courier__opt.is-active {
  border-color: var(--violet-signal, #7C5CFF);
  background: rgba(124,92,255,0.08);
  color: var(--white-100);
}
.cart-courier__opt:hover:not(.is-active) {
  background: var(--white-04);
  border-color: var(--white-24);
}
.cart-courier__opt-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--white-06);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}
.cart-courier__opt.is-active .cart-courier__opt-icon {
  background: rgba(124,92,255,0.2);
  color: var(--violet-bright, #9E87FF);
}
.cart-courier__opt-body { flex: 1; min-width: 0; }
.cart-courier__opt-body strong { display: block; font-size: 13px; font-weight: 600; }
.cart-courier__opt-body span  { display: block; font-size: 11px; color: var(--white-60); margin-top: 1px; }
.cart-courier__opt-check { font-size: 14px; color: var(--white-24); flex-shrink: 0; }
.cart-courier__opt.is-active .cart-courier__opt-check { color: var(--violet-signal, #7C5CFF); }
.cart-courier__pool-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--white-06);
  border-radius: 10px;
  background: var(--white-04);
  color: var(--white-80);
}
.cart-courier__setup-link {
  display: inline-block;
  font-size: 12px;
  color: var(--violet-bright, #9E87FF);
  text-decoration: none;
  margin-top: 8px;
  padding: 0 2px;
}
.cart-courier__setup-link:hover { text-decoration: underline; }

.cart-row {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--white-04);
}
.cart-row:last-child { border-bottom: none; }
.cart-row__thumb {
  width: 48px; height: 48px;
  border-radius: 8px;
  background: var(--white-06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white-60);
  font-size: 16px;
  overflow: hidden;
}
.cart-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__body { min-width: 0; }
.cart-row__name {
  font-size: 14px;
  color: var(--white-100);
  line-height: 1.3;
  margin: 0 0 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-row__sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-60);
}
.cart-row__right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.cart-row__price {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--white-100);
}
.cart-row__qty {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cart-row__qty-btn {
  width: 24px; height: 24px;
  border-radius: 6px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  font-size: 11px;
  transition: all .15s var(--ease);
}
.cart-row__qty-btn:hover { color: var(--white-100); border-color: var(--white-12); }
.cart-row__qty-btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 1px;
}
.cart-row__qty-val {
  min-width: 22px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-100);
}
.cart-row__remove {
  background: transparent;
  border: none;
  color: var(--white-60);
  font-size: 11px;
  cursor: pointer;
  padding: 2px 4px;
}
.cart-row__remove:hover { color: var(--state-crit, #F87171); }
.cart-row__remove:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 1px;
  border-radius: 4px;
}

.cart-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--white-60);
}
.cart-empty i { font-size: 36px; opacity: 0.4; margin-bottom: 16px; display: block; }
.cart-empty h3 {
  color: var(--white-100);
  font-size: 16px;
  margin: 0 0 8px;
}
.cart-empty p { font-size: 13px; margin: 0 0 20px; }

/* CHANGE-2: Cart drawer mini-map (160px Leaflet, non-interactive) */
.cart-minimap {
  height: 160px;
  border-radius: 10px;
  overflow: hidden;
  margin: 12px 0 0;
  background: var(--surface-02, #1A1A1A);
}
/* Leaflet tile dark inversion — applied via JS but also here as fallback */
.cart-minimap .leaflet-tile-pane {
  filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.cart-total {
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 14px;
}
.cart-total__row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  color: var(--white-80);
}
.cart-total__row--grand {
  border-top: 1px solid var(--white-06);
  margin-top: 6px;
  padding-top: 10px;
  color: var(--white-100);
  font-weight: 600;
  font-size: 14px;
}

/* CHANGE-11: Daraja fee disclosure above Place-order button */
.cart-refund-notice {
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted, #888);
  text-align: center;
  margin: 8px 0 10px;
  padding: 0 4px;
}
.cart-submit {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: var(--violet-signal);
  color: #FFFFFF;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s var(--ease);
}
.cart-submit:hover { opacity: 0.92; }
.cart-submit:disabled { opacity: 0.4; cursor: not-allowed; }
.cart-submit:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

/* Topbar cart-count badge — extends .topbar__btn--badge */
.topbar__btn--badge[data-count]::after {
  content: attr(data-count);
  top: 4px;
  right: 4px;
  width: auto;
  height: 16px;
  min-width: 16px;
  padding: 0 4px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topbar__btn--badge[data-count="0"]::after,
.topbar__btn--badge:not([data-count])::after { content: ''; padding: 0; }


/* ───── A+ · Notifications panel (§6 — used by K-W2.1e) ───── */

.notif-panel {
  position: fixed;
  top: 64px;
  right: 16px;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: 500px;
  background: var(--ink-1, #0A0A0F);
  border: 1px solid var(--white-12);
  border-radius: 14px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.5);
  z-index: 940;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.notif-panel.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.notif-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--white-06);
  flex-shrink: 0;
}
.notif-panel__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 14px;
  color: var(--white-100);
  margin: 0;
}
.notif-panel__head-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.notif-panel__link {
  font-size: 12px;
  color: var(--violet-signal);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}
.notif-panel__link:hover { text-decoration: underline; }
.notif-panel__link:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
  border-radius: 4px;
}
.notif-panel__list {
  flex: 1 1 auto;
  overflow-y: auto;
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif-row {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--white-04);
  cursor: pointer;
  transition: background .15s var(--ease);
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--white-04); }
.notif-row:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: -2px;
}
.notif-row--unread { background: rgba(124, 58, 237, 0.06); }
.notif-row--unread:hover { background: rgba(124, 58, 237, 0.10); }
.notif-row--read { background: transparent; }
.notif-row__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--white-06);
  color: var(--violet-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}
.notif-row__body {
  min-width: 0;
}
.notif-row__title {
  font-size: 13px;
  color: var(--white-100);
  line-height: 1.35;
  margin: 0 0 3px;
  font-weight: 500;
}
.notif-row--read .notif-row__title { font-weight: 400; color: var(--white-80); }
.notif-row__text {
  font-size: 12px;
  color: var(--white-60);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-row__ts {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.notif-row__cta {
  grid-column: 2 / -1;
  margin-top: 6px;
  font-size: 11px;
  color: var(--violet-signal);
}

.notif-empty {
  padding: 36px 24px;
  text-align: center;
  color: var(--white-60);
}
.notif-empty i { display: block; font-size: 28px; opacity: 0.4; margin-bottom: 12px; }
.notif-empty p { font-size: 13px; margin: 0; }


/* ───── A+ · Tutorial overlay (§7 — used by K-W2.1e) ───── */

.tour-spotlight {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 980;
  pointer-events: auto;
  /* Cut-out hole rendered via clip-path — JS sets --hole-* vars to
     position and size the cut-out around the targeted element. */
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 0%,
    var(--hole-x, 50%) var(--hole-y, 50%),
    var(--hole-x, 50%) calc(var(--hole-y, 50%) + var(--hole-h, 0px)),
    calc(var(--hole-x, 50%) + var(--hole-w, 0px)) calc(var(--hole-y, 50%) + var(--hole-h, 0px)),
    calc(var(--hole-x, 50%) + var(--hole-w, 0px)) var(--hole-y, 50%),
    var(--hole-x, 50%) var(--hole-y, 50%)
  );
}
.tour-spotlight.is-no-target {
  clip-path: none;
}

.tour-callout {
  position: fixed;
  z-index: 982;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: var(--ink-1, #0A0A0F);
  border: 1px solid var(--white-12);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 16px 36px rgba(0,0,0,0.5);
}
.tour-callout__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 16px;
  color: var(--white-100);
  margin: 0 0 8px;
}
.tour-callout__body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--white-80);
  margin: 0 0 14px;
}
.tour-callout__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tour-callout__btn-row {
  display: flex;
  gap: 8px;
}
.tour-callout__btn {
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.tour-callout__btn:hover { color: var(--white-100); border-color: var(--white-12); }
.tour-callout__btn--primary {
  background: var(--violet-signal);
  border-color: var(--violet-signal);
  color: #FFFFFF;
}
.tour-callout__btn--primary:hover { opacity: 0.92; color: #FFFFFF; }
.tour-callout__btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

.tour-progress {
  display: flex;
  gap: 5px;
  align-items: center;
}
.tour-progress__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--white-12);
}
.tour-progress__dot.is-current {
  background: var(--violet-signal);
  width: 18px;
  border-radius: 3px;
  transition: all .2s var(--ease);
}


/* ───── A+ · Cross-spec composition (§4 — used by K-W2.1a/c) ───── */

.surge-drafts {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.surge-drafts__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.surge-drafts__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0;
}
.surge-drafts__card {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.surge-drafts__card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--white-60);
  margin-bottom: 8px;
}
.surge-drafts__card-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--white-100);
  margin: 0 0 12px;
}
.surge-drafts__card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.surge-drafts__card-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.surge-drafts__card-btn:hover { color: var(--white-100); border-color: var(--white-12); }
.surge-drafts__card-btn--primary {
  background: var(--violet-signal);
  color: #FFFFFF;
  border-color: var(--violet-signal);
}
.surge-drafts__card-btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

.synth-queue {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 16px;
}
.synth-queue__title {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin: 0 0 12px;
}
.synth-queue__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--white-04);
}
.synth-queue__row:last-child { border-bottom: none; }
.synth-queue__icon {
  width: 28px; height: 28px;
  border-radius: 6px;
  background: var(--white-06);
  color: var(--violet-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.synth-queue__text {
  font-size: 13px;
  color: var(--white-100);
  line-height: 1.35;
}
.synth-queue__sub {
  font-size: 11px;
  color: var(--white-60);
  margin-top: 2px;
}
.synth-queue__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--state-ok, #5EEAB5);
}
.synth-queue__status--queued { color: var(--state-warn, #FBBF24); }

.sage-sources {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--white-04);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-60);
}
.sage-sources i { color: var(--violet-signal); font-size: 11px; }


/* ───── A+ · Mobile responsive (≤720px) ───── */

@media (max-width: 720px) {
  .spec-header { gap: 12px; }
  .spec-header__name { font-size: 20px; }
  .spec-lead { font-size: 15px; }
  .spec-firstcall { padding: 18px 16px 20px; }
  .spec-firstcall__bubble { max-width: 88%; font-size: 13px; }
  .spec-capabilities { grid-template-columns: 1fr; }
  .spec-data-needed,
  .spec-settings,
  .spec-output { padding: 16px 18px; }

  .ocr-review__body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .ocr-review__preview {
    border-right: none;
    border-bottom: 1px solid var(--white-06);
  }
  .ocr-review__item-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .ocr-review__item-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .ocr-review__actions { padding: 12px 16px; }

  /* Cart: bottom sheet on mobile — SCHED-01 / MOBILE-01 */
  .cart-drawer {
    width: 100vw;
    top: auto;
    height: 88vh;
    border-left: none;
    border-top: 1px solid var(--white-12);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    box-shadow: 0 -16px 40px rgba(0,0,0,0.5);
  }
  .cart-drawer.is-open { transform: translateY(0); }
  /* Drag handle */
  .cart-drawer__head::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: var(--white-12);
    border-radius: 99px;
  }
  .cart-drawer__head { position: relative; }
  /* Scheduled delivery time inputs on mobile */
  .cart-sched-row { flex-direction: column; gap: 8px; }
  .cart-sched-row select { width: 100%; }

  .notif-panel {
    width: calc(100vw - 16px);
    right: 8px;
    top: 56px;
  }

  .tour-callout { width: calc(100vw - 32px); }

  .surge-drafts,
  .synth-queue { padding: 14px 16px; }
}


/* ─── Wave A+ — End ─── */


/* ═══════════════════════════════════════════════════════════════════
   WAVE A++ PRIMITIVES — 2026-05-21
   Per docs/ALAT_APP_WAVE_A2_PLAN.md §11 + §1-§9
   Role-scope: merchant + customer + courier (investor deferred)
   ═══════════════════════════════════════════════════════════════════ */


/* ───── A++ §8 · Toast stack + high-priority variant ───── */

.toast-stack {
  position: fixed;
  top: 76px;
  right: 18px;
  z-index: 990;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 340px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
}

.toast {
  position: relative;
  background: var(--ink-1, #0A0A0F);
  border: 1px solid var(--white-12);
  border-radius: 12px;
  padding: 12px 38px 12px 14px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  color: var(--white-100);
  font-size: 13px;
  line-height: 1.45;
  cursor: pointer;
  pointer-events: auto;
  transform: translateX(110%);
  opacity: 0;
  transition: transform .28s var(--ease), opacity .28s var(--ease);
}
.toast.is-open {
  transform: translateX(0);
  opacity: 1;
}
.toast:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.toast__title {
  font-size: 13px;
  font-weight: 500;
  color: var(--white-100);
  margin: 0 0 3px;
  line-height: 1.35;
}
.toast__body {
  font-size: 12px;
  color: var(--white-60);
  line-height: 1.45;
  margin: 0;
}
.toast__close {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--white-60);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.toast__close:hover { color: var(--white-100); background: var(--white-06); }
.toast__close:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

.toast--high {
  border-left: 3px solid var(--violet-signal);
  background: linear-gradient(180deg, rgba(124,58,237,0.10) 0%, var(--ink-1, #0A0A0F) 28%);
}
.toast--high .toast__title {
  color: var(--white-100);
}


/* ───── A++ §2 · SURGE drafts card (enriched) ───── */

.surge-drafts__card-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: var(--white-06) center/cover no-repeat;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-60);
  font-size: 22px;
}
.surge-drafts__card-caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--white-100);
  margin: 0 0 12px;
}
.surge-drafts__platforms {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.surge-drafts__platform-btn {
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.surge-drafts__platform-btn.is-active {
  background: var(--white-06);
  color: var(--white-100);
  border-color: var(--white-12);
}
.surge-drafts__platform-btn:hover { color: var(--white-100); }
.surge-drafts__platform-btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}


/* ───── A++ §2 · SYNTH queue row (enriched) ───── */

.synth-queue__row-preview {
  display: block;
  min-width: 0;
}
.synth-queue__row-subject {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
  margin: 0 0 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.synth-queue__row-snippet {
  font-size: 12px;
  color: var(--white-60);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.synth-queue__row-countdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-60);
}
.synth-queue__row-ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--white-12);
  border-top-color: var(--violet-signal);
  animation: synth-ring-spin 1.2s linear infinite;
}
@keyframes synth-ring-spin {
  to { transform: rotate(360deg); }
}
.synth-queue__row-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  grid-column: 2 / -1;
}
.synth-queue__row-btn {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.synth-queue__row-btn:hover { color: var(--white-100); border-color: var(--white-12); }
.synth-queue__row-btn--primary {
  background: var(--violet-signal);
  border-color: var(--violet-signal);
  color: #FFFFFF;
}
.synth-queue__row-btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}


/* ───── A++ §2 · K-W3.1b · Cross-spec set-piece additions ───── */

/* SURGE drafts host (collapsed look — Arkam-quiet, no shadow, no gradient) */
.surge-drafts__head .surge-drafts__title:last-child {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--white-40);
  text-transform: none;
}

/* Sage source chip — small, monochrome, mono-font */
.sage-sources__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-right: 6px;
  margin-top: 2px;
  margin-bottom: 2px;
  transition: border-color .15s var(--ease), color .15s var(--ease);
}
.sage-sources__chip:hover { color: var(--white-100); border-color: var(--white-12); }
.sage-sources__chip i { color: var(--violet-signal); font-size: 11px; }
.sage-sources__chip:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}

/* Hidden host attribute should collapse fully (HTML hidden + CSS for clarity) */
.surge-drafts[hidden],
.synth-queue[hidden],
[data-app-sage-card][hidden] { display: none !important; }


/* ───── A++ §6 · Workforce Health page ───── */

.workforce-strip {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  margin-bottom: 18px;
}
.workforce-strip__window {
  display: inline-flex;
  border: 1px solid var(--white-06);
  border-radius: 999px;
  overflow: hidden;
  background: var(--ink-0, transparent);
}
.workforce-strip__window-btn {
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: none;
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.workforce-strip__window-btn.is-active {
  background: var(--violet-signal);
  color: #FFFFFF;
}
.workforce-strip__window-btn:hover { color: var(--white-100); }
.workforce-strip__window-btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: -2px;
}
.workforce-strip__totals {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.workforce-strip__metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
}
.workforce-strip__metric-val {
  font-family: var(--font-display, var(--font-sans));
  font-size: 22px;
  color: var(--white-100);
  letter-spacing: 0;
  text-transform: none;
  font-weight: 500;
  margin-bottom: 2px;
}
.workforce-strip__agents {
  display: inline-flex;
  gap: 4px;
  font-size: 14px;
}

.workforce-grid {
  display: grid;
  gap: 12px;
}
.workforce-row {
  display: grid;
  grid-template-columns: 44px 1fr 120px 140px auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 12px;
  transition: background .15s var(--ease), border-color .15s var(--ease);
}
.workforce-row:hover {
  background: var(--white-06);
  border-color: var(--white-12);
}
.workforce-row:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.workforce-row__avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--white-06);
  color: var(--violet-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.workforce-row__body {
  min-width: 0;
}
.workforce-row__name {
  font-size: 14px;
  color: var(--white-100);
  margin: 0 0 3px;
  font-weight: 500;
}
.workforce-row__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
  display: flex;
  gap: 8px;
  align-items: center;
}
.workforce-row__sparkline {
  display: block;
  width: 120px;
  height: 32px;
}
.workforce-row__sparkline svg { width: 100%; height: 100%; display: block; }
.workforce-row__sparkline path {
  fill: none;
  stroke: var(--violet-signal);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.workforce-row__sparkline-fill {
  fill: rgba(124, 58, 237, 0.14);
  stroke: none;
}
.workforce-row__metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.workforce-row__metric-val {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px;
  color: var(--white-100);
  margin-bottom: 2px;
}
.workforce-row__metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
}
.workforce-row__delta {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.workforce-row__delta--up    { color: var(--state-ok, #5EEAB5); }
.workforce-row__delta--down  { color: var(--state-warn, #FBBF24); }
.workforce-row__delta--flat  { color: var(--white-60); }
.workforce-row__link {
  font-size: 12px;
  color: var(--violet-signal);
  text-decoration: none;
  white-space: nowrap;
}
.workforce-row__link:hover { text-decoration: underline; }
.workforce-row__link:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
  border-radius: 4px;
}


/* ───── A++ §7 · Skill upgrade row + section ───── */

.skill-upgrades {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 18px 20px;
  margin-top: 18px;
}
.skill-upgrades__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.skill-upgrades__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 16px;
  color: var(--white-100);
  margin: 0;
}
.skill-upgrades__lead {
  font-size: 12px;
  color: var(--white-60);
  margin: 0;
}
.skill-upgrades__list {
  display: grid;
  gap: 10px;
}

.upgrade-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink-0, transparent);
  border: 1px solid var(--white-06);
  border-radius: 10px;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.upgrade-row:hover {
  border-color: var(--white-12);
  background: var(--white-04);
}
.upgrade-row.is-enabled {
  border-color: rgba(124, 58, 237, 0.40);
  background: rgba(124, 58, 237, 0.06);
}
.upgrade-row__body {
  min-width: 0;
}
.upgrade-row__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--white-100);
  margin: 0 0 3px;
}
.upgrade-row__what {
  font-size: 12px;
  color: var(--white-60);
  line-height: 1.45;
  margin: 0 0 4px;
}
.upgrade-row__metric {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
}
.upgrade-row__pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.14);
  color: var(--violet-signal);
  border: 1px solid rgba(124, 58, 237, 0.30);
  white-space: nowrap;
}
.upgrade-row__toggle {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--white-12);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s var(--ease);
}
.upgrade-row__toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform .2s var(--ease);
}
.upgrade-row__toggle[aria-pressed="true"] {
  background: var(--violet-signal);
}
.upgrade-row__toggle[aria-pressed="true"]::after {
  transform: translateX(18px);
}
.upgrade-row__toggle:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 3px;
}

/* K-W3.2: row sub-bits — delta chip alias, status badge, pricing footer */
.upgrade-row__delta-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--white-04);
  color: var(--white-60);
  border: 1px solid var(--white-06);
  white-space: nowrap;
  margin-right: 6px;
}
.upgrade-row__status {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(46, 182, 185, 0.10);
  color: #5EEAB5;
  border: 1px solid rgba(46, 182, 185, 0.22);
  white-space: nowrap;
}
.upgrade-row__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.upgrade-row__pricing {
  grid-column: 1 / -1;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--white-06);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-60);
}
.skill-upgrades__empty {
  font-family: var(--font-text);
  font-size: 13px;
  color: var(--white-60);
  margin: 0;
}

/* K-W3.2: Capabilities preview strip (lives in the Upgrades section) */
.capabilities-preview {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--white-06);
}
.capabilities-preview__head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-40);
  margin: 0 0 8px;
}
.capabilities-preview__row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.capabilities-preview__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-family: var(--font-text);
  font-size: 12px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  color: var(--white-60);
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.capabilities-preview__chip.is-on {
  background: rgba(124, 58, 237, 0.10);
  border-color: rgba(124, 58, 237, 0.32);
  color: var(--white-100);
}
.capabilities-preview__chip i {
  font-size: 9px;
  opacity: 0.7;
}

/* K-W3.2: Specialist index — "Upgraded · N" chip + filter strip */
.specialist-card__upgraded-chip,
.specialist-tile__upgraded-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(124, 58, 237, 0.14);
  color: var(--violet-bright);
  border: 1px solid rgba(124, 58, 237, 0.30);
  white-space: nowrap;
}
.specialist-card__upgraded-chip i,
.specialist-tile__upgraded-chip i {
  font-size: 8px;
}

.specialists-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-pill-soft);
  overflow-x: auto;
  max-width: 100%;
}
.specialists-filter::-webkit-scrollbar { display: none; }
.specialists-filter__tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: transparent;
  border: 0;
  border-radius: var(--radius-pill-soft);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  color: var(--white-60);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.specialists-filter__tab:hover { color: var(--white-100); }
.specialists-filter__tab.is-active {
  background: var(--violet-signal);
  color: #FFFFFF;
}


/* ───── A++ §4 · Customer Wishlist row ───── */

.wishlist-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 12px;
  margin-bottom: 8px;
  transition: background .15s var(--ease);
}
.wishlist-row:hover { background: var(--white-06); }
.wishlist-row__thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--white-06);
  color: var(--violet-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.wishlist-row__body {
  min-width: 0;
}
.wishlist-row__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--white-100);
  margin: 0 0 3px;
}
.wishlist-row__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-60);
}
.wishlist-row__price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-100);
  font-weight: 500;
}
.wishlist-row__price-old {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  text-decoration: line-through;
  margin-left: 4px;
}
.wishlist-row__btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--white-06);
  background: var(--violet-signal);
  color: #FFFFFF;
  cursor: pointer;
  transition: opacity .15s var(--ease);
}
.wishlist-row__btn:hover { opacity: 0.92; }
.wishlist-row__btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.wishlist-row__btn--ghost {
  background: transparent;
  color: var(--white-80);
}
.wishlist-row__btn--ghost:hover { color: var(--white-100); border-color: var(--white-12); }


/* ───── A++ §4.3 · Active Stay banner ───── */

.active-stay-banner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(95deg, rgba(124,58,237,0.18), rgba(124,58,237,0.04));
  border: 1px solid rgba(124, 58, 237, 0.30);
  border-radius: 14px;
  margin-bottom: 18px;
}
.active-stay-banner__icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(124, 58, 237, 0.18);
  color: var(--violet-signal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.active-stay-banner__body {
  min-width: 0;
}
.active-stay-banner__hotel {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-100);
  margin: 0 0 3px;
}
.active-stay-banner__meta {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.active-stay-banner__actions {
  display: flex;
  gap: 8px;
}
.active-stay-banner__btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--white-12);
  background: var(--ink-0, transparent);
  color: var(--white-80);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.active-stay-banner__btn:hover {
  color: var(--white-100);
  border-color: var(--violet-signal);
}
.active-stay-banner__btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}


/* ───── A++ §9 · Audit log row (Settings → Data → Activity) ───── */

.audit-row {
  display: grid;
  grid-template-columns: 130px 1fr 120px;
  gap: 14px;
  align-items: start;
  padding: 10px 14px;
  border-bottom: 1px solid var(--white-04);
  font-size: 13px;
}
.audit-row:last-child { border-bottom: none; }
.audit-row:hover { background: var(--white-04); }
.audit-row__ts {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--white-60);
  white-space: nowrap;
}
.audit-row__action {
  font-size: 13px;
  color: var(--white-100);
  margin: 0;
}
.audit-row__payload {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
  margin: 4px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-row__actor {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-60);
  text-align: right;
}


/* ───── A++ §3.2 · Knowledge review modal (mirrors catalog/review.html) ───── */

.kn-review {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 540px;
}
.kn-review__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--white-06);
}
.kn-review__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 16px;
  color: var(--white-100);
  margin: 0;
}
.kn-review__body {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 380px;
}
.kn-review__preview {
  border-right: 1px solid var(--white-06);
  padding: 16px 20px;
  background: var(--ink-0, transparent);
  overflow-y: auto;
  font-size: 13px;
  line-height: 1.55;
  color: var(--white-80);
  white-space: pre-wrap;
}
.kn-review__list {
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kn-review__faq-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 14px;
  padding: 12px 14px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 10px;
}
.kn-review__faq-q {
  font-size: 13px;
  font-weight: 500;
  color: var(--white-100);
  margin: 0 0 4px;
}
.kn-review__faq-a {
  font-size: 12px;
  color: var(--white-80);
  line-height: 1.5;
  margin: 0;
}
.kn-review__faq-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}
.kn-review__faq-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
}
.kn-review__faq-btn:hover { color: var(--white-100); border-color: var(--white-12); }
.kn-review__faq-btn--primary { background: var(--violet-signal); border-color: var(--violet-signal); color: #FFFFFF; }
.kn-review__faq-btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.kn-confidence-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--white-06);
  color: var(--white-60);
}
.kn-confidence-pill--high { color: var(--state-ok, #5EEAB5); border-color: rgba(94, 234, 181, 0.40); }
.kn-confidence-pill--med  { color: var(--state-warn, #FBBF24); border-color: rgba(251, 191, 36, 0.40); }
.kn-confidence-pill--low  { color: var(--state-err, #F87171); border-color: rgba(248, 113, 113, 0.40); }


/* ───── A++ §3.1 · Builder AI streamed-edit surface (K-W3.1c) ─────
   Sits inside the Builder right-rail prompt panel. Each onChunk
   patch becomes a faint typed line; a blinking caret marks the
   live tail. Arkam-quiet: no glow, no shadow, neutral background. */
.builder-ai-stream {
  display: none;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card-soft);
  font-family: var(--font-mono);
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--white-60);
}
.builder-ai-stream.is-open { display: block; }
.builder-ai-stream__line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 0;
  color: var(--white-80);
  word-break: break-word;
}
.builder-ai-stream__line i {
  font-size: 9px;
  color: var(--violet-bright);
  opacity: 0.7;
  flex-shrink: 0;
}
.builder-ai-stream__line--status { color: var(--white-60); font-style: italic; }
.builder-ai-stream__line--status i { color: var(--white-40); }
.builder-ai-stream__cursor {
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--violet-bright);
  opacity: 0.55;
  animation: saikatiCursorBlink 0.9s steps(2) infinite;
}
.builder-prompt-panel__cancel {
  margin-left: 8px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--white-12);
  border-radius: var(--radius-pill-soft);
  color: var(--white-60);
  font-family: var(--font-text);
  font-size: 11px;
  cursor: pointer;
  transition: color .15s var(--ease), border-color .15s var(--ease);
}
.builder-prompt-panel__cancel:hover { color: var(--white-100); border-color: var(--white-40); }
.builder-prompt-panel__cancel:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}


/* ───── A++ §5.3 · Settlement preview tile (courier) ───── */

.settlement-tile {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease);
}
.settlement-tile:hover {
  border-color: var(--white-12);
  background: var(--white-06);
}
.settlement-tile:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.settlement-tile__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.settlement-tile__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
}
.settlement-tile__day {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet-signal);
}
.settlement-tile__amount {
  font-family: var(--font-display, var(--font-sans));
  font-size: 26px;
  color: var(--white-100);
  margin: 0 0 6px;
}
.settlement-tile__break {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--white-60);
}
.settlement-tile__drill {
  display: none;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--white-06);
}
.settlement-tile.is-open .settlement-tile__drill { display: block; }
.settlement-tile__drill-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 0;
  color: var(--white-80);
}


/* ───── A++ §5.1 · Route simulation controls (courier) ───── */

.route-sim-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--ink-1, #0A0A0F);
  border: 1px solid var(--white-12);
  border-radius: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.route-sim-controls__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-right: 4px;
}
.route-sim-controls__btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .15s var(--ease);
}
.route-sim-controls__btn:hover { color: var(--white-100); border-color: var(--white-12); }
.route-sim-controls__btn--primary {
  background: var(--violet-signal);
  border-color: var(--violet-signal);
  color: #FFFFFF;
}
.route-sim-controls__btn--primary:hover { opacity: 0.92; color: #FFFFFF; }
.route-sim-controls__btn:disabled { opacity: 0.4; cursor: not-allowed; }
.route-sim-controls__btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.route-sim-controls__status {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--white-60);
}


/* ───── A++ Mobile responsive (≤720px) ───── */

@media (max-width: 720px) {
  .toast-stack {
    top: 64px;
    right: 8px;
    left: 8px;
    width: auto;
    max-width: none;
  }

  .workforce-strip {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .workforce-strip__totals {
    justify-content: flex-start;
    gap: 18px;
  }
  .workforce-row {
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
  }
  .workforce-row__sparkline,
  .workforce-row__metric { grid-column: 2 / -1; }
  .workforce-row__link { grid-column: 1 / -1; text-align: right; }

  .upgrade-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .upgrade-row__pill,
  .upgrade-row__toggle { justify-self: flex-start; }

  .wishlist-row {
    grid-template-columns: 40px 1fr;
    gap: 10px;
  }
  .wishlist-row__price,
  .wishlist-row__btn { grid-column: 2 / -1; justify-self: flex-start; }

  .active-stay-banner {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .active-stay-banner__actions { flex-wrap: wrap; }

  .kn-review__body {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .kn-review__preview {
    border-right: none;
    border-bottom: 1px solid var(--white-06);
  }

  .audit-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .audit-row__actor { text-align: left; }

  .surge-drafts__platforms { flex-direction: row; }
  .synth-queue__row {
    grid-template-columns: auto 1fr;
  }
  .synth-queue__row-countdown {
    grid-column: 2 / -1;
    margin-top: 4px;
  }

  .route-sim-controls__status {
    margin-left: 0;
    width: 100%;
    text-align: left;
  }
}


/* ───── A++ §1 · Saikati ↔ Knowledge loop (K-W3.1a) ─────
   Customer-facing attribution chip + merchant-side unanswered queue.
   Arkam-quiet: no shadows, tight spacing, brand-token colours only. */

.saikati-attribution-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.10);
  border: 1px solid rgba(124, 58, 237, 0.26);
  color: var(--violet-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
}
.saikati-attribution-chip i {
  font-size: 9px;
  color: var(--violet-signal);
}

.saikati-stream-typing {
  display: inline-block;
  width: 6px;
  height: 14px;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: currentColor;
  opacity: 0.55;
  animation: saikatiCursorBlink 0.9s steps(2) infinite;
}
@keyframes saikatiCursorBlink {
  0%, 100% { opacity: 0.0; }
  50%      { opacity: 0.55; }
}

.saikati-unanswered {
  margin: 0 0 28px;
  padding: 18px 20px 16px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card);
}
.saikati-unanswered__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.saikati-unanswered__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--white-100);
  letter-spacing: -0.012em;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.saikati-unanswered__title i {
  color: var(--violet-signal);
  font-size: 13px;
}
.saikati-unanswered__count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--violet-soft);
  border: 1px solid rgba(124, 58, 237, 0.26);
  color: var(--violet-bright);
  text-transform: uppercase;
}
.saikati-unanswered__count.is-zero {
  background: var(--white-04);
  border-color: var(--white-06);
  color: var(--white-40);
}
.saikati-unanswered__sub {
  font-size: 12.5px;
  color: var(--white-60);
  margin: 0;
}
.saikati-unanswered__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.saikati-unanswered__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) auto;
  gap: 14px;
  align-items: start;
  padding: 14px 14px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-card-soft);
}
.saikati-unanswered__q {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.saikati-unanswered__q-text {
  font-family: var(--font-text);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--white-100);
  font-weight: 500;
  word-break: break-word;
}
.saikati-unanswered__q-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--white-40);
}
.saikati-unanswered__q-meta strong {
  color: var(--white-60);
  font-weight: 500;
}
.saikati-unanswered__a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.saikati-unanswered__a textarea {
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-input);
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
}
.saikati-unanswered__a textarea:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 0;
  border-color: transparent;
}
.saikati-unanswered__submit {
  align-self: flex-start;
  padding: 9px 16px;
  border: 0;
  border-radius: var(--radius-pill-soft);
  background: var(--violet-bright);
  color: var(--ink-1);
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s var(--ease);
}
.saikati-unanswered__submit:hover { background: var(--violet-signal); }
.saikati-unanswered__submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.saikati-unanswered__empty {
  font-size: 12.5px;
  color: var(--white-40);
  padding: 4px 2px 2px;
  font-family: var(--font-text);
}
@media (max-width: 820px) {
  .saikati-unanswered__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .saikati-unanswered__submit { align-self: stretch; text-align: center; }
}

/* Merchant dashboard — Saikati callout card (shown only when queue > 0) */
.saikati-callout {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  margin-bottom: 20px;
  background: linear-gradient(180deg, rgba(124,58,237,0.10) 0%, var(--ink-2) 60%);
  border: 1px solid rgba(124, 58, 237, 0.26);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s var(--ease);
}
.saikati-callout:hover { border-color: rgba(124, 58, 237, 0.40); }
.saikati-callout__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--violet-soft);
  border: 1px solid rgba(124, 58, 237, 0.26);
  color: var(--violet-bright);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.saikati-callout__body {
  min-width: 0;
}
.saikati-callout__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--white-100);
  letter-spacing: -0.01em;
  margin: 0 0 2px;
}
.saikati-callout__sub {
  font-size: 12.5px;
  color: var(--white-60);
  margin: 0;
}
.saikati-callout__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--violet-bright);
  white-space: nowrap;
}
.saikati-callout__cta i { margin-left: 4px; }

/* Compact badge on Saikati specialist tile (when one exists) */
.specialist-tile__needs-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--violet-soft);
  border: 1px solid rgba(124, 58, 237, 0.26);
  color: var(--violet-bright);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 500;
}


/* ───── A++ §5.1 · Route sim callout + §5.2 Replay modal + §5.3 Settlement modal (K-W3.1e) ───── */

.route-sim-callout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  background: var(--violet-soft, rgba(124,58,237,0.10));
  border: 1px solid rgba(124, 58, 237, 0.26);
  border-radius: 12px;
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 13px;
}
.route-sim-callout__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(124,58,237,0.16);
  color: var(--violet-bright);
  font-size: 11px;
  flex-shrink: 0;
}
.route-sim-callout__body { flex: 1; line-height: 1.4; }
.route-sim-callout__cta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--violet-bright);
  text-transform: uppercase;
}
.route-sim-callout__dismiss {
  background: transparent;
  border: 0;
  color: var(--white-60);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 12px;
}
.route-sim-callout__dismiss:hover { color: var(--white-100); }

/* Sim marker on the Leaflet map */
.sim-rider-icon {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--violet-signal);
  border: 2px solid #fff;
  box-shadow: 0 0 0 4px rgba(124,58,237,0.32);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px;
}

/* Replay modal */
.replay-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  z-index: 199;
  display: none;
}
.replay-modal-scrim.is-open { display: block; }
.replay-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  padding: 22px;
  z-index: 200;
  display: none;
}
.replay-modal.is-open { display: block; }
.replay-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.replay-modal__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px; font-weight: 600;
  color: var(--white-100); letter-spacing: -0.014em;
}
.replay-modal__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-top: 4px;
}
.replay-modal__close {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  flex-shrink: 0;
}
.replay-modal__close:hover { background: var(--white-04); color: var(--white-100); }
.replay-modal__stage {
  min-height: 280px;
  background: var(--ink-1, #0A0A0F);
  border: 1px solid var(--white-06);
  border-radius: 12px;
  padding: 16px;
  display: flex; flex-direction: column;
  gap: 10px;
}
.replay-modal__stage-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
.replay-modal__stage-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-60);
}
.replay-modal__stage-title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 15px;
  font-weight: 600;
  color: var(--white-100);
}
.replay-modal__stage-addr { font-size: 12px; color: var(--white-60); }
.replay-modal__stage-time {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
}
.replay-modal__stage-photo {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: var(--white-04);
}
.replay-modal__stage-photo--placeholder {
  display: flex; align-items: center; justify-content: center;
  height: 140px;
  color: var(--white-60);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.replay-modal__stage-sig {
  width: 100%;
  max-height: 100px;
  border-radius: 8px;
  border: 1px solid var(--white-06);
  background: #f7f7f7;
}
.replay-modal__stage-auto {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(124,58,237,0.10);
  border: 1px solid rgba(124, 58, 237, 0.26);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--violet-bright);
}
.replay-modal__map {
  width: 100%;
  height: 280px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: var(--ink-3);
}
.replay-modal__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}
.replay-modal__counter {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
}
.replay-modal__nav {
  display: flex; gap: 8px;
}
.replay-modal__nav-btn {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  font-family: var(--font-text);
  font-size: 13px;
  cursor: pointer;
}
.replay-modal__nav-btn:hover { color: var(--white-100); border-color: var(--white-12); }
.replay-modal__nav-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.replay-modal__nav-btn--primary {
  background: var(--violet-signal);
  border-color: var(--violet-signal);
  color: #FFFFFF;
}
.replay-modal__nav-btn--primary:hover { opacity: 0.92; color: #FFFFFF; }

/* Replay launch button surfaced after route completion */
.replay-launch-strip {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}
.replay-launch-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--violet-signal);
  background: var(--violet-signal);
  color: #fff;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.replay-launch-btn:hover { opacity: 0.92; }

/* Settlement modal */
.settlement-modal-scrim {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(4px);
  z-index: 199;
  display: none;
}
.settlement-modal-scrim.is-open { display: block; }
.settlement-modal {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: var(--ink-2);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  padding: 22px;
  z-index: 200;
  display: none;
}
.settlement-modal.is-open { display: block; }
.settlement-modal__head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; margin-bottom: 14px;
}
.settlement-modal__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 18px; font-weight: 600;
  color: var(--white-100); letter-spacing: -0.014em;
}
.settlement-modal__sub {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-top: 4px;
}
.settlement-modal__close {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  flex-shrink: 0;
}
.settlement-modal__close:hover { background: var(--white-04); color: var(--white-100); }
.settlement-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-top: 6px;
}
.settlement-breakdown th {
  text-align: left;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white-60);
  border-bottom: 1px solid var(--white-06);
  font-weight: 500;
}
.settlement-breakdown td {
  padding: 10px 12px;
  font-size: 13px;
  color: var(--white-80);
  border-bottom: 1px solid var(--white-06);
}
.settlement-breakdown td:nth-child(n+3),
.settlement-breakdown th:nth-child(n+3) { text-align: right; }
.settlement-breakdown__date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-100);
}
.settlement-breakdown__net { color: var(--state-ok); font-weight: 600; }
.settlement-breakdown__total td {
  border-top: 1px solid var(--white-12);
  background: var(--white-04);
  font-family: var(--font-display, var(--font-sans));
  font-weight: 600;
  color: var(--white-100);
}
.settlement-modal__stops-toggle {
  margin-top: 14px;
  padding: 9px 14px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-80);
  font-family: var(--font-text);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.settlement-modal__stops-toggle:hover { color: var(--white-100); border-color: var(--white-12); }
.settlement-modal__stops {
  display: none;
  margin-top: 12px;
}
.settlement-modal__stops.is-open { display: block; }

@media (max-width: 720px) {
  .replay-modal,
  .settlement-modal {
    width: calc(100vw - 16px);
    padding: 18px;
    border-radius: 14px;
  }
  .replay-modal__foot { flex-direction: column-reverse; align-items: stretch; }
  .replay-modal__nav { width: 100%; justify-content: space-between; }
}


/* ───── K-W3.1f · Workforce empty-gate + topstrip extras + audit table + danger zone ───── */

.workforce-gate {
  padding: 56px 28px;
  text-align: center;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  max-width: 620px;
  margin: 0 auto;
}
.workforce-gate__icon {
  width: 64px; height: 64px;
  border-radius: 18px;
  background: var(--white-06);
  color: var(--violet-bright);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 18px;
}
.workforce-gate__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 20px;
  color: var(--white-100);
  margin: 0 0 8px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.workforce-gate__body {
  font-size: 14px;
  color: var(--white-60);
  line-height: 1.6;
  max-width: 460px;
  margin: 0 auto 22px;
}
.workforce-gate__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--violet-signal);
  color: #FFFFFF;
  text-decoration: none;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  transition: opacity .15s var(--ease);
}
.workforce-gate__cta:hover { opacity: 0.88; }

.workforce-custom {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 12px;
}
.workforce-custom label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 4px;
}
.workforce-custom input[type="date"] {
  padding: 7px 10px;
  background: var(--ink-0, #000);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 13px;
  color-scheme: dark;
}
.workforce-custom__apply {
  padding: 8px 14px;
  background: var(--violet-signal);
  color: #FFF;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}
.workforce-callout {
  margin-top: 18px;
  padding: 16px 18px;
  background: rgba(124, 58, 237, 0.06);
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.workforce-callout__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 15px;
  color: var(--white-100);
  margin: 0 0 4px;
  font-weight: 500;
}
.workforce-callout__sub {
  font-size: 13px;
  color: var(--white-60);
}
.workforce-callout__cta {
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--violet-signal);
  color: #FFF;
  text-decoration: none;
  font-size: 13px;
  white-space: nowrap;
}

/* ───── Settings → Data tabs + Activity log + Danger zone ───── */

.settings-tabs {
  display: inline-flex;
  border: 1px solid var(--white-06);
  border-radius: 999px;
  overflow: hidden;
  background: var(--ink-0, transparent);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.settings-tabs__btn {
  padding: 8px 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  background: transparent;
  color: var(--white-60);
  cursor: pointer;
  transition: all .15s var(--ease);
}
.settings-tabs__btn:hover { color: var(--white-100); }
.settings-tabs__btn.is-active {
  background: var(--violet-signal);
  color: #FFFFFF;
}
.settings-tabs__btn:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: -2px;
}

.settings-panel[hidden] { display: none !important; }

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.audit-table th,
.audit-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--white-06);
  vertical-align: top;
}
.audit-table th {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--white-60);
  font-weight: 500;
  background: var(--white-04);
  white-space: nowrap;
}
.audit-table tbody tr:hover { background: var(--white-04); }
.audit-table__ts {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
  white-space: nowrap;
}
.audit-table__action {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--violet-bright);
  letter-spacing: 0.02em;
}
.audit-table__actor {
  font-size: 12px;
  color: var(--white-80);
}
.audit-table__context {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
  word-break: break-all;
  max-width: 320px;
  cursor: pointer;
}
.audit-table__context.is-collapsed {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  display: inline-block;
}

.audit-table__filter {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.audit-table__filter label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
}
.audit-table__filter select {
  padding: 7px 10px;
  background: var(--ink-0, #000);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  color: var(--white-100);
  font-family: var(--font-text);
  font-size: 12px;
  color-scheme: dark;
}
.audit-table__filter .audit-table__count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--white-60);
  margin-left: auto;
}

.export-card,
.danger-zone {
  padding: 22px;
  border-radius: 14px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
}
.danger-zone {
  border-color: rgba(248, 113, 113, 0.30);
  background: rgba(248, 113, 113, 0.04);
}
.export-card__title,
.danger-zone__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 15px;
  color: var(--white-100);
  margin: 0 0 6px;
  font-weight: 600;
}
.danger-zone__title { color: #f9a8a8; }
.export-card__sub,
.danger-zone__sub {
  font-size: 13px;
  color: var(--white-60);
  line-height: 1.55;
  margin: 0 0 16px;
}

.confirm-delete-input {
  display: block;
  width: 100%;
  max-width: 280px;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--ink-0, #000);
  border: 1px solid rgba(248, 113, 113, 0.40);
  border-radius: 8px;
  color: var(--white-100);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
}
.confirm-delete-input:focus {
  outline: 2px solid rgba(248, 113, 113, 0.60);
  outline-offset: 0;
}

/* ───── Settings → Notifications — per-kind mute toggles ───── */

.notif-mute-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--white-06);
}
.notif-mute-row:last-child { border-bottom: 0; }
.notif-mute-row__body { min-width: 0; flex: 1; }
.notif-mute-row__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-100);
  margin: 0 0 3px;
}
.notif-mute-row__kind {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--violet-bright);
  margin-left: 8px;
}
.notif-mute-row__sub {
  font-size: 12px;
  color: var(--white-60);
  line-height: 1.5;
}

/* ─── Wave A++ — End ─── */


/* ════════════════════════════════════════════════════════════════════
   ═══════════════════ WAVE A4 PRIMITIVES — 2026-05-22 ═══════════════════
   K-W5.0a — foundation surfaces for Wave A4 (investor + reviews +
   discovery + Karama + Bima + Daraja Credit + i18n + camera + theme/
   component marketplaces + catering + dispute + analytics + billing).
   Arkam-quiet: compact spacing, no shadows, no gradients, no
   decoration competing with data. Uses existing tokens.
   ════════════════════════════════════════════════════════════════════ */

/* ───── Investor — Portfolio cohort grid ───── */
.investor-cohort-grid {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--white-06);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  overflow: hidden;
}
.investor-cohort-grid__row {
  display: grid;
  grid-template-columns: 1.4fr repeat(6, 1fr);
  gap: 1px;
  background: var(--white-06);
}
.investor-cohort-grid__row--head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
}
.investor-cohort-grid__cell {
  padding: 10px 12px;
  background: var(--ink-1);
  font-size: 13px;
  color: var(--white-100);
  display: flex;
  align-items: center;
  min-height: 36px;
}
.investor-cohort-grid__cell--label { color: var(--white-60); }

/* ───── Investor — Metric tile ───── */
.investor-metric-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  min-width: 0;
}
.investor-metric-tile__value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--white-100);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.investor-metric-tile__delta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
}
.investor-metric-tile__delta--up    { color: #4ade80; }
.investor-metric-tile__delta--down  { color: #f87171; }
.investor-metric-tile__sub {
  font-size: 11px;
  color: var(--white-60);
  letter-spacing: 0.02em;
}

/* ───── Language switcher ───── */
.lang-switcher {
  position: relative;
  display: inline-block;
}
.lang-switcher__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--white-06);
  border-radius: 6px;
  color: var(--white-100);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.lang-switcher__btn:hover { border-color: var(--white-04); }
.lang-switcher__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 140px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 6px;
  padding: 4px;
  display: none;
  z-index: 90;
}
.lang-switcher--open .lang-switcher__menu { display: block; }
.lang-switcher__option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  background: transparent;
  border: 0;
  color: var(--white-100);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: 4px;
}
.lang-switcher__option:hover { background: var(--white-04); }
.lang-switcher__option--active { color: var(--alat-violet); }

/* ───── Review card ───── */
.review-card {
  padding: 14px 16px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.review-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.review-card__author {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
}
.review-card__date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  letter-spacing: 0.06em;
}
.review-card__stars {
  display: inline-flex;
  gap: 2px;
  color: var(--alat-violet);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.review-card__stars--muted { color: var(--white-60); }
.review-card__body {
  font-size: 13px;
  line-height: 1.55;
  color: var(--white-100);
}
.review-card__merchant-reply {
  margin-top: 4px;
  padding: 10px 12px;
  border-left: 2px solid var(--alat-violet);
  background: var(--white-04);
  border-radius: 0 6px 6px 0;
  font-size: 12px;
  color: var(--white-100);
  line-height: 1.55;
}
.review-card__merchant-reply-head {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--white-60);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* ───── Review photo grid ───── */
.review-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 6px;
}
.review-photo-grid__cell {
  aspect-ratio: 1;
  background: var(--white-06);
  border: 1px solid var(--white-06);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-60);
  font-size: 10px;
  cursor: pointer;
}
.review-photo-grid__cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ───── Discovery card ───── */
.discovery-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 120ms ease;
}
.discovery-card:hover { border-color: var(--alat-violet); }
.discovery-card__photo {
  aspect-ratio: 16/9;
  background: var(--white-06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-60);
  font-size: 11px;
}
.discovery-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.discovery-card__head {
  padding: 10px 12px 4px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.discovery-card__name {
  font-size: 13px;
  font-weight: 500;
  color: var(--white-100);
  line-height: 1.3;
}
.discovery-card__meta {
  padding: 0 12px 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  letter-spacing: 0.04em;
}
.discovery-card__chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 6px;
  background: var(--white-04);
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-100);
  letter-spacing: 0.04em;
}
.discovery-card__chip--verified {
  background: rgba(167, 139, 250, 0.15);
  color: var(--alat-violet);
}

/* ───── Discovery filters ───── */
.discovery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 0;
}
.discovery-filters__chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  background: transparent;
  border: 1px solid var(--white-06);
  border-radius: 999px;
  color: var(--white-100);
  font-size: 12px;
  cursor: pointer;
}
.discovery-filters__chip:hover { border-color: var(--white-04); }
.discovery-filters__chip--active {
  background: var(--alat-violet);
  border-color: var(--alat-violet);
  color: #fff;
}

/* ───── Karama — tier chip ───── */
.karama-tier-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  background: transparent;
}
.karama-tier-chip--bronze { color: #c08457; }
.karama-tier-chip--silver { color: #c0c0c8; }
.karama-tier-chip--gold   { color: #e6c14f; }

/* ───── Karama — points tile ───── */
.karama-points-tile {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
}
.karama-points-tile__value {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--white-100);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.karama-points-tile__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
}

/* ───── Karama — reward row ───── */
.karama-reward-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
}
.karama-reward-row__body { min-width: 0; flex: 1; }
.karama-reward-row__title {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
  margin-bottom: 2px;
}
.karama-reward-row__sub {
  font-size: 11px;
  color: var(--white-60);
}
.karama-reward-row__cost {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--alat-violet);
}

/* ───── Bima — product card ───── */
.bima-product-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  overflow: hidden;
}
.bima-product-card__head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--white-06);
}
.bima-product-card__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-100);
  margin-bottom: 2px;
}
.bima-product-card__partner {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--white-60);
  text-transform: uppercase;
}
.bima-product-card__body {
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--white-60);
  flex: 1;
}
.bima-product-card__premium {
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--white-100);
  letter-spacing: 0.04em;
}
.bima-product-card__cta {
  padding: 10px 14px;
  background: var(--white-04);
  border: 0;
  border-top: 1px solid var(--white-06);
  color: var(--white-100);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.bima-product-card__cta:hover { background: var(--alat-violet); color: #fff; }

/* ───── Daraja Credit — calculator ───── */
.daraja-credit-calc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
}
.daraja-credit-calc__slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--white-06);
  border-radius: 2px;
  outline: none;
}
.daraja-credit-calc__slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--alat-violet);
  border-radius: 50%;
  cursor: pointer;
}
.daraja-credit-calc__slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--alat-violet);
  border-radius: 50%;
  cursor: pointer;
  border: 0;
}
.daraja-credit-calc__output {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.daraja-credit-calc__output-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.daraja-credit-calc__output-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
}
.daraja-credit-calc__output-value {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--white-100);
  letter-spacing: 0.02em;
}

/* ───── Mobile builder responsive helper ───── */
.mobile-builder-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 768px) {
  .mobile-builder-stack {
    flex-direction: row;
    align-items: flex-start;
  }
  .mobile-builder-stack > * { flex: 1; min-width: 0; }
}

/* ───── Native camera shell ───── */
.native-camera-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #000;
  border: 1px solid var(--white-06);
  border-radius: 8px;
  overflow: hidden;
}
.native-camera-shell__viewport {
  width: 100%;
  aspect-ratio: 3/4;
  background: #000;
  object-fit: cover;
  display: block;
}
.native-camera-shell__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px;
  background: var(--ink-1);
}
.native-camera-shell__snap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--white-100);
  border: 4px solid var(--ink-1);
  outline: 1px solid var(--white-06);
  cursor: pointer;
}
.native-camera-shell__snap:hover { background: var(--alat-violet); }

/* ───── Theme marketplace ───── */
.theme-marketplace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.theme-marketplace-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
}
.theme-marketplace-card:hover { border-color: var(--alat-violet); }
.theme-marketplace-card__preview {
  aspect-ratio: 4/3;
  background: var(--white-06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.theme-marketplace-card__body {
  padding: 10px 12px;
}
.theme-marketplace-card__title {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
  margin-bottom: 2px;
}
.theme-marketplace-card__price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--alat-violet);
  letter-spacing: 0.04em;
}

/* ───── Component marketplace ───── */
.component-marketplace-card {
  display: flex;
  flex-direction: column;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  padding: 12px 14px;
  gap: 8px;
}
.component-marketplace-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.component-marketplace-card__title {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
}
.component-marketplace-card__price {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--alat-violet);
  letter-spacing: 0.04em;
}
.component-marketplace-card__body {
  font-size: 12px;
  color: var(--white-60);
  line-height: 1.55;
}

/* ───── Catering form ───── */
.catering-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.catering-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 640px) {
  .catering-form__row { grid-template-columns: 1fr; }
}
.catering-form__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 4px;
}

/* ───── Dispute mediator row ───── */
.dispute-mediator-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
}
.dispute-mediator-row__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white-06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--alat-violet);
  flex-shrink: 0;
}
.dispute-mediator-row__body { min-width: 0; flex: 1; }
.dispute-mediator-row__title {
  font-size: 13px;
  color: var(--white-100);
  margin-bottom: 2px;
}
.dispute-mediator-row__sub {
  font-size: 11px;
  color: var(--white-60);
  line-height: 1.5;
}

/* ───── Analytics — heatmap + blocks ───── */
.analytics-heatmap {
  display: grid;
  grid-template-columns: 40px repeat(24, 1fr);
  gap: 1px;
  background: var(--white-06);
  padding: 1px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.analytics-heatmap__label {
  background: var(--ink-1);
  color: var(--white-60);
  padding: 4px 6px;
  letter-spacing: 0.06em;
}
.analytics-heatmap__cell {
  background: var(--ink-1);
  min-height: 18px;
}
.analytics-heatmap__cell--l1 { background: rgba(167, 139, 250, 0.15); }
.analytics-heatmap__cell--l2 { background: rgba(167, 139, 250, 0.35); }
.analytics-heatmap__cell--l3 { background: rgba(167, 139, 250, 0.60); }
.analytics-heatmap__cell--l4 { background: var(--alat-violet); }

.analytics-block {
  padding: 14px 16px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.analytics-block__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.analytics-block__title {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
}
.analytics-block__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  letter-spacing: 0.06em;
}

/* ───── Billing — subscription + bundle ───── */
.billing-subscription-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
}
.billing-subscription-row__title {
  font-size: 13px;
  color: var(--white-100);
  font-weight: 500;
  margin-bottom: 2px;
}
.billing-subscription-row__sub {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--white-60);
  letter-spacing: 0.04em;
}
.billing-subscription-row__price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--white-100);
  letter-spacing: 0.04em;
}
.billing-subscription-row__status {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid currentColor;
}
.billing-subscription-row__status--active  { color: #4ade80; }
.billing-subscription-row__status--paused  { color: #facc15; }
.billing-subscription-row__status--cancel  { color: #f87171; }
.billing-subscription-row__status--grace   { color: var(--alat-violet); }

.billing-bundle-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  background: var(--ink-1);
  border: 1px solid var(--white-06);
  border-radius: 8px;
}
.billing-bundle-card__title {
  font-size: 14px;
  font-weight: 500;
  color: var(--white-100);
}
.billing-bundle-card__price {
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--alat-violet);
  letter-spacing: 0.04em;
}
.billing-bundle-card__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.billing-bundle-card__items li {
  font-size: 12px;
  color: var(--white-60);
  padding-left: 14px;
  position: relative;
}
.billing-bundle-card__items li::before {
  content: "·";
  position: absolute;
  left: 4px;
  color: var(--alat-violet);
}

/* ─── Wave A4 — End ─── */

/* ═══════════════════════════════════════════════════════════════════
   REFERRAL ENGINE — per docs/REFERRAL_ENGINE_PLAN.md
   ═══════════════════════════════════════════════════════════════════ */

.referral-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .referral-shell { grid-template-columns: 1fr; }
}

.referral-qr-card {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}
.referral-qr-card__canvas {
  background: #ffffff;
  border-radius: 10px;
  padding: 12px;
  width: 280px; height: 280px;
  display: flex; align-items: center; justify-content: center;
}
.referral-qr-card__canvas img,
.referral-qr-card__canvas svg,
.referral-qr-card__canvas canvas { width: 100%; height: 100%; }
.referral-qr-card__url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
  text-align: center;
  word-break: break-all;
  max-width: 100%;
  padding: 6px 10px;
  background: var(--white-04);
  border-radius: 8px;
}
.referral-qr-card__actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
}
.referral-qr-card__actions button,
.referral-qr-card__actions a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  font: 500 12px var(--font-text);
  cursor: pointer; text-decoration: none;
  transition: color 120ms, background 120ms;
}
.referral-qr-card__actions button:hover,
.referral-qr-card__actions a:hover { color: var(--white-100); background: var(--white-04); }

.referral-side {
  display: flex; flex-direction: column; gap: 18px;
}

.referral-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 768px) { .referral-kpi-grid { grid-template-columns: repeat(2, 1fr); } }

.referral-kpi-tile {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.referral-kpi-tile__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-60);
  margin-bottom: 8px;
}
.referral-kpi-tile__value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--white-100);
  letter-spacing: -0.02em;
}
.referral-kpi-tile__sub {
  font-size: 11px;
  color: var(--white-60);
  margin-top: 4px;
}

.referral-section { margin-top: 8px; }
.referral-section__head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.referral-section__title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--white-100);
}
.referral-section__action {
  font-size: 12px;
  color: var(--white-60);
  background: transparent;
  border: 1px solid var(--white-06);
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.referral-section__action:hover { color: var(--white-100); background: var(--white-04); }

.referral-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--white-06);
  align-items: center;
}
.referral-row:first-of-type { border-top: 0; }
.referral-row__name { font-size: 13px; color: var(--white-100); }
.referral-row__meta { font-family: var(--font-mono); font-size: 11px; color: var(--white-60); }
.referral-row__amount { font-family: var(--font-mono); font-size: 12px; color: var(--white-80, var(--white-60)); }
.referral-row__amount--first { color: var(--state-ok, #5EEAB5); }

.referral-campaign-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 12px;
  padding: 10px 12px;
  border-top: 1px solid var(--white-06);
  align-items: center;
}
.referral-campaign-row:first-of-type { border-top: 0; }
.referral-campaign-row__name { font-size: 13px; color: var(--white-100); font-weight: 500; }
.referral-campaign-row__stat {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--white-60);
}
.referral-campaign-row__stat b { color: var(--white-100); font-weight: 600; }
.referral-campaign-row__copy {
  background: transparent;
  border: 1px solid var(--white-06);
  color: var(--white-60);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  cursor: pointer;
}
.referral-campaign-row__copy:hover { color: var(--white-100); background: var(--white-04); }

.referral-attribution-banner {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: rgba(108, 92, 231, 0.10);
  border: 1px solid rgba(108, 92, 231, 0.26);
  border-radius: 12px;
  color: var(--white-100);
  font-size: 13px;
  margin-bottom: 16px;
}
.referral-attribution-banner__icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(108, 92, 231, 0.18);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--alat-violet);
}
.referral-attribution-banner__close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: var(--white-60);
  cursor: pointer;
  padding: 4px 8px;
  font-size: 14px;
}
.referral-attribution-banner__close:hover { color: var(--white-100); }

/* ─── Referral engine — End ─── */


/* ═══════════════════════════════════════════════════════════════════
   K-W5.1 · Pagination helper — 5-row visible cap + infinite scroll
   ───────────────────────────────────────────────────────────────────
   Used by ALAT.ui.paginate to cap every list/table at 5 visible rows.
   The sentinel is a 1px invisible div that the IntersectionObserver
   watches; the button is the accessible/keyboard fallback. The stats
   line reassures the user about how much more is left.
   ═══════════════════════════════════════════════════════════════════ */

.app-paginate-more-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-top: 10px;
  padding-top: 4px;
}
.app-paginate-sentinel {
  width: 100%;
  height: 1px;
  background: transparent;
  pointer-events: none;
}
.app-paginate-more {
  min-height: 44px;            /* touch-friendly per Kevin */
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: var(--radius-pill-soft, 10px);
  color: var(--white-80);
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.app-paginate-more:hover {
  background: var(--white-06);
  color: var(--white-100);
  border-color: rgba(255, 255, 255, 0.18);
}
.app-paginate-more:focus-visible {
  outline: 2px solid var(--violet-signal);
  outline-offset: 2px;
}
.app-paginate-stats {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--white-40);
  text-align: center;
}
@media (max-width: 480px) {
  .app-paginate-more { font-size: 14px; padding: 12px 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   K-W6 — Customer iteration
   Merchant-link banner on customer dashboard. Linked state surfaces
   the primary merchant + multi-merchant pill switcher. Unlinked state
   surfaces a "find a merchant to follow" card.
   ═══════════════════════════════════════════════════════════════════ */
.customer-merchant-banner {
  background:
    radial-gradient(140% 200% at 0% 0%, rgba(124, 92, 255, 0.08) 0%, transparent 55%),
    var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 16px;
  position: relative;
}
.customer-merchant-banner__primary {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 16px;
  align-items: center;
}
.customer-merchant-banner__avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--white-100);
  background: var(--violet-signal);
  border: 1px solid rgba(255,255,255,0.08);
  letter-spacing: -0.01em;
}
.customer-merchant-banner__brand { min-width: 0; }
.customer-merchant-banner__eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--white-40);
  text-transform: uppercase;
  margin-bottom: 4px;
}
.customer-merchant-banner__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--white-100);
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.customer-merchant-banner__sub {
  font-size: 13px;
  color: var(--white-60);
  margin-top: 4px;
  line-height: 1.4;
}
.customer-merchant-banner__actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  align-items: center;
}
.customer-merchant-banner__cta {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-text);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--white-06);
  background: var(--white-04);
  color: var(--white-80);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.customer-merchant-banner__cta:hover {
  background: var(--white-06);
  color: var(--white-100);
  border-color: rgba(255,255,255,0.18);
}
.customer-merchant-banner__cta--primary {
  background: var(--violet-signal);
  border-color: transparent;
  color: var(--white-100);
}
.customer-merchant-banner__cta--primary:hover {
  background: var(--violet-bright, var(--violet-signal));
  color: var(--white-100);
}
.customer-merchant-banner__cta i { font-size: 11px; }

.customer-merchant-pills {
  display: flex; gap: 6px; flex-wrap: wrap;
  border-top: 1px solid var(--white-06);
  padding-top: 14px;
  align-items: center;
}
.customer-merchant-pills__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--white-40);
  margin-right: 6px;
}
.customer-merchant-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--white-06);
  background: transparent;
  color: var(--white-60);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
}
.customer-merchant-pill:hover {
  background: var(--white-04);
  color: var(--white-80);
  border-color: rgba(255,255,255,0.12);
}
.customer-merchant-pill.is-active {
  background: var(--violet-signal);
  border-color: transparent;
  color: var(--white-100);
}
.customer-merchant-pill.is-active:hover { background: var(--violet-signal); }
.customer-merchant-pill--add {
  color: var(--violet-signal);
  border-style: dashed;
  border-color: var(--white-06);
}
.customer-merchant-pill--add:hover {
  color: var(--violet-bright, var(--violet-signal));
  background: rgba(124, 92, 255, 0.06);
}

.customer-unlinked-card {
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.customer-unlinked-card__title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--white-100);
  letter-spacing: -0.01em;
}
.customer-unlinked-card__body {
  font-size: 13px;
  color: var(--white-60);
  line-height: 1.5;
  max-width: 56ch;
}
.customer-unlinked-card__actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 4px;
}

/* Tiny modal used by "Have a QR? Paste it" and "+ scan another". */
.customer-merchant-modal {
  position: fixed; inset: 0;
  background: rgba(10, 10, 10, 0.66);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.customer-merchant-modal__panel {
  background: var(--bg-elevated, #141414);
  border: 1px solid var(--white-06);
  border-radius: 16px;
  padding: 22px;
  max-width: 460px;
  width: 100%;
  display: flex; flex-direction: column; gap: 14px;
}
.customer-merchant-modal__title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--white-100);
}
.customer-merchant-modal__sub {
  font-size: 12.5px;
  color: var(--white-60);
  line-height: 1.45;
}
.customer-merchant-modal__input {
  width: 100%;
  background: var(--white-04);
  border: 1px solid var(--white-06);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--white-100);
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.customer-merchant-modal__input:focus {
  outline: 2px solid var(--violet-signal);
  outline-offset: 1px;
  border-color: transparent;
}
.customer-merchant-modal__row {
  display: flex; gap: 8px; justify-content: flex-end;
}

@media (max-width: 560px) {
  .customer-merchant-banner__primary { grid-template-columns: 44px 1fr; }
  .customer-merchant-banner__actions { grid-column: 1 / -1; }
}


/* ══════════════════════════════════════════════════════════════════
   WAVE A-W3 — Mobile-first responsive — MOBILE-01 / SPEC §A.2-§A.8
   2026-06-09
   ══════════════════════════════════════════════════════════════════ */

/* ── §A.2 Bottom navigation (mobile only) ── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height, 60px);
  background: var(--ink-2, #06060A);
  border-top: 1px solid var(--white-06);
  z-index: 100;
}
.bottom-nav__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: var(--touch-min, 44px);
  min-height: var(--touch-min, 44px);
  justify-content: center;
  color: var(--white-60);
  font-size: 10px;
  text-decoration: none;
  transition: color .15s;
  flex: 1;
}
.bottom-nav__item.is-active { color: var(--violet-signal); }
.bottom-nav__item i { font-size: 20px; }
.bottom-nav__badge {
  position: absolute;
  top: 6px; right: calc(50% - 18px);
  background: var(--state-crit, #F97066);
  color: white;
  font-size: 9px;
  border-radius: 99px;
  padding: 1px 4px;
  min-width: 16px;
  text-align: center;
  pointer-events: none;
}

@media (max-width: 767px) {
  /* Sidebar: off-canvas (already handled by the 720px rule above).
     bottom-nav shows as the primary nav, but hamburger still opens
     the sidebar as a slide-over drawer via sidebar-mobile-open on body. */
  .bottom-nav { display: flex; justify-content: space-around; align-items: center; }
  .app-main { padding-bottom: calc(var(--bottom-nav-height, 60px) + 16px); }
}

/* ── §A.5 KPI strip — 2-col on mobile ── */
@media (max-width: 767px) {
  .kpi-strip {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }
}

/* ── §A.6 Order status timeline — vertical on mobile ── */
.order-timeline {
  display: flex;
  justify-content: space-between;
  position: relative;
}
@media (max-width: 767px) {
  .order-timeline {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }
  .order-timeline__step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    position: relative;
  }
  .order-timeline__step::before {
    content: '';
    position: absolute;
    left: 9px; top: 28px;
    width: 2px; height: 100%;
    background: var(--white-12);
  }
  .order-timeline__step:last-child::before { display: none; }
}

/* ── §A.7 M-Pesa STK modal — full-screen on mobile ── */
@media (max-width: 767px) {
  .mpesa-stk-modal {
    position: fixed;
    inset: 0;
    border-radius: 0;
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    top: 0 !important;
    transform: none !important;
    display: flex;
    flex-direction: column;
  }
  .mpesa-stk-modal__head {
    background: #4CAF50;
    color: white;
    padding: 32px 20px 20px;
    border-radius: 0;
  }
  .mpesa-stk-modal__head * { color: white !important; }
  .mpesa-stk-modal__logo { filter: brightness(0) invert(1); }
  .mpesa-stk-modal__pin {
    min-height: 64px;
    font-size: 24px;
    letter-spacing: 0.25em;
  }
  .mpesa-stk-modal__btn { min-height: 48px; font-size: 15px; }
}

/* ── §A.8 Topbar — mobile bell + role badge ── */
@media (max-width: 767px) {
  .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--ink-1, #0A0A0F);
    border-bottom: 1px solid var(--white-06);
  }
  .topbar__notif { margin-left: auto; }
  .topbar__role-badge { font-size: 11px; }
}

/* ── §A.2 Touch targets on primary CTAs ── */
@media (max-width: 767px) {
  .cart-submit,
  .pool-claim-btn,
  [data-cart-action="submit"],
  .rt-action-btn,
  .btn-claim,
  .btn-decline {
    min-height: 48px !important;
  }
}


/* ══════════════════════════════════════════════════════════════════
   K-W13.3 (2026-06-12) — Skeleton loaders + inline error states (P7.3)
   Used via ALAT.ui.skeleton / ALAT.ui.errorState / ALAT.ui.hydrate.
   ══════════════════════════════════════════════════════════════════ */
.skel-wrap { display: flex; flex-direction: column; gap: 10px; }
.skel-row {
  border-radius: 10px;
  background: linear-gradient(90deg,
    rgba(255,255,255,0.04) 25%,
    rgba(255,255,255,0.09) 37%,
    rgba(255,255,255,0.04) 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease infinite;
}
@keyframes skel-shimmer {
  0%   { background-position: 100% 0; }
  100% { background-position: 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .skel-row { animation: none; }
}
.inline-error-state {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(249,112,102,0.35);
  border-radius: 12px;
  background: rgba(249,112,102,0.07);
}
.inline-error-state > i {
  color: var(--state-crit, #F97066);
  font-size: 16px;
  margin-top: 2px;
}
.inline-error-state__body { flex: 1; min-width: 0; }
.inline-error-state__body strong {
  display: block;
  color: var(--white-100, #fff);
  font-size: 13px;
  margin-bottom: 2px;
}
.inline-error-state__body p {
  margin: 0;
  color: var(--white-60, rgba(255,255,255,0.6));
  font-size: 12px;
  line-height: 1.45;
}
.inline-error-state__retry {
  flex: none;
  min-height: 36px;
  padding: 6px 14px;
  border: 1px solid var(--white-12, rgba(255,255,255,0.12));
  border-radius: 8px;
  background: transparent;
  color: var(--white-100, #fff);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.inline-error-state__retry:hover { border-color: var(--violet-signal, #7C5CFF); }

/* ═══════════════════════════════════════════════════════════════════
   K-W14.1 (2026-06-12) — ALAT.ui.confirm modal (.app-confirm*)
   Obsidian-styled confirm gate used app-wide before consequential
   actions (MERCHANT_UIUX_PLAN_2026-06-12 §M1). Reduced-motion safe.
   ═══════════════════════════════════════════════════════════════════ */
.app-confirm-scrim {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  z-index: 2400;
  opacity: 0;
  transition: opacity .2s var(--ease, ease);
}
.app-confirm-scrim.is-open { opacity: 1; }
.app-confirm {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) translateY(10px);
  width: min(420px, calc(100vw - 32px));
  background: var(--ink-1, #0E0E12);
  border: 1px solid var(--white-12, rgba(255,255,255,0.12));
  border-radius: 16px;
  padding: 22px 24px 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  z-index: 2401;
  opacity: 0;
  transition: opacity .2s var(--ease, ease), transform .2s var(--ease, ease);
}
.app-confirm.is-open { opacity: 1; transform: translate(-50%, -50%); }
.app-confirm--danger { border-color: rgba(249, 112, 102, 0.35); }
.app-confirm__title {
  font-family: var(--font-display, var(--font-sans));
  font-size: 16px; font-weight: 700;
  color: var(--white-100, #fff);
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.app-confirm__body {
  font-size: 13px; line-height: 1.55;
  color: var(--white-60, rgba(255,255,255,0.6));
  margin: 0 0 14px;
}
.app-confirm__summary {
  background: var(--white-04, rgba(255,255,255,0.04));
  border: 1px solid var(--white-06, rgba(255,255,255,0.06));
  border-radius: 10px;
  padding: 10px 14px;
  margin: 0 0 16px;
}
.app-confirm__summary-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 4px 0;
  font-size: 12px;
}
.app-confirm__summary-row + .app-confirm__summary-row {
  border-top: 1px solid var(--white-06, rgba(255,255,255,0.06));
}
.app-confirm__summary-k {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--white-40, rgba(255,255,255,0.4));
  align-self: center;
}
.app-confirm__summary-v {
  color: var(--white-100, #fff);
  font-weight: 600;
  text-align: right;
  word-break: break-word;
}
.app-confirm__actions {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 4px;
}
.app-confirm__btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--white-12, rgba(255,255,255,0.12));
  background: transparent;
  color: var(--white-80, rgba(255,255,255,0.8));
  font-size: 13px; font-weight: 600;
  font-family: var(--font-text, var(--font-sans));
  cursor: pointer;
  transition: border-color .15s var(--ease, ease), background .15s var(--ease, ease);
}
.app-confirm__btn:hover { border-color: var(--white-20, rgba(255,255,255,0.2)); color: var(--white-100, #fff); }
.app-confirm__btn:disabled { opacity: 0.5; cursor: default; }
.app-confirm__btn--primary {
  background: var(--violet-signal, #7C5CFF);
  border-color: var(--violet-signal, #7C5CFF);
  color: #fff;
}
.app-confirm__btn--primary:hover { background: var(--violet-bright, #9B82FF); border-color: var(--violet-bright, #9B82FF); }
.app-confirm__btn--danger {
  background: rgba(249, 112, 102, 0.14);
  border-color: rgba(249, 112, 102, 0.45);
  color: #F97066;
}
.app-confirm__btn--danger:hover { background: rgba(249, 112, 102, 0.24); border-color: #F97066; color: #FFB4AD; }
@media (prefers-reduced-motion: reduce) {
  .app-confirm-scrim, .app-confirm { transition: none; transform: translate(-50%, -50%); }
}

/* ═══════════════════════════════════════════════════════════════════
   K-W14.3 (2026-06-12) — .kpi-money — the ONE money-card pattern
   (MERCHANT_UIUX_PLAN_2026-06-12 §M3): mono label + KES chip + big
   clean value (no "KES " prefix inside the number) + delta line.
   Apply the class to ANY card whose value is money — .kpi-tile,
   .rev-kpi, etc. Counts never get the chip. .kpi-money__chip is the
   portable chip for cards that don't use .kpi-tile__currency.
   ═══════════════════════════════════════════════════════════════════ */
.kpi-money__chip {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--violet-signal, #b8a8ff);
  background: rgba(124, 92, 255, 0.14);
  border: 1px solid rgba(124, 92, 255, 0.32);
  padding: 3px 8px 2px;
  border-radius: 999px;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1;
  vertical-align: middle;
}
.kpi-money .rev-kpi__label,
.kpi-money .kpi-tile__label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
/* Money values read as clean tabular figures */
.kpi-money .kpi-tile__value,
.kpi-money .rev-kpi__value,
.kpi-money [class*="__value"] {
  font-variant-numeric: tabular-nums;
}

/* ───── K-W14.4 · Specialist Info modal (.spec-info on .app-confirm) ───── */
.spec-info { width: min(460px, calc(100vw - 32px)); }
.spec-info__head {
  display: flex; align-items: flex-start; gap: 14px;
  margin-bottom: 14px;
}
.spec-info__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; flex: 0 0 42px;
  border-radius: 12px;
  background: rgba(124, 92, 255, 0.12);
  border: 1px solid rgba(124, 92, 255, 0.32);
  color: var(--violet-signal, #b8a8ff);
  font-size: 17px;
}
.spec-info__line {
  font-size: 12px; color: var(--white-60, rgba(255,255,255,0.6));
  margin: 4px 0 0; line-height: 1.45;
}
.spec-info__close {
  margin-left: auto;
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 9px;
  border: 1px solid var(--white-06, rgba(255,255,255,0.06));
  background: transparent;
  color: var(--white-60, rgba(255,255,255,0.6));
  cursor: pointer;
}
.spec-info__close:hover { color: var(--white-100, #fff); border-color: var(--white-20, rgba(255,255,255,0.2)); }
.spec-info__section-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--white-40, rgba(255,255,255,0.4));
  margin: 12px 0 6px;
}
.spec-info__does {
  margin: 0; padding: 0 0 0 2px; list-style: none;
}
.spec-info__does li {
  font-size: 13px; color: var(--white-80, rgba(255,255,255,0.8));
  line-height: 1.5; padding-left: 18px; position: relative; margin-bottom: 4px;
}
.spec-info__does li::before {
  content: '·';
  position: absolute; left: 4px;
  color: var(--violet-signal, #7C5CFF);
  font-weight: 700;
}
.spec-info__stat {
  font-family: var(--font-mono);
  font-size: 12px; color: var(--white-100, #fff);
  background: var(--white-04, rgba(255,255,255,0.04));
  border: 1px solid var(--white-06, rgba(255,255,255,0.06));
  border-radius: 8px; padding: 8px 12px; margin: 0;
}
.spec-info__pricing {
  font-size: 11px; color: var(--white-40, rgba(255,255,255,0.4));
  margin: 14px 0 4px;
}
.spec-info__pricing i { color: var(--violet-signal, #b8a8ff); margin-right: 4px; }
.spec-info .app-confirm__btn { text-decoration: none; display: inline-flex; align-items: center; }

/* ── Global type baseline (appended) — the source app-shared.css only sets
   var(--font-display) on specific classed elements, and obsidian-shared.css
   only covers h1–h4. Force the Obsidian fonts on the body + ALL headings so
   unclassed page h1/h2/h5/h6 never fall back to the browser serif (Times). ── */
body { font-family: var(--font-text, 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif); color: var(--white-100); }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display, 'Inter', sans-serif); }
