/* ==========================================================================
   «أصلي» — NATIVE FEEL TOKENS. THE ONE COLOUR SOURCE for both front ends (2026-11-02, phase 2).

   Phase 1 declared these inside native.css, the employee app's layer. Phase 2 brings the console
   (admin.html, settings.html) onto the same direction, and a second copy of the palette would be
   two palettes the first time somebody tuned one of them. So the type and the `--n-*` tokens live
   here, and BOTH native.css (employee) and admin.css / settings.css (console) read them; each side
   then maps its own older token names (--bg, --card, --gold …) onto these.

   LIGHT BY DEFAULT, DARK WHEN THE DEVICE IS. Every token is declared on :root FIRST and only then
   redefined under prefers-color-scheme (a token that exists only inside a colour preference is
   undefined on every other device). In dark nothing is ever highlighted with a pale fill: the
   primary becomes gold with dark text, selection is a gold ring or a low-alpha gold wash.

   Type: Almarai (Arabic) and Rubik (Latin and numbers), SERVED FROM THIS ORIGIN — the CSP is
   `font-src 'self'`, and an installed app keeps them offline.
   ========================================================================== */

@font-face { font-family: "Almarai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/fonts/almarai-400-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/fonts/almarai-700-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Almarai"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/fonts/almarai-800-arabic.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Rubik"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("/fonts/rubik-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215; }

/* ---------------------------------------------------------------- tokens (light, the default) */
:root {
  --n-bg: #F2F2F7;            /* grouped background */
  --n-sf: #FFFFFF;            /* card */
  --n-sf2: #F7F7FA;           /* a card inside a card */
  --n-field: #F2F2F7;         /* an input inside a card */
  --n-fill: rgba(118, 118, 128, .12);   /* quiet controls: secondary buttons, close circles */
  --n-press: rgba(0, 0, 0, .05);
  --n-ln: rgba(60, 60, 67, .14);        /* hairlines */
  --n-tx: #111113;
  --n-mu: #6C6C70;            /* secondary text — #8E8E93 is too faint for small Arabic on white */
  --n-mu2: #AEAEB2;
  --n-ink: #111113;           /* the primary button */
  --n-on-ink: #FFFFFF;
  --n-ac: #E8A317;            /* Empire gold, for fills and icons */
  --n-acd: #946200;           /* gold that is legible as TEXT on a light card */
  --n-on-ac: #1A1203;
  --n-wash: rgba(232, 163, 23, .14);
  --n-ok: #1F7A35;  --n-ok-bg: rgba(52, 199, 89, .14);
  --n-bad: #D70015; --n-bad-bg: rgba(255, 59, 48, .10);
  --n-on-bad: #FFFFFF;           /* text on a solid --n-bad fill: a count pill, a destructive button */
  --n-wait: #0058C9; --n-wait-bg: rgba(10, 132, 255, .11);
  --n-bar: rgba(249, 249, 251, .80);    /* frosted bars */
  --n-bar-solid: #F9F9FB;
  --n-grab: #C7C7CC;
  --n-shadow: 0 1px 0 rgba(0, 0, 0, .03), 0 8px 20px -12px rgba(0, 0, 0, .16);
  --n-spring: cubic-bezier(.32, 1.36, .5, 1);
  --n-font: "Rubik", "Almarai", system-ui, -apple-system, "Segoe UI", Tahoma, "Noto Kufi Arabic", sans-serif;
  --n-tab-h: 56px;
  color-scheme: light;
}

/* ---------------------------------------------------------------- tokens (dark, when the device is) */
@media (prefers-color-scheme: dark) {
  :root {
    --n-bg: #000000;
    --n-sf: #1C1C1E;
    --n-sf2: #2C2C2E;
    --n-field: #2C2C2E;
    --n-fill: rgba(118, 118, 128, .24);
    --n-press: rgba(232, 163, 23, .10);
    --n-ln: rgba(84, 84, 88, .55);
    --n-tx: #F2F2F7;
    --n-mu: #9E9EA6;
    --n-mu2: #636366;
    --n-ink: #E8A317;           /* in dark the primary is gold with dark text, never a pale block */
    --n-on-ink: #1A1203;
    --n-ac: #E8A317;
    --n-acd: #F0B43C;
    --n-on-ac: #1A1203;
    --n-wash: rgba(232, 163, 23, .16);
    --n-ok: #30D158;  --n-ok-bg: rgba(48, 209, 88, .16);
    --n-bad: #FF6961; --n-bad-bg: rgba(255, 69, 58, .16);
    --n-on-bad: #1A0503;
    --n-wait: #64D2FF; --n-wait-bg: rgba(100, 210, 255, .14);
    --n-bar: rgba(22, 22, 24, .78);
    --n-bar-solid: #161618;
    --n-grab: #48484A;
    --n-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
    color-scheme: dark;
  }
}

/* Reduced motion: the press and the spring become instant, everywhere these tokens are read. */
@media (prefers-reduced-motion: reduce) {
  :root { --n-spring: linear; }
}
