/* ===========================================================================
 * Soft-UI design kit: tokens
 * ---------------------------------------------------------------------------
 * Every value the kit uses lives here. Load this file first, then
 * components.css (and login.css for the sign-in page).
 *
 * TO REBRAND, change three tokens and nothing else:
 *   --brand        the accent colour (active icon, links, focus ring, data)
 *   --tint         a light version of it (focus ring on a dark surface)
 *   --brand-wash   the brand at about 10 percent on white (icon discs, chips)
 * The brand colour is an ACCENT. It is never a button fill: the primary
 * button is ink (--ink).
 *
 * Light only. There is no dark-mode block on purpose: a real dark theme needs
 * its own token set and re-checked contrast, not an automatic swap.
 * =========================================================================== */

/* Inter (SIL Open Font License 1.1). display=swap paints with the system face
 * first, so a slow font host never blocks the page. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* ---- Brand (change these three to rebrand) ---------------------------
   * Dijiwa Back Office: the brand is Aqua Blue, #00B9E4. Raw, that tone is only
   * 2.3:1 on white, and --brand is used for link text and the focus ring, so
   * --brand is the same hue (191 degrees) deepened until it passes: 5.25:1 on
   * white, 4.78:1 on the canvas, 4.80:1 on the wash. The raw Aqua Blue lives on
   * as --tint (8.5:1 on ink) and, at 10 percent on white, as --brand-wash. */
  --brand:        #007691;
  --tint:         #00B9E4;
  --brand-wash:   #E6F8FC;

  /* ---- Ink and surfaces -------------------------------------------------
   * Three tone steps do the work that borders and shadows do elsewhere:
   * the grey canvas, a white surface on it, a grey fill inside the surface. */
  --ink:          #0A0A0A;   /* text, and the one primary button per view */
  --ink-2:        #3F3F46;   /* row text in a menu or list */
  --canvas:       #F4F4F5;   /* the page */
  --surface:      #FFFFFF;   /* cards, tiles on the canvas, menus, modals */
  --fill:         #F4F4F5;   /* a block nested in a white surface */
  --fill-2:       #E9E9EB;   /* a control inside a fill; grey buttons; inputs */
  --fill-3:       #DFDFE2;   /* hover of --fill-2 */

  /* ---- Text greys ------------------------------------------------------- */
  --muted:        #6B7280;   /* secondary text on WHITE (4.8:1) */
  --muted-strong: #52525B;   /* secondary text on a grey fill (7:1) */
  --faint:        #A1A1AA;   /* disabled text only, never information */
  --placeholder:  #85858E;   /* input placeholder on --fill-2 (3:1) */

  /* ---- Lines and the dim layer ------------------------------------------ */
  --hairline:        rgba(10, 10, 10, .10);
  --hairline-soft:   rgba(10, 10, 10, .06);
  --hairline-strong: rgba(10, 10, 10, .18);
  --scrim:           rgba(10, 10, 10, .32);

  /* ---- Status tones (text on a soft tint, never a bordered alert) -------- */
  --pos:      #166534;
  --pos-bg:   #DCFCE7;
  --warn:     #92400E;
  --warn-bg:  #FEF3C7;
  --neg:      #991B1B;
  --neg-bg:   #FEE2E2;
  --neg-bg-2: #FECACA;

  /* ---- Radius, by role --------------------------------------------------- */
  --radius-sm:    6px;     /* inline marks: legend swatch, progress fill */
  --radius-row:  10px;     /* a row inside a menu */
  --radius-md:   14px;     /* controls: input, select, nav item, menu */
  --radius-tile: 20px;     /* stat tile, a block nested in a card */
  --radius-lg:   24px;     /* card, panel, chart or table section */
  --radius-xl:   28px;     /* overlay: modal, dialog, slide-over */
  --radius-pill: 999px;    /* capsules: buttons, chips, segmented control */

  /* ---- Elevation ---------------------------------------------------------
   * What RESTS on the page is flat. Only what FLOATS casts a shadow. */
  --elev-flat:    none;
  --elev-thumb:   0 1px 3px rgba(10, 10, 10, .10);    /* active segment of a switch */
  --elev-float:   0 8px 24px rgba(10, 10, 10, .08);   /* decorative floating card */
  --elev-popover: 0 8px 24px rgba(10, 10, 10, .16);   /* menu, dropdown, tooltip */
  --elev-overlay: 0 24px 64px rgba(10, 10, 10, .22);  /* modal, dialog */

  /* ---- Type -------------------------------------------------------------- */
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --eyebrow-size: 11px;   --eyebrow-weight: 600;   --eyebrow-track: 0.055em;
  --caption-size: 12px;
  --small-size:   14px;
  --body-size:    16px;
  --h4-size: 17px;        --h4-weight: 600;        --h4-track: -0.01em;
  --h3-size: 20px;        --h3-weight: 600;        --h3-track: -0.018em;
  --h2-size: 24px;        --h2-weight: 700;        --h2-track: -0.022em;
  --h1-size: 32px;        --h1-weight: 700;        --h1-track: -0.03em;
  --num-hero-size: 48px;  --num-hero-weight: 600;  --num-hero-track: -0.03em;

  /* ---- Motion ------------------------------------------------------------ */
  --ease-out:    cubic-bezier(0.23, 1, 0.32, 1);
  --dur-press:   160ms;
  --dur-fade:    200ms;
  --dur-modal:   240ms;
  --scale-press: 0.97;    /* a held button; never below 0.95 */
  --scale-entry: 0.95;    /* where an overlay starts from; never 0 */

  /* Native controls and scrollbars stay light on a dark-mode device. */
  color-scheme: light;
}

/* Reduced motion: nothing moves, opacity fades stay. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-press:   0ms;
    --dur-modal:   100ms;
    --scale-press: 1;
    --scale-entry: 1;
  }
}
