/**
 * Frontline Design System (FDS) — local token layer (BSEHS-83277)
 *
 * Values and names are taken directly from the real "Frontline Design
 * System 2.0" Figma file (fileKey 8tI1bsAac6hGJaLqKPiMAM), Library Status:
 * Draft, v2.0.0. See docs/design/BSEHS-83277-figma-v2-reconciliation.md for
 * the full pull methodology and delta report.
 *
 * There is no v1 to support: the earlier version of this file was built
 * from an unpublished Confluence draft before FDS 2.0 existed, and nothing
 * in this app references any of those names or values yet (layout wiring
 * and the CSS/view migration — Items 2's wiring step, 3, 4 — haven't
 * started). This file now targets FDS 2.0's real token names directly
 * (`color/feedback/success` -> `--fds-color-feedback-success`,
 * `spacing/xs` -> `--fds-spacing-xs`, etc.) rather than carrying forward a
 * provisional naming scheme invented before real values existed.
 *
 * Sections that existed only as unvalidated boilerplate — with no basis in
 * either FDS 2.0 or this app's actual CSS (verified by grep across all 5
 * audited files) — were removed rather than carried forward:
 *   - Sidebar and Top Bar color families: this app has no sidebar or
 *     topbar chrome at all.
 *   - `status-neutral` / a "neutral" pill color: never used anywhere in
 *     the app's CSS, and FDS 2.0's own "Neutral" badge intent doesn't use
 *     a distinct color either (it just uses the muted surface + primary
 *     text colors below).
 *   - Pill *-border colors for every intent: the app's real badge/pill
 *     styling (`.confidence-badge` in invoice-review.css) only ever uses
 *     a tinted background + text color, never a border.
 *   - `radius-badge`: FDS 2.0 badges use `radius-full` (they're
 *     pill-shaped) — there's no separate "badge radius" concept.
 *
 * Out of scope here (see BSEHS-83277): font-family migration — FDS 2.0
 * confirms a dual-font system (Geist for headings, Inter for body), but
 * font delivery isn't defined yet, so this file migrates size/weight only.
 */

:root {
	/* ---- Color: Brand ---- */
	--fds-color-brand-primary: #9e00ae; /* confirmed via Badge, Button, Popover, Dialog components — a separate "colors/primary" (#8b3fb3) exists but only on a doc-authoring utility component, not real product components; not authoritative */
	--fds-color-brand-primary-foreground: #ffffff;
	--fds-color-brand-secondary: #ebe7eb; /* confirmed via Button */
	--fds-color-brand-secondary-foreground: #1d161e;

	/* ---- Color: Surface ---- */
	--fds-color-surface-background: #fbfbfb; /* UNCONFIRMED — FDS 2.0's color/background/page resolved to #f3f1f3 in the one context pulled, identical to muted/accent there, so it's ambiguous whether "page" is genuinely distinct; needs a cleaner signal before changing */
	--fds-color-surface-foreground: #0c090c; /* confirmed */
	--fds-color-surface-card: #ffffff; /* confirmed */
	--fds-color-surface-card-foreground: #0c090c;
	--fds-color-surface-muted: #f3f1f3; /* confirmed */
	--fds-color-surface-muted-foreground: #79697b; /* confirmed */
	--fds-color-surface-accent: #f3f1f3; /* confirmed via Button */
	--fds-color-surface-accent-foreground: #1d161e; /* confirmed via Button */
	--fds-color-surface-popover: #ffffff; /* confirmed via Popover/Dialog */

	/* ---- Color: Interface ---- */
	--fds-color-border-default: #d8d5d8; /* confirmed via 3 independent components (border/default, interface/border, sidebar/border all agree) */
	--fds-color-border-focus: #c2bcc3; /* confirmed via Focus state doc, Popover, Button */
	--fds-color-border-input: #d8d5d8; /* assumed to track border-default; not independently confirmed as a distinct input-border value */

	/* ---- Color: Feedback (status) ---- */
	--fds-color-feedback-success: #008a34; /* confirmed via Badge (Success/Primary) */
	--fds-color-feedback-success-foreground: #ffffff;
	--fds-color-feedback-success-subtle: #ecfdf3; /* confirmed via Badge (Success/Secondary) */
	--fds-color-feedback-warning: #b95a00; /* confirmed via Badge (Warning/Primary) */
	--fds-color-feedback-warning-foreground: #ffffff;
	--fds-color-feedback-warning-subtle: #fff8eb; /* confirmed via Badge (Warning/Secondary) */
	--fds-color-feedback-error: #e7000b; /* confirmed via Badge + Button (Destructive/Primary, color/error/default) */
	--fds-color-feedback-error-foreground: #ffffff;
	--fds-color-feedback-error-subtle: #fff2f2; /* confirmed via Badge (Destructive/Secondary) */
	--fds-color-feedback-error-ring: #ffa2a5; /* confirmed via Button — likely an invalid-field focus ring; no current call site mapped yet */
	--fds-color-feedback-info: #155dfc; /* confirmed via Badge (Info/Primary) */
	--fds-color-feedback-info-foreground: #ffffff;
	--fds-color-feedback-info-subtle: #eff6ff; /* confirmed via Badge (Info/Secondary) */

	/* ---- Color: Queue status pills (BSEHS-84532) ----
	   NOT sourced from the DS 2.0 Figma file -- pixel-sampled directly from a reference
	   screenshot the user provided as the authoritative target look (explicit call: match
	   the screenshot exactly, even where it diverges from --fds-color-feedback-* above).
	   Values are exactly Tailwind's default 100/700 palette per hue (confirmed for amber by
	   sampling; the others follow the same convention) -- consistent with this being a
	   Lovable/Tailwind-authored mockup rather than an FDS 2.0 export. Used only for the
	   Invoice Queue's Status-column badges and the Unassigned owner badge -- do not reuse
	   elsewhere without re-confirming against that context. */
	--fds-color-queue-status-warning-bg: #fef3c7;
	--fds-color-queue-status-warning-text: #b45309;
	--fds-color-queue-status-success-bg: #dcfce7;
	--fds-color-queue-status-success-text: #15803d;
	--fds-color-queue-status-error-bg: #fee2e2;
	--fds-color-queue-status-error-text: #b91c1c;
	--fds-color-queue-status-info-bg: #dbeafe;
	--fds-color-queue-status-info-text: #1d4ed8;
	--fds-color-queue-status-secondary-bg: #f3f4f6;
	--fds-color-queue-status-secondary-text: #374151;

	/* ---- Color: AI ---- */
	/* Reserved for AI-assisted experiences only per FDS guidance (this app
	   has one: the feature-flagged "Ask AI" search POC in manifests/list.hbs
	   and app-configuration.hbs) — do not reuse for generic
	   "selected"/"active" states. */
	--fds-color-ai-foreground: #7c3aed; /* confirmed via Button — a genuinely distinct AI color, not derived from brand-primary */
	/* No confirmed FDS 2.0 surface/border/highlight AI colors yet. The
	   app's one real "selected/active" tint needing a home
	   (app-configuration.css .mode-option.active, #f3eef9) should derive
	   from --fds-color-brand-primary at low alpha per the audit's own
	   recommendation — not invented here, since the exact alpha is a
	   design decision, not a value FDS data can confirm. */

	/* ---- Typography: size + weight only (font-family migration deferred) ---- */
	/* FDS 2.0 confirms a dual-font system: Geist for headings, Inter for
	   body — font-family declarations are still untouched pending font
	   delivery being defined (see file header). */
	--fds-font-size-page-title: 32px; /* confirmed via FDS 2.0 Heading/H1 (32/600) */
	--fds-font-weight-page-title: 600;
	--fds-font-size-kpi-value: 20px; /* UNCONFIRMED against FDS 2.0 */
	--fds-font-weight-kpi-value: 600;
	--fds-font-size-section-title: 16px; /* UNCONFIRMED */
	--fds-font-weight-section-title: 600;
	--fds-font-size-label: 14px; /* UNCONFIRMED */
	--fds-font-weight-label: 500;
	--fds-font-size-body: 14px; /* confirmed via FDS 2.0 Body/Small */
	--fds-font-weight-body: 400;
	/* BSEHS-84532: confirmed via get_design_context on the DataTableCard node
	   (fileKey 0qOLtQzlt21fANETsqu2iD, node 271:8347) -- table cell text uses
	   Body/Medium (16/24 Inter Regular), a size/line-height pair with no other
	   token in this file until now. */
	--fds-font-size-body-medium: 16px;
	--fds-line-height-body-medium: 24px;
	--fds-font-size-body-large: 18px; /* confirmed via FDS 2.0 Body/Large */
	--fds-font-weight-body-large: 400;
	--fds-font-size-label-small: 12px; /* confirmed via FDS 2.0 Label/Small */
	--fds-font-weight-label-small: 500;
	--fds-font-size-metadata: 12px; /* confirmed via FDS 2.0 Caption */
	--fds-font-weight-metadata: 400;

	/* ---- Spacing ---- */
	/* FDS 2.0's real scale: a 10-step numeric progression, confirmed
	   directly across Badge, Card, Popover, and a doc-utility component. */
	--fds-spacing-none: 0px;
	--fds-spacing-xxs: 2px;
	--fds-spacing-xs: 4px;
	--fds-spacing-sm: 6px;
	--fds-spacing-md: 8px;
	--fds-spacing-lg: 10px;
	--fds-spacing-xl: 12px;
	--fds-spacing-2xl: 16px;
	/* fds-spacing-3xl not yet confirmed — between 16 and 24 */
	--fds-spacing-4xl: 24px;
	--fds-spacing-5xl: 32px;

	/* ---- Radius ---- */
	--fds-radius-control: 8px; /* PROVISIONAL — no confirmed single FDS 2.0 value; the Tailwind-alias "rounded-lg" signal was inconsistent (8 on a doc utility, 10 on Card). Using the lower value as a placeholder for buttons/inputs/selects until FDS 2.0 gives a cleaner signal — revisit before this is treated as final. */
	--fds-radius-md: 12px; /* confirmed via Card */
	--fds-radius-lg: 16px; /* confirmed via Dialog — larger tier than md, used for larger surfaces */
	--fds-radius-full: 9999px; /* confirmed via Badge, Button */
	--fds-radius-none: 0px; /* confirmed */

	/* ---- Shadows ---- */
	/* Confirmed directly from the components that use each tier in FDS 2.0:
	   Card -> xs, Popover -> the dropdown/tooltip tier (FDS 2.0 names it
	   "SM"), Dialog -> lg. sm/lg are layered (two stacked drop-shadows). */
	--fds-shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.05);
	--fds-shadow-sm: 0 1px 2px -1px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
	--fds-shadow-lg: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);

	/* ---- App-specific extensions (no FDS equivalent) ---- */
	/* Real values from this app's own CSS, confirmed by direct grep —
	   independent of FDS version, kept at current values. */
	--app-color-surface-inverse: #1f2937; /* tooltip backgrounds (was #1f2937 and #2c3e50) */
	--app-color-surface-inverse-foreground: #f8fafc;
	--app-color-accent-indigo: #6c63ff; /* confirmed: invoice-review.css .confidence-field .btn-link / .confidence-undo-btn:hover */
	--app-color-accent-teal: #117a8b; /* email opt-in panel accent, no FDS analogue */
	--app-color-accent-teal-icon: #0f5f6b;
}
