/* ---------------------------------------------------------------------------
   tokens.css — :root ONLY. Zero selectors. MAIN-THREAD OWNED, frozen.
   ---------------------------------------------------------------------------
   Design system: "Real-Time Monitoring" (ui-ux-pro-max, variance 4 / motion 5 /
   density 8) with two deliberate overrides:

   1. The generated palette is blue (#1E40AF). Replaced with the ProAgri green
      that every other app in this estate uses, so this console reads as part
      of the family. Every pair below was checked to 4.5:1 on its background.
   2. The generated typography is Fira Code / Fira Sans from Google Fonts. This
      app may load NO external assets, so the intent is preserved with system
      stacks instead: sans for the interface, mono for data and log output.

   Density 8 means the 8-32px spacing scale, not the 16-64px marketing scale.
   This is an operations console, not a landing page.
--------------------------------------------------------------------------- */
:root {
  /* ---- brand + semantic colour ------------------------------------------ */
  --c-primary:        #1f4b2f;   /* ProAgri deep green, on white 10.4:1      */
  --c-primary-hover:  #173924;
  --c-primary-soft:   #e8f0ea;
  --c-on-primary:     #ffffff;
  --c-accent:         #15803d;   /* Agri4All green, the email CTA colour     */
  --c-accent-soft:    #dcfce7;

  --c-bg:             #f6f7f6;
  --c-surface:        #ffffff;
  --c-surface-2:      #fbfcfb;
  --c-fg:             #14201a;   /* on --c-bg 14.8:1                         */
  --c-fg-muted:       #5b6660;   /* on --c-surface 5.9:1, safe for body copy */
  --c-fg-faint:       #7d8781;   /* on --c-surface 4.6:1, smallest text OK   */
  --c-border:         #dde3df;
  --c-border-strong:  #c2ccc6;

  /* Status. Each has a text-safe variant: the raw hue is for fills and dots,
     the -ink variant is what you put text in. Colour is never the only signal
     on this screen, every state also carries a label. */
  --c-ok:             #15803d;  --c-ok-ink:     #14532d;  --c-ok-soft:    #dcfce7;
  --c-warn:           #b45309;  --c-warn-ink:   #7c2d12;  --c-warn-soft:  #fef3c7;
  --c-danger:         #b91c1c;  --c-danger-ink: #7f1d1d;  --c-danger-soft:#fee2e2;
  --c-info:           #1d4ed8;  --c-info-ink:   #1e3a8a;  --c-info-soft:  #dbeafe;
  --c-idle:           #94a3a0;  --c-idle-ink:   #5b6660;  --c-idle-soft:  #eef1ef;

  /* Dropped leads are not an error, they are the funnel working. Neutral, not
     red: sixteen red cards would imply sixteen faults. */
  --c-drop:           #8a8f96;  --c-drop-soft:  #f1f2f4;

  /* ---- spacing: density 8, the 4/8/12/16/24/32 dashboard scale ---------- */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px;

  /* ---- type ------------------------------------------------------------- */
  --f-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --f-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --t-xs:   11px;  /* log timestamps, meta chips. mono only, never body copy */
  --t-sm:   12px;
  --t-base: 13px;  /* dense console base. Body prose uses --t-md.            */
  --t-md:   14px;
  --t-lg:   16px;
  --t-xl:   20px;
  --t-2xl:  26px;

  --lh-tight: 1.25;
  --lh-body:  1.5;

  --fw-normal: 400; --fw-medium: 500; --fw-semi: 600; --fw-bold: 700;

  /* ---- shape + depth ---------------------------------------------------- */
  --r-sm: 4px; --r-md: 6px; --r-lg: 10px; --r-pill: 999px;

  --sh-1: 0 1px 2px rgba(20, 32, 26, .06);
  --sh-2: 0 2px 6px rgba(20, 32, 26, .08);
  --sh-3: 0 8px 24px rgba(20, 32, 26, .12);

  /* ---- motion ----------------------------------------------------------- */
  /* 150-300ms band. Anything slower feels laggy on a screen that updates
     continuously; anything faster reads as a glitch rather than a transition. */
  --m-fast:   150ms;
  --m-base:   220ms;
  --m-slow:   320ms;
  --m-ease:   cubic-bezier(.2, .8, .3, 1);
  --m-in:     cubic-bezier(.4, 0, 1, 1);

  /* ---- layout ----------------------------------------------------------- */
  --w-dropped:  300px;   /* dropped column, desktop                          */
  --w-stream:   1020px;  /* max readable width of the lead stream            */
  --h-mode:     32px;    /* the test-mode strip                              */
  --h-header:   56px;
  --h-rail:     92px;
  --z-sticky:   10;
  --z-banner:   20;
  --z-modal:    40;
}

/* Motion is meaning on this screen: a lead striking through and moving to the
   dropped column is how the operator reads the funnel. When motion is not
   wanted we keep the state change and drop the travel, rather than removing
   the feedback entirely. */
@media (prefers-reduced-motion: reduce) {
  :root {
    --m-fast: 1ms;
    --m-base: 1ms;
    --m-slow: 1ms;
  }
}
