/* PRIDE design tokens - the theme contract (see handoff 05-DESIGN-SYSTEM.md).
   Brand + accent are swappable: everything reads these variables. */
:root {
    /* Brand / accent */
    --accent: #F3CC2E;            /* primary accent (amber on customer/operator) */
    --accent-deep: #9A6E00;       /* dark amber - readable accent text/eyebrows on light (admin) */
    --on-accent: #0A0F0D;         /* text on accent */
    --green: #15E08F;             /* success / ready / live / go */
    --green-deep: #0BB572;
    --amber: #F3CC2E;             /* in production / heat-press */
    --red: #FF4D3F;               /* errors, low stock, cancel */
    --btn-secondary: #5BAEE6;     /* light blue - secondary/neutral buttons (the ones that had no fill) */

    /* Surfaces */
    --ink: #0A0F0D;
    --ink-2: #14201B;
    --bg: #F5F5F2;
    --brand-black: #0A0F0D;
    --brand-paper: #F5F5F2;
    --card: #FFFFFF;
    --card-soft: #ECECE6;
    --line: rgba(10, 15, 13, 0.09);
    --label: #2B3F66;             /* operator field-label blue-grey */

    /* Ink alpha ramp (ink at opacity) */
    --ink-04: rgba(10, 15, 13, 0.04);
    --ink-05: rgba(10, 15, 13, 0.05);
    --ink-06: rgba(10, 15, 13, 0.06);
    --ink-08: rgba(10, 15, 13, 0.08);
    --ink-10: rgba(10, 15, 13, 0.10);
    --ink-12: rgba(10, 15, 13, 0.12);
    --ink-15: rgba(10, 15, 13, 0.15);
    --ink-20: rgba(10, 15, 13, 0.20);
    --ink-25: rgba(10, 15, 13, 0.25);
    --ink-30: rgba(10, 15, 13, 0.30);
    --ink-40: rgba(10, 15, 13, 0.40);
    --ink-55: rgba(10, 15, 13, 0.62); /* muted-text token: nudged above 0.55 so 14px labels clear WCAG AA 4.5:1 on the paper bg (name is legacy) */
    --ink-60: rgba(10, 15, 13, 0.60);
    --ink-70: rgba(10, 15, 13, 0.70);
    --ink-85: rgba(10, 15, 13, 0.85);

    /* Type */
    --font-body: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    /* One legible font (Open Sans) for all data/headings/labels across the site - size and
       weight carry the hierarchy. Archivo Black/JetBrains Mono dropped (hard to read, esp. bold).
       Only the PRIDE wordmark keeps a distinct face (Oswald). */
    --font-display: var(--font-body);
    --font-wordmark: "Oswald", var(--font-body);
    --font-mono: var(--font-body);

    /* Radius */
    --r-sm: 4px;
    --r-md: 8px;
    --r-lg: 12px;
    --r-pill: 100px;

    --base-font: 15.5px;
}

*, *::before, *::after { box-sizing: border-box; }

[x-cloak] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font-body);
    font-size: var(--base-font);
    line-height: 1.45;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

/* Form controls don't inherit the page font by default - without this they fall back to the
   OS default (Arial / "MS Shell Dlg" on Windows). Make every control use the data font
   (Open Sans) across all surfaces (customer, operator, admin). */
button, input, optgroup, select, textarea, ::file-selector-button {
    font-family: inherit;
}

/* Unified keyboard-focus ring + disabled cursor for EVERY button across all three surfaces. Bespoke
   buttons that don't define their own focus style inherit this ring; .btn / .pa-btn restate the
   identical ring at higher specificity, so the focus affordance looks the same everywhere. */
button:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 33%, transparent); }
button:disabled { cursor: default; }

h1, h2, h3, .display {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.9;
    text-transform: uppercase;
    margin: 0 0 0.4em;
}

a { color: inherit; }

.mono { font-family: var(--font-mono); }

.eyebrow {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ink-55);
}

/* ── Atoms ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: transform 0.06s ease, background 0.15s ease, filter 0.15s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 33%, transparent); }
.btn:disabled, .btn.is-disabled { opacity: 0.45; filter: none; cursor: default; }
.btn:disabled:active, .btn.is-disabled:active { transform: none; }
.btn-ink { background: var(--ink); color: var(--brand-paper); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-green { background: var(--green); color: var(--on-accent); }
.btn-grey { background: var(--ink-12); color: var(--ink); }
.btn-red { background: var(--red); color: #fff; }
.btn-ghost { background: var(--btn-secondary); color: var(--ink); border: 1.5px solid var(--btn-secondary); }
/* Unified hover feedback (shared with Admin's .pa-btn): filled roles brighten, neutral darkens slightly. */
.btn-ink:hover { background: var(--ink-2); }
.btn-accent:hover, .btn-green:hover, .btn-red:hover { filter: brightness(1.06); }
.btn-grey:hover { background: var(--ink-15); }
.btn-ghost:hover { filter: brightness(1.04); }
.btn-lg { padding: 18px 28px; font-size: 15px; }
.btn-sm { padding: 8px 14px; font-size: 14px; }

/* Shared icon-button contract (square, neutral chrome buttons: close / back / zoom / step). One neutral
   fill, one radius, a 3-step size scale - so icon buttons converge instead of drifting per surface.
   Function-specific icon buttons (dark overlays, the amber pickup control) keep their own fill on top. */
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    border: none; border-radius: var(--r-md);
    background: var(--ink-06); color: var(--ink);
    font-size: 16px; line-height: 1; cursor: pointer;
    transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--ink-12); }
.icon-btn:disabled, .icon-btn.is-disabled { opacity: 0.4; cursor: default; }
.icon-btn--sm { width: 24px; height: 24px; font-size: 14px; }
.icon-btn--lg { width: 44px; height: 44px; font-size: 22px; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: var(--r-pill);
    background: var(--ink-06);
    color: var(--ink);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px;
}

.field {
    width: 100%;
    font-family: var(--font-body);
    font-size: 15px;
    padding: 14px 16px;
    border: 1px solid var(--ink-15);
    border-radius: var(--r-md);
    background: var(--card);
    color: var(--ink);
}
.field:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 33%, transparent); }

.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); }
@keyframes pulse-dot { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); } 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.live-dot.pulse { animation: pulse-dot 1.6s infinite; }

/* PRIDE logo mark */
.brand-mark { width: 28px; height: 28px; transform: rotate(-6deg); }
.wordmark { font-family: var(--font-wordmark); font-weight: 800; letter-spacing: -0.02em; text-transform: uppercase; }
