/* ============================================================
   app-ext.css — app-level extensions to the design package.
   Token-based only. Candidates for upstreaming into design/app.css
   are tracked in BillingWebUI-design/DESIGN-GAPS.md.
   AURORA: no dark chrome anywhere — the shell is a glass header over
   a transparent nav rail (design-reference.html is the tie-breaker).
   ============================================================ */

:root {
  /* app.css references --on-brand (.sidebar__logo, active nav badge) but no longer
     defines it — logged in DESIGN-GAPS for upstreaming. */
  --on-brand: #FFFFFF;
  /* Amber hairline used by app.css .banner-simulation — exposed as a token so pages
     never hard-code the hex. */
  --warning-border: #F3E0BC;
}

/* ---------- Shell: glass header above sidebar + main (Aurora) ---------- */
.shell { height: 100vh; display: flex; flex-direction: column; overflow: hidden; background: var(--canvas); }
.shell__body { flex: 1; display: flex; min-height: 0; }
/* app.css sizes .main for its grid shell; in this flex shell it must fill the frame.
   The rail has no panel of its own — a hairline separates it from content. */
.shell__body > .main { flex: 1; background: transparent; border-left: 1px solid var(--border); }
.shell .toolbar { background: transparent; }

/* Brand zone inside the glass header — logo · hairline divider · product name */
.header__brand {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  height: 100%;
  display: flex; align-items: center; gap: 13px;
  padding: 0 18px;
}
.shell .header { padding: 0 20px 0 0; flex: 0 0 var(--header-h); }
.header__meta {
  margin-left: auto;
  display: flex; align-items: center;
  color: var(--text-muted); font-size: 11.5px; gap: 9px;
  white-space: nowrap;
}

/* Global search — lives in the glass header, scoped to the whole app */
.gsearch { flex: 1; max-width: 600px; position: relative; }
.gsearch__box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 9px; padding: 0 12px; height: 38px;
}
.gsearch__box:focus-within { border-color: var(--brand); }
.gsearch__input {
  flex: 1; border: none; background: transparent; outline: none;
  font: 400 13px var(--font-sans); color: var(--text);
}
.gsearch__input::placeholder { color: var(--text-muted); }
/* ⌘K hint chip — the ONE sanctioned --text-faintest use (non-informational ornament) */
.gsearch__kbd {
  font-size: 10.5px; color: var(--text-faintest);
  border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-weight: 500; white-space: nowrap;
}
.gsearch__results {
  position: absolute; top: 46px; left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--sh-pop);
  padding: 6px;
  max-height: 400px; overflow-y: auto;
  animation: fade-in .13s ease;
  z-index: 50;
}

/* Aurora's 34px interactive floor (button/input min-height in app.css) must not inflate
   compact controls: the toggle switch track is 23px by design (knob 19px), and native
   radio/checkbox glyphs size themselves. The 44px/34px rule is for tap targets, not for
   stretching a track around its knob. */
.switch, input[type="checkbox"], input[type="radio"] { min-height: 0; }

/* ---------- Aurora overrides of dark-era leftovers in app.css ----------
   (site-picker / nav badge / sidebar user still carry white-alpha values in the
   design file — flagged in DESIGN-GAPS for upstreaming) */
.site-picker {
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-hover);
  border-radius: 9px; padding: 5px 10px; min-height: 34px;
  color: var(--brand-text); font: 600 11.5px var(--font-sans);
}
.site-picker:hover { background: var(--brand-soft-hover); }
.nav-item__badge { background: var(--input-bg); color: var(--text-muted); }
.nav-item.active .nav-item__badge { background: var(--brand-soft-hover); color: var(--brand-text); }
.sidebar__user { border-top: 1px solid var(--border); }
.sidebar__avatar {
  background: var(--brand-soft);
  border: 1px solid var(--brand-soft-hover);
  color: var(--brand-text);
}

/* Site picker dropdown (top bar) */
.site-picker__menu {
  position: absolute; top: 34px; left: 0; min-width: 220px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--sh-pop);
  padding: 6px; z-index: 60; animation: fade-in .13s ease;
}
.site-picker__option {
  display: flex; align-items: center; gap: 9px;
  width: 100%; border: none; background: transparent; cursor: pointer;
  text-align: left; padding: 8px 10px; border-radius: var(--r-chip);
  font: 500 12.5px var(--font-sans); color: var(--text);
}
.site-picker__option:hover { background: var(--input-bg); }
.site-picker__option.selected { background: var(--row-selected); }
.site-picker__option-meta { margin-left: auto; font-size: 11px; color: var(--text-faint); }
.site-picker-wrap { position: relative; }

/* ---------- Filter tabs (Requests screen; pill-style buttons) ---------- */
.filter-tabs { display: flex; gap: 10px; margin-bottom: 16px; }
.filter-tab {
  border: 1px solid var(--border); background: var(--surface); color: var(--text-muted);
  font-size: 12.5px; font-weight: 600; padding: 7px 14px;
  border-radius: 9px; cursor: pointer;
}
.filter-tab:hover { background: var(--input-bg); }
/* Aurora: ONE chip style app-wide — selected = orange tint + darkened-orange text,
   same treatment as active nav. A dark or solid-orange chip fill is a bug. */
.filter-tab.active { border-color: var(--brand-soft-hover); background: var(--brand-soft); color: var(--brand-text); }
.filter-tab__count { opacity: .7; margin-left: 4px; }

/* In-page filter bar search input — white on canvas, tied to the table below it */
.list-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 0 11px; height: 36px;
  flex: 1; max-width: 340px;
}
.list-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font: 400 12.5px var(--font-sans); color: var(--text);
}

/* ---------- Skeleton loading (tables load with these, never spinners) ---------- */
@keyframes skeleton-sheen { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton {
  display: block; height: 13px; border-radius: 6px;
  background: linear-gradient(90deg, var(--divider) 25%, var(--divider-2) 50%, var(--divider) 75%);
  background-size: 200% 100%;
  animation: skeleton-sheen 1.4s ease infinite;
}

/* ---------- Domain pill aliases beyond the designed set ----------
   Request lifecycle also has: draft, processing, completed, cancelled. */
.pill--processing { background: var(--info-bg);    color: var(--info-fg); }
.pill--completed  { background: var(--success-bg); color: var(--success-fg); }
.pill--cancelled  { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill--pending-activation { background: var(--warning-bg); color: var(--warning-fg); }
.pill--pending-cancellation { background: var(--warning-bg); color: var(--warning-fg); }
/* pre-charge pipeline statuses */
.pill--processed    { background: var(--success-bg); color: var(--success-fg); }
.pill--skipped      { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill--accumulating { background: var(--info-bg);    color: var(--info-fg); }
.pill--charged      { background: var(--success-bg); color: var(--success-fg); }
.pill--exception    { background: var(--danger-bg);  color: var(--danger-fg); }
.pill--unresolved   { background: var(--warning-bg); color: var(--warning-fg); }
.pill--unmapped     { background: var(--warning-bg); color: var(--warning-fg); }
.pill--unpriced     { background: var(--warning-bg); color: var(--warning-fg); }
.pill--covered-flat-fee { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill--expired    { background: var(--neutral-bg); color: var(--neutral-fg); }
/* Recurly migration ladder (progress order) — hues from design-reference pill() map,
   .pill--mig- prefix keeps them separate from billing statuses that share names
   ("pending" here is neutral not-started, not the amber charge state). */
.pill--mig-pending                 { background: var(--neutral-bg);        color: var(--neutral-fg); }
.pill--mig-migration-started       { background: var(--pal-purple-bg);     color: var(--pal-purple-fg); }
.pill--mig-request-created         { background: var(--ct-quotesent-bg);   color: var(--ct-quotesent-fg); }
.pill--mig-request-in-progress     { background: var(--info-bg);           color: var(--info-fg); }
.pill--mig-pending-golive          { background: var(--ct-quoteaccepted-bg); color: var(--ct-quoteaccepted-fg); }
.pill--mig-awaiting-recurly-cancel { background: var(--warning-bg);        color: var(--warning-fg); }
.pill--mig-live                    { background: var(--success-bg);        color: var(--success-fg); }
.pill--mig-verified                { background: var(--success-bg);        color: var(--success-fg); }
.pill--mig-excluded                { background: var(--neutral-bg);        color: var(--text-faint); }
/* Recurly account state: inactive = canceled there = cutover complete (neutral, not danger) */
.pill--inactive { background: var(--neutral-bg); color: var(--neutral-fg); }
/* The nag tint: awaiting_recurly_cancel rows / unresolved mapping lines pull the eye */
.row--nag > td { background: color-mix(in srgb, var(--warning-bg) 55%, transparent); }
/* Wizard step number — brand as an active mark (design-reference), never a surface fill */
.wizard-step__num {
  width: 20px; height: 20px; border-radius: 100px; flex-shrink: 0;
  background: var(--brand); color: var(--on-brand);
  font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
/* e-mail delivery statuses (invoice e-mail log) */
.pill--sent       { background: var(--info-bg);    color: var(--info-fg); }
.pill--delivered  { background: var(--success-bg); color: var(--success-fg); }
.pill--opened     { background: var(--success-bg); color: var(--success-fg); }
.pill--bounced    { background: var(--danger-bg);  color: var(--danger-fg); }
.pill--failed     { background: var(--danger-bg);  color: var(--danger-fg); }
.pill--queued     { background: var(--neutral-bg); color: var(--neutral-fg); }

/* ---------- Contract lifecycle (11 statuses) — hues from DESIGN.md §0, as tokens ---------- */
:root {
  --ct-quotesent-bg: #EAECFF;     --ct-quotesent-fg: #4C4FCF;
  --ct-quoteaccepted-bg: #E1F5F1; --ct-quoteaccepted-fg: #0F7B6C;
  --ct-suspended-bg: #FFF1E6;     --ct-suspended-fg: #C4741A;
  --ct-expired-bg: #F2EDEE;       --ct-expired-fg: #8A6A6C;
}
/* .pill--ct-* prefix keeps contract hues separate from billing statuses that share names */
.pill--ct-draft           { background: var(--neutral-bg); color: var(--neutral-fg); }
.pill--ct-pendingapproval { background: var(--warning-bg); color: var(--warning-fg); }
.pill--ct-sentforsigning  { background: var(--info-bg);    color: var(--info-fg); }
.pill--ct-active          { background: var(--success-bg); color: var(--success-fg); }
.pill--ct-suspended       { background: var(--ct-suspended-bg); color: var(--ct-suspended-fg); }
.pill--ct-terminated      { background: var(--danger-bg);  color: var(--danger-fg); }
.pill--ct-expired         { background: var(--ct-expired-bg); color: var(--ct-expired-fg); }
.pill--ct-inrevision      { background: var(--pal-purple-bg); color: var(--pal-purple-fg); }
.pill--ct-superseded      { background: var(--neutral-bg); color: var(--text-faint); }
.pill--ct-quotesent       { background: var(--ct-quotesent-bg); color: var(--ct-quotesent-fg); }
.pill--ct-quoteaccepted   { background: var(--ct-quoteaccepted-bg); color: var(--ct-quoteaccepted-fg); }

/* billingStatus — outline ghost chip, subordinate to the lifecycle pill */
.ghost-chip {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: var(--r-pill);
  border: 1px solid var(--border); color: var(--text-faint); background: transparent;
  white-space: nowrap;
}
.ghost-chip--pending { border-color: var(--warning-fg); color: var(--warning-fg); }
.ghost-chip--sent    { border-color: var(--success-fg); color: var(--success-fg); }
.ghost-chip--failed, .ghost-chip--rejected { border-color: var(--danger-fg); color: var(--danger-fg); }

/* contract type chip — always beside the number */
.type-chip {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.type-chip--master { background: var(--pal-blue-bg); color: var(--pal-blue-fg); }
.type-chip--child  { background: var(--pal-purple-bg); color: var(--pal-purple-fg); }

/* child rows indent behind a caret on a tinted row */
.contract-row--child td:first-child { padding-left: 46px; }
.contract-row--child { background: var(--row-hover); }

/* ---------- Linked-system chips (All accounts) ----------
   Presence = filled blue; absence = dashed-border neutral — never faded. */
.link-chip {
  display: inline-flex; align-items: center;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.link-chip--on  { background: var(--pal-blue-bg); color: var(--pal-blue-fg); border: 1px solid transparent; }
.link-chip--off { background: transparent; color: var(--text-muted); border: 1px dashed var(--text-faint); }

/* Muted italic "Not assigned" for missing SAP codes — never print the GUID */
.not-assigned { color: var(--text-faint); font-style: italic; font-size: 12px; }

/* Account card grid (Cards view) */
.account-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

/* ---------- PDF preview — THE one sanctioned modal (document viewer, CF-approved) ---------- */
.pdfview__backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(24,23,28,0.32);         /* matches app.css .modal__backdrop */
  backdrop-filter: blur(2px);              /* within the blur budget: modal backdrop */
  display: flex; align-items: center; justify-content: center;
  animation: fade-in .13s ease;
}
.pdfview {
  width: min(920px, 92vw); height: min(90vh, 1100px);
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-pop);
  display: flex; flex-direction: column; overflow: hidden;
}
.pdfview__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex: 0 0 auto;
}
.pdfview__body { flex: 1; background: var(--canvas); }
.pdfview__body iframe { width: 100%; height: 100%; border: none; }

/* SAP second line under the invoice number */
.sap-line { font-size: 10.5px; margin-top: 1px; }
.sap-line--num { font-family: var(--font-mono); color: var(--text-faint); }
.sap-line--todo { color: var(--warning-fg); font-weight: 600; }

/* ---------- Toast stacking (errors persist 10s and may coexist) ---------- */
.toast-host {
  position: fixed; bottom: 44px; left: 50%;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 100;
}
.toast-host .toast { position: static; transform: none; animation: fade-in .2s ease; }

/* ---------- Inline action panel (the no-modals pattern) ---------- */
.inline-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-control);
  padding: 14px 16px;
  margin-top: 10px;
  animation: fade-in .13s ease;
}
.inline-panel--danger { border-left-color: var(--danger-fg); }
.inline-panel__title { font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.inline-panel__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }

/* Form fields inside panels / detail forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); }
.field__input, .field__select, .field__textarea {
  font: 400 13px var(--font-sans); color: var(--text);
  background: var(--input-bg); border: 1px solid var(--border);
  border-radius: var(--r-chip); padding: 8px 10px; outline: none;
}
.field__input:focus, .field__select:focus, .field__textarea:focus { border-color: var(--brand); background: var(--surface); }
.field__error { font-size: 11.5px; color: var(--danger-fg); }
.field-row { display: flex; gap: 12px; }
.field-row > .field { flex: 1; }

/* ---------- Readiness / validation banners (request approval gate) ---------- */
.banner { display: flex; align-items: flex-start; gap: 10px; border-radius: var(--r-control); padding: 10px 14px; font-size: 12.5px; }
.banner--danger  { background: var(--danger-bg);  color: var(--danger-fg);  border: 1px solid var(--danger-bg); }
.banner--warning { background: var(--warning-bg); color: var(--warning-fg); border: 1px solid var(--warning-bg); }
.banner--success { background: var(--success-bg); color: var(--success-fg); border: 1px solid var(--success-bg); }
.banner--info    { background: var(--info-bg);    color: var(--info-fg);    border: 1px solid var(--info-bg); }
.banner__title { font-weight: 600; }
.banner ul { margin: 6px 0 0; padding-left: 18px; }

/* ---------- Facts grid labels (Power-user field grid) ---------- */
.fact__label { font-size: 11px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: .04em; }
.fact__value { font-size: 13px; margin-top: 3px; }

/* ---------- Detail page header ---------- */
.detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.detail-head__title { font-size: 20px; font-weight: 600; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.detail-head__meta { font-size: 12.5px; color: var(--text-faint); margin-top: 3px; }
.detail-head__actions { margin-left: auto; display: flex; gap: 8px; }

.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  background: none; border: none; cursor: pointer; padding: 0;
}
.back-link:hover { color: var(--text); }

/* Departments band (master account detail, DESIGN.md §Departments): a missing integration
   id is the operator's work queue, never quieter than a present one. --warning-fg (#B07300)
   fails the 4.5:1 floor on the amber row tint at 12.5px data size — the design mandates the
   darker amber for small warning text. */
:root { --warning-fg-strong: #8A5A00; }
.dept-id-missing { color: var(--warning-fg-strong); font-weight: 600; }
.dept-gap-note { font-size: 11.5px; color: var(--warning-fg-strong); margin-top: 4px; white-space: nowrap; }

/* SAP Mass edit grid (DESIGN.md §8c) — tokens mirror the design-reference values. */
:root {
  --mass-band-bg: #FFF7F1;      /* mass-change row band */
  --mass-band-border: #FFE4D0;
  --grid-sticky-bg: #F4F3F0;    /* opaque — sticky cells must not let rows ghost through */
}
.mass-grid { border-collapse: separate; border-spacing: 0; width: 100%; }
.mass-grid th { text-align: left; font-size: 9.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px; white-space: nowrap; }
.mass-grid td { padding: 9px 12px; border-top: 1px solid var(--divider); vertical-align: top; }
.mass-sticky { position: sticky; left: 0; z-index: 2; background: var(--grid-sticky-bg); min-width: 216px; border-right: 1px solid var(--border); }
.mass-band td { background: var(--mass-band-bg); border-top: 1px solid var(--mass-band-border); border-bottom: 1px solid var(--mass-band-border); }
.mass-band .mass-sticky { background: var(--mass-band-bg); z-index: 3; }
.mass-cell-input { width: 100%; border: 1px solid var(--border); border-radius: 7px; padding: 6px 8px; font: 400 12.5px var(--font-mono, ui-monospace, Menlo, monospace); background: var(--surface, #fff); outline: none; min-height: 34px; }
.mass-cell-input--dirty { border-color: var(--brand); background: var(--brand-soft); }
.mass-cell-note { font-size: 10.5px; color: var(--warning-fg-strong); margin-top: 4px; font-family: var(--font-mono, ui-monospace, Menlo, monospace); }
.mass-ro-cell { background: color-mix(in srgb, var(--grid-sticky-bg) 55%, transparent); font-family: var(--font-mono, ui-monospace, Menlo, monospace); font-size: 12.5px; color: var(--text-muted); }
.mass-org-chip { display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; background: #F1EDFE; color: #5B3FC4; border-radius: 6px; padding: 2px 7px; font-size: 10.5px; font-weight: 600; }

/* Disabled buttons must LOOK disabled — an enabled-looking primary that ignores clicks
   reads as a silent failure (Card payments panels, InlinePanel confirms, everywhere). */
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ==== Billing health (design package 2026-09-02) ============================ */
/* Funnel palette — encoded once as tokens; the two faint values are deliberate:
   excluded/noise must not read as problems. */
:root {
  --bh-billed: var(--success-fg);      /* #2D7A4F */
  --bh-ready: #1F62B8;
  --bh-flat: #C4CAD3;
  --bh-blocked: #E8A33D;
  --bh-unconsumed: #8B6BE8;
  --bh-risk: var(--danger-fg);
  --bh-waived: #CFD6CE;   /* migration cut-off: deliberately unbilled — calm, never alarming */
  --bh-noise: #DAD8D2;
  --bh-excluded: #EAE8E2;
}
/* Unconsumed is identity-violet (pal-purple), never a semantic colour. */
.pill--unconsumed { background: var(--pal-purple-bg); color: var(--pal-purple-fg); }

/* ---------- Role switcher (top bar) — a role shapes the workspace, it is not access control ---------- */
.role-switch-wrap { position: relative; flex: 1; min-width: 0; }
.role-switch {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 40px;
  background: transparent; border: 1px solid transparent; border-radius: 9px;
  padding: 4px 8px 4px 6px; cursor: pointer; text-align: left; color: var(--text);
}
.role-switch:hover, .role-switch[aria-expanded="true"] { background: var(--input-bg); border-color: var(--border); }
.role-switch__eyebrow { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-muted); line-height: 1.4; }
.role-switch__label { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-menu {
  position: absolute; top: 48px; left: 0; width: 328px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--sh-pop); padding: 6px; z-index: 60; animation: fade-in .13s ease;
  max-height: calc(100vh - 80px); overflow-y: auto;   /* 8 options must never clip below a short viewport */
}
.role-menu__head { padding: 9px 11px 7px; }
.role-menu__eyebrow { font-size: 9.5px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-muted); }
.role-menu__note { font-size: 11.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.55; }
.role-option {
  display: flex; align-items: flex-start; gap: 10px; width: 100%; border: none; border-radius: 9px;
  background: transparent; cursor: pointer; text-align: left; padding: 9px 11px; color: var(--text);
}
.role-option:hover { background: var(--input-bg); }
.role-option.selected { background: var(--brand-soft); }
.role-option__tick { width: 15px; flex: 0 0 15px; font-size: 12px; font-weight: 700; color: var(--brand-text); margin-top: 2px; }
.role-option__label { display: block; font-size: 13px; font-weight: 600; }
.role-option__sub { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.role-option__count { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); white-space: nowrap; margin-top: 3px; }
/* Outside-click catcher. Lives in the shell wrapper, NOT in the glass header: backdrop-filter
   makes the header the containing block for position:fixed, which would shrink this to 62px. */
/* z-index 39: BELOW the header (z 40). The header is a stacking context, so the menu's z 60
   only counts inside it — a backdrop above the header would sit on top of the menu and eat
   every option click. Below the header it still covers the rail (z 30) and the content. */
.role-backdrop { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: transparent; z-index: 39; }

/* ---------- Rail scope panel: say what is hidden, offer the way out ---------- */
.nav-scope {
  background: rgba(255,255,255,0.7); border: 1px dashed var(--border); border-radius: 10px;
  padding: 11px 12px; margin-bottom: 14px;
}
.nav-scope__note { font-size: 11.5px; color: var(--text-muted); line-height: 1.55; }
.nav-scope__btn { background: transparent; border: none; padding: 0; margin-top: 6px; font-size: 11.5px; font-weight: 600; color: var(--brand-text); cursor: pointer; min-height: 24px; }
.nav-scope--warn { border-style: solid; border-color: var(--warning-border, var(--border)); background: var(--warning-bg, rgba(255,255,255,0.7)); }

/* ---------- Off-scope banner: a deep link crossed the role boundary — proceed and say so ---------- */
.offscope {
  margin: 18px 24px 0; border-radius: 10px; padding: 13px 16px;
  background: var(--accent-soft, #F1EDFE); border: 1px solid var(--accent-border, #DCD2FB); border-left: 3px solid var(--accent, #5B3FC4);
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
}
.offscope__title { font-size: 12.5px; font-weight: 600; color: var(--accent-text, #4A2FA8); }
.offscope__note { font-size: 12px; color: var(--text-muted); margin-top: 3px; line-height: 1.55; }
.offscope__btn { border-radius: 9px; min-height: 34px; padding: 0 12px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.offscope__btn--primary { border: none; background: var(--black); color: #fff; }
.offscope__btn--ghost { border: 1px solid var(--accent-border, #DCD2FB); background: var(--surface); color: var(--accent-text, #4A2FA8); }
