/* =============================================================================
   AiBLE CRM — token delta for customer hub, Activities, quotes, proformas
   PR 7a.  Load AFTER design_handoff_shell_and_inquiry/01-tokens.delta.css.

   Scope: 3 new tokens. No changed values. No markup changes.
   Fully revertable by deleting this file.

   Everything these four modules need already exists. The severity ramp used by
   the ageing bar and the due buckets is the STATUS palette in ascending order
   (--green → --amber → --copper → --red) and is deliberately not re-tokenised:
   inventing --sev-1..4 aliases would let the two drift apart, and the whole
   reason the ageing bar needs no legend is that it is the same four colours the
   user already reads on every pill in the app.
   ========================================================================== */

:root {

  /* -- NEW: meter track ----------------------------------------------------
     Credit utilisation, advance received and the margin guard all draw a
     filled bar on an unfilled track. The track is NOT --line-2: it sits
     inside cards that are already --surface on --bg, and --line-2 disappears
     there. One value, used by .meter and .agebar.                         */
  --meter-track: #e3e8ee;

  /* -- NEW: rail width -----------------------------------------------------
     The Activities filter rail. 236px is set by the longest label
     ("Transcribed calls" in the pre-merge state, "Recorded · transcribed" as
     a sub-view) plus its count, at 12.5px Inter. Tokenised because the
     Approvals and Tenders modules are the next candidates for the same rail.
     Below 1100px the rail collapses to a "Filters (n)" sheet — see
     03-components.css.                                                     */
  --rail-w: 236px;

  /* -- NEW: rail active ground --------------------------------------------
     The selected rail row. --primary-50 is right in light mode but too loud
     in dark, where the rail sits on --surface rather than the sidebar's
     darker ground.                                                         */
  --rail-active: var(--primary-50);
}

:root[data-theme="dark"] {
  --meter-track: #222d3a;
  --rail-active: rgba(116, 184, 232, .10);
}

/* ---------------------------------------------------------------------------
   ALIASES — added here, not by editing 03-components.css.

   The design package speaks its own severity vocabulary (--danger, --warn,
   --ok, --mono); this codebase has spoken --red / --copper / --green and an
   explicit font stack since day one. Rather than rewrite the handoff file -
   which would make it impossible to diff against the next design drop - the
   two vocabularies are joined here. --ok is NOT aliased: theme.css already
   defines it as var(--green), and re-declaring it here would pin a value that
   file owns. Deleting this file still reverts PR 7
   whole, exactly as the plan says.

   --warn maps to --copper, not --amber-50: the ageing ramp is
   green -> amber -> copper -> red in ASCENDING severity, and --copper is the
   third step. --amber-50 is a background wash, not a ramp colour.
   --------------------------------------------------------------------------- */
:root{
  --danger:    var(--red);
  --danger-50: var(--red-50);
  --warn:      var(--copper);
  --ok-50:     var(--green-50);
  --mono:      'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}
