/* ==========================================================================
   VCG.Web — shared design tokens + shape classes. Modeled directly on
   Site.Core's wwwroot/cobblestone-theme.css (the sibling Contract Insight
   Blazor migration): ONE global stylesheet carries every token and every
   reusable shape (buttons, fields, panels, alerts, modals, brand mark) so a
   new page composes them instead of re-authoring its own copies. Site.Core's
   own CLAUDE.md rule U2 says it plainly — "`.ci-alert` had 85 private copies
   and `.ci-btn` 18 different definitions... If a shared class is wrong, fix
   it here for everyone" — VCG.FOIA's own CLAUDE.md rule U2 already carries
   the same rule for this file. Expanded 2026-08-28 (docs/vcg/PLAN.md) after
   Default.razor.css's first pass showed exactly the pattern Site.Core warns
   about: field/button/alert CSS that any future form-heavy page would need
   again, sitting in one page's scoped file.

   Palette confirmed as real CobbleStone brand (not a guess): Site.Core's
   CLAUDE.md documents navy #2C4070 / accent #0070C0 / slate #455a64 /
   surface #f5f8fb as the Contract Insight palette, and the same #2C4070 and
   #f5f8fb values are already hardcoded throughout legacy VCG's own CSS/
   markup (Header.razor's icon strokes, GatewayVCG.css's menu background).

   Open question (docs/vcg/PLAN.md §1, to resolve in Cohort A): whether
   --accent ends up per-tenant configurable (like FOIA's AccentColor) or
   stays fixed to this CobbleStone default. Fixed for now.
   ========================================================================== */

:root {
    --ink: #1C2430;
    --muted: #5B6169;
    --surface: #FFFFFF;
    --surface-2: #F5F8FB;
    --line: #DAD7CC;

    --good: #2E6B4F;
    --good-soft: #E1EFE7;
    --pending: #9C7A2E;
    --pending-soft: #F4ECD9;
    --closed: #6B6F76;
    --closed-soft: #EAE9E4;
    --danger: #B20000;
    --danger-soft: rgba(178, 0, 0, 0.08);

    --accent: #2C4070;
    --accent-hover: #233258;
    --accent-soft: rgba(44, 64, 112, 0.1);
    /* header tag chips (2026-09-05) — same rgba-tint recipe as --danger-soft, not a hand-picked hex, so it
       always harmonizes with --accent */
    --on-accent: #FFFFFF;
    --on-accent-muted: #B9C2D6;
    --accent-line: rgba(255, 255, 255, 0.16);
    --accent-line-strong: rgba(255, 255, 255, 0.32);

    /* --font-display aliased to --font-ui (2026-09-11, direct user feedback on ClientSignup's own heading —
       "such a stark difference from the rest of the site font... they should match better") — every heading
       across the app (.vcg-page-title, .vcg-form-heading, .vcg-message-heading, .vcg-detail-header h2,
       .vcg-detail-group-title, .vcg-detail-keydate-value, .vcg-badge/.account-avatar-btn monograms, and the
       page-scoped headings in Home/News/Help/PublicContact/AccountMenu) reads through this one token, so
       aliasing it here is a single-point fix instead of touching 14 separate call sites across 8 files. The
       original serif stack ('Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, 'Times New Roman',
       serif) is kept here only as a comment in case a future deliberate serif-headline pass wants it back. */
    --font-display: var(--font-ui);
    --font-ui: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;

    /* Radius scale — pick by the SIZE of the element, matching Site.Core's U12 convention (there: 4
       steps + pill; VCG starts with 3 since nothing here yet needs the extra "large surface" step). */
    --radius-sm: 4px;
    /* a control: input, button, tag */
    --radius-md: 6px;
    /* a block: card, panel, modal */
    --radius-pill: 999px;

    /* Shadow — ONE elevation step for now (floating surfaces only: modal, dropdown — never a card or
       button sitting flat in the page; see Site.Core's U12 "elevation is meaning, not decoration"). */
    --shadow-float: 0 10px 28px rgba(15, 30, 24, 0.16);
    --scrim: rgba(20, 28, 46, 0.5);
    /* modal/drawer backdrop */

    --control-h: 2.5rem;
    /* one height for a field/button pair to line up on */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--surface-2);
}

/* Sticky footer — the standard flex pattern (footer anchors to the viewport bottom on a short page,
   scrolls normally out of view on a long one; NOT `position: sticky`, which pins it while the page scrolls
   past instead, a different and usually unwanted behavior for a footer). MainLayout.razor's .vcg-shell had
   no layout rules at all until now, so on any page shorter than the viewport (an error page, a bare form)
   Footer just sat directly under @Body's content instead of anchored to the bottom — a real, confirmed gap,
   not a style preference. VCG.FOIA.Web already ships exactly this pattern (foia-site.css's .portal
   `min-height:100vh; display:flex; flex-direction:column` + .content `flex:1`) — ported verbatim rather
   than inventing a second version, matching U4. */
/* Row, not column, since docs/vcg/PLAN.md's side-navigation write-up — Sidebar (full viewport height,
   uninterrupted) sits beside .vcg-main-col (TopStrip + main + Footer stacked), not above it. */
.vcg-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: row;
}

/* The column that used to be .vcg-shell's own direct children (Header/main/Footer) now lives one level in,
   beside Sidebar — min-width:0 matters here: without it, a flex row's child with pre-existing wide content
   (ContractSearch's own SfGrid columns) can force Sidebar off-screen instead of scrolling internally, the
   same min-width:0 gotcha this codebase has already hit elsewhere (its own .vcg-search-* classes). */
.vcg-main-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* display:flex/flex-direction:column added 2026-09-02 (Home.razor's full-height sidebar fix) — lets a
   page's own root element opt into `flex: 1` to reliably fill whatever vertical space .vcg-main actually
   has, instead of a `min-height: 100%` percentage that depends on a chain of ancestors all having a truly
   definite (not just min-) height to resolve against — fragile in a way flex-grow isn't. Backward-compatible
   for every other page: a column flex container's default cross-axis stretch just reproduces ordinary
   block-width behavior, and items aren't grown along the main axis unless they opt in with their own
   `flex: 1`, so Default.razor's `.login-shell`/every `.vcg-message-page` page keeps behaving exactly as
   before unless it deliberately asks for the fill-height behavior the way Home.razor.css now does.

   Padding added 2026-09-05 (direct request — page content sat flush against the sidebar/window edges,
   U7's own placeholder gap finally closed): MainLayout now owns real inset, not a per-page stopgap. Same
   `2rem 2.2rem 2.5rem` value this app had already independently converged on twice (ContractSearch's
   `.vcg-list-wrap`, News's `.news-shell`) — both removed their own copy in favor of this one, and
   Default.razor's `.login-shell` dropped its own `padding` (kept its `max-width`/`margin: 0 auto`, a
   legitimate content-block constraint per U7, not an inset). ContractDetails had no padding workaround at
   all — it, and every future page, now gets this for free. A page's own root still sets NO outer
   padding/max-width of its own (U7 unchanged) — this is the one place that owns it. */
.vcg-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 2rem 2.2rem 2.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ── Brand mark — badge + wordmark, used anywhere VCG's identity appears (the login welcome panel
   today; the future Header/nav chrome once it's built — docs/DEFERRED.md — will reuse this exact
   pair rather than re-authoring it). ────────────────────────────────────────────────────────── */

.vcg-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.vcg-badge {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: var(--accent-line);
    border: 1px solid var(--accent-line-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--on-accent);
    flex-shrink: 0;
}

.vcg-wordmark {
    font-size: 1rem;
    font-weight: 700;
    color: var(--on-accent);
}

/* ── Panel/card — the one flat container every page reaches for (Site.Core's `.ci-widget`/`.panel`
   equivalent). Flat, not floating — a 1px border does the separating, no shadow (Site.Core U12). ── */

.vcg-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

/* ── Card — a hoverable, clickable variant of .vcg-panel (an image/icon area + caption, or a header/body/
   value stack) — built for Help.razor's nav + contact cards (docs/vcg/PLAN.md §4), generic enough for any
   future page's own "pick one of these" tile grid. ─────────────────────────────────────────────────────── */

.vcg-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

a.vcg-card,
button.vcg-card,
.vcg-card[role="button"] {
    display: block;
    width: 100%;
    cursor: pointer;
    color: inherit;
    text-decoration: none;
    text-align: left;
    font: inherit;
    border: 1px solid var(--line);
    padding: 0;
}

a.vcg-card:hover,
button.vcg-card:hover,
.vcg-card[role="button"]:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
}

.vcg-card-image {
    height: 132px;
    width: 100%;
    object-fit: cover;
    display: block;
    background: var(--surface-2);
}

.vcg-card-caption {
    padding: 0.85rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    border-top: 1px solid var(--line);
}

.vcg-card-body {
    padding: 1.1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.vcg-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.vcg-card-header img,
.vcg-card-header svg {
    width: 22px;
    height: 22px;
    color: var(--accent);
}

.vcg-card-header h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.vcg-card-desc {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.5;
}

.vcg-card-value {
    font-size: 0.88rem;
    color: var(--ink);
    word-break: break-word;
}

a.vcg-card-value {
    color: var(--accent);
    text-decoration: none;
}

a.vcg-card-value:hover {
    text-decoration: underline;
}

/* ── Form fields — one label style, one input style, sized off --control-h so a field lines up with
   a button beside it without per-page padding guesswork (Site.Core U7's exact rationale). ───────── */

.vcg-field-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.vcg-field-text {
    width: 100%;
    height: var(--control-h);
    padding: 0 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    font-size: 0.92rem;
    font-family: var(--font-ui);
}

.vcg-field-text:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* A value the visitor can see but not change (e.g. a solicitation line item's agency-set Unit of Measure/
   Quantity in the survey "Add Line Item" pop-up, 2026-09-29) — reads as fixed rather than as a broken input. */
.vcg-field-text[readonly] {
    background: var(--surface-2);
    color: var(--muted);
    cursor: default;
}

/* Stacked field wrapper (label/input + validation message, spaced from the next field) — promoted from
   Default.razor.css's .login-field the moment a second real page (PasswordReset/PasswordChange) needed the
   exact same shape (UI rule U4: extract on the second real need, not before). */
.vcg-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1rem;
}

/* ── Page title — a plain top-level heading for a full-width page (News.razor is the first; every other
   page so far has been narrow/single-column and used .vcg-message-heading/.vcg-form-heading instead, which
   are CONTENT-block headings, not a page-level one). Deliberately just typography, not the fuller
   .vcg-page-header/.vcg-actions shape (heading + an action-button row, U6) — that's still earmarked for
   Cohort B's first SfGrid page (see this file's own trailing comment); News has no header-level actions to
   lay out, so building that fuller shape now would be speculative. ─────────────────────────────────────── */

.vcg-page-title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.7rem;
    color: var(--accent);
    margin: 0 0 1.2rem;
}

/* ── Narrow single-column content — the shape shared by PasswordReset/PasswordChange/MFA (and, in spirit,
   Default's own sign-in panel heading). Promoted straight to vcg-site.css rather than staged through one
   page's .razor.css first: each new page needed the exact same shape from the moment it was built, so there
   was never a "first, page-scoped" copy to extract from (UI rule U4's underlying goal — one shape, one
   definition — same outcome, no intermediate step needed here).

   U7, corrected 2026-08-31: .vcg-form-page/.vcg-message-page below are CONTENT blocks (max-width is fine
   here — U7's own "a block of prose" carve-out) and must always sit one level INSIDE a page's own bare root
   element, never AS that root element. PasswordReset.razor/PasswordChange.razor/MFA.razor originally used
   .vcg-form-page directly as their root div — a real U7 violation that crept back in when the shape was
   promoted from a two-level (bare wrapper + content block) structure down to one; fixed by reintroducing the
   bare wrapper `<div>` in each page's markup (no class needed — it carries no styling of its own, only the
   content block nested inside it does). Only Default.razor.css's .login-shell keeps the documented,
   grandfathered root-level exception U7 itself calls out — every other page must use the two-level
   structure, not add a second "it doesn't visibly break yet" exception. ────────────────────────────────── */

.vcg-form-page {
    max-width: 30rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 0;
}

.vcg-form-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.8rem;
    color: var(--accent);
    margin: 0 0 0.5rem;
}

.vcg-form-sub {
    color: var(--muted);
    margin: 0 0 1.4rem;
}

/* Centered plain-notice content (Logout, SSOLoginFailed) — a lighter-weight sibling of .vcg-form-page for
   pages with no form, just a heading + a line of body text. */
.vcg-message-page {
    max-width: 30rem;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 0;
    text-align: center;
}

.vcg-message-heading {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.6rem;
    color: var(--accent);
    margin: 0 0 1.5rem;
}

.vcg-message-body {
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.6;
}

/* Visually hidden but still announced by screen readers — standard "sr-only" utility, added 2026-09-24 so
   Skeleton.razor's own loading state (aria-hidden, since the shimmer itself is decorative) has a real text
   alternative instead of announcing nothing at all. Not a token-governed value (U8 doesn't apply — no
   color/radius/shadow here), just layout-clipping. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.vcg-spinner {
    width: 0.9rem;
    height: 0.9rem;
    border: 2px solid var(--on-accent-muted);
    border-top-color: var(--on-accent);
    border-radius: 50%;
    display: inline-block;
    animation: vcg-spin 0.6s linear infinite;
}

@keyframes vcg-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Buttons — one primary (solid), one secondary (outline) shape, same height as a field. ─────── */

/* Real, confirmed bug (2026-09-04, live screenshot): a lone button inside a plain `text-align: center`
   wrapper (.vcg-message-page/.vcg-message-body — Error.razor, RedirectToFixUrl.razor, and MainLayout's own
   <ErrorBoundary> fallback all use this "center a single action" pattern) never actually centered — a
   `display: flex` box is BLOCK-level, and `text-align` only affects inline-level content, so the button sat
   left-anchored regardless of its centered siblings. `inline-flex` fixes this (an inline-level box IS
   affected by `text-align: center`) with zero effect anywhere else: every other real usage puts this button
   inside its own flex row (.vcg-actions, .login-form-buttons, .mfa-buttons, .news-filter-actions,
   .vcg-list-filterbar-actions) — CSS blockifies a flex ITEM's display regardless of `flex` vs `inline-flex`
   (a flex item's own outer display is irrelevant to how its flex-container parent lays it out), so those
   call sites render byte-identically before and after this change. */
.vcg-btn-solid,
.vcg-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: var(--control-h);
    padding: 0 1.1rem;
    font-size: 0.92rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
}

.vcg-btn-solid {
    border: none;
    background: var(--accent);
    color: var(--on-accent);
}

.vcg-btn-outline {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

/* Disabled looks disabled. Many pages already set `disabled` on these buttons (Add User with vendor edits off,
   Download All with downloads off, …) and, with no rule here, they looked clickable (WI #4229 review). */
.vcg-btn-solid:disabled,
.vcg-btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* A destructive confirm action (ConfirmDialog's own Delete button) — same --danger token .vcg-alert-error
   already uses, not a new hand-picked color. */
.vcg-btn-solid.vcg-btn-danger {
    background: var(--danger);
}

/* An outline button that should stand out from neighbouring plain outlines without competing with the row's
   solid primary — accent border/text (first use: the survey Response page's "Save and Return", 2026-09-29). */
.vcg-btn-outline.vcg-btn-accent {
    border-color: var(--accent);
    color: var(--accent);
}

.vcg-btn-outline.vcg-btn-accent:hover {
    background: var(--accent-soft);
}

/* ── Alerts — status banners, one shape with a color variant per status (Site.Core's
   `.ci-alert`/`.ci-alert-error` pattern). ──────────────────────────────────────────────────────── */

.vcg-alert {
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    font-size: 0.85rem;
}

.vcg-alert-error {
    background: var(--danger-soft);
    color: var(--danger);
}

.vcg-alert-success {
    background: var(--good-soft);
    color: var(--good);
}

/* Neutral/informational banner (SolicitationDetails' reverse-auction low-bid and Dutch-auction "pending
   review" states) — the SAME --accent-soft/--accent token pair already used elsewhere (U8: no new hand-picked
   color), not a new "info" concept. */
.vcg-alert-info {
    background: var(--accent-soft);
    color: var(--accent);
}

/* Something the visitor can't do here and should know before they try (SolicitationDetails: a line-item bid that
   can't be finalized online). --ink, not --pending, on the soft pending fill — --pending text there is under 4.5:1
   (same reason as .vcg-suggest-warn); the --pending edge carries the color. */
.vcg-alert-warn {
    background: var(--pending-soft);
    color: var(--ink);
    border-left: 4px solid var(--pending);
}

/* Small muted hint line under a field (e.g. "Account Pending Activation") — promoted here 2026-09-15 as a
   generically useful shape, not SolicitationDetails-specific. */
.vcg-field-hint {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
}

/* ── Surveys (Cohort G) — the Welcome/Attestation/Response/View response pages' own shared shell/title/
   admin-authored-message block and a single checkbox/radio option row. Global from the start rather than
   page-scoped (U4): Welcome and Attestation both need the identical shell+message shape, and Response/
   Attestation both need the identical option-row shape, so a page-scoped copy would already be a second real
   duplicate on day one. */
.vcg-survey-shell {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 40rem;
}

.vcg-survey-title {
    margin: 0;
    font-size: 1.35rem;
}

.vcg-survey-message {
    line-height: 1.5;
}

.vcg-survey-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

/* The Response/View pages' own shared section-by-section shell — a second real consumer (View) from day
   one, so promoted here instead of duplicated per-page scoped CSS (U4). No max-width (2026-09-29, direct
   request — use the page's full width for answers, price and subtable grids; a page-root max-width also
   breaks U7). */
.vcg-survey-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.vcg-survey-progress {
    color: var(--muted);
    font-size: 0.9rem;
}

.vcg-survey-question {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.vcg-survey-question-text {
    font-weight: 600;
}

.vcg-survey-file-block,
.vcg-survey-list-block {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.vcg-survey-table {
    width: 100%;
    border-collapse: collapse;
}

.vcg-survey-table th,
.vcg-survey-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 0.9rem;
}

/* Response/View's section button row: step navigation (Previous/Next/Complete) in a left-aligned .vcg-actions
   group (U6), and — on Response — "Save and Return" set apart on the far right (2026-09-29, direct request:
   it's an exit, not a step, so it shouldn't read as a third sibling of Previous). Wraps under on narrow
   screens. */
.vcg-survey-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.vcg-survey-answer {
    white-space: pre-wrap;
}

/* ── Line-item suggestion list — the autocomplete under an Item box that offers a solicitation's own line
   items. Promoted here from PricingLineItemsGrid.razor.css (2026-09-29, U4) the moment a second real consumer
   (the survey Response page's "Add Line Item" pop-up) needed the identical shape. ──────────────────────── */
.vcg-suggest {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.vcg-suggest-head {
    padding: 0.35rem 0.75rem;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.vcg-suggest-option {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    border: none;
    border-top: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* The options themselves — capped at about eight rows and scrolling inside the box, so a solicitation with
   hundreds of line items never pushes the page (or a pop-up) down (2026-09-29, direct request). */
.vcg-suggest-list {
    display: flex;
    flex-direction: column;
    max-height: 20rem;
    overflow-y: auto;
}

.vcg-suggest-option:hover,
.vcg-suggest-option:focus-visible,
.vcg-suggest-option[aria-selected="true"] {
    background: var(--accent-soft);
}

.vcg-suggest-option[aria-selected="true"] {
    color: var(--accent);
    font-weight: 600;
}

/* "Showing 50 of 212 items. Keep typing…" under a trimmed list. */
.vcg-suggest-more {
    padding: 0.45rem 0.75rem;
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    font-size: 0.8rem;
}

.vcg-suggest-option:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.vcg-suggest-detail {
    color: var(--muted);
    font-size: 0.82rem;
    white-space: nowrap;
}

.vcg-suggest-own {
    color: var(--accent);
    font-weight: 600;
}

.vcg-suggest-warn,
.vcg-suggest-empty {
    padding: 0.55rem 0.75rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
}

/* --ink, not --pending, on the soft pending fill: --pending text there is under 4.5:1 at this size. */
.vcg-suggest-warn {
    background: var(--pending-soft);
    color: var(--ink);
}

.vcg-suggest-empty {
    color: var(--muted);
}

/* ── CAPTCHA — the homegrown SVG CAPTCHA widget shape (image + refresh + answer field). Promoted here
   2026-09-10 (U4 — second real page, ClientSignup, needed the identical shape Default.razor's own login
   CAPTCHA already established as .login-captcha*; moved to shared classes instead of forking a second
   page-scoped copy). ─────────────────────────────────────────────────────────────────────────────── */

.vcg-captcha {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.1rem;
}

.vcg-captcha-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.vcg-captcha-image {
    width: 180px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 2px;
    overflow: hidden;
}

.vcg-captcha-image svg {
    display: block;
}

.vcg-captcha-refresh {
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
}

/* ── Modal — one overlay + dialog shape (Terms & Conditions today; any future confirm/detail modal
   reuses this rather than re-authoring backdrop/positioning per page). ────────────────────────── */

.vcg-modal-backdrop {
    position: fixed;
    inset: 0;
    background: var(--scrim);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.vcg-modal {
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    width: 700px;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Added 2026-09-18 for SubTablesPanel's "Add Bulk" modal (a data grid, not a form) — U4: a shared modifier the
   moment a second real need for it exists, not a per-page override of .vcg-modal itself (U2). */
.vcg-modal-wide {
    width: 1100px;
}

.vcg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    border-bottom: 1px solid var(--line);
    font-weight: 700;
    color: var(--ink);
}

.vcg-modal-close {
    border: none;
    background: none;
    font-size: 1.4rem;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.vcg-modal-body {
    padding: 1.2rem 1.4rem;
    overflow-y: auto;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Pending-file review list + upload-result banners — first built page-scoped for VendorFileUpload
   (docs/vcg/PLAN.md's VendorFileUpload write-up), promoted here (U4) once AttachmentsPanel became the second
   real consumer of the identical shape (a captured-but-not-yet-uploaded file batch, one row per file, a
   Remove action, then a stacked list of per-file success/error banners after submitting). ────────── */

.vcg-upload-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.vcg-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.vcg-file-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.vcg-file-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcg-file-size,
.vcg-file-status {
    color: var(--muted);
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ── Footer — global site chrome (docs/vcg/PLAN.md §4 "Footer — built"), rendered once from
   MainLayout/Footer.razor on every page, one flat row (Terms / copyright+link / Version) matching
   VCG.FOIA.Web's own sitefoot layout. Reuses .vcg-modal-* above for its Terms dialog (U2/U4). ────────── */

.vcg-footer {
    background: var(--surface-2);
    border-top: 1px solid var(--line);
}

.vcg-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.1rem 2rem;
}

/* Two zones (2026-09-03, per the VCG Modernization mockup canvas's "Option A", user-approved) — things you
   click to get somewhere else (Terms, Version) grouped on the left, who this is (the logo + copyright)
   grouped on the right, instead of four unrelated children evenly spaced across one row. */
.vcg-footer-utility {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.vcg-footer-divider {
    width: 1px;
    height: 16px;
    background: var(--line);
    flex-shrink: 0;
}

.vcg-footer-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.vcg-footer-app {
    /* Plain inline text (a sentence with one embedded link) — demoted to a caption beside the logo now that
       it's grouped with it, rather than a full-size sentence competing with three other unrelated controls. */
    color: var(--muted);
    font-size: 0.78rem;
    border-left: 1px solid var(--line);
    padding-left: 0.7rem;
}

/* The real CobbleStone mark (restored 2026-09-03, per direct request) — legacy's own footer sizes this at
   228x40; scaled down to fit this footer's own slim row height instead of copying that literal size. */
.vcg-footer-logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.vcg-footer-logo img {
    height: 1.4rem;
    width: auto;
    display: block;
}

.vcg-link-btn {
    /* Legacy's own footer used a brighter one-off blue (#0070C0) for these two buttons, distinct from the
       rest of the app; using --accent instead keeps one link color across the whole site rather than
       reintroducing a second, inconsistent blue only this component would have. inline-flex/gap accommodate
       VersionPanel's icon+text trigger reusing this same class (U2) — a no-op for Terms' plain text.
       PublicContact.razor's +CC/+BCC toggles (docs/vcg/PLAN.md §4) reuse it too, same reasoning. */
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    /* The page's own typeface: a <button> otherwise takes the browser's button font, so a <button> and a <label>
       (the requested-files card's Replace) with this class didn't match side by side (2026-10-27). */
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.vcg-link-btn:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Golden Rule 10: an unavailable action shows disabled (its title says why), so it must look it. After :hover, so a
   disabled one never underlines. */
.vcg-link-btn:disabled {
    color: var(--muted);
    text-decoration: none;
    cursor: not-allowed;
}

@media (max-width: 640px) {
    .vcg-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ── Header — global site chrome (docs/vcg/PLAN.md §4 "Header — built", revised to match the VCG
   Modernization mockup canvas — see that write-up for the full comparison/rationale). Navy background,
   matching the mockup's own `.navbar` pattern across every artboard (Main/Search/Login/etc.) and properly
   reusing .vcg-brand's on-accent tokens rather than the placeholder white bar this started as. ─────────── */

.vcg-header {
    background: var(--accent);
    border-bottom: 1px solid var(--accent-line);
    height: var(--vcg-topbar-h);
}

.vcg-header-inner {
    display: flex;
    align-items: center;
    /* space-between between exactly two groups now — .vcg-header-left (burger + brand) and
       .vcg-header-actions — both always real, non-empty flex children (brand always renders something,
       even the config's own placeholder text), so this doesn't hit the "lone child" bug a bare, sometimes-
       hidden burger used to cause here (that fix is now moot — .vcg-header-left is never empty). */
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    height: 100%;
    padding: 0 2rem;
}

.vcg-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex-shrink: 1;
}

/* Mobile-only (900px breakpoint below, matching Sidebar's own drawer breakpoint) — opens the Sidebar drawer.
   The nav-item list that used to live here moved to Sidebar.razor (docs/vcg/PLAN.md's side-navigation
   write-up) — TopStrip owns the brand block again (see .vcg-header-brand below) plus utility controls, not
   "where can I go" content. */
.vcg-header-burger {
    display: none;
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--accent-line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-accent);
}

.vcg-header-burger:hover {
    background: rgba(255, 255, 255, 0.16);
}

/* Restored 2026-09-03 (moved back from Sidebar.razor — real feedback: the collapsed-rail shrink/clip
   treatment there still visibly mangled it). The far-left robustness fix — see docs/vcg/PLAN.md §4's Header
   write-up. Gateway_HeaderContent is genuinely variable admin-authored HTML — text, an image, or both, any
   length. Letting brand (not the actions on the right) give up space, capped so it can never crowd them out,
   is what actually keeps every other control reachable regardless of what an admin puts here. */
.vcg-header-brand {
    font-weight: 700;
    color: var(--on-accent);
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* An admin-embedded logo scales to the bar's own height instead of blowing it out vertically/horizontally. */
.vcg-header-brand img {
    max-height: 2rem;
    max-width: 100%;
    height: auto;
    width: auto;
    vertical-align: middle;
}

.vcg-header-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-shrink: 0;
    /* nowrap by default — desktop has room, and letting this row wrap on its own would break the icon
       cluster away from Sign In/Create Account mid-line. Overridden back to wrap below 640px, where the
       anonymous state's content (icon group + "Sign In" + "Create Account") is wide enough to overflow the
       bar's edge instead of just shrinking — the signed-in state (three small square icons) never needs
       the override, since it never gets close to that width even on a narrow phone. */
    flex-wrap: nowrap;
}

.vcg-header-btn {
    /* .vcg-btn-solid/.vcg-btn-outline already size themselves off --control-h; Header just needs them not
       to stretch full-width the way Default.razor's stacked login-form buttons do. */
    width: auto;
}

/* .vcg-btn-solid/.vcg-btn-outline are authored for a light surface (navy solid button, white/outline on
   white) — on this navy bar they need the mockup's own inverted pair instead: solid = white pill with navy
   text (reads as "the" call to action against navy), outline = transparent with a visible-on-navy border. */
/* Scoped to .vcg-header-btn (the strip's own Sign In/Create Account), not every button inside the header —
   real bug found 2026-09-30: CompanySwitcher's ConfirmDialog renders inside .vcg-header, and the old
   `.vcg-header .vcg-btn-*` selectors restyled its buttons for navy on a white modal (Cancel became white
   text on white, Switch a borderless link). */
.vcg-header .vcg-btn-solid.vcg-header-btn {
    background: var(--surface);
    color: var(--accent);
}

.vcg-header .vcg-btn-outline.vcg-header-btn {
    background: transparent;
    border-color: var(--accent-line-strong);
    color: var(--on-accent);
}

/* Language + Help (anonymous) / Language + notification bell + avatar (signed in) — one paired utility
   cluster, not scattered through the row (see docs/vcg/PLAN.md §4). Placement differs by state: before
   Sign In/Create Account when anonymous, at the trailing end next to the avatar when signed in — each
   instance sits directly in the markup at the position it needs, this just controls the internal gap. */
.vcg-header-icon-group {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Icon-only secondary actions (Help, Language trigger, the decorative notification bell) — on-accent-only,
   built for this navy bar specifically (same convention as .vcg-badge above: never use this on a light
   surface). Golden Rule 10's own stated convention: "every other action = icon-only, Label as its
   tooltip" — Sign In/Create Account keep their labels as the primary actions, these don't need to. */
.vcg-icon-btn {
    width: 2.15rem;
    height: 2.15rem;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--accent-line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-accent-muted);
}

.vcg-icon-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    color: var(--on-accent);
}

.vcg-icon-btn svg {
    display: block;
}

/* Decorative-only notification dot on the bell icon (docs/vcg/PLAN.md §4 — visual placeholder, no Alerts
   backend exists yet to drive a real unread count). Reuses the existing --pending token (U8 — tokens only,
   no literal color) rather than a new one just for this: "pending" already means "something awaiting
   attention," which is exactly what an unread-notification dot signals. */
.vcg-notif-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pending);
    border: 1.5px solid var(--accent);
}

@media (max-width: 640px) {
    /* The fixed --vcg-topbar-h height only needs to hold above this breakpoint — the sidebar is already an
       off-canvas drawer below 900px (see the sidebar's own breakpoint further down), so there's no visible
       .vcg-sidebar-brand edge left to line up with here. Below 640px .vcg-header-inner itself switches to a
       column layout (burger+brand row, then actions wrapping below it), which genuinely needs more than one
       row's height — auto lets it grow instead of clipping the wrapped actions row. */
    .vcg-header {
        height: auto;
    }

    .vcg-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    /* The actual mobile fix for the anonymous state — see .vcg-header-actions' own comment above. Below
       640px, icon group + "Sign In" + "Create Account" no longer reliably fits one row's width; letting it
       wrap to a second line beats the alternative (nowrap pushing "Create Account" past the edge of the
       bar, unreachable without horizontal scroll — confirmed by adding up each control's own min width
       against a 375px phone viewport). A no-op for the signed-in state, which never approaches this width. */
    .vcg-header-actions {
        flex-wrap: wrap;
    }
}

/* ── Sidebar — the left navigation rail (docs/vcg/PLAN.md's side-navigation write-up). Adapted from
   Site.Core's own .ci-sidebar/.ci-nav CONCEPTS (width-transition collapse, nested indent, a collapsed-rail
   flyout, a slide-in mobile drawer) but built on this file's own tokens throughout, not copied verbatim —
   Site.Core's sidebar sits on a light-ish rail with a separate accent stripe; this one's background already
   IS --accent (matching .vcg-header's existing navy-bar convention), so the active-state treatment below is
   a lighter overlay + an --on-accent inset line, not Site.Core's own --ci-accent-on-light stripe. ────────── */

:root {
    --vcg-sidebar-w: 248px;
    --vcg-sidebar-w-collapsed: 60px;
    /* Shared with .vcg-header/.vcg-header-inner below (direct ask #3) — one token both read, so the
       sidebar-brand strip's own bottom border lands on the exact same pixel as the header bar's bottom edge
       regardless of either side's own padding. Value confirmed live via getBoundingClientRect() against the
       header's natural height (1rem top/bottom padding + the 2rem-tall admin logo slot), not guessed. */
    --vcg-topbar-h: 64px;
}

.vcg-sidebar {
    width: var(--vcg-sidebar-w);
    flex-shrink: 0;
    background: var(--accent);
    display: flex;
    flex-direction: column;
    transition: width 0.15s ease;
    overflow: hidden;
}

/* Real, confirmed fix — .vcg-nav-flyout (below) is a position:absolute child of .vcg-nav-item, itself
   nested inside .vcg-nav inside this element; the overflow:hidden above (needed for the width-transition
   during collapse/expand) was clipping the flyout out of existence rather than just mispositioning it —
   "when collapsed, I do not get any of the flyouts at all," not a placement bug. Relax clipping on both
   ancestors only while a flyout actually exists in the tree, so the collapse transition still clips
   normally the rest of the time. */
.vcg-sidebar:has(.vcg-nav-flyout) {
    overflow: visible;
}

.vcg-sidebar.collapsed {
    width: var(--vcg-sidebar-w-collapsed);
}

/* Holds the CobbleStone mark itself again (Superseded 2026-09-25, Site.Core screenshots as the direct
   reference — see Sidebar.razor's own doc comment for the full history/rationale). --vcg-topbar-h is the
   same shared-variable trick Site.Core's own .ci-brand/.ci-topbar use: this strip and TopStrip's .vcg-header
   both read the one token, so their bottom edges land on the same pixel regardless of either side's own
   padding/content — direct ask #3 ("the separator lines up with the bottom of the header bar"). */
.vcg-sidebar-brand {
    height: var(--vcg-topbar-h);
    display: flex;
    border-bottom: 1px solid var(--accent-line);
    flex-shrink: 0;
}

/* The brand IS the collapse control again, matching Site.Core's own .ci-brandbtn exactly (ported values,
   not re-derived) — the mark stays put in both states while the wordmark comes and goes beside it, so
   collapsing never makes the logo appear to jump or swap for a different glyph. This spends a
   conventionally-a-link affordance (a logo) on a state toggle instead — the chevron (hidden until hover/
   focus) is the compensation, plus aria-expanded/aria-controls for assistive tech; Home stays reachable from
   the Home nav item directly underneath. Fine here specifically because the CobbleStone mark is this port's
   own fixed, known asset (Golden Rule 8, byte-identical copies of Site.Core's own SVGs) — NOT the same
   control this file's own history above once ruled out for the admin-configured Gateway_HeaderContent block,
   which is arbitrary-length admin HTML and stays a click target risk; that block correctly stays in
   TopStrip.razor, unclickable, untouched by this change. */
.vcg-brandbtn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    height: 100%;
    padding: 0 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease;
}

.vcg-brandbtn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.vcg-brandbtn:focus-visible {
    outline: 2px solid var(--accent-line-strong);
    outline-offset: -2px;
}

.vcg-brand-mark {
    width: 40px;
    height: auto;
    flex: none;
    transition: opacity 0.15s ease;
}

.vcg-brand-word {
    height: 14px;
    width: auto;
    flex: none;
    opacity: 0.9;
}

.vcg-brand-chev {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding-right: 2px;
    color: var(--on-accent-muted);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.vcg-brandbtn:hover .vcg-brand-chev,
.vcg-brandbtn:focus-visible .vcg-brand-chev {
    opacity: 1;
}

/* Collapsed there's no room beside the mark, so the chevron takes its place on hover instead. */
.vcg-brand-chev.collapsed {
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.vcg-sidebar.collapsed .vcg-brandbtn:hover .vcg-brand-mark,
.vcg-sidebar.collapsed .vcg-brandbtn:focus-visible .vcg-brand-mark {
    opacity: 0.18;
}

.vcg-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem 0;
}

/* Same flyout-clipping fix as .vcg-sidebar above, one level in — this is the nearer ancestor that actually
   sets overflow-x:hidden day to day (for the width-transition), and its own overflow-y:auto would otherwise
   convert a lone "overflow-x: visible" back into clipping (the CSS overflow spec pairs the two axes), so
   both axes drop to visible together while a flyout is open. */
.vcg-nav:has(.vcg-nav-flyout) {
    overflow: visible;
}

.vcg-nav-link,
.vcg-nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.55rem 1rem;
    border: none;
    background: none;
    color: var(--on-accent-muted);
    font-size: 0.88rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.vcg-nav-link:hover,
.vcg-nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--on-accent);
    text-decoration: none;
}

/* NavLink's own injected class (Match="NavLinkMatch.All") — the active-route highlight. */
.vcg-nav-link.active {
    background: var(--accent-line-strong);
    color: var(--on-accent);
    box-shadow: inset 3px 0 0 var(--on-accent);
}

.vcg-nav-link.disabled {
    color: var(--on-accent-muted);
    opacity: 0.5;
    cursor: not-allowed;
}

.vcg-nav-link.disabled:hover {
    background: none;
}

.vcg-nav-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcg-nav-icon {
    flex-shrink: 0;
}

/* Collapsed: the icon is the only content left (label text drops away), so it centers in the narrow rail
   instead of sitting at the row's usual left padding. */
.vcg-sidebar.collapsed .vcg-nav-link,
.vcg-sidebar.collapsed .vcg-nav-group-toggle {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.vcg-nav-caret {
    flex-shrink: 0;
    display: flex;
}

.vcg-nav-children {
    background: rgba(0, 0, 0, 0.16);
}

.vcg-nav-children .vcg-nav-link,
.vcg-nav-children .vcg-nav-group-toggle {
    padding-left: 2.1rem;
    font-size: 0.85rem;
}

.vcg-nav-children .vcg-nav-children .vcg-nav-link,
.vcg-nav-children .vcg-nav-children .vcg-nav-group-toggle {
    padding-left: 3rem;
}

/* The containing block a collapsed-rail flyout anchors to — real, confirmed fix: the flyout used to be
   position:fixed with no top value, so every flyout rendered at the same fixed spot regardless of which
   button opened it, and (since more than one could be open at once) multiple could visibly overlap. Each
   group now wraps its own button+flyout pair in this position:relative box, so .vcg-nav-flyout's
   position:absolute below anchors to the item that actually opened it. SidebarGroup.razor.cs's own Toggle()
   also only allows one flyout open at a time when collapsed, so overlap can't happen even across siblings. */
.vcg-nav-item {
    position: relative;
}

/* Collapsed-rail flyout — a group's children, click-triggered (not hover, for touch-device reliability),
   floating beside the narrow rail instead of an inline block there's no room to indent. */
.vcg-nav-flyout {
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 60;
    min-width: 200px;
    background: var(--accent);
    border: 1px solid var(--accent-line);
    box-shadow: var(--shadow-float);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.vcg-nav-flyout .vcg-nav-link,
.vcg-nav-flyout .vcg-nav-group-toggle {
    padding-left: 1rem;
}

/* Mobile drawer — below 900px (matching the one width-driven breakpoint this codebase already has,
   Default.razor.css, rather than a third value alongside the existing 640px list-card breakpoint, a
   different concern). The rail becomes a fixed slide-in panel; .vcg-nav-backdrop covers the rest of the
   viewport and closes it on click; the hamburger (TopStrip.razor) is what's visible to open it, since the
   rail itself is off-screen there. */
@media (max-width: 900px) {
    .vcg-header-burger {
        display: flex;
    }

    .vcg-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 70;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .vcg-shell.nav-open .vcg-sidebar {
        transform: translateX(0);
    }

    .vcg-nav-backdrop {
        position: fixed;
        inset: 0;
        background: var(--scrim);
        z-index: 65;
    }
}

/* ── Page header + chrome actions (U6's button-row convention — chrome right-aligned, icon+label; primary
   last/rightmost) — built for ContractSearch.razor (docs/vcg/PLAN.md §4), the first page to need it, but
   deliberately generic: any future page with a heading + a row of top-level actions (Print/Export today,
   whatever Cohort C's own list pages need next) reuses this rather than a second copy. ────────────────── */

.vcg-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.vcg-page-header .vcg-page-title {
    margin-bottom: 0;
}

.vcg-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.vcg-actions .vcg-btn-solid,
.vcg-actions .vcg-btn-outline {
    width: auto;
}

/* ── Detail-page header — legacy's own `.details-header` shape (HelpScreen.razor today, docs/vcg/PLAN.md §4;
   ContractDetails next in Cohort B needs the identical thing) — built shared from the start rather than
   page-scoped (U2/U4). The back button that used to live directly above this (`.vcg-back-button`/
   `.vcg-detail-back-standalone`, both removed 2026-09-25) is now VCG.UI's shared Breadcrumb/BreadcrumbItem
   instead — see docs/vcg/PLAN.md's breadcrumb write-up. ─────────────────────────────────────────────────── */

.vcg-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.vcg-detail-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
}

/* ── ContractDetails (docs/vcg/PLAN.md's ContractDetails write-up) — header tag chips, action group, the
   Details tab's field-group grid. Shared per U2/U4 since any future Cohort C/D detail page (same
   IVcgFieldGroupService/IHeaderTagChipService engine) needs the identical shapes. ─────────────────────── */

.vcg-detail-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.vcg-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

/* Colored 2026-09-05 (direct request — chips read as too pale against the page to stand out): accent-tinted
   background + a real accent border, not a neutral --line one, same "soft background, solid-color text"
   recipe the status badges elsewhere in this app already use (e.g. Active: --good-soft/--good). */
.vcg-tag-chip {
    display: inline-flex;
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid var(--accent);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
}

/* Real UI-cleanup follow-up (2026-09-04) — each field group is now its own .vcg-panel card (border + radius,
   no shadow per --shadow-float's own "never a card sitting flat" convention) with a proper header/body split,
   instead of a bare <h3> floating directly on the page background with a CSS grid underneath it. */
.vcg-detail-group {
    padding: 1.3rem 1.5rem;
    margin-bottom: 1rem;
}

.vcg-detail-group:last-child {
    margin-bottom: 0;
}

/* <summary> — the group's clickable header, collapsible-card follow-up (2026-09-05, Option A). Native
   <details> already gives every browser's own disclosure triangle; list-style/marker rules below remove it
   since a hand-drawn chevron (rotated via .vcg-detail-group[open]) replaces it, matching the mockup exactly. */
.vcg-detail-group-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
    list-style: none;
}

/* Border/spacing only when a body actually follows — a collapsed card has nothing to divide the header
   from, so it shouldn't show a divider line floating just above the card's own bottom edge. */
.vcg-detail-group[open] .vcg-detail-group-title {
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}

.vcg-detail-group-title::-webkit-details-marker {
    display: none;
}

.vcg-detail-group-chevron {
    color: var(--muted);
    flex-shrink: 0;
    transition: transform 0.15s;
    transform: rotate(-90deg);
}

.vcg-detail-group[open] .vcg-detail-group-chevron {
    transform: rotate(0deg);
}

/* ── Inline field/group editing (2026-09-05) — Site.Core's own real convention, not a modal (legacy VCG uses
   one; confirmed by reading its source this stays inline instead, matching Option A's whole spatial-continuity
   premise — see docs/vcg/PLAN.md's write-up for the full reasoning). ─────────────────────────────────────── */

/* Pushes the pencil/save/cancel controls to the far right of the group header row, regardless of the group
   name's own width — the plain <span> wrapping @group.GroupName has no class of its own to target directly,
   so this grows to fill the remaining space instead. */
.vcg-detail-group-title > span:first-of-type {
    flex: 1;
}

.vcg-detail-group-edit-actions {
    display: flex;
    gap: 0.35rem;
}

.vcg-detail-pencil-btn {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.vcg-detail-pencil-save {
    color: var(--good);
    background: var(--good-soft);
    border-color: transparent;
}

.vcg-detail-pencil-cancel {
    color: var(--muted);
}

.vcg-detail-label-row {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.vcg-detail-field-pencil {
    width: 20px;
    height: 20px;
    border-radius: var(--radius-sm);
    border: none;
    background: none;
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    opacity: 0.6;
}

.vcg-detail-field-pencil:hover {
    opacity: 1;
    background: var(--surface-2);
}

/* Site.Core's own real convention for "not editable, here's why" (confirmed by reading RecordField.razor) —
   plain dashed underline + cursor:help, never a greyed-out disabled input. */
.vcg-detail-value-locked {
    display: inline-block;
    border-bottom: 1px dashed var(--line);
    color: var(--muted);
    cursor: help;
}

.vcg-field-input {
    width: 100%;
    padding: 0.4rem 0.55rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--surface);
}

.vcg-field-textarea {
    width: 100%;
    padding: 0.5rem 0.6rem;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-family: var(--font-ui);
    color: var(--ink);
    background: var(--surface);
    min-height: 4rem;
    resize: vertical;
}

.vcg-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem 1.5rem;
}

.vcg-detail-field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.vcg-detail-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.vcg-detail-value {
    font-size: 0.92rem;
    color: var(--ink);
    overflow-wrap: break-word;
}

/* A second line under a field's value — the vendor address (Core_ShowVendorCustAddressInlineOnRecs). */
.vcg-detail-subvalue {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.85rem;
    color: var(--muted);
    overflow-wrap: break-word;
}

/* Loading state (U3) — a compact placeholder in the header's own text slot, not a full-width one, so the
   header doesn't visibly lurch once real content (a title + a row of tag chips) replaces it. */
.vcg-detail-header-skel {
    max-width: 22rem;
}

/* Key-dates row (2026-09-04 follow-up) — real content legacy's own ContractDetails shows (Effective/
   Expiration/Review, straight from tblContracts) that this page didn't have at all before. A stat-tile row
   (label small/muted above, value larger/bold below) rather than legacy's own flat "gray bar" with a
   right-aligned value — same three facts, a more modern presentation using this app's own token system. */
.vcg-detail-keydates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

/* Same tiles inside a container that already spaces its own children (the survey pages' header row). */
.vcg-detail-keydates.vcg-detail-keydates-flush {
    margin-bottom: 0;
}

.vcg-detail-keydate {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.vcg-detail-keydate-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--muted);
}

.vcg-detail-keydate-value {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--accent);
}

/* Generic anchored dropdown-menu popover — VersionPanel.razor/LanguagePicker.razor already built this exact
   shape locally (trigger button + click-away catcher + a menu of plain row buttons); promoted to shared here
   (2026-09-08, U4 — "extract the moment a SECOND real consumer needs it") for ContractDetails' own header
   "Print & Export Options" dropdown, the first non-icon-trigger, action-menu use of the pattern. Downward-
   opening (top: 100%+gap) like LanguagePicker's own header-anchored popover, not VersionPanel's footer-
   anchored upward one. LanguagePicker/VersionPanel keep their own already-working local copies for now rather
   than being risked in an unrelated pass — a future cleanup could migrate them onto these instead. */
.vcg-popover-root {
    position: relative;
    display: inline-flex;
}

.vcg-popover-catcher {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: transparent;
    border: none;
    cursor: default;
}

.vcg-popover-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 12rem;
    z-index: 901;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-float);
    padding: 0.35rem;
}

.vcg-popover-menu-item {
    display: block;
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    text-align: left;
    font-size: 0.88rem;
    font-family: var(--font-ui);
    color: var(--ink);
    cursor: pointer;
}

.vcg-popover-menu-item:hover {
    background: var(--surface-2);
}

.vcg-popover-menu-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

/* Made more eye-catching 2026-09-08 (direct request — the plain small muted text "looked very small and
   blended into the gray background from a distance"). A dashed-border panel gives it real presence instead of
   floating, easy-to-miss text; U2 — fixed once here rather than forked per page, so every current user
   (AssociatedGridTab's five tabs, ContractDetails' "not available yet" placeholders, DetailsFieldsTab's "no
   details configured") gets the same real visibility. */
.vcg-empty-state {
    color: var(--ink);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 2.6rem 1.5rem;
    background: var(--surface);
    border: 1.5px dashed var(--line);
    border-radius: var(--radius-md);
}

/* A row of field groups (a dropdown + a button, a few short inputs side by side) — first built for
   DocumentLibrary's own search bar shape, promoted here 2026-09-15 once Signatures/AddSignatureModal became a
   second, third, and fourth real consumer (U4's own "extract at the second real need" threshold). */
.vcg-field-row {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

/* A small inline file-type glyph inside a grid cell — first built page-scoped for DocumentLibrary
   (.vcg-doclib-filetype-icon), promoted here 2026-09-15 once Signatures became a second real consumer. */
.vcg-filetype-icon {
    vertical-align: middle;
}

/* A bordered section with its own title inside a page or tab — first built page-scoped for SolicitationDetails
   (My Response, Dutch Auction), promoted here (U4) once its Q&A panel's "Ask a Question" became a second real
   consumer (WI #6719 P5). */
.vcg-sol-section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.2rem;
}

.vcg-sol-section-title {
    margin: 0 0 0.8rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
}

/* ── List page shell (UI rule U5 — a full-page SfGrid-based list fills the page and scrolls internally,
   one shared wrapper, not a per-page improvisation). Built for ContractSearch.razor, the first SfGrid page
   in VCG.Web — generic enough for Cohort C's own list pages (Requests, MyCompany's Users grid, ...) to reuse
   without a second copy, matching how VCG.FOIA.Web's SearchResults.razor already pairs its own SfGrid table
   with a CSS-breakpoint-swapped stacked-card mobile fallback (.table-scroll/.results-cards there;
   .vcg-list-table-scroll/.vcg-list-cards here, same idea). ─────────────────────────────────────────────── */

/* No padding of its own — .vcg-main now owns real inset (2026-09-05, U7). This class used to carry the
   exact same padding value as its own local stopgap; removed in favor of the shared one rather than
   double-inseting. */
.vcg-list-filterbar {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.vcg-list-filterbar .vcg-field {
    margin-bottom: 0;
    min-width: 12rem;
}

.vcg-list-filterbar-actions {
    display: flex;
    gap: 0.6rem;
}

.vcg-list-filterbar-actions .vcg-btn-solid,
.vcg-list-filterbar-actions .vcg-btn-outline {
    width: auto;
}

.vcg-list-table-scroll {
    overflow-x: auto;
}

.vcg-list-detail-placeholder {
    padding: 0.9rem 1.2rem;
    color: var(--muted);
    font-size: 0.88rem;
}

/* ── SfTab content inset — every Details page's tab set (Details/Files & Attachments/Subtables/Surveys &
   Responses) renders its ContentTemplate directly into Syncfusion's own .e-content/.e-item, with no wrapper
   of our own to hang padding on — content (AttachmentsPanel's grid, etc.) butted up flush against the tab
   strip/panel edge. One global rule instead of a per-page/per-component fix, so it's automatic for every
   tab on every page, current and future. Same inset value as .vcg-modal-body's own content padding. */
.e-tab .e-content .e-item {
    padding: 1.2rem 1.4rem;
}

/* ── SfGrid fixed-width columns still fill the grid. Past 8 data columns a list page gives every column a fixed
   width (VCG.UI GridColumnSizing) so the set overflows and the grid scrolls sideways instead of squeezing each
   column to a sliver. When those widths add up to less than the grid (a wide screen), this stretches the table to
   the grid's width rather than leaving a blank strip on the right. Ported from Site.Core's CiDataGrid. */
.e-grid .e-headercontent table,
.e-grid .e-content table {
    min-width: 100%;
}

/* ── Skeleton (Components/Shared/Skeleton.razor) — U3's real answer, ported from Site.Core's own
   Components/Shared/Skeleton.razor + cobblestone-theme.css (their U4: "Put a <Skeleton> in the loading
   branch. Never a bare 'Loading…'"). ContractSearch.razor's own results-loading gate (_columns.Count == 0)
   is this component's first VCG.Web consumer; every future SfGrid list page (Cohort C) reuses it rather than
   a bespoke per-page placeholder — same reasoning as U2. Token mapping from Site.Core's --ci-* names:
   --ci-hover → --surface-2, --ci-hover-strong → --line, --ci-surface-sunk → --surface-2 (VCG has no separate
   sunk-surface token yet). ─────────────────────────────────────────────────────────────────────────────── */
.vcg-skel {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.vcg-skel::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
    animation: vcg-shimmer 1.3s infinite;
}

@keyframes vcg-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vcg-skel::after {
        animation: none;
    }
}

.vcg-skel-line {
    height: 0.78rem;
    border-radius: var(--radius-sm);
}

.vcg-skel-lines {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0.5rem 0.25rem;
}

.vcg-skel-grid {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--surface);
}

.vcg-skel-gridhead {
    height: 2.4rem;
    border-radius: 0;
    background: var(--line);
}

.vcg-skel-gridrow {
    height: 2.05rem;
    border-radius: 0;
    margin: 0.5rem 0.6rem;
}

.vcg-skel-form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem 1.5rem;
    padding: 0.25rem;
}

.vcg-skel-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.vcg-skel-input {
    height: 2.2rem;
}

/* Static placeholder (Skeleton Static="true"): an inert outline of a shape that is NOT loading — a shimmer
   there reads as a stalled request rather than "your turn". No VCG.Web consumer yet; ported alongside the
   rest of the component for the next page that needs it (e.g. a form waiting on a user pick), not dead code
   speculatively added on its own. */
.vcg-skel-static .vcg-skel::after {
    display: none;
}

.vcg-skel-static .vcg-skel {
    background: var(--surface-2);
}

/* Search/Reset/scope-change (ContractSearch.razor's own _isSearching) is a real DB round trip, not instant —
   dims whichever results view (desktop table or mobile cards) is currently visible so a tap always has an
   immediate, visible response, not just the Search button's own spinner. Shared here, not page-scoped (U2) —
   the next SfGrid list page to grow a server-side filter needs the exact same affordance. */
.vcg-list-results-busy {
    opacity: 0.5;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

/* Mobile card fallback — hidden by default (the table above is the desktop truth), swapped in below the
   same 640px breakpoint the rest of this file already uses for the header/footer. */
.vcg-list-cards {
    display: none;
}

.vcg-list-card {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    margin-bottom: 0.9rem;
}

.vcg-list-card-field {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.vcg-list-card-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.vcg-list-card-value {
    font-size: 0.9rem;
    color: var(--ink);
}

/* Mobile-only — the desktop SfGrid uses Syncfusion's own native pager (VcgServerGridAdaptor), which lives
   inside the SfGrid's own DOM, hidden below 640px alongside the rest of the table in favor of
   .vcg-list-cards. The card view still needs its own pagination control, hence this stays, mobile-only. */
.vcg-list-foot {
    display: none;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.2rem;
}

.vcg-list-range {
    color: var(--muted);
    font-size: 0.85rem;
    margin: 0;
}

.vcg-list-pagination {
    display: flex;
    gap: 0.4rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.vcg-list-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--ink);
    cursor: pointer;
}

.vcg-list-page-btn:hover:not(:disabled) {
    background: var(--surface-2);
}

.vcg-list-page-btn:disabled {
    color: var(--muted);
    cursor: not-allowed;
    opacity: 0.5;
}

@media (max-width: 640px) {
    .vcg-list-table-scroll {
        display: none;
    }

    .vcg-list-cards {
        display: block;
    }

    .vcg-list-foot {
        display: flex;
    }
}

/* ── Dynamic ADD-form field grid — DynamicAddFields.razor(.cs)'s own shared shape (promoted here from
   ClientSignup.razor.css 2026-09-11, the moment UserAdd arrived as this component's second real consumer —
   U4/U2: a shared component's CSS lives in the shared stylesheet, not one page's scoped file). Originally
   ClientSignup-only (`.signup-*`), renamed `.vcg-addform-*` on the move since it's no longer signup-specific.

   Field grid is a fixed 12-column grid with a fixed span per field, not an auto-fit/minmax grid — ported from
   Site.Core's RecordEditView.razor (.record-fields/.record-field/FieldWidthClass, checked directly at the
   user's own request) after a real, confirmed bug: auto-fit collapses to however many tracks fit and hands
   whatever's left on the last row to whichever field is alone on it, so a group with an odd field count — or
   just one field, like ClientSignup's own "Record Info"'s lone Account Number — stretched that field the full
   row width for no reason tied to what it holds. Site.Core hit this too ("a four-digit year was as wide as a
   contract title") and its own first fix introduced a SECOND bug worth not repeating: giving a "short" field
   type (a date, a number, a checkbox) a narrower CELL only lines columns up while short fields happen to
   arrive in neat pairs — one short field mid-group shifts every column after it (their own QA finding: "the
   columns don't align"). Their real fix, ported as-is: every field takes one whole, identically-sized column;
   a type that holds less caps its INPUT CONTROL's width instead (.vcg-addform-field-short below), so the
   column edges never move. .vcg-addform-field-full (memo/rich text/multiselect/slider) spans the whole row
   instead, since those need more than everything else, not less.
   Plain @media, not Site.Core's @container: every known consumer (ClientSignup, UserAdd) only ever renders as
   the full page, so there's no second width context to react to (U4 — build the general version only on a
   second real need). ─────────────────────────────────────────────────────────────────────────────────────── */
.vcg-addform-group {
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}

.vcg-addform-group-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 0.8rem;
}

.vcg-addform-field-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

.vcg-addform-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
    grid-column: span 6;
}

.vcg-addform-field.vcg-addform-field-full {
    grid-column: 1 / -1;
}

@media (min-width: 1024px) {
    .vcg-addform-field {
        grid-column: span 4;
    }
}

@media (max-width: 640px) {
    .vcg-addform-field {
        grid-column: 1 / -1;
    }
}

/* Width-by-type on the CONTROL, never the cell (see the block comment above) — targets every direct child
   except the label row and help note, so it catches a plain <input>, a checkbox, and whatever wrapper markup
   each Syncfusion picker renders, without a dedicated wrapper class in every branch of the field-type switch.
   No `::deep` here (unlike this rule's own pre-promotion form in ClientSignup.razor.css) — `::deep` only means
   anything inside Blazor's PER-COMPONENT CSS isolation (it tells the compiler not to append that component's
   own scope attribute past that point in the selector); a plain global stylesheet like this one was never
   scoped to begin with, so every selector here already reaches a Syncfusion component's rendered root with no
   special syntax needed. */
.vcg-addform-field.vcg-addform-field-short > *:not(.vcg-addform-label-row):not(.vcg-addform-help-note) {
    max-width: min(100%, 18rem);
}

.vcg-addform-required {
    color: var(--danger);
    margin-right: 0.2rem;
}

/* Field label design (Option A — docs/vcg/PLAN.md "Field label design" write-up; replaces the old
   VCGFloatingLabels floating-vs-static split, now deprecated/unread). One fixed label, always — never
   floating — that truncates only when a field group column genuinely can't fit the whole display name, with
   a click-to-expand affordance (JS-measured, see wwwroot/js/vcgFieldLabels.js) instead of a global toggle, and
   a real description surfaced as a small, click-to-pin help note instead of silently dropped. Ported from
   Site.Core's own RecordEditView.razor pattern, re-skinned in this app's own tokens. */
.vcg-addform-label-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    min-height: 1.15rem;
}

.vcg-addform-label {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    flex: 0 1 auto;
}

.vcg-addform-label-text {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vcg-addform-label-chevron {
    flex: none;
    width: 8px;
    height: 8px;
    color: var(--muted);
    transition: transform 0.15s ease;
}

/* Only a label JS actually measured as cut off (.is-truncated) or that the user expanded (.is-expanded)
   is clickable — a short label has no chevron and no pointer cursor, so nothing suggests it can be clicked. */
.vcg-addform-label.is-truncated,
.vcg-addform-label.is-expanded {
    cursor: pointer;
}

.vcg-addform-label.is-truncated:hover .vcg-addform-label-text,
.vcg-addform-label.is-truncated:hover .vcg-addform-label-chevron,
.vcg-addform-label.is-expanded:hover .vcg-addform-label-text,
.vcg-addform-label.is-expanded:hover .vcg-addform-label-chevron {
    color: var(--accent);
}

.vcg-addform-label.is-expanded .vcg-addform-label-text {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.3;
}

.vcg-addform-label.is-expanded .vcg-addform-label-chevron {
    transform: rotate(90deg);
}

.vcg-addform-field:has(.vcg-addform-label.is-expanded) .vcg-addform-label-row {
    align-items: flex-start;
}

/* Master "expand/collapse all" toggle (2026-09-16) — a deliberate complement to the per-field click above,
   not a replacement: one control per DynamicAddFields instance (one screen), covering every group it
   renders. Only shown when at least one label on that screen is genuinely truncated — see
   DynamicAddFields.razor's own `@if (_truncatedLabelFields.Count > 0)` guard. Styled consistently with
   .vcg-addform-help-btn's own quiet aesthetic (transparent at rest, --accent on hover/focus) but wider since
   it carries text, not just an icon — same tokens, no new colors (U8). */
.vcg-addform-toggle-all-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.vcg-addform-toggle-all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.35rem 0.75rem 0.35rem 0.6rem;
    cursor: pointer;
}

.vcg-addform-toggle-all:hover,
.vcg-addform-toggle-all:focus-visible {
    color: var(--accent);
    border-color: var(--accent);
    background: var(--accent-soft);
}

.vcg-addform-toggle-all svg {
    flex: none;
    width: 10px;
    height: 10px;
    transition: transform 0.15s ease;
}

.vcg-addform-toggle-all.is-all-expanded svg {
    transform: rotate(180deg);
}

.vcg-addform-help-btn {
    flex: none;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    padding: 0;
}

.vcg-addform-help-btn:hover,
.vcg-addform-help-btn:focus-visible {
    border-color: var(--line);
    color: var(--accent);
    background: var(--accent-soft);
}

.vcg-addform-help-note {
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--muted);
    background: var(--accent-soft);
    border-left: 2px solid var(--accent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.4rem 0.6rem;
}
