/* The tokens and chrome BOTH portals use.
 *
 * They used to be copied into each portal's styles.css, and the copies drifted
 * exactly as you would expect: by 1 Nov 2026 the vendor portal was still
 * painting its primary button white on #2BA6E0 (2.7:1, fails AA), still using
 * 999px pills where the console had moved to 8px, and still using a --muted
 * that fails 4.5:1. None of that was a decision; it was the copy nobody
 * re-copied. So there is one file now, deployed beside each portal, and each
 * loads it BEFORE its own stylesheet.
 *
 * What belongs here: anything whose value is a brand or accessibility
 * decision rather than a layout one — colour, type, the top bar, buttons,
 * cards. What does not: a portal's own screens. If a rule would read oddly in
 * the other portal, it is not shared.
 *
 * Values match the PM console as it shipped, deliberately: the console is the
 * surface in constant use, so this file moving must not restyle it. The one
 * place the vendor portal needs a different value (44px buttons, for phones)
 * it overrides in its own stylesheet and says why.
 */
:root {
  /* --brand is an ACCENT only: the logo dot, the active-nav underline, the
     focus ring. It is 2.7:1 on white, so white text on it fails AA — use
     --action for anything that carries a label. */
  --brand: #2BA6E0;

  /* --action carries labels, so it has to clear 4.5:1 BOTH ways: white text
     on it (buttons) and it as text on white (links). The spec asked for
     #0E7DC0, which measures 4.46 — near enough to look fine and not near
     enough to pass. #0D78B8 is 4.78 and is indistinguishable beside it.
     Paul chose this on 1 Nov 2026; the spec's §1 swatch was updated to match,
     so do not "restore" the brighter blue from an older copy of the spec. */
  --action: #0D78B8;
  --brand-dark: #0D78B8;   /* the old name for --action; kept so older rules still read */
  --navy: #0E1B26;
  --navy-2: #0B3552;
  --ink: #0E1B26;
  --ink-2: #33475A;
  --bg: #F3F6F9;
  --card: #FFFFFF;
  --line: #E1E9F0;
  --good: #1FA971;
  --muted: #54697B;        /* the old #7a8792 failed 4.5:1 on white */

  /* Status, and what each one MEANS. The semantics matter more than the
     hexes: a reader scanning either portal should be able to tell "I have to
     do something" from "I am waiting on them" without reading a word.
       orange = waiting on us      blue = waiting on them
       green  = fine               red  = failed       grey = needs a decision
     Compliance chasing was red before this. It is a task, not an error, and
     red next to green is also the pair colour-blind readers lose first. */
  --todo: #B5470F;      --todo-bg: #FFF1E6;   --todo-chip: #9A3B0A;
  --wait: #0B5E8E;      --wait-bg: #E6F4FC;
  --ok:   #1B6B43;      --ok-bg:   #E7F5EE;
  --fail: #A12A2A;      --fail-bg: #FDECEC;
  --flat: #33475A;      --flat-bg: #EEF2F6;

  /* The spacing scale. Named so a reviewer can see when a layout has invented
     a seventh value rather than reached for one of these six. */
  --s1: 4px;  --s2: 8px;  --s3: 12px;
  --s4: 16px; --s5: 24px; --s6: 32px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
/* 4.78:1 on white, which is where body text lives: cards are white and the
   page background only shows between them. On --bg itself it is 4.40, so a
   link belongs inside a card rather than loose in the page. */
a { color: var(--action); }

/* Top bar */
header.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px; background: var(--navy); color: #fff;
}
.wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700; font-size: 24px; letter-spacing: -0.5px; color: #fff;
}
.wordmark .dot { color: var(--brand); }
.topbar-right { display: flex; align-items: center; gap: 16px; font-size: 14px; color: #cfe6f5; }
.portal-tag {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase;
  color: #cfe6f5; border: 1px solid rgba(255,255,255,.25); padding: 5px 12px; border-radius: 999px;
}
.who { color: #fff; font-weight: 600; }
.linkbtn { background: none; border: 0; color: #cfe6f5; cursor: pointer; font: inherit; text-decoration: underline; }
.linkbtn:hover { color: #fff; }

/* Buttons.
   One primary per card. Row actions in lists always use .secondary, so a
   list of 28 rows does not become a wall of blue. 8px, not the old 999px
   pill: the pill read as a marketing button in a console full of them.

   min-height is 40px here because that is what the console ships and this
   file must not resize it. The vendor portal raises it to 44 for touch. */
.btn {
  background: var(--action); color: #fff; border: 1px solid transparent; cursor: pointer;
  font-family: Inter, system-ui, sans-serif; font-weight: 600; font-size: 14px;
  min-height: 40px; padding: 0 16px; border-radius: 8px; transition: background .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { background: var(--navy-2); }
.btn:disabled { opacity: .6; cursor: default; }
.btn:disabled:hover { background: var(--action); }
.btn.block { width: 100%; }

/* Headings */
h1 { font-family: "Space Grotesk", sans-serif; font-weight: 700; color: var(--navy); }
/* --action, not --brand. This class exists for exactly one thing: the
   "Sign in to take calls." half of the vendor sign-in heading. At 34px/700
   the brand blue measured 2.54:1 on the page background, which fails even
   the 3:1 allowed for large text - so the one place the accent token was
   used as TEXT was the one place it should not have been. Measured on the
   live page 1 Nov 2026, not inferred. */
.accent { color: var(--action); }

/* Cards */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; box-shadow: 0 12px 30px rgba(14,27,38,.08);
  /* A card has always been a box with a border and no inside, so every bare
     .card put its text hard against its own edge. The variants that set their
     own padding (.card.section, .tablecard, .queuecard) still win. */
  padding: 18px 20px;
}

/* Status dot */
.status-dot { width: 9px; height: 9px; border-radius: 999px; background: #c3ccd4; display: inline-block; }
.status-dot.online { background: var(--good); }
