:root {
  --ink: #eef2f8;
  --muted: #a7b0c2;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #ff7b5c;
  --moss: #2f9e8f;
  --gold: #e2a15a;
  --blue: #7eb6ff;
  --panel: rgba(18, 22, 34, 0.42);
  --panel-solid: rgba(22, 26, 38, 0.94);
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  --rail-w: 252px;
  --radius: 20px;
  color-scheme: dark;
}

html.rail-collapsed {
  --rail-w: 84px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  display: grid;
  grid-template-columns: var(--rail-w) minmax(0, 1fr);
  background: #070b14;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  transition: grid-template-columns 0.18s ease;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

svg {
  display: block;
}

.rail {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px 18px;
  color: #d5dbe8;
  background:
    linear-gradient(180deg, rgba(48, 82, 150, 0.28), transparent 26%),
    rgba(12, 14, 22, 0.94);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-head {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding-right: 8px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  flex: none;
  color: #f4f7fb;
}

.logo-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mark {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.1;
}

.mark-sub {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rail-toggle {
  position: absolute;
  top: 26px;
  right: -13px;
  z-index: 6;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #1a2030;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
}

.rail-toggle svg {
  width: 16px;
  height: 16px;
}

html.rail-collapsed .rail-toggle svg {
  transform: rotate(180deg);
}

.rail nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rail nav a,
.nav-group-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #c5cddd;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.rail nav a.active,
.rail nav a:hover,
.nav-group-toggle:hover,
.nav-group:has(a.active) > .nav-group-toggle {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  flex: none;
}

.nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon svg .dot {
  fill: currentColor;
  stroke: none;
}

.nav-label {
  min-width: 0;
  font-size: 14px;
  font-weight: 500;
}

.chev {
  width: 16px;
  height: 16px;
  margin-left: auto;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.16s ease;
}

.nav-group[data-open="true"] > .nav-group-toggle .chev {
  transform: rotate(180deg);
}

.nav-sub {
  display: none;
  flex-direction: column;
  gap: 2px;
  margin: 2px 0 4px;
}

.nav-group[data-open="true"] > .nav-sub {
  display: flex;
}

.nav-sub a {
  padding-left: 42px;
}

.flyout-title {
  display: none;
  margin: 2px 8px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

html.rail-collapsed .nav-label,
html.rail-collapsed .logo-text,
html.rail-collapsed .rail-foot,
html.rail-collapsed .chev {
  display: none;
}

html.rail-collapsed .rail {
  padding-left: 12px;
  padding-right: 12px;
  align-items: center;
}

html.rail-collapsed .rail-head,
html.rail-collapsed .logo {
  justify-content: center;
}

html.rail-collapsed .rail nav {
  align-items: center;
  width: 100%;
}

html.rail-collapsed .rail nav > a,
html.rail-collapsed .nav-group-toggle {
  justify-content: center;
  width: 44px;
  padding: 10px 0;
}

html.rail-collapsed .nav-group > .nav-sub {
  display: none;
}

html.rail-collapsed .nav-group.flyout-open > .nav-sub {
  display: flex;
  position: fixed;
  z-index: 40;
  min-width: 210px;
  margin: 0;
  padding: 12px;
  background: rgba(28, 32, 44, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

html.rail-collapsed .nav-group.flyout-open .flyout-title {
  display: block;
}

html.rail-collapsed .nav-sub .nav-label {
  display: inline;
}

html.rail-collapsed .nav-sub a {
  width: 100%;
  justify-content: flex-start;
  padding: 8px 10px;
}

html.rail-collapsed .nav-group {
  position: relative;
}

html.rail-collapsed .nav-group:has(#decision-badge:not([hidden]), #outreach-badge:not([hidden])) > .nav-group-toggle::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #7b6cff;
}

.rail-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.rail-foot {
  margin: 0;
  color: #8e98ab;
  font-size: 12px;
  line-height: 1.45;
}

.lang {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.lang button {
  flex: 1;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #c5cddd;
  padding: 7px 0;
  cursor: pointer;
  letter-spacing: 0.06em;
  font-size: 12px;
  font-weight: 600;
}

.lang button.active {
  background: #f4f7fb;
  color: #141820;
}

html.rail-collapsed .lang {
  flex-direction: column;
  width: 44px;
}

main {
  min-width: 0;
  min-height: 100vh;
  padding: 22px 28px 56px 40px;
  background:
    radial-gradient(ellipse 80% 55% at 12% -8%, rgba(48, 104, 196, 0.72), transparent 58%),
    radial-gradient(ellipse 85% 70% at 62% 42%, rgba(214, 132, 52, 0.4), transparent 58%),
    radial-gradient(ellipse 50% 40% at 90% 88%, rgba(18, 32, 64, 0.55), transparent 60%),
    linear-gradient(165deg, #10203c 0%, #172844 22%, #4a3826 58%, #141c2e 100%);
}

.top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.global-search {
  flex: 1;
  display: flex;
  gap: 10px;
  min-width: min(440px, 100%);
  margin-top: 6px;
}

.global-search input[type="search"] {
  flex: 1;
  min-width: 160px;
}

.global-search select {
  min-width: 128px;
}

.search-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.search-filters select {
  min-width: 148px;
}

.search-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.search-hit {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(18, 22, 34, 0.42);
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.search-hit strong {
  font-weight: 600;
}

.search-hit span {
  color: var(--muted);
  font-size: 13px;
}

.search-hit:hover {
  border-color: rgba(126, 182, 255, 0.45);
}

@media (max-width: 860px) {
  .search-columns {
    grid-template-columns: 1fr;
  }
}

h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h2,
.section-title {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 600;
}

#page-kicker,
.lede {
  color: var(--muted);
  margin: 6px 0 0;
  line-height: 1.45;
}

.lede {
  max-width: 760px;
  margin-bottom: 16px;
}

.status {
  margin: 8px 0 0;
  font-size: 13px;
  color: #ffb199;
}

.status[hidden] {
  display: none;
}

.profile {
  position: relative;
}

.profile-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.avatar {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 700;
  font-size: 15px;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: 240px;
  padding: 16px 16px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(46, 86, 168, 0.95), rgba(154, 96, 42, 0.92));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

.profile-menu[hidden] {
  display: none;
}

.profile-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.profile-name {
  margin: 4px 0 8px;
  font-size: 20px;
  font-weight: 600;
}

.profile-note {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.dash-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  margin-bottom: 16px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

.dash-grid .panel {
  min-height: 100%;
}

.panel,
.metric,
.card,
.table-wrap,
.rep-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), var(--shadow);
  backdrop-filter: blur(16px);
}

.panel {
  padding: 16px 16px 14px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-head h2,
.snapshot h2 {
  margin: 0;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.swatch.reached {
  background: var(--blue);
}

.swatch.instage {
  background: var(--gold);
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
}

#funnel svg {
  width: 100%;
  height: auto;
}

.chart-x {
  display: flex;
  margin-top: 2px;
}

.chart-x span {
  flex: 1;
  min-width: 0;
  text-align: center;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.snapshot #metrics {
  display: flex;
  flex-direction: column;
  margin-top: 8px;
}

.snap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: inherit;
  text-decoration: none;
}

.snap-row:last-child {
  border-bottom: 0;
}

.snap-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d5dcea;
  font-size: 13px;
}

.snap-label i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.snap-row b {
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.donut-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.donut-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.donut-legend b {
  display: block;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.donut-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.donut-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.donut {
  width: 148px;
  height: 148px;
  flex: none;
}

.subhead {
  margin: 16px 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stack {
  display: flex;
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.stack span {
  display: block;
  height: 100%;
  min-width: 4px;
}

.stack-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: 8px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
}

.stack-legend i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
}

.stuck-list {
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow: auto;
}

.stuck-row {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.stuck-row:last-child {
  border-bottom: 0;
}

.stuck-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.mono {
  width: 34px;
  height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(126, 182, 255, 0.16);
  color: #d7e7ff;
  font-size: 12px;
  font-weight: 700;
}

.stuck-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.stuck-main strong {
  font-size: 14px;
  font-weight: 600;
}

.stuck-main span,
.rep-card p {
  color: var(--muted);
  font-size: 12px;
}

.bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto 8px;
  row-gap: 6px;
  align-items: center;
  font-size: 13px;
}

.bar-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-row b {
  font-variant-numeric: tabular-nums;
}

.bar-track {
  grid-column: 1 / -1;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--blue);
  border-radius: inherit;
}

.bar-fill.hot,
.bar-fill.replied,
.bar-fill.asked_call {
  background: var(--accent);
}

.bar-fill.warm,
.bar-fill.offered,
.bar-fill.with_rep {
  background: var(--gold);
}

.bar-fill.not_yet,
.bar-fill.unscored,
.bar-fill.waiting {
  background: #8ea0b8;
}

.bar-fill.template_sent,
.bar-fill.contacted {
  background: #6eb6ea;
}

.bar-fill.closed,
.bar-fill.retained {
  background: #7d8cff;
}

.dash-foot .panel-head {
  margin: 4px 2px 12px;
}

.pending-link {
  color: #d7e4ff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(123, 108, 255, 0.18);
}

.pending-link:hover {
  background: rgba(123, 108, 255, 0.28);
}

.rep-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.rep-card {
  padding: 14px 14px 12px;
}

.rep-card strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.rep-card p {
  margin: 6px 0 0;
  line-height: 1.4;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}

.metric {
  padding: 16px 16px 14px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.limit-note {
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0 16px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

input[type="search"],
select,
.score-row input[type="number"] {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 12, 20, 0.45);
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 180px;
}

input[type="search"]:focus,
select:focus,
.score-row input[type="number"]:focus {
  outline: 2px solid rgba(126, 182, 255, 0.7);
  outline-offset: 1px;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}

.split:has(.detail[hidden]) {
  grid-template-columns: 1fr;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 28px 16px;
  background: rgba(5, 8, 14, 0.62);
  backdrop-filter: blur(4px);
}

.modal[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: min(82vh, 760px);
  overflow: auto;
  background: linear-gradient(180deg, rgba(32, 38, 54, 0.98), rgba(18, 22, 32, 0.98));
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
}

.modal-card .detail {
  position: static;
  border: 0;
  background: transparent;
  padding: 22px 20px 20px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.board {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  padding: 4px 2px 16px;
  align-items: flex-start;
}

.lane {
  flex: 0 0 300px;
  min-height: 320px;
  padding: 18px 16px 20px;
  border-radius: 22px;
  background: rgba(8, 12, 22, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.lane header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 0 4px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lane h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.lane .pile {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 16px;
}

.lane > .pile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  min-height: 64px;
  margin: 0 0 10px;
  padding: 10px 14px 10px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.lane > .pile-head:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.lane .pile > .pile-head {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: default;
}

.lane .pile > button.pile-head {
  cursor: pointer;
  border-radius: 12px;
}

.lane .pile > button.pile-head:hover {
  background: rgba(255, 255, 255, 0.04);
}

.score-chip {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 48px;
  padding: 0 10px;
  border-radius: 14px;
  background: rgba(126, 182, 255, 0.16);
  color: #d7e7ff;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  line-height: 1;
}

.score-chip.hot {
  background: rgba(255, 123, 92, 0.22);
  color: #ffd0c4;
}

.score-chip.warm {
  background: rgba(226, 161, 90, 0.22);
  color: #ffe0b8;
}

.score-chip.not_yet {
  background: rgba(126, 182, 255, 0.16);
  color: #d7e7ff;
}

.score-chip.unscored {
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tally {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  margin-left: auto;
}

.tally b {
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tally small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1;
}

.pile-bar {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 0 2px;
}

.pile-step {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pile-step:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.16);
}

.pile-step:disabled {
  opacity: 0.28;
  cursor: default;
}

.pile-count {
  justify-self: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
}

.deal {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 16px 16px 14px;
  margin: 0;
  color: var(--ink);
  cursor: pointer;
}

.deal:hover,
.deal.selected {
  border-color: rgba(255, 255, 255, 0.36);
  background: rgba(255, 255, 255, 0.1);
}

.deal strong {
  font-weight: 600;
  font-size: 16px;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.deal .place {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.deal .who {
  color: var(--ink);
  font-size: 13px;
}

.section-title + .table-wrap {
  margin-bottom: 22px;
}

.table-wrap,
.detail {
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: top;
}

th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: rgba(126, 182, 255, 0.1);
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #e8eef8;
  font-size: 12px;
}

.pill.hot {
  background: rgba(255, 123, 92, 0.2);
  color: #ffb199;
}

.pill.warm,
.pill.template_sent,
.pill.replied,
.pill.asked_call {
  background: rgba(226, 161, 90, 0.2);
  color: #f3d3a4;
}

.pill.offered,
.pill.with_rep,
.pill.closed,
.pill.retained,
.pill.existing {
  background: rgba(47, 158, 143, 0.22);
  color: #b7ebe3;
}

.pill.not_yet,
.pill.unscored {
  background: rgba(255, 255, 255, 0.1);
  color: #d5dcea;
}

.brand-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.brand-pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.65;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.brand-sales {
  margin-top: 16px;
}

.brand-sales .lede {
  margin-bottom: 8px;
}

.brand-sales .empty {
  padding: 8px 0 4px;
}

.brand-pie {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
}

.brand-pie svg {
  width: 148px;
  height: 148px;
  flex: none;
}

.brand-pie-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.brand-pie-legend li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: baseline;
}

.brand-pie-legend .name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  min-width: 0;
}

.brand-pie-legend .name i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.brand-pie-legend b {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.brand-pie-legend .amt {
  grid-column: 1 / -1;
  padding-left: 14px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.sales-note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

#customer-modal .modal-card {
  width: min(560px, 100%);
}

.empty {
  padding: 22px 8px;
  color: var(--muted);
}

.detail {
  padding: 18px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--panel);
}

.detail h3 {
  font-weight: 600;
  margin: 0 36px 8px 0;
  font-size: 20px;
}

.detail-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 36px 8px 0;
}

.detail-title h3 {
  margin: 0;
}

.message-link {
  flex: none;
  display: inline-block;
  background: #6d7dff;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  padding: 6px 12px;
}

.message-link:hover {
  filter: brightness(1.08);
}

.detail dl {
  margin: 0;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px 10px;
  font-size: 13px;
}

.detail dt {
  color: var(--muted);
}

.detail dl.attrs {
  grid-template-columns: 132px 1fr;
  margin-top: 8px;
}

.thread {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bubble {
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
}

.bubble.in {
  background: rgba(47, 158, 143, 0.16);
}

.bubble .when {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-bottom: 2px;
}

.bubble .body {
  display: block;
}

.detail .links {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.detail .links li {
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.detail .links li:hover {
  color: #ffb199;
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border: none;
  background: transparent;
}

.card {
  padding: 18px 20px;
}

.card h3 {
  font-weight: 600;
  margin: 0 0 6px;
}

.card p {
  margin: 4px 0;
  color: #d5dcea;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.outreach-bar,
.score-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.outreach-bar {
  margin: 8px 0 18px;
}

.read-progress {
  margin: -6px 0 18px;
}

.read-progress .bar-track {
  grid-column: auto;
  height: 10px;
}

.read-progress p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

#outreach-summary {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

button.yes,
button.no,
button.send {
  border: 0;
  border-radius: 12px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
}

button.send {
  background: #6d7dff;
  color: #fff;
  font-size: 14px;
  padding: 11px 18px;
}

button.send:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.45);
  cursor: not-allowed;
}

button.yes {
  background: var(--moss);
  color: #fff;
}

button.no {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

#decision-badge:not([hidden]),
#outreach-badge:not([hidden]) {
  display: inline-grid;
  place-items: center;
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  background: #7b6cff;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.score-bar {
  position: sticky;
  top: 12px;
  z-index: 2;
  margin: 8px 0 12px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(16, 20, 32, 0.78);
  backdrop-filter: blur(16px);
}

.score-bar .limit-note {
  margin: 0;
}

.score-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 132px;
  gap: 18px;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.score-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.score-row strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
}

.score-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.score-row label {
  display: block;
}

.score-row input[type="number"] {
  width: 100%;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.score-default {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.score-default.differs {
  color: #ffb199;
}

#score-params .panel + .panel {
  margin-top: 12px;
}

:focus-visible {
  outline: 2px solid rgba(158, 191, 255, 0.9);
  outline-offset: 2px;
}

@media (max-width: 1100px) {
  .dash-hero,
  .dash-grid,
  .metrics,
  .book-layout,
  .customer-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  body,
  html.rail-collapsed body {
    grid-template-columns: 1fr;
  }

  .rail,
  html.rail-collapsed .rail {
    position: relative;
    height: auto;
    width: 100%;
    align-items: stretch;
    padding: 16px;
  }

  .rail-toggle {
    display: none;
  }

  html.rail-collapsed .nav-label,
  html.rail-collapsed .logo-text,
  html.rail-collapsed .rail-foot,
  html.rail-collapsed .chev,
  html.rail-collapsed .nav-sub .nav-label {
    display: inline;
  }

  html.rail-collapsed .rail nav > a,
  html.rail-collapsed .nav-group-toggle,
  html.rail-collapsed .nav-sub a {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
  }

  html.rail-collapsed .lang {
    flex-direction: row;
    width: auto;
  }

  html.rail-collapsed .nav-group.flyout-open > .nav-sub {
    position: static;
    min-width: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .split,
  .score-row {
    grid-template-columns: 1fr;
  }

  main {
    padding: 18px 16px 40px;
  }
}

.wati-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wati-bar .limit-note {
  margin: 0;
}

.wati-error {
  color: #ffb199;
  margin: 0 0 14px;
}

.stage-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 8px 0 18px;
}

.stage-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 148px;
  padding: 14px 16px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(8, 12, 20, 0.45);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.stage-chip span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.stage-chip b {
  font-size: 22px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.stage-chip.active {
  border-color: rgba(126, 182, 255, 0.85);
  background: rgba(126, 182, 255, 0.16);
}

.stage-chip.active span {
  color: var(--ink);
}

.wati-table td,
.wati-table th {
  padding: 14px 16px;
}

.wati-table tbody tr {
  cursor: default;
}

.wati-table tbody tr:hover {
  background: transparent;
}

.wati-table .quiet {
  color: var(--muted);
}

.book-panel {
  margin-bottom: 16px;
}

.book-total {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.book-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.15fr);
  gap: 18px;
  align-items: start;
}

.book-reps {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

button.book-rep {
  display: block;
  width: 100%;
  text-align: left;
  color: inherit;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

button.book-rep:hover {
  background: rgba(126, 182, 255, 0.12);
}

.book-rep-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
}

.book-rep-top b {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

.book-rep p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.customer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.75fr);
  gap: 16px;
  align-items: start;
}

.customer-layout.solo {
  grid-template-columns: 1fr;
}

.customer-leads {
  padding: 14px;
  max-height: 70vh;
  overflow: auto;
}

.customer-leads h2 {
  margin: 0 0 8px;
  font-size: 14px;
}

.customer-leads .empty {
  padding: 8px 0;
}

button.lead-link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  text-align: left;
  color: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 8px 0;
  cursor: pointer;
}

button.lead-link span {
  color: var(--muted);
  font-size: 12px;
}

button.lead-link:hover strong {
  color: #d7e4ff;
}

.linked-account,
.astra-brief,
.suggestion {
  margin-top: 14px;
  padding: 12px 12px 10px;
  border-radius: 12px;
}

.linked-account,
.astra-brief {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.suggestion {
  border: 1px dashed rgba(226, 161, 90, 0.7);
  background: rgba(226, 161, 90, 0.08);
}

.suggestion .note,
.linked-account .lede,
.suggestion .lede,
.astra-brief .section-title {
  margin: 0 0 8px;
}

.suggestion .note {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.stalled-table select.loss-reason {
  min-width: 200px;
  padding: 6px 8px;
}

.stalled-table tbody tr,
.results-table tbody tr {
  cursor: default;
}

.stalled-table tbody tr:hover,
.results-table tbody tr:hover {
  background: transparent;
}

button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: #d7e4ff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

button.linkish:hover {
  text-decoration: underline;
}

.reason-note {
  color: var(--muted);
  font-size: 12px;
  margin: 6px 0 0;
}

#stalled-chat {
  z-index: 32;
}

#stalled-chat .modal-card {
  width: min(560px, 100%);
}

#stalled-chat .detail h2 {
  margin: 0 36px 12px 0;
  font-size: 16px;
}

.chat-line {
  margin: 6px 0;
  font-size: 14px;
}

.chat-line span {
  display: inline-block;
  min-width: 52px;
  color: var(--muted);
  font-size: 12px;
}

.sign-out {
  margin: 0;
}

.sign-out button {
  background: none;
  border: 0;
  padding: 0;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.sign-out button:hover {
  color: var(--ink);
}

.login-body {
  display: grid;
  place-items: center;
  min-height: 100vh;
  grid-template-columns: 1fr;
  padding: 24px;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(48, 82, 150, 0.35), transparent 60%),
    #070b14;
}

.login-card {
  width: min(400px, 100%);
  padding: 32px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}

.login-mark {
  margin: 0;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: var(--muted);
}

.login-card h1 {
  margin: 8px 0 0;
  font-size: 32px;
  font-weight: 600;
}

.login-lede,
.login-error {
  color: var(--muted);
  line-height: 1.45;
}

.login-error {
  color: #ffb4a2;
}

.login-card form {
  display: grid;
  gap: 14px;
}

.login-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.login-card input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.login-card button[type="submit"] {
  margin-top: 4px;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: #f4f7fb;
  color: #12141c;
  font-weight: 600;
  cursor: pointer;
}
