/* ==========================================================================
   app-base.css — the application's base layer: the universal box model, the
   document font and root font size, the page/body element defaults, and the
   `--primary` token family.
   --------------------------------------------------------------------------
   WHAT IT OWNS
     · `::selection` / `::-moz-selection` — the gold text-selection highlight.
     · `*, *::before, *::after` — border-box sizing, zero margin/padding and
       `font-size: 12PX` on EVERY element. That rule also sets the ROOT font
       size, so `1rem` resolves to 12px application-wide; a `font-size: 1rem`
       declared anywhere else is therefore a no-op.
     · `html`, `body` — full height, hidden overflow, the body as a flex column,
       the body colours, and the body font-family
       `'Segoe UI', system-ui, sans-serif`.
     · `input, button, select, textarea`, `p`, `legend`, `fieldset` defaults.
     · `:root` — `--primary`, `--primary-dark`, `--primary-light`,
       `--transition`, `--card-radius`, `--shadow-sm`, `--shadow-md`.

   LINK ORDER — LOAD-BEARING
     · `_Meta` links this sheet after the framework sheet, the two `compat\`
       sheets and `legacy-chrome.css`, and before the token, icon and component
       sheets. `_AuthMeta` links it immediately BEFORE `screens\auth-shell.css`
       (which reads the `--primary` family from here) and after every other
       sheet except `auth-shell.css` and `responsive.css`.
     · Its `body` rule must remain the LAST unscoped `body` font-family in the
       chain — that is what makes this sheet the owner of the application font.
       Linking it earlier silently changes the font and the box model of every
       screen.
     · The ORDER INSIDE THIS FILE is deliberate: the element defaults come first
       and the `*` / `body` rules at the foot win over them on source order.
       Do not reorder the file.

   TOKENS
     · The `--primary` family is a SEPARATE token set from the design tokens in
       `lib-v2\css\tokens\*` (`--ics-*`). Its only reader is
       `screens\auth-shell.css` (`--card-radius`, `--shadow-md`, `--primary`,
       `--primary-dark`, `--transition`). A NEW rule reads the `--ics-*` tokens,
       never these.

   NOT THIS FILE
     · `lib-v2\css\base.css` is a different sheet: a token-driven reset scoped
       under `.ics-v2`, linked by no shell. Never link it in place of this one.
   ========================================================================== */

/* ── the document base ────────────────────────────────────────────────────────
   ⚠⚠ THESE COME FIRST ON PURPOSE: every rule in this block loses to this sheet's
   own `*` / `body` rules further down on source order. Move any of it after them
   and the application silently changes font-family and box model.
   ⚠ `* { font-size: 12PX }` also sets the ROOT font size, which is why `1rem`
   resolves to 12px application-wide. */
::selection {
    background: #d0b358;
    color: #fff;
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-size: 12PX;
}

input, button, select, textarea {
    font-size: 12px;
}

::-moz-selection {
    background: #d0b358;
    color: #fff;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

html {
    height: 100%;
}

body {
    font-family: sans-serif;
    background-color: #F9FAFB;
    color: #111827;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

p {
    margin-bottom: 0;
    padding: 0;
    font-size: 12px;
}

legend {
    all: unset;
    display: block;
    font-weight: bold;
    padding: 0 4px;
}

fieldset {
    display: block;
    padding: 3px;
    border: 1px solid #ccc;
    margin: 3px !important;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
}

/* ── the `--primary` token family (read by screens\auth-shell.css) ───────────── */
:root {
    --primary:        #CFB53B;
    --primary-dark:   #a88f2a;
    --primary-light:  #f0e080;
    --transition:     0.25s ease;
    --card-radius:    10px;
    --shadow-sm:      0 2px 8px rgba(0,0,0,.08);
    --shadow-md:      0 4px 16px rgba(0,0,0,.12);
}

/* ── the universal box model + the document font ──────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, sans-serif; }
