/* Shared design tokens — Admin console (.lr-*), Workspace shell/plugins, Lab Ops portal.
   Load before ui-shell.css, admin.css, or portal pages. Typography + admin chrome + sign-in. */

:root {
  --lc-font-sans: system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Default document text (Admin + Workspace shells) */
  --lc-size-root: 16px;

  /* Sidebar navigation (Admin + Workspace) */
  --lc-size-nav-section: 18px;
  --lc-size-nav-item: 16px;
  --lc-nav-item-padding-y: 9px;
  --lc-nav-item-padding-x: 10px;
  --lc-nav-item-gap: 10px;
  --lc-nav-item-radius: 10px;

  /* Main report / page chrome */
  --lc-size-page-title: 28px;
  --lc-weight-page-title: 700;

  --lc-size-app-brand-title: 22px;
  --lc-weight-app-brand-title: 600;

  --lc-size-page-subtitle: 14px;
  --lc-weight-page-subtitle: 600;

  /* In-card section titles (Admin .lr-section-title, Workspace card chrome) */
  --lc-size-section-title: 18px;
  --lc-weight-section-title: 600;

  /* Body copy under a page title (Workspace plugin ledes; optional elsewhere) */
  --lc-size-section-lede: 14px;

  /* Admin form kit + Workspace controls (match .lr-input).
     Field labels are BOLD (700) so labels read as emphasized, not as muted grey
     body text; input/select values track table density (13px) so values stay
     compact beside the tables. Shared by BOTH consoles — no per-shell override.
     (2026-07-20: restored to 700 after the W1 unbold flattened important labels
     into grey across both shells; the many `var(--lc-weight-field-label, 700)`
     fallbacks throughout the CSS already assumed this.) */
  --lc-size-field-label: 16px;
  --lc-weight-field-label: 700;
  --lc-size-control-input: var(--lc-size-table-body, 13px);
  /* Bold weight for detail-pane headings ("Selected X"). Shared constant. */
  --lc-weight-detail-title: 700;

  /* Explanatory copy below a control within .lr-field (.lr-field-hint) */
  --lc-field-hint-indent: 10px;

  /* Version filter inputs: placeholder "exact" + number spinners (Admin + Workspace) */
  --lc-version-criteria-input-width: 100px;

  /* Multi-line form textareas (Admin detail panes; opt-in via .lr-input--textarea) */
  --lc-textarea-width: 600px;
  /* Read-only scalar values in the same panes (Created/Updated stamps, locked
     name, last-4). Tracks the textarea so a detail column is one width. */
  --lc-readonly-value-width: var(--lc-textarea-width);

  /* Admin Data Explorer → Documents: primary row Group <select> (was 140px; +10px) */
  --de-explorer-documents-group-select-width: 150px;

  --lc-size-table-body: 13px;
  --lc-size-table-header: 11px;
  --lc-weight-table-header: 800;
  --lc-letter-spacing-table-header: 0.05em;
  /* Table-header BAND — one source of truth for BOTH shells' sticky table
     headers so the heading row stands out crisply from the body rows. Applied
     by admin's .lr-table th and the shared .ls-table th (used by admin Data
     Explorer + all Workspace answer-set tables). The band is fully opaque so
     the sticky header covers scrolled rows and text renders sharply. */
  --lc-bg-table-header: linear-gradient(180deg, rgb(51, 65, 85), rgb(37, 49, 71));
  --lc-color-table-header: #ffffff;
  --lc-text-shadow-table-header: 0 1px 0 rgba(0, 0, 0, 0.55);

  /* Chevrons, uppercase badges, tiny meta (Admin tree toggles; Workspace expand pills) */
  --lc-size-micro: 10px;
  --lc-size-badge-tiny: 9px;

  --lc-size-primary-button: 14px;
  --lc-weight-primary-button: 800;

  /* Monospace / code viewers (<pre>, policy JSON, CodeMirror-style areas) */
  --lc-size-code: 13px;
  --lc-font-mono: ui-monospace, Menlo, Monaco, Consolas, "Courier New", monospace;

  /* Dense key-value tables (Admin policy panels; optional elsewhere) */
  --lc-size-kv-table: 12px;

  /* Shared semantic colors (sign-in + shell hints; pair with app backgrounds) */
  --lc-color-text-main: #e5e7eb;
  --lc-color-text-muted: #9ca3af;
  --lc-color-text-soft: #94a3b8;
  --lc-color-label: #cbd5e1;
  /* Explanatory copy that describes what a page/card DOES — page-title subtitles
     (Admin #pageSubtitle, Workspace .section-heading p), card subtitles, and card
     descriptive paragraphs (e.g. the Rate Limiting policy notes). ONE shared tone
     for BOTH consoles so the "what this is" line reads as real, readable copy rather
     than the throwaway grey used for tiny hints/disabled/meta. Matched to the main
     body text (--lc-color-text-main / admin --text) so descriptions read at full
     strength. Tune the readability of all descriptive copy here in one place.
     (2026-07-20 review.) */
  --lc-color-text-explanatory: var(--lc-color-text-main, #e5e7eb);
  --lc-color-error: #f87171;
  --lc-color-success: #4ade80;
  /* Warning / amber (session-expiry countdown warn state, pre-danger hints) */
  --lc-color-warning: #fbbf24;
  --lc-color-warning-soft-bg: rgba(251, 191, 36, 0.12);
  --lc-color-warning-soft-border: rgba(251, 191, 36, 0.4);
  /* Call-graph dynamic-match orange: variable-named calls that resolve to a
     known routine, the unreviewed review pill, Cytoscape dynamic hubs. */
  --lc-color-dynamic-match: #ffcc80;
  --lc-color-dynamic-match-soft-bg: rgba(255, 204, 128, 0.2);
  /* Call-graph miss red: missing callee, dynamic-miss, graph error text.
     Unifies the former #ef9a9a / #ff9e9e / #e57373 / #ff8080 family.
     Distinct from --lc-color-error. */
  --lc-color-dynamic-miss: #ef9a9a;
  --lc-color-dynamic-miss-soft-bg: rgba(239, 154, 154, 0.18);
  --lc-color-dynamic-miss-soft-border: rgba(239, 154, 154, 0.45);
  --lc-color-dynamic-miss-line: rgba(239, 154, 154, 0.85);
  /* Call-graph reviewed green: reviewed pill, rollup "match" chip. Soft
     surfaces share rgb(129, 199, 132). Distinct from --lc-color-success. */
  --lc-color-reviewed: #a5d6a7;
  --lc-color-reviewed-soft-bg: rgba(129, 199, 132, 0.18);
  --lc-color-reviewed-soft-border: rgba(129, 199, 132, 0.45);
  --lc-color-reviewed-focus: rgba(129, 199, 132, 0.65);
  /* Muted success/danger surfaces (Data Explorer row badges, compact pills) */
  --lc-color-success-soft-bg: rgba(34, 197, 94, 0.15);
  --lc-color-success-soft-border: rgba(34, 197, 94, 0.35);
  --lc-color-danger-soft-bg: rgba(239, 68, 68, 0.12);
  --lc-color-danger-soft-border: rgba(239, 68, 68, 0.3);
  /* Stronger danger edge (icon hover, emphasis) */
  --lc-color-danger-strong-border: rgba(239, 68, 68, 0.45);
  /* Success tints (bootstrap `.ok`, status dot) — distinct from pill `--lc-color-success-soft-*` */
  --lc-color-success-pale: #d1fae5;
  --lc-color-success-tint-bg: rgba(34, 197, 94, 0.1);
  --lc-color-success-tint-border: rgba(34, 197, 94, 0.25);
  --lc-color-success-solid: #22c55e;
  --lc-color-success-glow: rgba(34, 197, 94, 0.9);

  /* Sky accent — rgba(56, 189, 248, α) */
  --lc-accent-07: rgba(56, 189, 248, 0.07);
  --lc-accent-08: rgba(56, 189, 248, 0.08);
  --lc-accent-10: rgba(56, 189, 248, 0.1);
  --lc-accent-12: rgba(56, 189, 248, 0.12);
  --lc-accent-14: rgba(56, 189, 248, 0.14);
  --lc-accent-15: rgba(56, 189, 248, 0.15);
  --lc-accent-16: rgba(56, 189, 248, 0.16);
  --lc-accent-18: rgba(56, 189, 248, 0.18);
  --lc-accent-22: rgba(56, 189, 248, 0.22);
  --lc-accent-28: rgba(56, 189, 248, 0.28);
  --lc-accent-30: rgba(56, 189, 248, 0.3);
  --lc-accent-35: rgba(56, 189, 248, 0.35);
  --lc-accent-45: rgba(56, 189, 248, 0.45);
  --lc-accent-55: rgba(56, 189, 248, 0.55);
  --lc-accent-60: rgba(56, 189, 248, 0.6);
  --lc-accent-65: rgba(56, 189, 248, 0.65);
  --lc-accent-70: rgba(56, 189, 248, 0.7);
  --lc-accent-75: rgba(56, 189, 248, 0.75);
  --lc-accent-85: rgba(56, 189, 248, 0.85);
  --lc-accent-90: rgba(56, 189, 248, 0.9);
  --lc-accent-92: rgba(56, 189, 248, 0.92);
  --lc-accent-95: rgba(56, 189, 248, 0.95);

  /* Button border — width AND resting colour, shared by every `.ls-btn` tier
     and by the modal copies in workspaceUi/shared/dom.css.

     2px MATCHES `.ls-input` / `.ls-select` (line 242 of ls-form-controls.css),
     so a button and the field beside it carry the same weight of edge. The
     colours stay different on purpose: fields use `--ls-border-strong`
     (203,213,225 at 0.55), buttons the slate 148,163,184 below.

     The width is a token because ENABLED and DISABLED must use the same one.
     A disabled button that narrowed its border would change size on toggle and
     shift everything beside it, and Connect to Your SOR toggles its buttons on
     every readiness read. `.ls-btn.primary` spends this width on a TRANSPARENT
     border rather than dropping it, so the accent tier is the same box as the
     neutral tier (the background paints under the border, so the gradient still
     fills the whole button). */
  --lc-btn-border-width: 2px;
  --lc-btn-border: rgba(148, 163, 184, 0.75);

  /* Disabled button — ONE treatment for every `.ls-btn` tier. A tier says which
     action leads, and a button that cannot be clicked leads nothing, so primary
     and secondary land here together.

     The border is kept, at the SAME WIDTH as enabled, because a disabled
     control still has to read as a BUTTON and must not resize when it toggles.
     Dropping it outright turned Change your SOR and Truncate into plain labels.
     Only the alpha carries the difference: 0.4 against the enabled 0.75, which
     at 2px is an unmistakable edge and still plainly weaker. Two earlier passes
     at 1px (0.22, then 0.45) were both too faint to read as an edge at all,
     which is what moved the border off 1px. It went 3px first, and 0.4 is the
     partial compensation for coming back down to 2px. The real enabled-versus-
     disabled signal is the text (0.4 against 0.94) plus `cursor: not-allowed`.

     Tokens rather than literals because four rules restate this treatment: the
     two tier rules in ls-form-controls.css and two modal rules in
     workspaceUi/shared/dom.css. Those exist because a later, equal-specificity
     primary rule would otherwise repaint the accent gradient, and they had
     already drifted to a different grey once. */
  --lc-btn-disabled-bg: rgba(255, 255, 255, 0.02);
  --lc-btn-disabled-border: rgba(148, 163, 184, 0.4);
  --lc-btn-disabled-text: rgba(226, 232, 240, 0.4);

  /* Console blue — rgba(58, 160, 255, α). The Operational Settings console's own accent (active tab
     underline, selected row, active tier tab); distinct from the sky accent above. */
  --lc-accent-console-blue: #3aa0ff;
  --lc-accent-console-blue-16: rgba(58, 160, 255, 0.16);
  --lc-accent-console-blue-18: rgba(58, 160, 255, 0.18);
  --lc-accent-console-blue-55: rgba(58, 160, 255, 0.55);

  /* Sign-in card + controls (Admin / Workspace signIn pages) */
  --lc-border-card: 1px solid rgba(255, 255, 255, 0.08);
  --lc-border-control: 1px solid rgba(255, 255, 255, 0.12);
  --lc-bg-input: #071023;
  --lc-bg-card: rgba(15, 23, 42, 0.95);
  --lc-radius-card: 14px;
  --lc-radius-control: 10px;
  --lc-radius-toast: 14px;
  --lc-padding-card: 18px 20px;
  --lc-padding-input: 10px 12px;
  --lc-padding-button-y: 12px;
  --lc-padding-button-x: 22px;

  /* Modal surface (.ls-modal-content) shared by BOTH shells — Workspace gets the
     rule from workspaceUi/shared/dom.css, Admin from webShared/ui-ls-modal-shell.css.
     Those two rule blocks are mirrored per-bundle, so the VALUES live here once to
     stop them drifting. Defined border + layered, down-right offset shadow for a
     lifted 3D surface (subtle top highlight + inner hairline define the edge). */
  /* Backdrop scrim behind a modal. Deliberately a translucent SLATE, not black:
     a dark drop shadow can only darken, so on a near-black scrim it is invisible.
     A slate scrim gives the offset shadow tonal room to read as a 3D lift. */
  --lc-scrim-modal: rgba(30, 41, 59, 0.60);
  --lc-border-modal: 2px solid rgba(255, 255, 255, 0.42);
  /* Directional (down-right) offset shadow, PowerPoint rounded-rectangle style:
     blur kept SMALLER than the offset so it lands to one corner instead of
     blooming an all-around halo. A tight contact shadow anchors the near edge. */
  --lc-shadow-modal:
    2px 2px 4px rgba(0, 0, 0, 0.45),
    10px 10px 14px rgba(228, 233, 240, 0.22);

  /* Admin console report kit (.lr-card, .lr-input, .lr-table-wrap) */
  --lc-radius-admin-card: 8px;
  --lc-radius-admin-input: 8px;
  --lc-radius-admin-button: 12px;
  --lc-radius-admin-table-wrap: 12px;
  --lc-border-color-strong: rgba(203, 213, 225, 0.55);
  /* Shared border color, light slate. ONE value drawn on by BOTH shells (Admin +
     Workspace) for card/panel borders and nav chrome. Shell-neutral name because
     the value is not admin-specific. Tune the border color here in one place. */
  --lc-border-color-standard: rgba(203, 213, 225, 0.35);
  /* Navigation chrome border: the sidebar's outer edge and the divider under the
     identity pill. Full shorthand (width + style + color) so consumers write
     `border-*: var(--lc-border-nav)`. Shared by BOTH shells so the nav reads
     identically. Tune the width here; the color via --lc-border-color-standard. */
  --lc-border-nav: 2px solid var(--lc-border-color-standard);
  /* Canonical card/panel border shared by BOTH shells (Admin .lr-card +
     Workspace .ls-card). 2px light slate, same color source as --lc-border-nav
     so cards and nav chrome read identically. */
  --lc-border-card-standard: 2px solid var(--lc-border-color-standard);
  --lc-border-color-row: rgba(203, 213, 225, 0.25);
  --lc-border-color-focus: var(--lc-accent-85);
  --lc-border-color-soft: rgba(36, 48, 68, 0.7);
  --lc-border-color-table-cell: rgba(31, 41, 55, 0.9);
  --lc-bg-admin-input: rgba(2, 6, 23, 0.65);
  --lc-bg-admin-page: #020617;
  /* Admin shell (admin.html layout: sidebar, page header, chrome band) */
  --lc-bg-admin-chrome: #071022;
  --lc-bg-admin-panel-weak: rgba(2, 6, 23, 0.35);
  --lc-bg-admin-panel-mid: rgba(2, 6, 23, 0.55);
  --lc-bg-admin-sidebar-top: rgba(2, 6, 23, 0.85);
  --lc-bg-admin-sidebar-bottom: rgba(2, 6, 23, 0.55);
  --lc-border-shell: rgba(36, 48, 68, 0.45);
  --lc-border-shell-muted: rgba(36, 48, 68, 0.35);
  --lc-bg-control-hover: #0b1220;

  /* Main column gutter: Workspace `.content`, Admin `.main` — one place to tune inset */
  --lc-shell-content-inset: 8px;

  /* Shared shell sidebar width — Workspace 280px; Admin 300px (brand title room) */
  --lc-shell-sidebar-width: 280px;
  --lc-shell-sidebar-width-admin: 300px;
  --lc-shell-sidebar-collapsed-width: 35px;
  --lc-shell-rail-sign-out-icon-size: 17px;

  /* Draggable split/resize handles — one source of truth so every splitter
     (vertical or horizontal) is the same thickness: Admin Data Explorer
     list|detail (.de-col-resizer), Process Control table|logs
     (.pm2-split-divider). The track value is also read by JS via
     getComputedStyle in adminUi/shared/twoColResizer.js to size the grid track. */
  --lc-splitter-track: 10px;      /* grab area / grid track the handle occupies */
  --lc-splitter-line: 2px;        /* visible hairline at rest */
  --lc-splitter-line-active: 6px; /* visible hairline on hover / drag (50% wider than rest baseline) */
  --lc-splitter-active-color: var(--lc-accent-45, rgba(56, 189, 248, 0.45)); /* softened accent on hover / drag */

  /* Workspace shell (ui-shell.css) — app frame, cards, sky accent */
  --lc-bg-app-panel: #02081a;
  --lc-bg-app-elevated-b: #020817;
  --lc-bg-app-panel-alt: #020819;
  --lc-bg-app-panel-deep: #02081f;
  --lc-bg-brand-mix: #0f172a;
  --lc-border-muted-solid: #1e293b;
  --lc-color-accent: #38bdf8;
  --lc-color-accent-strong: #0ea5e9;
  /* Primary-button gradient lower stop (matches --lc-color-accent-strong @ 85% alpha) */
  --lc-accent-strong-85: rgba(14, 165, 233, 0.85);
  --lc-color-accent-light: #bae6fd;
  /* Near-white foreground on cyan-tint control surfaces */
  --lc-color-accent-ink: rgba(224, 242, 254, 0.95);
  --lc-shadow-app-shell: 0 18px 45px rgba(15, 23, 42, 0.85);
  --lc-border-app-ring: rgba(148, 163, 184, 0.25);
  --lc-border-brand-glow: var(--lc-accent-70);
  --lc-radius-app-shell: 28px;
  --lc-radius-brand-asset: 20px;
  --lc-radius-app-card: 16px;

  /* Use sparingly (e.g. one-off emphasis), not default page titles */
  --lc-weight-emphasis: 900;

  /* Workspace `.ls-*` palette — moved from workspaceUi/shared/section.css :root so
     the shared ui-answer-table.css rules (.ls-card, .ls-table, …) resolve correctly
     when loaded by the Admin shell, which does not load section.css. */
  --ls-border: rgba(148, 163, 184, 0.22);
  --ls-border-strong: rgba(203, 213, 225, 0.55);
  --ls-border-focus: var(--lc-accent-85);
  --ls-surface: rgba(255, 255, 255, 0.03);
  --ls-surface-2: rgba(255, 255, 255, 0.06);
  /* Between --ls-surface and --ls-surface-2 (row hover, tree toggle well) */
  --ls-surface-hover: rgba(255, 255, 255, 0.04);
  --ls-surface-embed: rgba(255, 255, 255, 0.05);
  --ls-text-soft: rgba(255, 255, 255, 0.72);
  /* Opaque fill for sticky .ls-card-header / .ls-table th (avoids backdrop-filter halo). */
  --ls-sticky-chrome-bg: #0a1223;
}
