/* =====================================================================
   Interactive CRM demo, veris-ai.com/demo/crm/
   Product register: the site's navy, paper and royal-blue tokens carried
   into an app surface. Every colour lives in :root (scripts/copy-rules.mjs
   checks this file the same way it checks styles.css).
   ===================================================================== */

:root {
  /* Navy and ink, from the site. */
  --navy-950: oklch(0.165 0.030 258);
  --navy-900: oklch(0.212 0.038 258);
  --navy-800: oklch(0.288 0.041 258);
  --ink:   oklch(0.235 0.028 258);
  --ink-2: oklch(0.430 0.020 255);
  --ink-3: oklch(0.520 0.016 255);
  --on-dark:   oklch(0.975 0.004 250);
  --on-dark-2: oklch(0.830 0.014 250);

  /* Surfaces. Canvas is the work area, side is the cooler second neutral
     layer for navigation, column is the board lane. */
  --white:  oklch(1 0 0);
  --canvas: oklch(0.982 0.003 250);
  --side:   oklch(0.962 0.005 252);
  --column: oklch(0.955 0.006 252);
  --hover:  oklch(0.235 0.028 258 / 0.05);

  /* The one accent. */
  --blue:      oklch(0.480 0.185 262);
  --blue-deep: oklch(0.410 0.175 263);
  --blue-lit:  oklch(0.740 0.145 250);
  --blue-wash: oklch(0.480 0.185 262 / 0.07);
  --blue-edge: oklch(0.480 0.185 262 / 0.24);
  --blue-1: oklch(0.880 0.060 255);
  --blue-2: oklch(0.780 0.110 258);
  --blue-3: oklch(0.660 0.160 260);
  --blue-4: oklch(0.550 0.185 262);
  --blue-5: oklch(0.450 0.175 263);
  --blue-6: oklch(0.360 0.140 263);

  /* Semantic states. Temperature and flags only, never decoration. */
  --hot-ink:   oklch(0.480 0.170 27);
  --hot-wash:  oklch(0.600 0.190 27 / 0.10);
  --hot-edge:  oklch(0.600 0.190 27 / 0.28);
  --warm-ink:  oklch(0.470 0.105 65);
  --warm-wash: oklch(0.760 0.140 75 / 0.18);
  --cold-ink:  oklch(0.450 0.050 245);
  --cold-wash: oklch(0.700 0.050 245 / 0.16);
  --good-ink:  oklch(0.450 0.110 155);
  --good-wash: oklch(0.650 0.140 155 / 0.14);
  --good:      oklch(0.640 0.150 155);
  --good-ring: oklch(0.640 0.150 155 / 0.35);

  /* Hairlines. */
  --line:        oklch(0.235 0.028 258 / 0.12);
  --line-soft:   oklch(0.235 0.028 258 / 0.07);
  --line-strong: oklch(0.235 0.028 258 / 0.22);
  --line-dark:   oklch(0.975 0.004 250 / 0.22);
  --wash-light:  oklch(1 0 0 / 0.08);

  /* Depth. Offset plus soft blur, layered. */
  --shadow-sm: 0 1px 2px oklch(0.235 0.028 258 / 0.06);
  --shadow:    0 1px 2px oklch(0.235 0.028 258 / 0.05), 0 4px 12px oklch(0.235 0.028 258 / 0.07);
  --shadow-lg: 0 2px 4px oklch(0.235 0.028 258 / 0.05), 0 12px 28px oklch(0.235 0.028 258 / 0.10);
  --shadow-xl: 0 2px 6px oklch(0.235 0.028 258 / 0.06), 0 24px 64px oklch(0.235 0.028 258 / 0.18);
  --scrim:     oklch(0.165 0.030 258 / 0.32);

  --font: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
}

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
::selection { background: var(--blue-edge); color: var(--ink); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: var(--r-sm); }
.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;
}
.num { font-variant-numeric: tabular-nums; }

* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

.i { display: inline-flex; width: 16px; height: 16px; flex: none; }
.i svg { width: 100%; height: 100%; }

/* ------------------------------------------------------ standalone bar */
.standalone-bar {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 20px;
  background: var(--navy-950);
  color: var(--on-dark-2);
  font-size: 13px;
}
.standalone-bar[hidden] { display: none; }
.standalone-label strong { color: var(--on-dark); font-weight: 600; margin-right: 6px; }
.standalone-actions { display: flex; align-items: center; gap: 16px; flex: none; }
.sb-link { color: var(--on-dark); text-underline-offset: 3px; }
.sb-cta {
  color: var(--white);
  background: var(--blue);
  padding: 6px 12px;
  border-radius: var(--r);
  text-decoration: none;
  font-weight: 600;
}
.sb-cta:hover { background: var(--blue-deep); }

/* ------------------------------------------------------------ app shell */
.app {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 228px minmax(0, 1fr);
}

.sidebar {
  background: var(--side);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 12px;
  min-height: 0;
}
.workspace { display: flex; align-items: center; gap: 10px; padding: 2px 6px; }
.workspace-tile {
  width: 32px; height: 32px;
  border-radius: var(--r);
  background: var(--navy-900);
  color: var(--on-dark);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
}
.workspace-name { display: grid; line-height: 1.25; }
.workspace-name strong { font-size: 14px; font-weight: 650; }
.workspace-name span { font-size: 12px; color: var(--ink-3); }

.side-nav { display: grid; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--r);
  background: none;
  color: var(--ink-2);
  font-size: 14px; font-weight: 500;
  text-align: left;
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.side-link:hover { background: var(--hover); color: var(--ink); }
.side-link[aria-current="page"] {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.side-link[aria-current="page"] .i { color: var(--blue); }
.side-count {
  margin-left: auto;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 11.5px; font-weight: 650;
  display: inline-grid; place-items: center;
}
.side-count:empty { display: none; }

.agent-card {
  margin-top: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 12px;
  font-size: 12.5px;
  color: var(--ink-2);
  display: grid;
  gap: 6px;
}
.agent-head { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 650; font-size: 13px; }
.pulse {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px var(--good-ring);
}

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

/* -------------------------------------------------------------- top bar */
.topbar {
  flex: none;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.search {
  flex: 1;
  max-width: 420px;
  height: 36px;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--canvas);
  color: var(--ink-3);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), background 150ms var(--ease);
}
.search:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-edge); background: var(--white); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 14px; color: var(--ink); }
.search input::placeholder { color: var(--ink-3); }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 32px; height: 18px; border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background 150ms var(--ease);
}
.switch-thumb {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: transform 180ms var(--ease);
}
.switch input:checked + .switch-track { background: var(--blue); }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(14px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--blue); outline-offset: 2px; }

.demo-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px;
  border-radius: 999px;
  background: var(--blue-wash);
  border: 1px solid var(--blue-edge);
  color: var(--blue-deep);
  font-size: 12px; font-weight: 650;
  white-space: nowrap;
}
.demo-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.me {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--navy-900); color: var(--on-dark);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 650;
}

/* -------------------------------------------------------------- welcome */
.welcome {
  flex: none;
  margin: 16px 24px 0;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px 12px 16px;
  background: var(--navy-900);
  color: var(--on-dark-2);
  border-radius: var(--r-lg);
  font-size: 13.5px;
  box-shadow: var(--shadow);
}
.welcome[hidden] { display: none; }
.welcome strong { color: var(--on-dark); font-weight: 650; }
.welcome .i { color: var(--blue-lit); width: 18px; height: 18px; }
.welcome p { flex: 1; }

/* --------------------------------------------------------------- views */
.view { flex: 1; min-height: 0; overflow: auto; padding: 22px 24px 32px; outline: none; }
.noscript { max-width: 52ch; padding: 40px 0; }
.noscript h1 { font-size: 20px; margin-bottom: 8px; }
.noscript ul { margin: 12px 0; padding-left: 20px; display: grid; gap: 6px; color: var(--ink-2); }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; line-height: 1.2; font-weight: 650; letter-spacing: -0.012em; }
.page-sub { margin-top: 4px; color: var(--ink-2); font-size: 13.5px; max-width: 68ch; }
.page-actions { display: flex; gap: 8px; flex: none; }

/* Explanations: what this part of the screen is for. */
.explain {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 8px 10px;
  background: var(--blue-wash);
  border: 1px solid var(--blue-edge);
  border-radius: var(--r);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-2);
}
.explain .i { color: var(--blue); width: 15px; height: 15px; margin-top: 1px; }
.explain strong { color: var(--ink); font-weight: 600; }
.no-explain .explain { display: none; }

/* -------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 12px;
  border-radius: var(--r);
  border: 1px solid transparent;
  font-size: 13.5px; font-weight: 600;
  white-space: nowrap;
  transition: background 150ms var(--ease), border-color 150ms var(--ease), color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.btn .i { width: 15px; height: 15px; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn-secondary { background: var(--white); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { background: var(--canvas); border-color: var(--ink-3); }
.btn-ghost { background: none; color: var(--ink-2); }
.btn-ghost:hover { background: var(--hover); color: var(--ink); }
.btn-ghost-light { background: none; color: var(--on-dark); border-color: var(--line-dark); flex: none; }
.btn-ghost-light:hover { background: var(--wash-light); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.link-btn {
  background: none; border: 0; padding: 0;
  color: var(--blue); font-weight: 600; font-size: 13px;
  display: inline-flex; align-items: center; gap: 4px;
}
.link-btn:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.link-btn .i { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- chips */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 650;
  white-space: nowrap;
  background: var(--canvas);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: none; }
.chip-hot { background: var(--hot-wash); color: var(--hot-ink); border-color: transparent; }
.chip-warm { background: var(--warm-wash); color: var(--warm-ink); border-color: transparent; }
.chip-cold { background: var(--cold-wash); color: var(--cold-ink); border-color: transparent; }
.chip-hot::before, .chip-warm::before, .chip-cold::before { display: inline-block; }
.chip-flag { background: var(--hot-ink); color: var(--white); border-color: transparent; }
.chip-flag .i { width: 12px; height: 12px; }
.chip-client { background: var(--blue-wash); color: var(--blue-deep); border-color: var(--blue-edge); }
.chip-past { background: var(--good-wash); color: var(--good-ink); border-color: transparent; }
.chip-plain { background: var(--white); }

/* ------------------------------------------------------------- avatars */
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.01em;
  background: var(--blue-1); color: var(--blue-6);
}
.avatar.seller { background: var(--side); color: var(--navy-800); box-shadow: inset 0 0 0 1px var(--line); }
.avatar-lg { width: 46px; height: 46px; font-size: 13px; }

/* ----------------------------------------------------------------- card */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line-soft);
}
.card-head h2 { font-size: 15px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head .count { color: var(--ink-3); font-weight: 500; }
.card-explain { padding: 12px 16px 0; }

/* ------------------------------------------------------------ dashboard */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: grid; gap: 2px;
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), transform 150ms var(--ease);
}
.stat:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.stat-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-label .i { width: 14px; height: 14px; color: var(--ink-3); }
.stat-value { font-size: 24px; font-weight: 650; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; }
.stat-meta { font-size: 12px; color: var(--ink-3); }
.stat.is-alert .stat-value { color: var(--hot-ink); }

.dash { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.dash-col { display: grid; gap: 16px; min-width: 0; }

.esc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.esc:last-child { border-bottom: 0; }
.esc-name { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.esc-name .name-btn { font-weight: 650; font-size: 14px; }
.esc-when { color: var(--ink-3); font-size: 12px; }
.esc-reason { margin-top: 4px; font-size: 13.5px; color: var(--ink); max-width: 70ch; }
.esc-next { margin-top: 6px; font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: flex-start; }
.esc-next .i { color: var(--blue); width: 14px; height: 14px; margin-top: 2px; }
.esc-next strong { color: var(--ink); font-weight: 600; }
.esc-actions { display: flex; gap: 6px; align-items: flex-start; }

.name-btn { background: none; border: 0; padding: 0; color: var(--ink); text-align: left; }
.name-btn:hover { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

.glance { padding: 14px 16px; display: grid; gap: 10px; border-bottom: 1px solid var(--line-soft); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.glance:last-child { border-bottom: 0; }
.glance:hover { background: var(--canvas); }
.glance-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.glance-top strong { font-size: 14px; font-weight: 650; }
.glance-top span { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar { display: flex; height: 10px; border-radius: 999px; overflow: hidden; gap: 2px; background: var(--column); }
.bar span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; }
.s1 { background: var(--blue-1); } .s2 { background: var(--blue-2); } .s3 { background: var(--blue-3); }
.s4 { background: var(--blue-4); } .s5 { background: var(--blue-5); } .s6 { background: var(--blue-6); }

.sched { list-style: none; margin: 0; padding: 6px 0; }
.sched li { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; padding: 8px 16px; align-items: baseline; }
.sched time { font-size: 12.5px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }
.sched .what { font-size: 13.5px; }
.sched .who { font-size: 12.5px; }

.log { list-style: none; margin: 0; padding: 8px 0; }
.log li { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 10px; padding: 7px 16px; font-size: 13px; color: var(--ink); }
.log li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-3); margin: 7px 0 0 4px; }
.log .when { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- board */
.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.segmented { display: inline-flex; padding: 3px; background: var(--side); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.segmented button {
  height: 28px; padding: 0 12px;
  border: 0; border-radius: 7px; background: none;
  color: var(--ink-2); font-size: 13px; font-weight: 550;
}
.segmented button:hover { color: var(--ink); }
.segmented button[aria-pressed="true"] { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 650; }
.board-summary { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.board-summary strong { color: var(--ink); font-weight: 650; }

.board {
  display: flex; gap: 12px; align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}
.col {
  flex: 0 0 262px;
  background: var(--column);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 8px;
  display: flex; flex-direction: column; gap: 8px;
  scroll-snap-align: start;
  transition: background 150ms var(--ease), border-color 150ms var(--ease);
}
.col.is-over { background: var(--blue-wash); border-color: var(--blue-edge); }
.col-head { padding: 4px 6px 4px; display: grid; gap: 2px; }
.col-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 650; }
.col-title .n { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 0 7px; line-height: 18px; }
.col-total { font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.col-empty { font-size: 12.5px; color: var(--ink-3); padding: 14px 8px; text-align: center; border: 1px dashed var(--line-strong); border-radius: 10px; }

.deal {
  width: 100%;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  display: grid; gap: 8px;
  /* The line-clamped next step is a -webkit-box, whose min-content is its full
     unwrapped line; without a 0 floor the card grew to fit it. */
  grid-template-columns: minmax(0, 1fr);
  /* Contains the absolutely positioned screen-reader label in .deal-next; without it
     those labels escaped the board's scroller and widened the page at 390 px. */
  position: relative;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), transform 150ms var(--ease), opacity 150ms var(--ease);
}
.deal:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); }
.deal:active { cursor: grabbing; }
.deal.is-dragging { opacity: 0.45; transform: none; }
.deal.is-flagged { border-color: var(--hot-edge); }
.deal-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.deal-name { font-weight: 650; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-top .chip { margin-left: auto; }
.deal-money { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.deal-money small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.deal-prop { font-size: 12.5px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; min-width: 0; }
.deal-prop .i { width: 13px; height: 13px; color: var(--ink-3); }
.deal-prop span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deal-next {
  font-size: 12.5px; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 12px; }
.due { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 550; }
.due .i { width: 13px; height: 13px; }
.due.is-urgent { color: var(--hot-ink); font-weight: 650; }
.touch { color: var(--ink-3); }

/* ------------------------------------------------------------- contacts */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.table-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left;
  font-size: 12px; font-weight: 600; color: var(--ink-2);
  padding: 10px 14px;
  background: var(--canvas);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  position: sticky; top: 0;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background 120ms var(--ease); }
.table tbody tr:hover { background: var(--canvas); }
.cell-person { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.cell-person .name-btn { font-weight: 650; }
.cell-sub { display: block; font-size: 12px; color: var(--ink-3); }
.cell-money { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cell-muted { color: var(--ink-2); }
.cell-next { color: var(--ink-2); max-width: 32ch; }
.empty { padding: 36px 16px; text-align: center; color: var(--ink-2); display: grid; justify-items: center; gap: 6px; }
.empty .i { width: 22px; height: 22px; color: var(--ink-3); }
.empty strong { color: var(--ink); }

/* ------------------------------------------------------------ approvals */
.drafts { display: grid; gap: 12px; max-width: 860px; }
.draft { padding: 16px; display: grid; gap: 12px; transition: opacity 220ms var(--ease), transform 220ms var(--ease); }
.draft.is-leaving { opacity: 0; transform: translateX(16px); }
.draft-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.draft-why { color: var(--ink-2); font-size: 13px; }
.draft-why::before { content: "\00B7"; margin-right: 8px; color: var(--ink-3); }
.bubble { background: var(--canvas); border: 1px solid var(--line-soft); border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.55; max-width: 72ch; white-space: pre-wrap; }
.draft textarea {
  width: 100%; min-height: 96px; resize: vertical;
  padding: 12px 14px;
  border: 1px solid var(--blue); border-radius: 10px;
  box-shadow: 0 0 0 3px var(--blue-edge);
  font-size: 14px; line-height: 1.55;
  outline: none;
}
.draft-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.draft-actions .spacer { flex: 1; }

/* --------------------------------------------------------------- panel */
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; transition: opacity 200ms var(--ease); z-index: 20; }
.scrim.is-open { opacity: 1; }
.panel {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(500px, 100vw);
  background: var(--white);
  box-shadow: var(--shadow-xl);
  z-index: 21;
  transform: translateX(100%);
  transition: transform 240ms var(--ease);
  display: flex;
}
.panel.is-open { transform: none; }
.panel[hidden], .scrim[hidden] { display: none; }
.panel-inner { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.panel-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); display: grid; gap: 14px; }
.panel-id { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.panel-id h2 { font-size: 19px; font-weight: 650; letter-spacing: -0.01em; }
.panel-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.icon-btn {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r);
  border: 1px solid transparent; background: none; color: var(--ink-2);
}
.icon-btn:hover { background: var(--hover); color: var(--ink); }
.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.panel-explain-toggle { order: 9; margin-left: auto; }
.panel-body { flex: 1; overflow: auto; padding: 0 20px 28px; }
.p-sec { padding: 16px 0; border-bottom: 1px solid var(--line-soft); display: grid; gap: 10px; }
.p-sec:last-child { border-bottom: 0; }
.p-sec h3 { font-size: 14px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.p-sec h3 .i { color: var(--ink-3); width: 15px; height: 15px; }
.fields { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.fields dt { font-size: 12.5px; color: var(--ink-3); padding-top: 1px; }
.fields dd { margin: 0; font-size: 13.5px; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }
.money-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.money-tile { background: var(--canvas); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.money-tile span { font-size: 12px; color: var(--ink-2); }
.money-tile strong { font-size: 17px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.money-tile.is-accent { background: var(--blue-wash); border-color: var(--blue-edge); }
.money-tile.is-accent strong { color: var(--blue-deep); }

.flagbox { background: var(--hot-wash); border: 1px solid var(--hot-edge); border-radius: 10px; padding: 12px 14px; display: grid; gap: 4px; }
.flagbox strong { color: var(--hot-ink); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.flagbox strong .i { width: 14px; height: 14px; }
.flagbox p { font-size: 13.5px; }

.stage-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.select {
  height: 34px; padding: 0 32px 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r);
  background: var(--white);
  font-size: 13.5px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 15px) 14px, calc(100% - 10px) 14px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
.select:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
.steps { display: flex; gap: 3px; flex: 1; min-width: 120px; }
.steps span { height: 6px; flex: 1; border-radius: 999px; background: var(--column); }
.steps span.on { background: var(--blue); }

.next-box { display: flex; gap: 10px; align-items: flex-start; background: var(--canvas); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.next-box .i { color: var(--blue); margin-top: 2px; }
.next-box .due { margin-left: auto; flex: none; }

.notes { display: grid; gap: 8px; }
.note { background: var(--canvas); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.note time { display: block; font-size: 12px; color: var(--ink-3); margin-bottom: 2px; }
.note-form { display: grid; gap: 8px; }
.note-form textarea {
  width: 100%; min-height: 64px; resize: vertical;
  padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 13.5px; outline: none;
}
.note-form textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-edge); }
.note-form .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-3); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 12px; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 28px; bottom: 2px; width: 1px; background: var(--line); }
.t-icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--canvas); border: 1px solid var(--line); color: var(--ink-2); }
.t-icon .i { width: 13px; height: 13px; }
.t-icon.agent { background: var(--blue-wash); border-color: var(--blue-edge); color: var(--blue); }
.t-text { font-size: 13.5px; padding-top: 3px; }
.t-text time { display: block; font-size: 12px; color: var(--ink-3); }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed; left: 50%; bottom: 20px;
  transform: translate(-50%, 12px);
  max-width: min(560px, calc(100vw - 32px));
  padding: 11px 16px;
  background: var(--navy-900); color: var(--on-dark);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  opacity: 0; pointer-events: none;
  transition: opacity 180ms var(--ease), transform 180ms var(--ease);
  z-index: 40;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.toast strong { font-weight: 650; }

/* ----------------------------------------------------------- responsive */
@media (max-width: 1180px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .standalone-bar { flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 14px; }
  .standalone-label span { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sidebar { flex-direction: row; padding: 8px 10px; gap: 0; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .workspace, .agent-card { display: none; }
  .side-nav { display: flex; gap: 4px; }
  .side-link { width: auto; white-space: nowrap; padding: 7px 10px; }
  .topbar { padding: 0 12px; gap: 10px; height: 54px; }
  .switch-label, .me { display: none; }
  .welcome { margin: 12px 12px 0; align-items: flex-start; flex-wrap: wrap; }
  .view { padding: 16px 12px 24px; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-head h1 { font-size: 20px; }
  .stats { gap: 8px; }
  .stat { padding: 12px; }
  .stat-value { font-size: 20px; }
  .esc { grid-template-columns: auto minmax(0, 1fr); }
  .esc-actions { grid-column: 2; }
  .col { flex-basis: 80vw; }
  .table .hide-sm { display: none; }
  .fields { grid-template-columns: 112px minmax(0, 1fr); }
  .panel-head { padding: 14px 16px; }
  .panel-body { padding: 0 16px 24px; }
}

@media (max-width: 760px) {
  .sidebar { scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .welcome { font-size: 13px; padding: 10px 12px; }
  .welcome .btn { height: 30px; }
}

/* Drag and drop needs a pointer. On touch screens the stage control in the
   record panel is the way to move a card, so drag instructions are hidden. */
@media (hover: none) {
  .hover-only { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}
