/* ============================================================
   Arbah v2 — Dashboard surface
   All rules scoped under .arbah-v2. Off-state (no flag) is
   byte-identical — this file is a no-op unless <html> carries
   .arbah-v2 (see src/design/theme-flag.js).

   Scope decision: Dashboard's live DOM (src/pages/Dashboard.js)
   is a bespoke layout — `.dashboard` page wrapper with
   `.dashboard-title`, `.dashboard-subtitle`, `.dashboard-section-title`,
   `.dashboard-card`, `.dashboard-card-title`, `.dashboard-link`,
   `.dashboard-portfolio-btn`, `.project-snippet`, plus KPI primitives
   (`<UiKpiCard>` → `.kpi …`) inside `[data-testid="kpi-section"]`.
   It does NOT use `.card` / `.card-dense` / `.btn-group` directly.
   So this file is a v2-token PORT of the same bespoke classes —
   style what exists; never invent DOM.

   Out of scope (handled by the primitives lane, repainted at the
   shared `.kpi`, `.chip`, `.btn`, `.page-header` layer):
     - KPI tile chrome (`.kpi`, `.kpi-icon-*`, `.kpi-value`, `.kpi-sub`)
     - Modal chrome (`.modal-panel`, `.modal-header`, `.modal-body`)
     - PageHeader primitive (not used by Dashboard — bespoke title)

   Enrichment notes (logged, NOT auto-fixed by CSS):
     - Spec asks for `.btn-group` quick actions; Dashboard has no
       quick-actions row, only a single Portfolio PDF button.
     - Spec asks for tone variants by urgency on KPI tiles; the
       KPI tones are JS-bound (`tone="brand"` / `"warning"` / etc.
       set by Dashboard.js) and already mapped to `.kpi-icon-*` in
       the primitives layer.
     - `.dashboard-portfolio-btn` has `style="background:#0B2545"`
       inline. That's the v1 navy ramp (#0B2545) vs v2 brand navy
       (#102A43). Visually indistinguishable at button scale;
       leaving the inline literal stand — no !important war.
     - BudgetChart canvas reads its color from
       `--arbah-navy-500 / --arbah-bronze-500` in JS at init time.
       Those tokens aren't in the v2 namespace — chart colors are
       not CSS-reachable from this file; flagged for a future JS
       coordination pass.

   Token mapping (v1 → v2): standard v2 surface conventions.
     legacy white card    → --arbah-v2-surface
     legacy border-gray   → --arbah-v2-border
     legacy text-gray-900 → --arbah-v2-ink
     legacy text-gray-800 → --arbah-v2-ink
     legacy text-gray-500 → --arbah-v2-ink-muted
     legacy text-blue-600 → --arbah-v2-brand
     legacy rounded-xl    → --arbah-v2-radius-lg
     legacy shadow-xs     → --arbah-v2-shadow-sm

   Specificity: Tailwind utilities on the DOM are (0,1,0);
   `.arbah-v2 .x` is (0,2,0) and wins natively. !important policy: 0.
   ============================================================ */

/* -- Page shell --------------------------------------------- */
/* Background comes from .app-shell (surface-sunken) under v2;
   the page itself only sets text + font so it inherits the tray. */
.arbah-v2 .dashboard {
  color: var(--arbah-v2-ink);
  font-family: var(--arbah-v2-font-sans);
}

/* -- Page title + subtitle ---------------------------------- */
/* `.dashboard-title` renders in Plex Serif per the v2 type system
   (display face for page-scale headings). AR has no Plex Serif
   coverage — let the sans stack carry it under RTL via the block
   at the bottom of this file. */
.arbah-v2 .dashboard-title {
  font-family: var(--arbah-v2-font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.2;
  color: var(--arbah-v2-ink);
  letter-spacing: -0.005em;
}
.arbah-v2 .dashboard-subtitle {
  font-family: var(--arbah-v2-font-sans);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--arbah-v2-ink-muted);
}

/* -- Portfolio PDF button -----------------------------------
   Inline `style="background:#0B2545"` stays (see header note).
   Repaint everything else CSS-reachable: type, radius, hover. */
.arbah-v2 .dashboard-portfolio-btn {
  font-family: var(--arbah-v2-font-sans);
  font-weight: 600;
  border-radius: var(--arbah-v2-radius-md);
  box-shadow: var(--arbah-v2-shadow-sm);
  transition: box-shadow 120ms ease, filter 120ms ease;
}
.arbah-v2 .dashboard-portfolio-btn:hover {
  box-shadow: var(--arbah-v2-shadow-md);
  filter: brightness(1.06);
}

/* -- Section eyebrow (e.g., "Key Indicators") ---------------
   Plex Mono micro-eyebrow per the v2 type spec — uppercase, wide
   tracking, brand-toned. Sits above grouped tile rows. */
.arbah-v2 .dashboard-section-title {
  font-family: var(--arbah-v2-font-mono);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.4;
  color: var(--arbah-v2-brand);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* -- Section cards (raised tiles for charts/lists) ----------
   The DOM already carries Tailwind `bg-white rounded-xl shadow-xs
   border border-gray-100 p-5` — we override the chrome with v2
   surface tokens but keep the geometry. */
.arbah-v2 .dashboard-card {
  background: var(--arbah-v2-surface);
  border: 1px solid var(--arbah-v2-border);
  border-radius: var(--arbah-v2-radius-lg);
  box-shadow: var(--arbah-v2-shadow-sm);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.arbah-v2 .dashboard-card:hover {
  border-color: var(--arbah-v2-border-strong);
  box-shadow: var(--arbah-v2-shadow-md);
}

/* -- Card titles --------------------------------------------
   Plex Serif at section scale — slightly smaller than `.dashboard-title`. */
.arbah-v2 .dashboard-card-title {
  font-family: var(--arbah-v2-font-display);
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  color: var(--arbah-v2-ink);
  letter-spacing: -0.003em;
}

/* -- "View all" link affordance ----------------------------- */
.arbah-v2 .dashboard-link {
  font-family: var(--arbah-v2-font-sans);
  font-weight: 500;
  font-size: 13px;
  color: var(--arbah-v2-brand);
  background: transparent;
  border-radius: var(--arbah-v2-radius-sm);
  padding: 4px 6px;
  margin-inline: -6px;
  transition: background-color 120ms ease, color 120ms ease;
}
.arbah-v2 .dashboard-link:hover {
  background: var(--arbah-v2-navy-100);
  color: var(--arbah-v2-navy-900);
}

/* -- Project snippets (compact rows in Projects-summary card)
   The DOM is `<div class="project-snippet flex items-center gap-3
   cursor-pointer p-2">`; we layer hover surface so the row reads
   as interactive. The status dot / progress fill keep their
   Tailwind classes (out of CSS reach without DOM changes). */
.arbah-v2 .project-snippet {
  border-radius: var(--arbah-v2-radius-md);
  transition: background-color 120ms ease;
}
.arbah-v2 .project-snippet:hover {
  background: var(--arbah-v2-surface-sunken);
}

/* -- KPI section grid spacing -------------------------------
   The wrapper has a [data-testid] hook; gap normalisation only.
   Individual tiles are styled by the primitives layer (.kpi …). */
.arbah-v2 [data-testid="kpi-section"] > .grid {
  gap: 16px;
}

/* -- Mobile: tighten title + bump KPI grid to 2-col ---------
   At ≤640px the Tailwind grid already collapses to grid-cols-2
   (see Dashboard.js line 459); we only soften the page title and
   trim card padding so the on-site phone read is comfortable. */
@media (max-width: 640px) {
  .arbah-v2 .dashboard-title {
    font-size: 20px;
  }
  .arbah-v2 .dashboard-card {
    border-radius: var(--arbah-v2-radius-md);
  }
  .arbah-v2 .dashboard-section-title {
    font-size: 11px;
  }
}

/* -- RTL ----------------------------------------------------
   Plex Serif has no Arabic coverage — swap to the sans stack for
   page + card titles under RTL so the AR locale stays legible.
   Logical properties cover everything else (margin-inline, etc.).
   Three-selector pattern handles all .arbah-v2 / [dir="rtl"] nest
   orders. */
.arbah-v2[dir="rtl"] .dashboard-title,
[dir="rtl"] .arbah-v2 .dashboard-title,
.arbah-v2 [dir="rtl"] .dashboard-title,
.arbah-v2[dir="rtl"] .dashboard-card-title,
[dir="rtl"] .arbah-v2 .dashboard-card-title,
.arbah-v2 [dir="rtl"] .dashboard-card-title {
  font-family: var(--arbah-v2-font-sans);
  letter-spacing: 0;
}


/* ============================================================
   Arbah v2 — Dashboard PORTFOLIO REBUILD (flag-gated)
   Applies under .arbah-v2 .dashboard-v2-page (the DashboardV2 DOM in
   src/pages/Dashboard.js). The rules above this block restyle the legacy
   .dashboard DOM and are inert when the v2 rebuild renders. Built on
   --arbah-v2-* tokens + primitives (.kpi, .pbar). Real markup → mockup:
   rich subtitle, scope filter, 5 KPIs w/ sub-chips, full-width budget
   exposure card, project card grid. RTL via logical properties.
   ============================================================ */
.arbah-v2 .dashboard-v2-page {
  font-family: var(--arbah-v2-font-sans); color: var(--arbah-v2-ink);
  max-width: 1200px; margin-inline: auto; padding: 24px;
  display: flex; flex-direction: column; gap: 18px;
}

/* -- Header: title + rich subtitle + scope filter ----------- */
.arbah-v2 .dashboard-v2-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.arbah-v2 .dashboard-v2-header-main { min-width: 0; }
.arbah-v2 .dashboard-v2-header-actions { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.arbah-v2 .dashboard-v2-title { font-family: var(--arbah-v2-font-display); font-weight: 600; font-size: 26px; line-height: 1.15; letter-spacing: -0.01em; color: var(--arbah-v2-ink); }
.arbah-v2[dir="rtl"] .dashboard-v2-title { font-family: "IBM Plex Sans Arabic", var(--arbah-v2-font-display); }
.arbah-v2 .dashboard-v2-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--arbah-v2-ink-muted); margin-top: 4px; }
.arbah-v2 .dashboard-v2-sub-dot { color: var(--arbah-v2-ink-subtle); }
.arbah-v2 .dashboard-v2-updated { display: inline-flex; align-items: center; gap: 6px; }
.arbah-v2 .dashboard-v2-live-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--arbah-v2-success); display: inline-block; box-shadow: 0 0 0 3px var(--arbah-v2-success-soft); }
.arbah-v2 .dashboard-v2-live-dot.is-danger  { background: var(--arbah-v2-danger);  box-shadow: 0 0 0 3px var(--arbah-v2-danger-soft); }
.arbah-v2 .dashboard-v2-live-dot.is-success { background: var(--arbah-v2-success); box-shadow: 0 0 0 3px var(--arbah-v2-success-soft); }
.arbah-v2 .dashboard-v2-scope { display: inline-flex; padding: 2px; background: var(--arbah-v2-surface-sunken); border: 1px solid var(--arbah-v2-border); border-radius: 999px; }
.arbah-v2 .dashboard-v2-scope .tab { border: none; background: transparent; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--arbah-v2-ink-muted); cursor: pointer; font-family: var(--arbah-v2-font-sans); }
.arbah-v2 .dashboard-v2-scope .tab.tab-active { background: var(--arbah-v2-surface); color: var(--arbah-v2-ink); box-shadow: var(--arbah-v2-shadow-sm); }

/* -- KPI strip (5 tiles, mono label, serif number, sub-chip) - */
.arbah-v2 .dashboard-v2-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1000px) { .arbah-v2 .dashboard-v2-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px)  { .arbah-v2 .dashboard-v2-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.arbah-v2 .dashboard-v2-kpi {
  position: relative; overflow: hidden; background: var(--arbah-v2-surface);
  border: 1px solid var(--arbah-v2-border); border-radius: var(--arbah-v2-radius-lg);
  box-shadow: var(--arbah-v2-shadow-sm); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px;
}
.arbah-v2 .dashboard-v2-kpi::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 3px; background: var(--arbah-v2-border-strong); }
.arbah-v2 .dashboard-v2-kpi.is-brand::before   { background: var(--arbah-v2-brand); }
.arbah-v2 .dashboard-v2-kpi.is-info::before    { background: var(--arbah-v2-info); }
.arbah-v2 .dashboard-v2-kpi.is-success::before { background: var(--arbah-v2-success); }
.arbah-v2 .dashboard-v2-kpi.is-warning::before { background: var(--arbah-v2-warning); }
.arbah-v2 .dashboard-v2-kpi.is-danger::before  { background: var(--arbah-v2-danger); }
.arbah-v2 .dashboard-v2-kpi .kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.arbah-v2 .dashboard-v2-kpi .kpi-label { font-family: var(--arbah-v2-font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--arbah-v2-ink-muted); }
.arbah-v2 .dashboard-v2-kpi .kpi-icon { flex: 0 0 auto; width: 28px; height: 28px; border-radius: var(--arbah-v2-radius-sm); display: inline-flex; align-items: center; justify-content: center; background: var(--arbah-v2-surface-sunken); color: var(--arbah-v2-ink-muted); }
.arbah-v2 .dashboard-v2-kpi .kpi-icon-brand   { background: var(--arbah-v2-navy-100);    color: var(--arbah-v2-brand); }
.arbah-v2 .dashboard-v2-kpi .kpi-icon-info    { background: var(--arbah-v2-info-soft);    color: var(--arbah-v2-info); }
.arbah-v2 .dashboard-v2-kpi .kpi-icon-success { background: var(--arbah-v2-success-soft); color: var(--arbah-v2-success); }
.arbah-v2 .dashboard-v2-kpi .kpi-icon-warning { background: var(--arbah-v2-warning-soft); color: var(--arbah-v2-warning); }
.arbah-v2 .dashboard-v2-kpi .kpi-icon-danger  { background: var(--arbah-v2-danger-soft);  color: var(--arbah-v2-danger); }
.arbah-v2 .dashboard-v2-kpi .kpi-value { font-family: var(--arbah-v2-font-display); font-weight: 600; font-size: 28px; line-height: 1.05; color: var(--arbah-v2-ink); letter-spacing: -0.01em; }
.arbah-v2 .dashboard-v2-kpi .kpi-value bdi { unicode-bidi: isolate; }
.arbah-v2 .dashboard-v2-kpi-sub { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--arbah-v2-ink-muted); }
.arbah-v2 .dashboard-v2-kpi-sub.is-danger { color: var(--arbah-v2-danger); font-weight: 600; }
.arbah-v2 .dashboard-v2-mono { font-family: var(--arbah-v2-font-mono); font-variant-numeric: tabular-nums; }

/* -- Budget exposure (full-width, red-tinted, red inline-start) -- */
.arbah-v2 .dashboard-v2-exposure {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 24px;
  background: var(--arbah-v2-danger-soft); border: 1px solid var(--arbah-v2-danger);
  border-inline-start-width: 4px; border-radius: var(--arbah-v2-radius-lg); padding: 18px 22px;
}
.arbah-v2 .dashboard-v2-exposure.is-clear { background: var(--arbah-v2-success-soft); border-color: var(--arbah-v2-success); grid-template-columns: 1fr; }
@media (max-width: 800px) { .arbah-v2 .dashboard-v2-exposure { grid-template-columns: 1fr; } }
.arbah-v2 .dashboard-v2-exposure-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-family: var(--arbah-v2-font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--arbah-v2-danger); }
.arbah-v2 .dashboard-v2-exposure.is-clear .dashboard-v2-exposure-eyebrow { color: var(--arbah-v2-success); }
.arbah-v2 .dashboard-v2-exposure-count { font-family: var(--arbah-v2-font-display); font-weight: 600; font-size: 44px; line-height: 1; color: var(--arbah-v2-danger); margin-top: 8px; }
.arbah-v2 .dashboard-v2-exposure-label { font-size: 13px; font-weight: 600; color: var(--arbah-v2-ink); margin-top: 2px; }
.arbah-v2 .dashboard-v2-exposure-caption { font-size: 12px; color: var(--arbah-v2-ink-muted); margin-top: 6px; }
.arbah-v2 .dashboard-v2-exposure-clear { font-family: var(--arbah-v2-font-display); font-weight: 600; font-size: 18px; color: var(--arbah-v2-ink); margin-top: 8px; }
.arbah-v2 .dashboard-v2-exposure-empty { text-align: start; }
.arbah-v2 .dashboard-v2-exposure-link { margin-top: 12px; background: transparent; border: none; padding: 0; color: var(--arbah-v2-danger); font-weight: 600; font-size: 13px; cursor: pointer; }
.arbah-v2 .dashboard-v2-exposure-link:hover { text-decoration: underline; }
.arbah-v2 .dashboard-v2-exposure-break { display: flex; flex-direction: column; gap: 2px; }
.arbah-v2 .dashboard-v2-exposure-break-head { font-family: var(--arbah-v2-font-mono); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; color: var(--arbah-v2-ink-muted); margin-bottom: 4px; }
.arbah-v2 .dashboard-v2-exposure-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid color-mix(in srgb, var(--arbah-v2-danger) 22%, transparent); cursor: pointer; }
.arbah-v2 .dashboard-v2-exposure-row:hover { background: color-mix(in srgb, var(--arbah-v2-danger) 7%, transparent); }
.arbah-v2 .dashboard-v2-exposure-row-name { font-size: 13px; color: var(--arbah-v2-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arbah-v2 .dashboard-v2-exposure-row-amt { font-size: 12.5px; color: var(--arbah-v2-danger); font-weight: 600; }
.arbah-v2 .dashboard-v2-exposure-row-pct { font-size: 12px; color: var(--arbah-v2-danger); }
.arbah-v2 .dashboard-v2-exposure-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 10px; margin-top: 4px; font-weight: 700; font-size: 13px; color: var(--arbah-v2-ink); }
.arbah-v2 .dashboard-v2-exposure-total .dashboard-v2-mono { color: var(--arbah-v2-danger); }

/* -- Active-projects block + section head ------------------- */
.arbah-v2 .dashboard-v2-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.arbah-v2 .dashboard-v2-section-title { font-family: var(--arbah-v2-font-display); font-weight: 600; font-size: 18px; color: var(--arbah-v2-ink); }
.arbah-v2[dir="rtl"] .dashboard-v2-section-title { font-family: "IBM Plex Sans Arabic", var(--arbah-v2-font-display); }
.arbah-v2 .dashboard-v2-section-sub { font-size: 12.5px; color: var(--arbah-v2-ink-muted); margin-top: 3px; }
.arbah-v2 .dashboard-v2-viewall { background: transparent; border: none; color: var(--arbah-v2-brand); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 6px; margin-inline: -6px; border-radius: var(--arbah-v2-radius-sm); }
.arbah-v2 .dashboard-v2-viewall:hover { background: var(--arbah-v2-navy-100); }
.arbah-v2 .dashboard-v2-empty { padding: 28px; text-align: center; color: var(--arbah-v2-ink-subtle); font-size: 13px; border: 1px dashed var(--arbah-v2-border); border-radius: var(--arbah-v2-radius-lg); }

/* -- Project card grid -------------------------------------- */
.arbah-v2 .dashboard-v2-proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.arbah-v2 .dashboard-v2-card {
  background: var(--arbah-v2-surface); border: 1px solid var(--arbah-v2-border); border-radius: var(--arbah-v2-radius-lg);
  box-shadow: var(--arbah-v2-shadow-sm); padding: 16px; display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.arbah-v2 .dashboard-v2-card:hover { border-color: var(--arbah-v2-border-strong); box-shadow: var(--arbah-v2-shadow-md); transform: translateY(-1px); }
.arbah-v2 .dashboard-v2-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.arbah-v2 .dashboard-v2-code { font-family: var(--arbah-v2-font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--arbah-v2-ink-muted); background: var(--arbah-v2-surface-sunken); border: 1px solid var(--arbah-v2-border); border-radius: var(--arbah-v2-radius-sm); padding: 2px 7px; }
.arbah-v2 .dashboard-v2-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.arbah-v2 .dashboard-v2-status-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.arbah-v2 .dashboard-v2-status.is-ontrack { color: var(--arbah-v2-success); background: var(--arbah-v2-success-soft); }
.arbah-v2 .dashboard-v2-status.is-atrisk  { color: var(--arbah-v2-warning); background: var(--arbah-v2-warning-soft); }
.arbah-v2 .dashboard-v2-status.is-delayed { color: var(--arbah-v2-danger);  background: var(--arbah-v2-danger-soft); }
.arbah-v2 .dashboard-v2-card-name { font-family: var(--arbah-v2-font-display); font-weight: 600; font-size: 16px; line-height: 1.25; color: var(--arbah-v2-ink); }
.arbah-v2[dir="rtl"] .dashboard-v2-card-name { font-family: "IBM Plex Sans Arabic", var(--arbah-v2-font-display); }
.arbah-v2 .dashboard-v2-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.arbah-v2 .dashboard-v2-card-loc { font-size: 12px; color: var(--arbah-v2-ink-muted); }
.arbah-v2 .dashboard-v2-phase-tag { font-size: 11px; font-weight: 600; color: var(--arbah-v2-brand); background: var(--arbah-v2-navy-100); border-radius: var(--arbah-v2-radius-sm); padding: 2px 8px; }
.arbah-v2 .dashboard-v2-card-prog { display: flex; flex-direction: column; gap: 5px; }
.arbah-v2 .dashboard-v2-card-prog-head { display: flex; align-items: baseline; justify-content: space-between; }
.arbah-v2 .dashboard-v2-card-prog-label { font-family: var(--arbah-v2-font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--arbah-v2-ink-muted); }
.arbah-v2 .dashboard-v2-card-prog-pct { font-size: 13px; font-weight: 600; color: var(--arbah-v2-ink); }
.arbah-v2 .dashboard-v2-card-figs { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; border-top: 1px solid var(--arbah-v2-border); padding-top: 10px; }
.arbah-v2 .dashboard-v2-card-fig { display: flex; flex-direction: column; gap: 1px; }
.arbah-v2 .dashboard-v2-card-fig-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--arbah-v2-ink-subtle); }
.arbah-v2 .dashboard-v2-card-fig-v { font-size: 13px; color: var(--arbah-v2-ink); }
.arbah-v2 .dashboard-v2-overrun { margin-inline-start: auto; align-self: center; font-size: 11px; font-weight: 700; color: var(--arbah-v2-danger); background: var(--arbah-v2-danger-soft); border-radius: 999px; padding: 2px 8px; }
.arbah-v2 .dashboard-v2-card-next { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--arbah-v2-border); padding-top: 10px; }
.arbah-v2 .dashboard-v2-card-next-k { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--arbah-v2-ink-subtle); }
.arbah-v2 .dashboard-v2-milestone { font-size: 12.5px; font-weight: 600; color: var(--arbah-v2-ink); background: var(--arbah-v2-surface-sunken); border-radius: var(--arbah-v2-radius-sm); padding: 2px 8px; }
.arbah-v2 .dashboard-v2-card-next-date { margin-inline-start: auto; font-size: 12px; color: var(--arbah-v2-ink-muted); }
.arbah-v2 .dashboard-v2-card-next-none { font-size: 12px; color: var(--arbah-v2-ink-subtle); }

/* -- Mobile polish ------------------------------------------ */
@media (max-width: 640px) {
  .arbah-v2 .dashboard-v2-page { padding: 16px; gap: 14px; }
  .arbah-v2 .dashboard-v2-title { font-size: 22px; }
  .arbah-v2 .dashboard-v2-header-actions { width: 100%; }
  .arbah-v2 .dashboard-v2-proj-grid { grid-template-columns: 1fr; }
  .arbah-v2 .dashboard-v2-exposure-count { font-size: 36px; }
  /* Shrink the KPI number on the narrow 2-col grid so "SAR 7.05M" fits. */
  .arbah-v2 .dashboard-v2-kpi { padding: 14px; }
  .arbah-v2 .dashboard-v2-kpi .kpi-value { font-size: 23px; }
  .arbah-v2 .dashboard-v2-kpi .kpi-value.dashboard-v2-mono { font-size: 18px; }
}

/* ============================================================
   Arbah v2 — Dashboard EXACT design rebuild (dashboard-board.jsx +
   dashboard-mobile.jsx). The DashboardV2Surface component carries the
   pixel detail inline (mapped to --arbah-v2-* tokens); these classes
   own only the responsive container rules (desktop grid → mobile
   scroll/stack). Supersedes the dashboard-v2-* rules above, which the
   prior markup used and are now inert.
   ============================================================ */
.arbah-v2 .av2dash { max-width: 1280px; margin-inline: auto; padding: 0; gap: 0; display: block; }
.arbah-v2 .av2dash-header { padding: 28px 32px 18px; }
.arbah-v2 .av2dash-pad { padding: 0 32px 18px; }
.arbah-v2 .av2dash-kpis { padding: 0 32px 18px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.arbah-v2 .av2dash-over { display: grid; grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1.4fr) 132px; }
.arbah-v2 .av2dash-projgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* Tablet */
@media (max-width: 1000px) {
  .arbah-v2 .av2dash-projgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Mobile: KPIs horizontal scroll, single-col projects, stacked exposure */
@media (max-width: 860px) {
  .arbah-v2 .av2dash-header { padding: 18px 16px 12px; flex-wrap: wrap; }
  .arbah-v2 .av2dash-pad { padding: 0 16px 14px; }
  .arbah-v2 .av2dash-kpis { display: flex; overflow-x: auto; gap: 10px; padding: 0 16px 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .arbah-v2 .av2dash-kpis::-webkit-scrollbar { display: none; }
  .arbah-v2 .av2dash-kpis > section { flex: 0 0 150px; }
  .arbah-v2 .av2dash-projgrid { grid-template-columns: minmax(0, 1fr); }
  .arbah-v2 .av2dash-over { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .arbah-v2 .av2dash-over-div { display: none; }
}
