/* ============================================================
   Assurdent — Hi-fi product CSS
   Targets the same .wf-* class names from before; restyles to
   match the brand: cream/coral palette, editorial serif, modern
   sans, soft shadows, calm whitespace. No sketchy treatments.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600;6..72,700&family=Public+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --c-cream:    #FBF5EA;
  --c-cream-2:  #F5ECD9;
  --c-paper:    #FFFAF4;
  --c-ink:      #1C1810;
  --c-ink-2:    #4A4438;
  --c-ink-3:    #756E5E;
  --c-ink-4:    #A59C87;
  --c-line:     #E8DFC9;
  --c-line-2:   #F0E7D2;
  --c-coral:    #FF5F3C;
  --c-coral-d:  #E8482A;
  --c-coral-s:  #FFE8DF;
  --c-blush:    #FFE5D4;
  --c-blush-d:  #F9D4BC;
  --c-rose:     #D96A5B;
  --c-sage:     #7FA688;
  --c-sage-d:   #4F7D5B;
  --c-sage-s:   #E6EFE6;
  --c-amber:    #C48A1E;
  --c-amber-s:  #FCEBC9;

  /* legacy aliases — keep existing inline styles working */
  --w-cream:    var(--c-cream);
  --w-paper:    var(--c-paper);
  --w-line:     var(--c-ink);
  --w-line-2:   var(--c-ink-2);
  --w-mute:     var(--c-ink-3);
  --w-faint:    var(--c-line);
  --w-coral:    var(--c-coral);
  --w-coral-d:  var(--c-coral-d);
  --w-blush:    var(--c-blush);
  --w-sage:     var(--c-sage);
  --w-rose:     var(--c-rose);

  --font-display: 'Newsreader', 'Times New Roman', Georgia, serif;
  --font-body:    'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  /* legacy alias — display numbers use the editorial serif */
  --font-hand: var(--font-display);

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;

  --sh-1: 0 1px 2px rgba(28,24,16,0.04), 0 1px 3px rgba(28,24,16,0.06);
  --sh-2: 0 4px 14px rgba(28,24,16,0.06), 0 1px 3px rgba(28,24,16,0.04);
  --sh-3: 0 10px 32px rgba(28,24,16,0.10), 0 2px 6px rgba(28,24,16,0.05);
}

body { background: var(--c-cream); color: var(--c-ink); font-family: var(--font-body); }

/* ---- Root surface ---- */
.wf {
  background: var(--c-cream);
  color: var(--c-ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  width: 100%; height: 100%;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}
.wf *, .wf *::before, .wf *::after { box-sizing: border-box; }
.wf-bg-cream { background: var(--c-cream); }
.wf-bg-blush { background: var(--c-blush); }
.wf-grid { background: var(--c-cream); } /* no grid in hi-fi */

/* ---- Typography ---- */
.wf h1, .wf h2, .wf h3, .wf h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
  line-height: 1.1;
  color: var(--c-ink);
}
.wf h1 { font-size: 38px; letter-spacing: -0.02em; }
.wf h2 { font-size: 28px; letter-spacing: -0.015em; }
.wf h3 { font-size: 19px; font-weight: 600; }
.wf h4 { font-size: 16px; font-weight: 600; }
.wf p, .wf li, .wf td, .wf th, .wf label, .wf input, .wf button, .wf div, .wf span, .wf small, .wf strong { font-family: inherit; }
.wf p { line-height: 1.55; color: var(--c-ink-2); margin: 0; }
.wf small { font-size: 12.5px; color: var(--c-ink-3); line-height: 1.45; }
.wf strong { font-weight: 600; color: var(--c-ink); }
.wf .mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-ink-3);
  font-weight: 500;
}
.wf .mono-sm {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-ink-4);
}
.wf .muted { color: var(--c-ink-3); }
.wf .num { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.wf hr { border: 0; border-top: 1px solid var(--c-line); margin: 12px 0; }
.wf a { color: var(--c-ink); text-decoration: none; cursor: pointer; }
/* Coral hover applies to text links only — buttons keep their own color */
.wf a:not(.wf-btn):hover { color: var(--c-coral-d); }

/* Editorial display class (used for hero/dashboard numbers) */
.wf-display { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }

/* hand-note → tinted inline hint (no handwriting) */
.wf .hand-note {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--c-coral-d);
  font-style: italic;
  font-weight: 500;
}

/* ---- Top bar / chrome ---- */
.wf-topbar {
  height: 60px;
  background: var(--c-paper);
  border-bottom: 1px solid var(--c-line);
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  flex-shrink: 0;
}
.wf-topbar .brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  letter-spacing: -0.015em;
}
.wf-topbar .brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--c-coral); display: inline-block; }
.wf-topbar .nav { display: flex; gap: 4px; }
.wf-topbar .nav a {
  display: inline-flex; align-items: center;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 500;
  color: var(--c-ink-2);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.wf-topbar .nav a:hover { background: var(--c-cream); color: var(--c-ink); }
.wf-topbar .nav a.active { background: var(--c-ink); color: var(--c-paper); }
.wf-topbar .right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.wf-topbar.dark .right .topbar-contact-link {
  color: rgba(255,255,255,0.72); font-size: 13px; text-decoration: none;
  padding: 5px 10px; border: 1px solid rgba(255,255,255,0.16); border-radius: 6px;
  white-space: nowrap; transition: color .12s, border-color .12s;
}
.wf-topbar.dark .right .topbar-contact-link:hover {
  color: #fff; border-color: rgba(255,255,255,0.4);
}
.wf-topbar .avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--c-blush); color: var(--c-coral-d);
  font-weight: 600; font-size: 13px;
}

/* dark topbar (admin) */
.wf-topbar.dark { background: #15110A; color: var(--c-cream); border-bottom-color: rgba(255,255,255,0.06); }
.wf-topbar.dark .nav a { color: rgba(255,255,255,0.65); }
.wf-topbar.dark .nav a:hover { background: rgba(255,255,255,0.06); color: var(--c-cream); }
.wf-topbar.dark .nav a.active { background: var(--c-coral); color: var(--c-ink); }
.wf-topbar.dark .wf-btn.xs.ghost { color: var(--c-paper); }
.wf-topbar.dark .wf-btn.xs.ghost:hover { color: var(--c-ink); }

/* ---- Sidebar ---- */
.wf-sidebar {
  width: 232px; flex-shrink: 0;
  background: var(--c-paper);
  border-right: 1px solid var(--c-line);
  padding: 16px 12px;
  display: flex; flex-direction: column; gap: 2px;
  overflow-y: auto;
}
.wf-sidebar .group {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-ink-4);
  margin: 14px 10px 6px;
  font-weight: 500;
}
.wf-sidebar .item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 13.5px; font-weight: 500;
  color: var(--c-ink-2);
  transition: background 120ms, color 120ms;
}
.wf-sidebar .item:hover { background: var(--c-cream); color: var(--c-ink); }
.wf-sidebar .item.active { background: var(--c-coral-s); color: var(--c-coral-d); }
.wf-sidebar .item .ico {
  width: 16px; height: 16px;
  border-radius: 4px;
  background: var(--c-cream-2);
  flex-shrink: 0;
  position: relative;
}
.wf-sidebar .item.active .ico { background: var(--c-coral); }
.wf-sidebar .badge {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 600;
  background: var(--c-ink);
  color: var(--c-paper);
  padding: 2px 7px;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}
.wf-sidebar .item.active .badge { background: var(--c-coral); color: var(--c-paper); }

/* Dark sidebar (admin) */
.wf-sidebar.dark { background: #15110A; border-right-color: rgba(255,255,255,0.06); }
.wf-sidebar.dark .item { color: rgba(255,255,255,0.7); }
.wf-sidebar.dark .item:hover { background: rgba(255,255,255,0.05); color: var(--c-cream); }
.wf-sidebar.dark .item.active { background: rgba(255,95,60,0.16); color: var(--c-coral); }
.wf-sidebar.dark .item .ico { background: rgba(255,255,255,0.1); }
.wf-sidebar.dark .item.active .ico { background: var(--c-coral); }
.wf-sidebar.dark .group { color: rgba(255,255,255,0.4); }
.wf-sidebar.dark .badge { background: rgba(255,255,255,0.1); color: var(--c-cream); }
.wf-sidebar.dark .item.active .badge { background: var(--c-coral); color: var(--c-ink); }

/* ---- Main area ---- */
.wf-split { display: flex; height: calc(100% - 60px); }
.wf-main {
  flex: 1; overflow: auto;
  padding: 28px 32px;
  display: flex; flex-direction: column; gap: 20px;
}

/* layout helpers */
.wf-row { display: flex; gap: 16px; }
.wf-col { display: flex; flex-direction: column; gap: 16px; }
.wf-stack { display: flex; flex-direction: column; }
.wf-stack > * + * { margin-top: var(--g, 12px); }
.wf-hstack { display: flex; align-items: center; gap: var(--g, 12px); }
.wf-grow { flex: 1; min-width: 0; }
.wf-spacer { flex: 1; }
.wf-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wf-wrap { flex-wrap: wrap; }
.wf-gap-4 { gap: 4px; } .wf-gap-8 { gap: 8px; } .wf-gap-12 { gap: 12px; } .wf-gap-16 { gap: 16px; } .wf-gap-24 { gap: 24px; }
.wf-pad-12 { padding: 12px; } .wf-pad-16 { padding: 16px; } .wf-pad-24 { padding: 24px; }

/* New-warranty form: the Summary + Submit panel follows the scroll on desktop
   (sticky), and anchors to the bottom of the screen on mobile so the running
   total + submit are always reachable. The page scrolls at the window, but
   .wf-main's overflow:auto would trap the sticky inside a non-scrolling box —
   so opt this page out and let the panel stick to the viewport. */
.wf-main:has(.wf-form-aside) { overflow: visible; }
.wf-form-aside {
  width: 320px; flex-shrink: 0;
  align-self: flex-start;        /* don't stretch — sticky needs slack */
  position: sticky; top: 16px;
}
@media (max-width: 960px) {
  .wf-form-aside {
    position: fixed; left: 0; right: 0; bottom: 0; top: auto;
    width: auto !important; margin: 0; z-index: 40;
    background: var(--c-paper);
    border-top: 1px solid var(--c-line);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.10);
    padding: 12px 16px; gap: 10px;
  }
  /* Trim the panel to the essentials when it's a bottom bar. */
  .wf-form-aside .wf-aside-detail { display: none; }
  .wf-form-aside .wf-card { margin: 0; padding: 10px 14px; }
  .wf-form-aside .mono { display: none; }
  .wf-form-aside hr { display: none; }
  .wf-form-aside .mt-12 { margin-top: 8px; }
  /* Room so the fixed bar never hides the last fields. */
  .wf-form-grid { padding-bottom: 180px; }
}

/* ---- Cards ---- */
.wf-card {
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 18px;
  box-shadow: var(--sh-1);
  position: relative;
}
.wf-card.dashed {
  background: var(--c-cream);
  border-style: solid;
  border-color: var(--c-line);
  box-shadow: none;
}
.wf-card.thin { padding: 14px; }
.wf-card .h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }

/* image placeholders — subtle, branded */
.wf-ph {
  border: 1px solid var(--c-line);
  background: var(--c-cream);
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  color: var(--c-ink-3);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  text-align: center; padding: 12px;
}

/* "drop file" / image placeholder slot */
.wf-xbox {
  position: relative;
  border: 1.5px dashed var(--c-line);
  background: var(--c-cream);
  border-radius: var(--r-sm);
  overflow: hidden;
  transition: border-color 150ms, background 150ms;
}
.wf-xbox::before, .wf-xbox::after { content: none; }
.wf-xbox .lbl {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--c-ink-3);
  text-align: center;
  padding: 8px;
}
.wf-xbox.filled {
  background: linear-gradient(135deg, var(--c-blush) 0%, var(--c-cream-2) 100%);
  border-style: solid; border-color: var(--c-line);
}

/* logo */
.wf-logo { display: inline-flex; align-items: center; gap: 10px; }
.wf-logo-img { display: block; width: auto; }

/* ---- Forms ---- */
.wf-field { display: flex; flex-direction: column; gap: 6px; }
.wf-field > label {
  font-family: var(--font-body);
  font-size: 12px; font-weight: 500;
  color: var(--c-ink-2);
  letter-spacing: 0;
  text-transform: none;
}
.wf-field > label .req { color: var(--c-coral); }
.wf-input {
  border: 1px solid var(--c-line);
  background: var(--c-paper);
  border-radius: var(--r-sm);
  padding: 9px 12px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-ink);
  min-height: 38px;
  display: flex; align-items: center;
  transition: border-color 120ms, box-shadow 120ms;
}
.wf-input:hover { border-color: var(--c-ink-4); }
.wf-input.placeholder { color: var(--c-ink-4); }
.wf-input.dropdown::after { content: "▾"; margin-left: auto; color: var(--c-ink-3); font-size: 11px; }
.wf-input.error { border-color: var(--c-coral); box-shadow: 0 0 0 3px rgba(255,95,60,0.12); }
.wf-textarea { min-height: 84px; align-items: flex-start; padding: 10px 12px; line-height: 1.5; }

/* ---- Multi-select chip grid (e.g. states) ---- */
.state-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.state-chip { cursor: pointer; user-select: none; line-height: 1; }
.state-chip input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.state-chip span {
  display: inline-block;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--c-line);
  background: var(--c-paper);
  font-size: 12.5px; font-weight: 500;
  color: var(--c-ink-2);
  transition: background 120ms, border-color 120ms, color 120ms;
}
.state-chip span:hover { border-color: var(--c-ink-4); }
.state-chip input:checked + span {
  background: var(--c-coral);
  border-color: var(--c-coral);
  color: var(--c-paper);
  font-weight: 600;
}
.state-chip input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255,95,60,0.22); }

.wf-checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.wf-checkbox .box {
  width: 16px; height: 16px;
  border: 1.5px solid var(--c-ink-4);
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
  background: var(--c-paper);
  position: relative;
  transition: background 120ms, border-color 120ms;
}
.wf-checkbox .box.checked {
  background: var(--c-ink);
  border-color: var(--c-ink);
}
.wf-checkbox .box.checked::after {
  content: ""; position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid var(--c-paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.wf-radio { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.wf-radio .ring {
  width: 16px; height: 16px;
  border: 1.5px solid var(--c-ink-4);
  border-radius: 50%;
  display: inline-block; flex-shrink: 0;
  background: var(--c-paper); position: relative;
  transition: border-color 120ms;
}
.wf-radio .ring.on { border-color: var(--c-coral); border-width: 1.5px; }
.wf-radio .ring.on::after {
  content: ""; position: absolute; inset: 3px;
  border-radius: 50%; background: var(--c-coral);
}

/* ---- Buttons ---- */
.wf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--c-line);
  background: var(--c-paper);
  color: var(--c-ink);
  border-radius: var(--r-sm);
  padding: 9px 16px;
  font-family: var(--font-body);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 38px;
  transition: background 120ms, border-color 120ms, color 120ms, transform 80ms;
  box-shadow: var(--sh-1);
}
/* The `hidden` attribute must win over the inline-flex above — otherwise a
   hidden .wf-btn (e.g. the form-wizard Back on step 1, or Next on the last
   step) stays visible because display:inline-flex overrides [hidden]. */
.wf-btn[hidden] { display: none !important; }
.wf-btn:hover { border-color: var(--c-ink-4); background: var(--c-cream); }
.wf-btn:active { transform: translateY(1px); }
.wf-btn.primary {
  background: var(--c-coral);
  border-color: var(--c-coral);
  color: var(--c-paper);
}
.wf-btn.primary:hover { background: var(--c-coral-d); border-color: var(--c-coral-d); }
.wf-btn.dark {
  background: var(--c-ink);
  border-color: var(--c-ink);
  color: var(--c-cream);
}
.wf-btn.dark:hover { background: #000; border-color: #000; }
.wf-btn.ghost {
  background: transparent;
  border-color: var(--c-line);
  box-shadow: none;
}
.wf-btn.ghost:hover { background: var(--c-cream); }
.wf-btn.sm { padding: 6px 12px; min-height: 30px; font-size: 12.5px; }
.wf-btn.xs { padding: 4px 10px; min-height: 26px; font-size: 12px; box-shadow: none; }
/* Destructive ghost button — e.g. removing a roster row. */
.wf-btn.danger { color: var(--c-coral-d); border-color: var(--c-coral-s); }
.wf-btn.danger:hover { background: var(--c-coral-s); border-color: var(--c-coral); color: var(--c-coral-d); }
/* "Add another row" affordance — dashed, full-width, clearly an add action. */
.wf-btn.add-row {
  width: 100%;
  border-style: dashed;
  border-color: var(--c-coral);
  color: var(--c-coral-d);
  background: transparent;
  box-shadow: none;
}
.wf-btn.add-row:hover { background: var(--c-coral-s); border-color: var(--c-coral-d); }

/* ---- Modal dialog ---- */
.wf-modal {
  border: 1px solid var(--c-line);
  border-radius: var(--r-md);
  padding: 24px;
  width: 460px;
  max-width: calc(100vw - 32px);
  background: var(--c-paper);
  color: var(--c-ink);
  box-shadow: 0 20px 60px rgba(28,24,16,0.22);
}
.wf-modal::backdrop { background: rgba(28,24,16,0.45); }
.wf-modal h3 { font-family: var(--font-display); font-size: 20px; }

/* ---- Radio pills (e.g. Bug / Feature type selector) ---- */
.wf-radio-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: 1px solid var(--c-line); border-radius: 999px;
  cursor: pointer; font-size: 14px; user-select: none;
  transition: border-color .12s, background .12s;
}
.wf-radio-pill:hover { border-color: var(--c-ink-3); }
.wf-radio-pill:has(input:checked) {
  border-color: var(--c-coral); background: var(--c-coral-t, rgba(255,95,60,0.10));
  font-weight: 600;
}
.wf-radio-pill input { accent-color: var(--c-coral); margin: 0; }

/* ---- Segmented control (scope filters) ---- */
.wf-segmented {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: var(--c-cream-2);
  border: 1px solid var(--c-line);
  border-radius: 999px;
}
.wf-segmented .seg {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 500;
  color: var(--c-ink-3);
  cursor: pointer; white-space: nowrap;
  transition: background 140ms, color 140ms, box-shadow 140ms;
}
.wf-segmented .seg:hover { color: var(--c-ink); }
.wf-segmented .seg.active {
  background: var(--c-paper);
  color: var(--c-ink);
  font-weight: 600;
  box-shadow: var(--sh-1);
}
.wf-segmented .seg-count {
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 500;
  color: var(--c-ink-4);
  background: var(--c-paper);
  border: 1px solid var(--c-line);
  border-radius: 999px;
  padding: 1px 7px; min-width: 20px; text-align: center;
  transition: background 140ms, color 140ms, border-color 140ms;
}
.wf-segmented .seg.active .seg-count {
  background: var(--c-coral-s); color: var(--c-coral-d); border-color: transparent;
}

/* ---- Roster completion mini-bar ---- */
.dent-progress { display: inline-flex; flex-direction: column; gap: 5px; min-width: 54px; }
.dent-progress .frac { font-family: var(--font-mono); font-size: 12px; color: var(--c-ink-3); }
.dent-progress .frac b { color: var(--c-ink); }
.dent-progress .track { height: 4px; border-radius: 999px; background: var(--c-cream-2); overflow: hidden; }
.dent-progress .fill { display: block; height: 100%; border-radius: 999px; background: var(--c-ink-4); transition: width 200ms; }
.dent-progress.complete .fill { background: var(--c-sage-d); }
.dent-progress.complete .frac b { color: var(--c-sage-d); }

/* ---- Status pills ---- */
.wf-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--c-cream);
  color: var(--c-ink-2);
  border: none;
  white-space: nowrap;
}
.wf-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c-ink-3);
  flex-shrink: 0;
}
.wf-pill.cond     { background: var(--c-amber-s); color: #8B5E0F; }
.wf-pill.cond::before     { background: var(--c-amber); }
.wf-pill.formal   { background: var(--c-sage-s); color: var(--c-sage-d); }
.wf-pill.formal::before   { background: var(--c-sage-d); }
.wf-pill.pending  { background: var(--c-cream-2); color: var(--c-ink-2); }
.wf-pill.pending::before  { background: var(--c-ink-4); }
.wf-pill.denied   { background: #FAD9D2; color: #9F3527; }
.wf-pill.denied::before   { background: var(--c-rose); }
.wf-pill.paid     { background: var(--c-sage-s); color: var(--c-sage-d); }
.wf-pill.paid::before     { background: var(--c-sage-d); }
.wf-pill.invoiced { background: var(--c-coral-s); color: var(--c-coral-d); }
.wf-pill.invoiced::before { background: var(--c-coral); }
.wf-pill.failed   { background: #FAD9D2; color: #9F3527; }
.wf-pill.failed::before   { background: var(--c-rose); }
.wf-pill.draft    { background: var(--c-cream-2); color: var(--c-ink-3); }

/* Dashboard stat cards get narrow (~160px, two-up) on phones, where a long
   label like "awaiting Assurdent review" overflows a nowrap pill. Let pills
   inside the stat grid wrap onto a second line, dot aligned to the first. */
.pf-stat-grid .wf-pill { white-space: normal; align-items: flex-start; }
.pf-stat-grid .wf-pill::before { margin-top: 4px; }

/* ---- Tables ---- */
.wf-table { width: 100%; border-collapse: collapse; font-family: var(--font-body); }
.wf-table thead th {
  text-align: left;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--c-ink-3);
  border-bottom: 1px solid var(--c-line);
  background: var(--c-cream);
  white-space: nowrap;
}
.wf-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--c-line-2);
  vertical-align: middle;
  font-size: 13.5px;
  color: var(--c-ink-2);
}
.wf-table tbody tr:hover td { background: var(--c-cream); color: var(--c-ink); }
.wf-table tbody tr:last-child td { border-bottom: 0; }
.wf-table strong { color: var(--c-ink); }

/* ---- Stepper ---- */
.wf-steps {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 0;
}
.wf-steps .step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--c-ink-4);
  font-weight: 500;
  white-space: nowrap;
}
.wf-steps .step .num {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--c-ink-4);
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 11px;
  background: var(--c-paper);
  color: var(--c-ink-4);
}
.wf-steps .step.on { color: var(--c-ink); font-weight: 600; }
.wf-steps .step.on .num { background: var(--c-coral); border-color: var(--c-coral); color: var(--c-paper); }
.wf-steps .step.done { color: var(--c-ink-2); }
.wf-steps .step.done .num { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-paper); }
.wf-steps .step.done .num::after { content: "✓"; font-size: 12px; }
.wf-steps .step.done .num { font-size: 0; }
.wf-steps .bar { flex: 1; height: 1.5px; background: var(--c-line); min-width: 16px; }
.wf-steps .bar.done { background: var(--c-ink); }

/* ---- Notes / annotations replacements ---- */
.wf-note {
  position: absolute;
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--c-ink-3);
  font-style: italic;
  max-width: 220px;
  line-height: 1.4;
}
.wf-note .arrow { display: none; }
.wf-tag {
  display: inline-block;
  background: var(--c-coral-s);
  color: var(--c-coral-d);
  border: 0;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  letter-spacing: 0; text-transform: none;
  transform: none;
}

/* role chip */
.wf-role-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: var(--c-ink); color: var(--c-paper);
  padding: 3px 8px; border-radius: 4px;
}

/* number marker (used in process step indicators) */
.wf-cnum {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c-coral); color: var(--c-paper);
  font-family: var(--font-mono); font-size: 12px; font-weight: 700;
}

/* ---- Charts (sketch bars → real bars) ---- */
.wf-bars { display: flex; align-items: flex-end; gap: 6px; height: 100%; }
.wf-bars .b {
  flex: 1;
  background: var(--c-cream-2);
  border: 0;
  border-radius: 3px 3px 0 0;
  min-height: 4px;
}
.wf-bars .b.hi   { background: var(--c-coral); }
.wf-bars .b.peer { background: var(--c-ink-4); }

.wf-line-chart { overflow: visible; display: block; }
.wf-line-chart .line { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.wf-line-chart .line.hi   { stroke: var(--c-coral); stroke-width: 2.5; }
.wf-line-chart .line.peer { stroke: var(--c-ink-4); stroke-dasharray: 4 4; }
.wf-line-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--c-ink-4); }
.wf-line-legend .swatch { display: inline-block; width: 14px; height: 2px; vertical-align: middle; margin-right: 6px; border-radius: 2px; }
.wf-line-legend .swatch.hi   { background: var(--c-coral); }
.wf-line-legend .swatch.peer { background: var(--c-ink-4); }
/* Per-point values under a line chart — always-visible numbers aligned under
   each data point (the stretched sparkline can't carry SVG axis labels). */
.pf-chart-values { display: flex; justify-content: space-between; gap: 2px; text-align: center; overflow-x: auto; }
.pf-chart-values > span { flex: 1 1 0; min-width: 32px; line-height: 1.3; }
.pf-chart-values > span small { color: var(--c-ink-4); }

/* Line chart with real X/Y axes: a Y-axis tick column beside the plot, month
   labels along the X-axis, and horizontal gridlines drawn inside the SVG. */
.pf-axis-chart { display: flex; gap: 10px; align-items: stretch; }
.pf-axis-chart .pf-yaxis {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 200px; text-align: right; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 10px; color: var(--c-ink-4);
}
.pf-axis-chart .pf-plot { flex: 1 1 0; min-width: 0; overflow-x: auto; border-left: 1px solid var(--c-line); }
.pf-axis-chart .pf-plot-inner { min-width: 460px; }
.pf-axis-chart .pf-plot-inner .wf-line-chart { border-bottom: 1px solid var(--c-line); }
.wf-line-chart .grid { stroke: var(--c-line-2); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* X-axis labels: no own scroll — they ride the .pf-plot scroll so they stay
   aligned under each point; each span flexes evenly across the plot width. */
.pf-xaxis { margin-top: 6px; overflow-x: visible; }
.pf-xaxis > span { min-width: 0; }
.pf-xaxis > span strong { font-size: 13px; }

/* Grouped bar chart with real X/Y axes (dashboard "volume vs peer"). A fixed
   Y-axis tick column sits beside a scrollable plot; each month is a group of
   two bars (you / peer) with its label on the X-axis. */
.pf-bar-chart { display: flex; gap: 10px; align-items: stretch; }
.pf-bar-chart .pf-yaxis {
  display: flex; flex-direction: column; justify-content: space-between;
  height: 160px; text-align: right; flex: 0 0 auto;
  font-family: var(--font-mono); font-size: 10px; color: var(--c-ink-4);
}
.pf-bar-plot { flex: 1 1 0; min-width: 0; overflow-x: auto; border-left: 1px solid var(--c-line); }
.pf-bar-inner { display: flex; flex-direction: column; }
.pf-bar-area { position: relative; height: 160px; border-bottom: 1px solid var(--c-line); }
.pf-bar-grid { position: absolute; inset: 0; pointer-events: none; }
.pf-bar-grid > span { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--c-line-2); }
.pf-bar-cols { position: relative; display: flex; align-items: flex-end; gap: 10px; height: 100%; padding: 0 2px; }
.pf-bar-group { flex: 1 1 0; min-width: 30px; height: 100%; display: flex; align-items: flex-end; }
.pf-bar-pair { display: flex; align-items: flex-end; gap: 3px; width: 100%; height: 100%; }
.pf-bar-pair .b { flex: 1; min-height: 0; border-radius: 3px 3px 0 0; }
.pf-bar-pair .b.hi   { background: var(--c-coral); }
.pf-bar-pair .b.peer { background: var(--c-ink-4); }
.pf-bar-xaxis { display: flex; gap: 10px; padding: 0 2px; margin-top: 6px; }
.pf-bar-xaxis > span { flex: 1 1 0; min-width: 30px; text-align: center; line-height: 1.25; }
.pf-bar-xaxis > span small { color: var(--c-ink-4); }

/* ---- Phone frame ---- */
.wf-phone {
  background: #15110A;
  border-radius: 44px;
  padding: 10px;
  width: 360px; height: 720px;
  position: relative;
  box-shadow: var(--sh-3), 0 0 0 4px #2A251F;
  font-family: var(--font-body);
}
.wf-phone .statusbar {
  position: absolute;
  top: 16px; left: 0; right: 0;
  height: 26px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  font-family: var(--font-body);
  font-size: 13px; font-weight: 600;
  color: var(--c-cream);
  z-index: 2;
}
.wf-phone .notch {
  position: absolute;
  top: 14px; left: 50%; transform: translateX(-50%);
  width: 110px; height: 28px;
  background: #0A0805;
  border-radius: 16px;
  z-index: 1;
}
.wf-phone .screen {
  background: var(--c-cream);
  border-radius: 36px;
  height: 100%;
  overflow: hidden;
  position: relative;
  padding: 56px 18px 18px;
  display: flex; flex-direction: column; gap: 12px;
}

/* misc */
.wf-pad-section { padding: 32px 40px; }

/* ---- Login (practice + admin sessions/new) ----
   Two-column layout on wide screens: the sign-in card on the left, an
   editorial aside on the right with the marketing tagline. Collapses to a
   single column on mobile. Admin variant ("login-shell-admin") hides the
   aside and keeps a centered card. */
.login-shell {
  min-height: 100vh;
  display: grid; grid-template-columns: minmax(0, 460px) 1fr;
  gap: 0;
  background: var(--c-cream);
}
.login-shell.login-shell-admin {
  grid-template-columns: 1fr;
  place-items: center;
}
.login-card {
  background: var(--c-paper);
  padding: 48px 40px;
  display: flex; flex-direction: column; gap: 14px;
  border-right: 1px solid var(--c-line);
}
.login-shell.login-shell-admin .login-card {
  border-right: 0;
  width: 460px; max-width: 100%;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}
.login-card-head { display: flex; flex-direction: column; gap: 6px; }
.login-kicker { color: var(--c-coral-d); }
.login-heading { font-size: 34px; letter-spacing: -0.02em; margin-top: 6px; }
.login-lead { color: var(--c-ink-2); }
.login-primary { margin-top: 8px; }
.login-secondary {
  display: flex; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: 13.5px;
}
.login-aside {
  background: linear-gradient(160deg, var(--c-blush) 0%, var(--c-cream-2) 60%, var(--c-cream) 100%);
  display: grid; place-items: center;
  padding: 48px;
  overflow: hidden;
  position: relative;
}
.login-aside-inner { max-width: 560px; }
.login-aside-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(34px, 4.2vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--c-ink);
  margin-top: 10px;
}
.login-aside-headline em {
  font-style: italic;
  color: var(--c-coral-d);
}
.login-aside-sub {
  margin-top: 14px;
  color: var(--c-ink-2);
  font-size: 16px;
  max-width: 48ch;
}

@media (max-width: 880px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-card { border-right: 0; border-bottom: 1px solid var(--c-line); padding: 32px 22px; }
  .login-aside { padding: 32px 22px; }
}
