/* ══════════════════════════════════════════════════════════════════════════════
   vx-design-system.css  —  Vectris shared design system
   ──────────────────────────────────────────────────────────────────────────────
   TOKEN STRATEGY
   ─────────────
   • Structural surfaces (card bg, borders, text) → --mud-palette-*
     MudThemeProvider injects these inline — they always exist regardless of
     whether this file loads. Light/dark is handled by MudBlazor automatically.

   • Brand colours (navy gradients, steel accent) → hardcoded hex
     #0f1f3d  navy       #1a3260  navy-mid   #2d4a7a  slate   #4a6fa5  steel
     These never change per-theme (headers are always dark navy on both themes).

   • Semantic pill/badge colours → --vx-error/warning/success/info tokens
     These are cosmetic only — if this file fails to load, pills just lose colour.
     Light values in :root, dark values in [data-theme="dark"].

   DARK MODE
   ─────────
   Controlled entirely by [data-theme="dark"] on <html>, set by:
     • _Host.cshtml inline script  (before first paint — no flash)
     • MainLayout.razor ToggleTheme() + OnInitializedAsync()
     • Login.razor ToggleTheme()
   prefers-color-scheme is intentionally NOT used — the app has its own toggle.
══════════════════════════════════════════════════════════════════════════════ */


/* ── Semantic colour tokens — light mode defaults ─────────────────────────── */
:root {
    --vx-success:       #16a34a;
    --vx-warning:       #d97706;
    --vx-error:         #c8192c;
    --vx-info:          #1d4ed8;

    --vx-success-bg:    #dcfce7;
    --vx-warning-bg:    #fef3c7;
    --vx-error-bg:      #fde8ea;
    --vx-info-bg:       #dbeafe;

    --vx-success-text:  #166534;
    --vx-warning-text:  #92400e;
    --vx-error-text:    #991b1b;
    --vx-info-text:     #1e40af;
}

/* ── Semantic colour tokens — dark mode ───────────────────────────────────── */
[data-theme="dark"] {
    --vx-success:       #22c55e;
    --vx-warning:       #f59e0b;
    --vx-error:         #f43f5e;
    --vx-info:          #60a5fa;

    --vx-success-bg:    rgba(34,197,94,0.15);
    --vx-warning-bg:    rgba(245,158,11,0.15);
    --vx-error-bg:      rgba(244,63,94,0.15);
    --vx-info-bg:       rgba(96,165,250,0.15);

    --vx-success-text:  #4ade80;
    --vx-warning-text:  #fbbf24;
    --vx-error-text:    #fb7185;
    --vx-info-text:     #93c5fd;
}


/* ══════════════════════════════════════════════════════════════════════════════
   PAGE SHELL
══════════════════════════════════════════════════════════════════════════════ */

.vx-page {
    background: var(--mud-palette-background);
    min-height: 100vh;
    color: var(--mud-palette-text-primary);
}

/* Premium light-mode polish: panels lift slightly off the page background
   with a soft tinted shadow + a hairline border. The shadow tint matches
   the brand navy (#0f1f3d) at very low alpha so it reads as intentional
   shadow rather than dirty grey. In dark mode the shadow is essentially
   invisible against the near-black surface — harmless, so we leave one
   universal rule. */


/* ══════════════════════════════════════════════════════════════════════════════
   PAGE HEADER  —  navy gradient banner used on all ERM / BCM pages
══════════════════════════════════════════════════════════════════════════════ */

.vx-page-header {
    background: linear-gradient(135deg, #0f1f3d 0%, #1a3260 60%, #2d4a7a 100%);
    padding: 24px 28px 20px;
    border-radius: 0 0 16px 16px;
    /* 16px below — tightened from 22px so the navy block doesn't feel
       like a billboard floating in space. Whatever content follows
       (action strip, completion tile, panel) sits closer and reads as
       part of the same page rather than a separate region. */
    margin-bottom: 16px;
    position: relative; overflow: hidden;

    /* Lock text color to white inside the navy banner. Setting it here
       (on the parent) means every descendant inherits unless it has its
       own explicit color rule. This is more robust than trying to win
       the cascade fight on each individual child class — when a parent
       in the page (e.g. .vx-page) sets `color: var(--mud-palette-text-primary)`,
       that color cascades down and wins against any rule with equal or
       lower specificity. By overriding here at the page-header level
       with !important, we cut that chain cleanly. The few elements that
       DO need a different color (chips with their own backgrounds, the
       green OPEN status badge) set their own color explicitly and will
       not be affected. */
    color: rgba(255,255,255,0.92) !important;
}
/* Subtle crosshatch texture */
.vx-page-header::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.vx-page-header-eyebrow {
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.2em;
    text-transform: uppercase; color: rgba(255,255,255,0.55) !important;
    margin-bottom: 4px; position: relative; z-index: 1;
}
.vx-page-header-title {
    font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em;
    color: #fff !important; line-height: 1.15; position: relative; z-index: 1;
}
.vx-page-header-sub {
    font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em;
    text-transform: uppercase; color: rgba(255,255,255,0.55) !important;
    position: relative; z-index: 1;
}

/* ══════════════════════════════════════════════════════════════════════════════
   PAGE-HEADER COMPANIONS  (added: page-header-desc / back-btn / meta-strip /
   orgunit-chip)
   ──────────────────────────────────────────────────────────────────────────────
   Selectors are scoped under `.vx-page-header .X` (specificity 0,0,2,0)
   instead of just `.X` so they reliably outweigh any global `body { color }`
   reset that MudBlazor might apply in light mode.

   The inner-text colors carry `!important` because:
     1. The page-header is always the navy gradient — there is no theme in
        which dark text on it would be correct. The rule is unambiguous.
     2. MudBlazor sets --mud-palette-text-primary on body and several
        utility classes pull from it. Without !important here, any one of
        those competing selectors can win the cascade in a future Mud
        update and turn the meta strip invisible.
     3. The cost of "wrong" here is text-invisible (worst possible UX).
        The cost of !important is "I can't override this for one experimental
        page" — a fine trade. If a future page genuinely needs a different
        color on a page-header child, that page can re-declare with its own
        !important.

   The OUTER-LAYOUT rules (display, padding, gap) are NOT marked !important
   because pages legitimately may want to tweak spacing.
══════════════════════════════════════════════════════════════════════════════ */

/* Multiline body text under vx-page-header-title.
   Used on entity-detail pages (Objective, OrgUnit, etc.) for a one-or-two-
   sentence description that follows the title.
   Usage:
     <div class="vx-page-header-title">…</div>
     <div class="vx-page-header-desc">Reduce churn by 25% in the SMB segment.</div> */
.vx-page-header .vx-page-header-desc,
.vx-page-header-desc {
    font-size: 0.86rem; line-height: 1.5;
    color: rgba(255,255,255,0.78) !important;
    margin-top: 8px; max-width: 720px;
    position: relative; z-index: 1;
}

/* Small "‹ Label" pill that sits at the top of a page header.
   Used as the breadcrumb/back affordance on entity-detail pages.
   Usage (inside .vx-page-header):
     <span class="vx-back-btn" @onclick="GoBack">‹ Org Units</span> */
.vx-page-header .vx-back-btn,
.vx-back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
    color: rgba(255,255,255,0.65) !important;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 8px 4px 6px;
    cursor: pointer;
    transition: color 0.12s, background 0.12s, border-color 0.12s;
    user-select: none;
    margin-bottom: 10px;
    position: relative; z-index: 1;
}
.vx-page-header .vx-back-btn:hover,
.vx-back-btn:hover {
    color: #fff !important;
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.20);
}

/* Inline label/value pairs below the title — Perspective · Org Unit · Year. */
.vx-page-header .vx-meta-strip,
.vx-meta-strip {
    display: flex; flex-wrap: wrap; align-items: center;
    gap: 14px 18px;
    margin-top: 14px;
    position: relative; z-index: 1;
}
.vx-page-header .vx-meta-item,
.vx-meta-item {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.74rem;
    color: rgba(255,255,255,0.78) !important;
}
.vx-page-header .vx-meta-label,
.vx-meta-label {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55) !important;
}
.vx-page-header .vx-meta-value,
.vx-meta-value {
    font-weight: 600;
    color: rgba(255,255,255,0.92) !important;
}

/* The OrgUnit navigation chip (stocktake §6).
   Sits in a vx-meta-strip on entity-detail pages and routes to /org/unit/{id}.
   Outlined, white-with-alpha on the navy header. Hover brightens.
   Usage:
     <span class="vx-orgunit-chip" @onclick="…">
       <MudIcon … class="vx-orgunit-chip-icon" /> Logistics
     </span>
   For pages whose meta strip sits on a LIGHT background, add `.on-light`. */
.vx-page-header .vx-orgunit-chip,
.vx-orgunit-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.74rem; font-weight: 600;
    color: rgba(255,255,255,0.92) !important;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 18px;
    padding: 3px 12px 3px 10px;
    cursor: pointer;
    user-select: none;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.vx-page-header .vx-orgunit-chip:hover,
.vx-orgunit-chip:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.50);
    color: #fff !important;
}
.vx-orgunit-chip-icon {
    font-size: 0.85rem; opacity: 0.75;
    display: inline-flex; align-items: center;
}
/* Variant for entity-detail pages whose meta strip sits on light background.
   `.on-light` overrides the !important from the dark-default rules above
   with its own !important so it can swap to dark-on-light correctly. */
.vx-orgunit-chip.on-light {
    color: var(--mud-palette-text-primary) !important;
    background: var(--mud-palette-background-grey);
    border-color: var(--mud-palette-divider);
}
.vx-orgunit-chip.on-light:hover {
    background: var(--mud-palette-surface);
    border-color: #4a6fa5;
    color: #0f1f3d !important;
}

/* Badge / pill rendered on a dark header (e.g. "ACTIVE · OPEN CYCLE") */
.vx-header-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.2);
    border-radius: 20px; padding: 4px 12px;
    font-size: 0.72rem; font-weight: 700; color: #fff; letter-spacing: 0.04em;
    position: relative; z-index: 1;
}
.vx-header-badge-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: #34d399; box-shadow: 0 0 0 2px rgba(52,211,153,0.3);
}


/* ══════════════════════════════════════════════════════════════════════════════
   STAT CARDS  —  the summary number strip below the page header
   Usage:  <div class="vx-stats">
             <div class="vx-stat total">…</div>
             <div class="vx-stat threat">…</div>
           </div>
   Tint variants: total | threat | oppty | done | prog | pend | high | med
══════════════════════════════════════════════════════════════════════════════ */

.vx-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px; margin-bottom: 20px;
}
.vx-stat {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px; padding: 16px 18px;
    position: relative; overflow: hidden;
    cursor: pointer; transition: box-shadow 0.15s, transform 0.15s;
    /* Subtle shadow lifts cards off the page background. The tint matches
       the brand navy (#0f1f3d) at very low alpha so it reads as
       "intentional shadow" rather than dirty grey. In dark mode the
       shadow is essentially invisible against near-black, no harm done. */
    box-shadow: 0 1px 2px rgba(15, 31, 61, 0.04),
                0 2px 6px rgba(15, 31, 61, 0.04);
}
.vx-stat:hover {
    box-shadow: 0 4px 14px rgba(15, 31, 61, 0.10);
    transform: translateY(-1px);
}
/* Left accent bar */
.vx-stat::after {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; border-radius: 3px 0 0 3px;
}
/* Full-card tint overlay */
.vx-stat::before {
    content: ''; position: absolute; inset: 0;
    border-radius: 10px; pointer-events: none;
}
/* Tint variants */
.vx-stat.total::after        { background: #4a6fa5; }
.vx-stat.total::before       { background: rgba(74,111,165,0.06); }
.vx-stat.threat::after       { background: #c8192c; }
.vx-stat.threat::before      { background: rgba(200,25,44,0.06); }
.vx-stat.oppty::after        { background: #16a34a; }
.vx-stat.oppty::before       { background: rgba(22,163,74,0.06); }
.vx-stat.done::after         { background: #16a34a; }
.vx-stat.done::before        { background: rgba(22,163,74,0.05); }
.vx-stat.prog::after         { background: #d97706; }
.vx-stat.prog::before        { background: rgba(217,119,6,0.07); }
.vx-stat.high::after         { background: #c8192c; }
.vx-stat.high::before        { background: rgba(200,25,44,0.07); }
.vx-stat.med::after          { background: #d97706; }
.vx-stat.med::before         { background: rgba(217,119,6,0.07); }
.vx-stat.pend::after         { background: var(--mud-palette-divider); }
.vx-stat.info-stat::after    { background: #1d4ed8; }
.vx-stat.info-stat::before   { background: rgba(29,78,216,0.06); }
/* Content sits above the tint overlay */
.vx-stat-value {
    font-size: 1.9rem; font-weight: 900; letter-spacing: -0.05em;
    line-height: 1; color: var(--mud-palette-text-primary); margin-bottom: 2px;
    position: relative; z-index: 1;
}
.vx-stat-label {
    font-size: 0.6rem; font-weight: 700; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--mud-palette-text-secondary);
    position: relative; z-index: 1;
}
.vx-stat-sub {
    font-size: 0.65rem; color: var(--mud-palette-text-secondary);
    margin-top: 2px; position: relative; z-index: 1;
}


/* ══════════════════════════════════════════════════════════════════════════════
   PANEL  —  card container with optional header bar
   Usage:  <div class="vx-panel">
             <div class="vx-panel-header">
               <span class="vx-panel-title">Title</span>
             </div>
             …content…
           </div>
══════════════════════════════════════════════════════════════════════════════ */

.vx-panel {
    background: var(--mud-palette-surface);
    border: 1px solid var(--mud-palette-divider);
    border-radius: 10px; overflow: hidden; margin-bottom: 16px;
    /* Subtle navy-tinted shadow lifts panels off the page background.
       Looks like intentional depth in light mode; effectively invisible
       in dark mode against near-black surfaces. */
    box-shadow: 0 1px 2px rgba(15, 31, 61, 0.04),
                0 2px 8px rgba(15, 31, 61, 0.04);
}
.vx-panel-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--mud-palette-divider);
    /* Soft top-down gradient on the header band so it reads as a quiet
       section divider rather than a flat grey block. The gradient stays
       within the slate-50/100 range so it's visible but never noisy. */
    background: linear-gradient(180deg,
                                var(--mud-palette-surface) 0%,
                                var(--mud-palette-background-grey) 100%);
}
.vx-panel-title {
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--mud-palette-text-secondary);
}
/* Subdued context text shown alongside vx-panel-title.
   E.g. "Risk 40% · KPI 30% · Control 20% · Evidence 10%" on Health Composition. */
.vx-panel-hint {
    font-size: 0.7rem; font-weight: 500;
    color: var(--mud-palette-text-secondary);
    letter-spacing: 0.01em;
    text-align: right;
}
@media (max-width: 640px) {
    .vx-panel-hint {
        text-align: left;
        flex-basis: 100%;
        margin-top: 2px;
    }
}
/* Default body padding inside a panel. Pages override for tighter layouts. */
.vx-panel-body { padding: 20px; }


/* ══════════════════════════════════════════════════════════════════════════════
   TOOLBAR  —  filter/search bar inside a panel
══════════════════════════════════════════════════════════════════════════════ */

.vx-toolbar {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 12px 16px;
    background: var(--mud-palette-background-grey);
    border-bottom: 1px solid var(--mud-palette-divider);
}


/* ══════════════════════════════════════════════════════════════════════════════
   FILTER CHIP  —  clickable tag for filtering lists
   Usage:  <div class="vx-chip [active] [threat|oppty|warning]">Label</div>
══════════════════════════════════════════════════════════════════════════════ */

.vx-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 12px; border-radius: 20px; cursor: pointer;
    font-size: 0.7rem; font-weight: 700; letter-spacing: 0.03em;
    border: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface); color: var(--mud-palette-text-secondary);
    transition: all 0.12s; user-select: none;
}
.vx-chip:hover   { border-color: #4a6fa5; color: #4a6fa5; }
.vx-chip.active  { background: #0f1f3d; border-color: #0f1f3d; color: #fff; }
.vx-chip.threat.active  { background: #c8192c; border-color: #c8192c; color: #fff; }
.vx-chip.oppty.active   { background: #16a34a; border-color: #16a34a; color: #fff; }
.vx-chip.warning.active { background: #d97706; border-color: #d97706; color: #fff; }


/* ══════════════════════════════════════════════════════════════════════════════
   SCORE PILL  —  risk score badge (high / medium / low / info / empty)
   Usage:  <span class="vx-score-pill high">25</span>
══════════════════════════════════════════════════════════════════════════════ */

.vx-score-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 22px; border-radius: 4px;
    font-size: 0.72rem; font-weight: 800; letter-spacing: 0.02em; padding: 0 6px;
}
.vx-score-pill.high    { background: var(--vx-error-bg);   color: var(--vx-error-text); }
.vx-score-pill.medium  { background: var(--vx-warning-bg); color: var(--vx-warning-text); }
.vx-score-pill.low     { background: var(--vx-success-bg); color: var(--vx-success-text); }
.vx-score-pill.info    { background: var(--vx-info-bg);    color: var(--vx-info-text); }
.vx-score-pill.empty   { background: var(--mud-palette-background-grey); color: var(--mud-palette-text-secondary); }


/* ══════════════════════════════════════════════════════════════════════════════
   STATUS DOT + LABEL  —  inline status indicator
   Usage:  <span class="vx-status done">
             <span class="vx-status-dot"></span>Assessed
           </span>
══════════════════════════════════════════════════════════════════════════════ */

.vx-status {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 0.67rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase;
}
.vx-status-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.vx-status.done  .vx-status-dot { background: #16a34a; }
.vx-status.prog  .vx-status-dot { background: #d97706; }
.vx-status.pend  .vx-status-dot { background: var(--mud-palette-divider); border: 1px solid var(--mud-palette-text-secondary); }
.vx-status.err   .vx-status-dot { background: #c8192c; }
.vx-status.done  { color: #16a34a; }
.vx-status.prog  { color: #d97706; }
.vx-status.pend  { color: var(--mud-palette-text-secondary); }
.vx-status.err   { color: #c8192c; }


/* ══════════════════════════════════════════════════════════════════════════════
   DATA TABLE  —  risk register / session list tables
   Usage:  <table class="vx-table">…</table>
══════════════════════════════════════════════════════════════════════════════ */

.vx-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.vx-table th {
    padding: 10px 14px; text-align: left;
    font-size: 0.62rem; font-weight: 800; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--mud-palette-text-secondary);
    background: var(--mud-palette-background-grey);
    border-bottom: 2px solid var(--mud-palette-divider);
    white-space: nowrap;
}
.vx-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--mud-palette-background-grey);
    vertical-align: middle; color: var(--mud-palette-text-primary);
}
.vx-table tr:last-child td { border-bottom: none; }
.vx-table tr:hover td { background: var(--mud-palette-background); }
/* Risk code cell — monospace blue accent */
.vx-risk-code {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.05em;
    color: #4a6fa5; white-space: nowrap;
}
.vx-risk-title { font-weight: 500; line-height: 1.3; }


/* ══════════════════════════════════════════════════════════════════════════════
   TYPE CHIP  —  Threat / Opportunity inline label
   Usage:  <span class="vx-type-chip threat">THREAT</span>
══════════════════════════════════════════════════════════════════════════════ */

.vx-type-chip {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 4px;
    font-size: 0.64rem; font-weight: 700; letter-spacing: 0.04em;
    text-transform: uppercase;
}
.vx-type-chip.threat  { background: var(--vx-error-bg);   color: var(--vx-error-text); }
.vx-type-chip.oppty   { background: var(--vx-success-bg); color: var(--vx-success-text); }
.vx-type-chip.info    { background: var(--vx-info-bg);    color: var(--vx-info-text); }
.vx-type-chip.warning { background: var(--vx-warning-bg); color: var(--vx-warning-text); }


/* ══════════════════════════════════════════════════════════════════════════════
   CATEGORY CHIP  —  neutral tag (risk category, process code)
   Usage:  <span class="vx-cat-chip">Operational</span>
══════════════════════════════════════════════════════════════════════════════ */

.vx-cat-chip {
    display: inline-block; padding: 2px 8px; border-radius: 4px;
    font-size: 0.64rem; font-weight: 600;
    background: var(--mud-palette-background-grey);
    color: var(--mud-palette-text-secondary);
    border: 1px solid var(--mud-palette-divider); white-space: nowrap;
}


/* ══════════════════════════════════════════════════════════════════════════════
   PILL BADGE  —  session status pills (OPEN / SUBMITTED / APPROVED / CLOSED)
   Usage:  <span class="vx-badge open">Open</span>
══════════════════════════════════════════════════════════════════════════════ */

.vx-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 0.65rem; font-weight: 700; letter-spacing: 0.05em;
    text-transform: uppercase;
}
.vx-badge.open      { background: var(--vx-info-bg);    color: var(--vx-info-text); }
.vx-badge.submitted { background: var(--vx-warning-bg); color: var(--vx-warning-text); }
.vx-badge.approved  { background: var(--vx-success-bg); color: var(--vx-success-text); }
.vx-badge.closed    { background: var(--mud-palette-background-grey); color: var(--mud-palette-text-secondary); border: 1px solid var(--mud-palette-divider); }
.vx-badge.draft     { background: var(--mud-palette-background-grey); color: var(--mud-palette-text-secondary); border: 1px solid var(--mud-palette-divider); }
.vx-badge.error     { background: var(--vx-error-bg);   color: var(--vx-error-text); }


/* ══════════════════════════════════════════════════════════════════════════════
   PROGRESS BAR
   Usage:  <div class="vx-progress-track">
             <div class="vx-progress-fill" style="width:43%"></div>
           </div>
══════════════════════════════════════════════════════════════════════════════ */

.vx-progress-track {
    background: var(--mud-palette-divider); border-radius: 3px;
    height: 5px; overflow: hidden; margin-bottom: 3px;
}
.vx-progress-fill {
    height: 100%; border-radius: 3px; transition: width 0.4s ease;
    background: #4a6fa5;
}


/* ══════════════════════════════════════════════════════════════════════════════
   LEGEND ROW  —  colour key below heatmaps / charts
   Usage:  <div class="vx-legend">
             <span class="vx-legend-item">
               <span class="vx-legend-dot" style="background:#c8192c"></span>High
             </span>
           </div>
══════════════════════════════════════════════════════════════════════════════ */

.vx-legend {
    display: flex; flex-wrap: wrap; gap: 16px;
    padding: 10px 16px;
    border-top: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-background-grey);
}
.vx-legend-item {
    display: flex; align-items: center; gap: 5px;
    font-size: 0.65rem; color: var(--mud-palette-text-secondary); font-weight: 600;
}
.vx-legend-dot { width: 10px; height: 10px; border-radius: 2px; flex-shrink: 0; }


/* ══════════════════════════════════════════════════════════════════════════════
   ICON BUTTON  —  small action icon (edit / delete / view)
   Usage:  <button class="vx-icon-btn [danger|primary]">…icon…</button>
══════════════════════════════════════════════════════════════════════════════ */

.vx-icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 6px; cursor: pointer;
    border: 1px solid var(--mud-palette-divider);
    background: var(--mud-palette-surface); color: var(--mud-palette-text-secondary);
    transition: all 0.12s;
}
.vx-icon-btn:hover          { border-color: #4a6fa5; color: #4a6fa5; background: var(--mud-palette-background); }
.vx-icon-btn.danger:hover   { border-color: #c8192c; color: #c8192c; background: var(--vx-error-bg); }
.vx-icon-btn.primary:hover  { border-color: #0f1f3d; color: #0f1f3d; background: var(--mud-palette-background); }
.vx-icon-btn:disabled       { opacity: 0.35; pointer-events: none; }


/* ══════════════════════════════════════════════════════════════════════════════
   EMPTY STATE  —  centred message when a list has no items
   Usage:  <div class="vx-empty-state">
             <div class="vx-empty-state-icon">…icon…</div>
             <div class="vx-empty-state-title">No risks found</div>
             <div class="vx-empty-state-sub">Try adjusting the filter</div>
           </div>
══════════════════════════════════════════════════════════════════════════════ */

.vx-empty-state {
    padding: 48px 24px; text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.vx-empty-state-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--mud-palette-background-grey);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 4px; color: var(--mud-palette-text-secondary);
    font-size: 1.5rem;
}
.vx-empty-state-title { font-size: 0.95rem; font-weight: 700; color: var(--mud-palette-text-primary); }
.vx-empty-state-sub   { font-size: 0.78rem; color: var(--mud-palette-text-secondary); max-width: 340px; line-height: 1.5; }


/* ══════════════════════════════════════════════════════════════════════════════
   MUDTABS OVERRIDE  —  apply to any MudTabs using Class="vx-tabs"
   Makes tab labels always readable in both light and dark mode.
══════════════════════════════════════════════════════════════════════════════ */

.vx-tabs .mud-tabs-tabbar {
    background: var(--mud-palette-surface) !important;
    border-top: 1px solid var(--mud-palette-divider) !important;
    border-bottom: 3px solid var(--mud-palette-divider) !important;
    padding: 0 8px !important;
}
.vx-tabs .mud-tab {
    color: var(--mud-palette-text-secondary) !important;
    opacity: 1 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    min-width: 100px !important;
    text-transform: none !important;
}
.vx-tabs .mud-tab.mud-tab-active,
.vx-tabs .mud-tab[aria-selected="true"] {
    color: var(--mud-palette-primary) !important;
    font-weight: 700 !important;
}
.vx-tabs .mud-tab .mud-icon-root { color: inherit !important; }
.vx-tabs .mud-tabs-panels { background: var(--mud-palette-background) !important; }


/* ══════════════════════════════════════════════════════════════════════════════
   ACTIVE SESSIONS BANNER  —  info strip shown when a process has open sessions
══════════════════════════════════════════════════════════════════════════════ */

.vx-sessions-banner {
    background: var(--vx-info-bg);
    border: 1px solid var(--vx-info);
    border-left: 4px solid var(--vx-info);
    border-radius: 10px;
    padding: 12px 16px; margin-bottom: 18px;
    display: flex; align-items: flex-start; gap: 12px;
}
.vx-sessions-banner-title {
    font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em;
    text-transform: uppercase; color: var(--vx-info-text);
    margin-bottom: 8px;
}


/* ══════════════════════════════════════════════════════════════════════════════
   MIGRATION ALIASES  —  old page-prefixed names → vx-* equivalents
   Lets unmigrated pages keep compiling. Delete once all pages are on vx-*.
══════════════════════════════════════════════════════════════════════════════ */
/* (intentionally empty — pages should reference vx-* classes directly) */
