/* ==========================================================================
   Tap-Pay Solutions — Agent Portal
   Design language: "the ledger line". Hairline rules over drop shadows,
   letterspaced eyebrows lifted from the SOLUTIONS lockup, tabular mono
   figures for every dollar amount.
   ========================================================================== */

/* ---- Tokens ------------------------------------------------------------ */
:root {
  /* Brand — sampled directly from TPS__LogoMark_FullColorRGB.png */
  --ink:        #101820;
  --ink-2:      #1B2530;
  --ink-3:      #2A3542;
  --crimson:    #BB2031;
  --crimson-dk: #94141F;
  --crimson-lt: #FDECEE;
  --steel:      #5C6871;
  --steel-lt:   #8A949B;
  --mist:       #C2C6C8;
  --hair:       #E3E6E7;
  --hair-soft:  #EEF0F1;
  --paper:      #F6F7F8;
  --card:       #FFFFFF;

  /* Status — kept desaturated so crimson always reads as the loudest thing */
  --green:      #1C7A56;
  --green-lt:   #E7F4EF;
  --amber:      #A8761B;
  --amber-lt:   #FBF2E2;
  --blue:       #2A5C8A;
  --blue-lt:    #EAF1F7;

  /* Type */
  --f-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-body:    "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono:    "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Geometry — 6px echoes the rounded square of the logomark */
  --r:    6px;
  --r-sm: 4px;
  --r-lg: 10px;
  --rail: 244px;
  --topbar: 72px;

  --shadow-pop: 0 12px 32px -8px rgba(16, 24, 32, .22), 0 2px 6px rgba(16, 24, 32, .06);
  --shadow-card: 0 1px 2px rgba(16, 24, 32, .04);
}

/* ---- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, p, figure, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; width: 100%; }
:focus-visible {
  outline: 2px solid var(--crimson);
  outline-offset: 2px;
  border-radius: 3px;
}
::selection { background: var(--crimson); color: #fff; }

/* ---- Primitives -------------------------------------------------------- */

/* The eyebrow is the structural device of this design — a direct lift of the
   letterspacing in the SOLUTIONS half of the logo lockup. */
.eyebrow {
  font-family: var(--f-display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--steel-lt);
  display: block;
}
.eyebrow--ink { color: var(--steel); }

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.h1 { font-family: var(--f-display); font-size: 25px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.h2 { font-family: var(--f-display); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.h3 { font-family: var(--f-display); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.muted   { color: var(--steel); }
.muted-2 { color: var(--steel-lt); }
.small   { font-size: 12.5px; }
.tiny    { font-size: 11.5px; }
.right   { text-align: right; }
.center  { text-align: center; }
.nowrap  { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden  { display: none !important; }
.grow    { flex: 1 1 auto; min-width: 0; }
.row     { display: flex; align-items: center; gap: 10px; }
.row-t   { display: flex; align-items: flex-start; gap: 10px; }
.col     { display: flex; flex-direction: column; }
.wrap    { flex-wrap: wrap; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; }
.mt-4{margin-top:4px}.mt-8{margin-top:8px}.mt-12{margin-top:12px}
.mt-16{margin-top:16px}.mt-24{margin-top:24px}.mt-32{margin-top:32px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}.mb-24{margin-bottom:24px}

/* ---- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px;
  border-radius: var(--r);
  font-family: var(--f-display);
  font-size: 13px; font-weight: 600; letter-spacing: -.005em;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color .14s ease, border-color .14s ease, color .14s ease, transform .08s ease;
}
.btn:active { transform: translateY(.5px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--crimson-dk); }

.btn--ink { background: var(--ink); color: #fff; }
.btn--ink:hover { background: var(--ink-3); }

.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--hair); }
.btn--ghost:hover { background: var(--paper); border-color: var(--mist); }

.btn--quiet { background: transparent; color: var(--steel); }
.btn--quiet:hover { background: var(--hair-soft); color: var(--ink); }

.btn--danger { background: var(--card); color: var(--crimson); border-color: #F0CDD2; }
.btn--danger:hover { background: var(--crimson-lt); }

.btn--sm { height: 30px; padding: 0 11px; font-size: 12.5px; }
.btn--sm svg { width: 13px; height: 13px; }
.btn--icon { width: 34px; padding: 0; }
.btn--icon.btn--sm { width: 28px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ---- Form controls ----------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label,
.label {
  font-family: var(--f-display);
  font-size: 11px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; color: var(--steel);
}
.input, .select, .textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .14s ease, box-shadow .14s ease;
}
.input::placeholder, .textarea::placeholder { color: var(--steel-lt); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--mist); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(16, 24, 32, .07);
}
.textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%235C6871' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6.5 8 10.5 12 6.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 15px;
}
.input--err, .select--err, .textarea--err { border-color: var(--crimson); }
.err-msg { color: var(--crimson); font-size: 12px; }
.hint { font-size: 12px; color: var(--steel-lt); }

.check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--crimson); flex: none; }

.search {
  position: relative; display: flex; align-items: center;
}
.search svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--steel-lt); pointer-events: none; }
.search .input { padding-left: 33px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-2 { grid-column: 1 / -1; }

/* Page-level two-column layouts. These live in CSS rather than inline styles
   so the mobile media query can collapse them — an inline
   grid-template-columns would win over any stylesheet rule and leave phones
   with an unreadable sliver of a column. */
.split { display: grid; gap: 16px; align-items: start; }
.split--main-left  { grid-template-columns: minmax(0, 1.4fr)  minmax(0, 1fr); }
.split--main-right { grid-template-columns: minmax(0, .85fr)  minmax(0, 1.15fr); }
.split--form       { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.split--table      { grid-template-columns: minmax(0, 1.6fr)  minmax(0, 1fr); }
.split--profile    { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.split--even       { grid-template-columns: minmax(0, 1fr)    minmax(0, 1fr); }

/* ---- Layout shell ------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; }

.rail {
  width: var(--rail); flex: none;
  background: var(--ink);
  color: #fff;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  z-index: 40;
}
.rail__brand {
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.09);
}
.rail__brand img { width: 152px; }
.rail__role {
  margin-top: 11px;
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-display);
  font-size: 9.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: rgba(255,255,255,.55);
}
.rail__role::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--crimson);
}
.rail__nav { flex: 1 1 auto; overflow-y: auto; padding: 14px 12px 20px; }
.rail__nav::-webkit-scrollbar { width: 8px; }
.rail__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.13); border-radius: 4px; }

.navgroup + .navgroup { margin-top: 20px; }
.navgroup__label {
  padding: 0 10px 8px;
  font-family: var(--f-display);
  font-size: 9.5px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.36);
}
.navitem {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r);
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.74);
  transition: background-color .14s ease, color .14s ease;
}
.navitem svg { width: 16px; height: 16px; flex: none; opacity: .82; }
.navitem:hover { background: rgba(255,255,255,.07); color: #fff; }
.navitem.is-active { background: rgba(255,255,255,.1); color: #fff; font-weight: 600; }
.navitem.is-active::before {
  content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 19px; background: var(--crimson); border-radius: 0 2px 2px 0;
}
.navitem__badge {
  margin-left: auto;
  min-width: 19px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--crimson); color: #fff;
  border-radius: 9px;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 500;
}

.rail__foot { padding: 14px 12px; border-top: 1px solid rgba(255,255,255,.09); }
.railuser { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border-radius: var(--r); transition: background-color .14s ease; }
.railuser:hover { background: rgba(255,255,255,.07); }
.railuser__meta { min-width: 0; text-align: left; }
/* Both are spans, so they need to be blocks to stack instead of running on. */
.railuser__name,
.railuser__sub { display: block; }
.railuser__name { font-size: 13px; font-weight: 600; color: #fff; }
.railuser__sub { font-size: 11px; color: rgba(255,255,255,.5); }

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar);
  flex: none;
  display: flex; align-items: center; gap: 16px;
  padding: 0 28px;
  background: rgba(246, 247, 248, .88);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--hair);
  position: sticky; top: 0; z-index: 30;
}
/* The title must clip rather than run underneath the action buttons when the
   bar gets tight — min-width alone doesn't stop text from painting over. */
.topbar__title { min-width: 0; overflow: hidden; }
.topbar__title .h1,
.topbar__title .eyebrow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar > .row { flex: none; }
.view { padding: 26px 28px 64px; max-width: 1400px; width: 100%; }

/* ---- Avatars ----------------------------------------------------------- */
.avatar {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--r);
  background: var(--ink-3); color: #fff;
  font-family: var(--f-display); font-size: 12px; font-weight: 700; letter-spacing: .01em;
}
.avatar--sm { width: 24px; height: 24px; font-size: 10px; border-radius: var(--r-sm); }
.avatar--lg { width: 44px; height: 44px; font-size: 15px; }

/* ---- Panels ------------------------------------------------------------ */
.panel {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.panel__head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--hair-soft);
}
.panel__body { padding: 18px; }
.panel__body--flush { padding: 0; }
.panel__foot { padding: 12px 18px; border-top: 1px solid var(--hair-soft); }

/* Stat strip — flat cells divided by hairlines, like a statement header,
   deliberately not floating shadowed cards. */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.stat { padding: 15px 18px 16px; border-right: 1px solid var(--hair-soft); }
.stat:last-child { border-right: 0; }
.stat__val {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-size: 25px; font-weight: 500; letter-spacing: -.03em;
  margin-top: 7px;
  line-height: 1.1;
}
.stat__val--crimson { color: var(--crimson); }
.stat__sub { margin-top: 5px; font-size: 12px; color: var(--steel-lt); }

/* ---- Tables ------------------------------------------------------------ */
.tbl { font-size: 13.5px; }
.tbl th {
  text-align: left;
  padding: 10px 14px;
  font-family: var(--f-display);
  font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--steel-lt);
  border-bottom: 1px solid var(--hair);
  background: var(--card);
  white-space: nowrap;
}
/* `.tbl th` is more specific than the .right/.center utilities, so without
   these a numeric column's heading sits left while its figures sit right. */
.tbl th.right  { text-align: right; }
.tbl th.center { text-align: center; }
/* Uppercase headings carry a .12em tracking space after their last letter.
   Right-aligned, that trailing space is what meets the column edge and the
   heading reads a hair left of the numbers under it — take it back. */
.tbl th.right { padding-right: calc(14px - .12em); }
.tbl th.is-sortable { cursor: pointer; user-select: none; }
.tbl th.is-sortable:hover { color: var(--ink); }
.tbl th .sortmark { display: inline-block; margin-left: 4px; opacity: .55; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--hair-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr.is-clickable { cursor: pointer; }
.tbl tbody tr.is-clickable:hover { background: #FAFBFB; }
.tbl__scroll { overflow-x: auto; }
.tbl tfoot td {
  background: var(--paper);
  border-top: 1px solid var(--hair); border-bottom: 0;
  font-family: var(--f-display); color: var(--ink);
}

/* ---- Badges & pills ---------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px;
  border-radius: 11px;
  font-family: var(--f-display);
  font-size: 11px; font-weight: 600; letter-spacing: .01em;
  white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; flex: none; }
.badge--no-dot::before { display: none; }
.badge--gray  { background: var(--hair-soft); color: var(--steel); }
.badge--green { background: var(--green-lt); color: var(--green); }
.badge--amber { background: var(--amber-lt); color: var(--amber); }
.badge--blue  { background: var(--blue-lt);  color: var(--blue); }
.badge--red   { background: var(--crimson-lt); color: var(--crimson); }
.badge--ink   { background: var(--ink); color: #fff; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 11px;
  border: 1px solid var(--hair);
  border-radius: 14px;
  background: var(--card);
  font-size: 12.5px; font-weight: 500; color: var(--steel);
  transition: border-color .14s ease, color .14s ease, background-color .14s ease;
}
.chip:hover { border-color: var(--mist); color: var(--ink); }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- Tabs -------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--hair); }
.tab {
  position: relative;
  padding: 10px 14px 11px;
  font-family: var(--f-display);
  font-size: 13px; font-weight: 600;
  color: var(--steel);
  transition: color .14s ease;
}
.tab:hover { color: var(--ink); }
.tab.is-on { color: var(--ink); }
.tab.is-on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--crimson);
}
.tab__count { margin-left: 6px; color: var(--steel-lt); font-family: var(--f-mono); font-size: 11.5px; }

/* ---- Dotted leader — the receipt detail -------------------------------- */
.leader { display: flex; align-items: baseline; gap: 8px; }
.leader__label { color: var(--steel); flex: none; }
.leader__dots {
  flex: 1 1 auto;
  border-bottom: 1px dotted var(--mist);
  transform: translateY(-3px);
  min-width: 16px;
}
.leader__val { flex: none; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* ---- Statement stub — the signature element ---------------------------- */
.stub {
  position: relative;
  background: var(--card);
  border: 1px solid var(--hair);
  border-top: 0;
  border-radius: 0 0 var(--r-lg) var(--r-lg);
  padding: 30px 30px 26px;
  box-shadow: var(--shadow-card);
}
/* Perforated tear edge along the top */
.stub__perf {
  height: 9px;
  background:
    radial-gradient(circle at 5px 0, transparent 4.5px, var(--hair) 4.5px, var(--hair) 5.4px, var(--card) 5.4px) 0 0 / 10px 9px repeat-x;
  border: 1px solid var(--hair);
  border-bottom: 0;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  position: relative;
}
.stub__rule { height: 3px; background: var(--crimson); }
.stub__amount {
  font-family: var(--f-mono);
  font-variant-numeric: tabular-nums;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 500;
  letter-spacing: -.045em;
  line-height: 1;
  color: var(--ink);
}
.stub__lines { display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; }
.stub__total {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--ink);
  font-weight: 700;
}
.stub__total .leader__label { color: var(--ink); font-weight: 700; }
.stub__watermark {
  position: absolute; right: 26px; bottom: 20px;
  width: 92px; opacity: .05; pointer-events: none;
}

/* ---- Pipeline (kanban) ------------------------------------------------- */
.board {
  display: grid;
  grid-auto-flow: column;
  /* 210px keeps all five stages on screen at laptop width — seeing the whole
     cycle at once is the point of the board. */
  grid-auto-columns: minmax(210px, 1fr);
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 12px;
  align-items: start;
}
.lane {
  background: #EFF1F2;
  border: 1px solid var(--hair);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  min-height: 180px;
  transition: background-color .16s ease, border-color .16s ease;
}
.lane.is-over { background: var(--crimson-lt); border-color: #EBB9BF; }
.lane__head { padding: 12px 13px 10px; }
.lane__topline { display: flex; align-items: center; gap: 8px; }
.lane__seq {
  font-family: var(--f-mono); font-size: 11px; color: var(--steel-lt);
  font-variant-numeric: tabular-nums;
}
.lane__name { font-family: var(--f-display); font-size: 12.5px; font-weight: 700; letter-spacing: -.005em; }
.lane__count { margin-left: auto; font-family: var(--f-mono); font-size: 11.5px; color: var(--steel); }
.lane__bar { height: 2px; margin-top: 9px; background: var(--mist); border-radius: 1px; overflow: hidden; }
/* Ink by default — crimson is held back for the boarded lane, so the eye lands
   on the stage that actually pays. */
.lane__bar span { display: block; height: 100%; background: var(--ink-3); }
.lane--won .lane__bar span { background: var(--crimson); }
.lane--won .lane__name { color: var(--crimson); }

/* Closed / Lost sits outside the cycle, so it reads as an archive rather than
   a step: muted, dashed, and visually separated from the five live stages. */
.lane--lost {
  background: transparent;
  border-style: dashed;
  border-color: var(--mist);
}
.lane--lost .lane__name { color: var(--steel); }
.lane--lost .lane__bar span { background: var(--steel-lt); }
.lane--lost .dealcard { background: #FCFCFC; border-style: dashed; }
.lane--lost .dealcard__biz { color: var(--steel); }

/* Banner shown in the account drawer in place of the stage stepper. */
.loststrip {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--mist);
  border-left: 3px solid var(--steel);
  border-radius: var(--r);
  background: var(--hair-soft);
  color: var(--steel);
}
.loststrip svg { color: var(--steel); flex: none; }
.lane__sum { margin-top: 8px; font-family: var(--f-mono); font-size: 11.5px; color: var(--steel); font-variant-numeric: tabular-nums; }
.lane__cards { padding: 0 9px 9px; display: flex; flex-direction: column; gap: 8px; }
.lane__empty {
  margin: 0 9px 9px; padding: 18px 10px;
  border: 1px dashed var(--mist); border-radius: var(--r);
  text-align: center; font-size: 12px; color: var(--steel-lt);
}

.dealcard {
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  padding: 11px 12px;
  cursor: grab;
  transition: box-shadow .14s ease, border-color .14s ease, transform .14s ease;
}
.dealcard:hover { border-color: var(--mist); box-shadow: var(--shadow-card); }
.dealcard:active { cursor: grabbing; }
.dealcard.is-dragging { opacity: .4; }
.dealcard__biz { font-family: var(--f-display); font-size: 13.5px; font-weight: 700; letter-spacing: -.01em; }
.dealcard__contact { margin-top: 2px; font-size: 12px; color: var(--steel); }
.dealcard__foot {
  margin-top: 10px; padding-top: 9px;
  border-top: 1px solid var(--hair-soft);
  display: flex; align-items: center; gap: 8px;
}
.dealcard__vol { font-family: var(--f-mono); font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dealcard__age { margin-left: auto; font-size: 11px; color: var(--steel-lt); }
.dealcard__flag { color: var(--crimson); }

/* ---- Tickets ----------------------------------------------------------- */
/* Three wide lanes rather than five narrow ones — a ticket card carries more
   text than a deal card, so it needs the room. */
.board--tickets { grid-auto-columns: minmax(268px, 1fr); }
.lane--open .lane__name { color: var(--crimson); }
.lane--closed { background: transparent; border-style: dashed; }
.lane--closed .dealcard { background: #FCFCFC; }

/* Unassigned-queue call to action above the ticket board. */
.triage {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  background: var(--crimson-lt); border: 1px solid #EBB9BF;
  border-radius: var(--r); color: var(--ink);
}
.triage > svg { color: var(--crimson); flex: none; }
.triage .tiny { color: var(--steel); }
@media (max-width: 640px) {
  .triage { align-items: flex-start; flex-wrap: wrap; }
}

.tkt--high { border-left: 3px solid var(--crimson); }
.tkt__flag { color: var(--crimson); flex: none; display: inline-flex; }
.tkt .dealcard__foot { gap: 8px; }

/* ---- Calendar ---------------------------------------------------------- */
.cal-chip {
  display: flex; align-items: flex-start; gap: 6px;
  width: 100%; padding: 4px 6px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--hair);
  font-size: 11.5px; text-align: left;
  transition: border-color .14s ease, background-color .14s ease;
}
.cal-chip:hover { border-color: var(--chip, var(--mist)); background: var(--paper); }
.cal-chip + .cal-chip { margin-top: 4px; }
.cal-chip[draggable=true] { cursor: grab; }
.cal-chip.is-dragging { opacity: .4; cursor: grabbing; }
.cal-chip__dot {
  width: 6px; height: 6px; flex: none;
  border-radius: 50%; background: var(--chip, var(--steel));
}
.cal-chip__time {
  flex: none; font-family: var(--f-mono); font-size: 10px;
  color: var(--steel); font-variant-numeric: tabular-nums;
}
/* Week columns are narrow; two lines beats an ellipsis after three words. */
.cal-chip__title {
  min-width: 0; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cal-chip__dot { margin-top: 4px; }
.cal-chip__time { margin-top: 1px; }
/* Month cells are short — keep those to a single line. */
.cal-cell .cal-chip__title { -webkit-line-clamp: 1; }

/* Week — seven day columns */
.cal-week {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px;
  align-items: start;
}
.cal-col {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r); overflow: hidden; min-height: 190px;
}
.cal-col.is-today { border-color: var(--crimson); }
/* Drop landing zone, shared by the week column and the month cell. */
.cal-col.is-drop, .cal-cell.is-drop {
  border-color: var(--crimson);
  background: var(--crimson-lt);
  box-shadow: inset 0 0 0 1px var(--crimson);
}
.cal-col.is-drop * , .cal-cell.is-drop * { pointer-events: none; }
.cal-col__head {
  width: 100%; padding: 9px 10px;
  border-bottom: 1px solid var(--hair-soft);
  display: flex; align-items: baseline; gap: 7px;
  background: var(--paper);
}
.cal-col.is-today .cal-col__head { background: var(--crimson-lt); }
.cal-col__dow {
  font-family: var(--f-display); font-size: 10px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--steel-lt);
}
.cal-col.is-today .cal-col__dow { color: var(--crimson); }
.cal-col__num {
  font-family: var(--f-mono); font-size: 15px; font-weight: 500;
  font-variant-numeric: tabular-nums; margin-left: auto;
}
.cal-col.is-today .cal-col__num { color: var(--crimson); }
.cal-col__body { padding: 7px; }
.cal-col__empty { text-align: center; color: var(--mist); font-size: 12px; padding: 10px 0; }

/* Month */
.cal-dow {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px; margin-bottom: 6px;
}
.cal-dow span {
  font-family: var(--f-display); font-size: 10px; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--steel-lt);
  padding-left: 2px;
}
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-cell {
  background: var(--card); border: 1px solid var(--hair);
  border-radius: var(--r); padding: 7px; min-height: 108px;
  cursor: pointer; transition: border-color .14s ease;
}
.cal-cell:hover { border-color: var(--mist); }
.cal-cell.is-outside { background: var(--paper); opacity: .6; }
.cal-cell.is-today { border-color: var(--crimson); }
.cal-cell__num {
  display: block; font-family: var(--f-mono); font-size: 12.5px;
  font-variant-numeric: tabular-nums; color: var(--steel); margin-bottom: 5px;
}
.cal-cell.is-today .cal-cell__num { color: var(--crimson); font-weight: 600; }
.cal-cell__more { display: block; margin-top: 4px; font-size: 10.5px; color: var(--steel-lt); }

/* Day */
.cal-row {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 12px 18px; text-align: left;
  border-bottom: 1px solid var(--hair-soft);
  transition: background-color .12s ease;
}
.cal-row:last-child { border-bottom: 0; }
.cal-row:hover { background: #FAFBFB; }
.cal-row__time {
  flex: none; width: 78px; font-size: 12px; color: var(--steel);
  font-variant-numeric: tabular-nums;
}
.cal-row__bar { flex: none; width: 3px; align-self: stretch; border-radius: 2px; background: var(--chip, var(--steel)); }

@media (max-width: 900px) {
  /* A seven-column week is unreadable on a phone; stack the days instead. */
  .cal-week { grid-template-columns: 1fr; }
  .cal-col { min-height: 0; }
  .cal-dow { display: none; }
  .cal-month { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .cal-cell { min-height: 74px; padding: 4px; }
  .cal-cell .cal-chip__title, .cal-cell .cal-chip__time { display: none; }
  .cal-chip { justify-content: center; padding: 3px; }
  .cal-row__time { width: 62px; }
}

/* ---- Stage stepper ----------------------------------------------------- */
.stepper { display: flex; align-items: stretch; gap: 3px; }
.step {
  flex: 1 1 0; min-width: 0;
  padding: 8px 10px 9px;
  background: var(--hair-soft);
  border: 0;
  text-align: left;
  transition: background-color .14s ease, color .14s ease;
}
.step:first-child { border-radius: var(--r) 0 0 var(--r); }
.step:last-child  { border-radius: 0 var(--r) var(--r) 0; }
.step:hover { background: var(--mist); }
.step__seq { font-family: var(--f-mono); font-size: 10px; color: var(--steel-lt); }
.step__name { font-family: var(--f-display); font-size: 11.5px; font-weight: 600; color: var(--steel); margin-top: 2px; }
.step.is-done { background: var(--ink-3); }
.step.is-done .step__seq { color: rgba(255,255,255,.5); }
.step.is-done .step__name { color: rgba(255,255,255,.9); }
.step.is-current { background: var(--crimson); }
.step.is-current .step__seq { color: rgba(255,255,255,.65); }
.step.is-current .step__name { color: #fff; }

/* ---- Drawer ------------------------------------------------------------ */
.scrim {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(16, 24, 32, .38);
  animation: fade .16s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 61;
  width: min(680px, 100vw);
  background: var(--paper);
  border-left: 1px solid var(--hair);
  display: flex; flex-direction: column;
  animation: slide-in .22s cubic-bezier(.22,.7,.3,1);
  box-shadow: -18px 0 44px -18px rgba(16,24,32,.28);
}
.drawer__head {
  flex: none;
  padding: 18px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--hair);
}
.drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 20px 22px 44px; }
.drawer__foot { flex: none; padding: 13px 22px; background: var(--card); border-top: 1px solid var(--hair); display: flex; gap: 9px; }

@keyframes slide-in { from { transform: translateX(22px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { transform: translateY(6px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---- Modal ------------------------------------------------------------- */
.modal {
  position: fixed; z-index: 61;
  top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 60px);
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  display: flex; flex-direction: column;
  animation: pop .18s cubic-bezier(.22,.7,.3,1);
}
.modal--wide { width: min(760px, calc(100vw - 32px)); }
.modal__head { padding: 18px 22px 14px; border-bottom: 1px solid var(--hair-soft); }
.modal__body { padding: 20px 22px; overflow-y: auto; }
.modal__foot { padding: 14px 22px; border-top: 1px solid var(--hair-soft); display: flex; justify-content: flex-end; gap: 9px; }

/* ---- Menu -------------------------------------------------------------- */
.menu {
  position: fixed; z-index: 70;
  min-width: 190px;
  background: var(--card);
  border: 1px solid var(--hair);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  padding: 5px;
  animation: pop .13s ease;
}
.menu__item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 10px;
  border-radius: var(--r-sm);
  font-size: 13.5px; text-align: left;
  transition: background-color .12s ease;
}
.menu__item svg { width: 15px; height: 15px; color: var(--steel); flex: none; }
.menu__item:hover { background: var(--hair-soft); }
.menu__item--danger { color: var(--crimson); }
.menu__item--danger svg { color: var(--crimson); }
.menu__sep { height: 1px; background: var(--hair-soft); margin: 5px 0; }

/* ---- Toast ------------------------------------------------------------- */
.toasts {
  position: fixed; z-index: 90; bottom: 22px; right: 22px;
  display: flex; flex-direction: column-reverse; gap: 9px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  min-width: 268px; max-width: 384px;
  padding: 12px 14px;
  background: var(--ink);
  color: #fff;
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  font-size: 13.5px;
  animation: slide-in .2s cubic-bezier(.22,.7,.3,1);
}
.toast svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.toast--ok svg { color: #57D6A4; }
.toast--err svg { color: #FF8A97; }
.toast__sub { color: rgba(255,255,255,.65); font-size: 12px; margin-top: 2px; }

/* ---- Timeline (notes / activity) --------------------------------------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px;
  width: 1px; background: var(--hair);
}
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--mist);
}
.tl-item--note::before { border-color: var(--crimson); }
.tl-item__meta { font-size: 11.5px; color: var(--steel-lt); }
.tl-item__body {
  margin-top: 5px; padding: 11px 13px;
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r);
  font-size: 13.5px; line-height: 1.55; white-space: pre-wrap;
}

/* ---- Task / follow-up rows --------------------------------------------- */
.taskrow {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--hair-soft);
}
.taskrow:last-child { border-bottom: 0; }
.taskrow.is-done .taskrow__title { text-decoration: line-through; color: var(--steel-lt); }
.taskrow__title { font-size: 13.5px; font-weight: 500; }
.taskrow input[type=checkbox] { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--crimson); flex: none; }

/* Rows that open something on click — follow-ups and account tickets. */
.taskrow--edit { cursor: pointer; align-items: center; transition: background-color .12s ease; }
.taskrow--edit:hover { background: #FAFBFB; }
.taskrow__edit {
  flex: none; display: inline-flex; color: var(--mist);
  opacity: 0; transition: opacity .12s ease;
}
.taskrow--edit:hover .taskrow__edit { opacity: 1; }
/* Touch devices have no hover, so the affordance stays put. */
@media (hover: none) { .taskrow__edit { opacity: 1; } }

/* ---- Accordion (FAQ) --------------------------------------------------- */
.acc { border-bottom: 1px solid var(--hair-soft); }
.acc:last-child { border-bottom: 0; }
.acc__q {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 15px 18px;
  text-align: left;
  font-family: var(--f-display); font-size: 14px; font-weight: 600;
}
.acc__q svg { width: 16px; height: 16px; margin-left: auto; color: var(--steel-lt); transition: transform .2s ease; flex: none; }
.acc.is-open .acc__q svg { transform: rotate(180deg); }
.acc__a { padding: 0 18px 17px; font-size: 13.5px; line-height: 1.65; color: var(--steel); max-width: 76ch; }

/* ---- Knowledge base cards ---------------------------------------------- */
.kb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.kb-card {
  display: flex; flex-direction: column;
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-lg);
  overflow: hidden; text-align: left;
  transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease;
}
.kb-card:hover { border-color: var(--mist); box-shadow: var(--shadow-card); transform: translateY(-1px); }
.kb-card__thumb {
  position: relative; aspect-ratio: 16 / 9;
  background: var(--ink); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.kb-card__thumb img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.kb-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
}
.kb-card__play span {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(187, 32, 49, .95);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
  transition: transform .16s ease;
}
.kb-card:hover .kb-card__play span { transform: scale(1.08); }
.kb-card__play svg { width: 17px; height: 17px; color: #fff; margin-left: 2px; }
.kb-card__dur {
  position: absolute; right: 8px; bottom: 8px;
  padding: 2px 6px; border-radius: 3px;
  background: rgba(16,24,32,.82); color: #fff;
  font-family: var(--f-mono); font-size: 11px;
}
.kb-card__body { padding: 14px 15px 15px; flex: 1 1 auto; display: flex; flex-direction: column; }
.kb-card__title { font-family: var(--f-display); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.kb-card__sum { margin-top: 6px; font-size: 12.5px; color: var(--steel); line-height: 1.55; flex: 1 1 auto; }

/* Written material gets no thumbnail — a hairline rule and the title do the
   work, which keeps the grid dense and spends no crimson on decoration. */
.kb-card--doc { border-top: 2px solid var(--ink); }
.kb-card--doc:hover { border-top-color: var(--crimson); }
.kb-card--doc .kb-card__body { padding: 15px 16px 16px; }
.kb-card__cat {
  display: inline-flex; align-items: center;
  font-family: var(--f-display);
  font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--steel-lt);
  margin-bottom: 9px;
}
.kb-card__meta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 13px; padding-top: 11px;
  border-top: 1px solid var(--hair-soft);
}

/* ---- Progress ---------------------------------------------------------- */
.bar { height: 6px; background: var(--hair); border-radius: 3px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--crimson); border-radius: 3px; transition: width .5s cubic-bezier(.3,.8,.3,1); }
.bar--green span { background: var(--green); }
.bar--ink span { background: var(--ink); }

/* ---- Empty state ------------------------------------------------------- */
.empty { padding: 52px 24px; text-align: center; }
.empty svg { width: 30px; height: 30px; color: var(--mist); margin: 0 auto 12px; }
.empty__title { font-family: var(--f-display); font-size: 15px; font-weight: 700; }
.empty__body { margin-top: 5px; font-size: 13px; color: var(--steel); max-width: 44ch; margin-inline: auto; }

/* ---- Dropzone ---------------------------------------------------------- */
.drop {
  border: 1.5px dashed var(--mist);
  border-radius: var(--r);
  padding: 24px 18px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease;
}
.drop:hover, .drop.is-over { border-color: var(--crimson); background: var(--crimson-lt); }
.drop svg { width: 22px; height: 22px; color: var(--steel-lt); margin: 0 auto 9px; }

.filerow {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--hair); border-radius: var(--r);
  background: var(--card);
}
.filerow__ico {
  width: 32px; height: 32px; flex: none;
  border-radius: var(--r-sm);
  background: var(--crimson-lt); color: var(--crimson);
  display: flex; align-items: center; justify-content: center;
}
.filerow__ico svg { width: 16px; height: 16px; }

/* ---- Announcements ----------------------------------------------------- */
.ann { padding: 15px 18px; border-bottom: 1px solid var(--hair-soft); }
.ann:last-child { border-bottom: 0; }
.ann__title { font-family: var(--f-display); font-size: 14px; font-weight: 700; letter-spacing: -.01em; }
.ann__body { margin-top: 6px; font-size: 13px; line-height: 1.6; color: var(--steel); white-space: pre-wrap; }

/* ---- Login ------------------------------------------------------------- */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
}
.login__aside {
  background: var(--ink);
  color: #fff;
  padding: 46px 52px;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
/* Ledger rule field — the receipt bars of the logomark, blown up as texture */
.login__rules {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,.045) 0px,
    rgba(255,255,255,.045) 13px,
    transparent 13px,
    transparent 30px
  );
  mask-image: linear-gradient(105deg, #000 8%, transparent 62%);
  -webkit-mask-image: linear-gradient(105deg, #000 8%, transparent 62%);
  pointer-events: none;
}
.login__mark {
  position: absolute; right: -110px; bottom: -90px;
  width: 460px; opacity: .05; pointer-events: none;
}
/* Lift only the in-flow children above the two decorative layers. Scoping this
   by class matters: a `.login__aside > *` rule would out-specify the
   `position: absolute` above and drop the watermark back into the flow. */
.login__logo,
.login__pitch,
.login__sub,
.login__list,
.login__facts { position: relative; z-index: 1; }
.login__logo { width: 208px; }
.login__pitch {
  margin-top: auto;
  font-family: var(--f-display);
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.06;
  max-width: 14ch;
}
.login__pitch em { font-style: normal; color: var(--crimson); }
.login__sub { margin-top: 16px; font-size: 14.5px; line-height: 1.6; color: rgba(255,255,255,.62); max-width: 44ch; }

/* What the portal actually gives them, scannable in a couple of seconds.
   Same crimson eyebrow + hairline rules as the rest of the product, so the
   sign-in screen reads as the same thing they are about to log into. */
.login__list { margin-top: 22px; max-width: 50ch; }
.login__row { display: flex; gap: 16px; align-items: baseline; padding: 9px 0; }
.login__row + .login__row { border-top: 1px solid rgba(255, 255, 255, .1); }
.login__row-key {
  flex: none; width: 108px;
  font-family: var(--f-display);
  font-size: 10px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--crimson);
}
.login__row-val { font-size: 13.5px; line-height: 1.5; color: rgba(255, 255, 255, .72); }

.login__facts { margin-top: 26px; display: flex; gap: 34px; flex-wrap: wrap; }

/* Short laptop screens: tighten so the live counters stay above the fold
   rather than being pushed off the bottom of the panel. */
@media (max-height: 820px) {
  .login__aside { padding-top: 34px; padding-bottom: 34px; }
  .login__pitch { font-size: clamp(28px, 3vw, 38px); }
  .login__sub { margin-top: 13px; font-size: 13.5px; }
  .login__list { margin-top: 16px; }
  .login__row { padding: 7px 0; }
  .login__facts { margin-top: 20px; }
}
.login__fact .eyebrow { color: rgba(255,255,255,.42); }
.login__fact strong {
  display: block; margin-top: 7px;
  font-family: var(--f-mono); font-variant-numeric: tabular-nums;
  font-size: 21px; font-weight: 500; letter-spacing: -.03em;
}

.login__form {
  display: flex; align-items: center; justify-content: center;
  padding: 46px 40px;
  background: var(--card);
}
.login__card { width: 100%; max-width: 372px; }
.demo-key {
  margin-top: 22px; padding: 14px 16px;
  border: 1px solid var(--hair); border-radius: var(--r);
  background: var(--paper);
}
.demo-key button {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 9px; border-radius: var(--r-sm); text-align: left;
  transition: background-color .12s ease;
}
.demo-key button:hover { background: var(--hair-soft); }

/* ---- Charts ------------------------------------------------------------ */
.chart { width: 100%; display: block; overflow: visible; }
.chart text { font-family: var(--f-mono); font-size: 10px; fill: var(--steel-lt); }
.chart .grid { stroke: var(--hair-soft); stroke-width: 1; }
.chart .axis { stroke: var(--hair); stroke-width: 1; }

.funnel-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
.funnel-row__name { width: 116px; flex: none; font-size: 12.5px; font-weight: 500; }
.funnel-row__track { flex: 1 1 auto; height: 24px; background: var(--hair-soft); border-radius: var(--r-sm); overflow: hidden; }
.funnel-row__fill { height: 100%; background: var(--ink); border-radius: var(--r-sm); transition: width .5s cubic-bezier(.3,.8,.3,1); }
.funnel-row__fill--crimson { background: var(--crimson); }
.funnel-row__val { width: 74px; flex: none; text-align: right; font-family: var(--f-mono); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* ---- Utility ----------------------------------------------------------- */
.divider { height: 1px; background: var(--hair); }
.stack { display: flex; flex-direction: column; }
.stack > * + * { border-top: 1px solid var(--hair-soft); }
.link { color: var(--crimson); font-weight: 600; }
.link:hover { text-decoration: underline; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.copyline {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 11px;
  background: var(--paper); border: 1px solid var(--hair); border-radius: var(--r);
  font-family: var(--f-mono); font-size: 12.5px;
}

/* Entrance stagger — subtle, only on view swap */
.view > * { animation: pop .26s cubic-bezier(.22,.7,.3,1) backwards; }
.view > *:nth-child(1) { animation-delay: 0ms; }
.view > *:nth-child(2) { animation-delay: 35ms; }
.view > *:nth-child(3) { animation-delay: 70ms; }
.view > *:nth-child(4) { animation-delay: 100ms; }
.view > *:nth-child(n+5) { animation-delay: 125ms; }

/* ---- Mobile ------------------------------------------------------------ */
.rail__scrim { display: none; }
.menu-btn { display: none; }

@media (max-width: 1080px) {
  .login { grid-template-columns: 1fr; }
  .login__aside { padding: 30px 26px 34px; }
  .login__pitch { margin-top: 30px; font-size: 30px; }
  .login__facts { margin-top: 22px; gap: 22px; }
  .login__mark { display: none; }
}

@media (max-width: 900px) {
  .rail {
    position: fixed; left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
    transition: transform .22s cubic-bezier(.22,.7,.3,1);
    z-index: 80;
  }
  .rail.is-open { transform: none; }
  .rail__scrim.is-on {
    display: block; position: fixed; inset: 0; z-index: 79;
    background: rgba(16,24,32,.4);
  }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 0 16px; gap: 10px; }
  .view { padding: 18px 16px 56px; }
  .grid-2, .grid-3, .split { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { border-bottom: 1px solid var(--hair-soft); }
  .stat:nth-child(2n) { border-right: 0; }
  .stepper { flex-wrap: wrap; }
  .step { flex-basis: calc(50% - 2px); border-radius: var(--r) !important; }
  .drawer { width: 100vw; }
  .funnel-row__name { width: 84px; font-size: 11.5px; }
}

@media (max-width: 560px) {
  /* A fixed label column leaves too little room on a phone and every row
     wraps. Stacking is both shorter and easier to scan. */
  .login__row { flex-direction: column; gap: 3px; padding: 8px 0; }
  .login__row-key { width: auto; }
  .login__row-val { font-size: 13px; }

  .stats { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
  .stub { padding: 22px 18px 20px; }
  .stub__watermark { display: none; }
  .topbar { height: 60px; }
  .h1 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

@media print {
  .rail, .topbar, .btn, .toasts { display: none !important; }
  .view { padding: 0; }
  .panel, .stub { border-color: #ccc; box-shadow: none; }
}
