:root {
  --font-sans: Inter, "Avenir Next", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ink: #172033;
  --muted: #687386;
  --quiet: #8a94a4;
  --paper: #f5f6f8;
  --surface: #ffffff;
  --rule: #dde2e8;
  --rule-soft: #eaedf1;
  --blue: #3e63dd;
  --blue-soft: #edf1ff;
  --amber: #b76a22;
  --amber-soft: #fff6e9;
  --red: #b64c4c;
  --red-soft: #fff0f0;
  --green: #34775a;
  --green-soft: #edf8f2;
}

.workspace-v2 {
  color: var(--ink);
  background: var(--paper);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}

.workspace-v2 .sidebar {
  flex-basis: 220px;
  padding: 23px 12px 16px;
  background: #17243a;
}

.workspace-v2 .brand {
  padding: 0 9px;
  font-size: 21px;
  letter-spacing: -.05em;
}

.workspace-v2 .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--blue);
}

.workspace-v2 .workspace-label {
  margin: 39px 10px 9px;
  color: #71829a;
  font: 650 10px/1.2 var(--font-sans);
  letter-spacing: .01em;
  text-transform: none;
}

.workspace-v2 .primary-nav {
  gap: 3px;
}

.workspace-v2 .nav-link {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 6px;
  color: #aeb9c8;
  font-size: 12px;
  font-weight: 600;
}

.workspace-v2 .nav-link > span {
  color: #7589a4;
  font-size: 14px;
}

.workspace-v2 .nav-link:hover,
.workspace-v2 .nav-link.active {
  background: #233654;
  color: #fff;
}

.workspace-v2 .nav-link.active > span {
  color: #8da9ff;
}

.workspace-v2 .sidebar-proof {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 14px 10px;
  border-top: 1px solid #2a3b54;
  border-bottom: 1px solid #2a3b54;
}

.proof-pulse {
  width: 7px;
  height: 7px;
  margin-top: 3px;
  border-radius: 50%;
  background: #72c396;
  box-shadow: 0 0 0 3px rgba(114, 195, 150, .1);
}

.sidebar-proof strong,
.sidebar-proof small {
  display: block;
}

.sidebar-proof strong {
  color: #d5dee9;
  font-size: 10px;
}

.sidebar-proof small {
  margin-top: 3px;
  color: #74879f;
  font-size: 9px;
}

.workspace-v2 .sidebar-footer {
  margin-top: 0;
  padding: 14px 7px 0;
  border-top: 0;
}

.workspace-v2 .main-panel {
  width: calc(100vw - 220px);
  max-width: none;
  padding: 34px 40px 58px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 27px;
}

.page-header h1,
.deal-page-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.15;
  letter-spacing: -.04em;
}

.page-header > div > p,
.deal-page-header > div > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: #66738a;
  font-size: 10px;
}

.header-status > span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56a77b;
}

.workspace-v2 .button {
  min-height: 32px;
  padding: 7px 11px;
  border-radius: 5px;
  gap: 7px;
  font-size: 10px;
  font-weight: 700;
}

.workspace-v2 .button.primary {
  background: var(--blue);
  color: #fff;
}

.workspace-v2 .button.secondary {
  border: 1px solid var(--rule);
  background: #fff;
  color: #45546a;
}

.workspace-v2 .button.quiet {
  border: 0;
  background: transparent;
  color: #6d7889;
}

.workspace-v2 .button:disabled {
  cursor: default;
  opacity: .65;
}

.today-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 35px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: var(--surface);
}

.today-summary > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-height: 69px;
  padding: 20px;
  border-right: 1px solid var(--rule-soft);
}

.today-summary > div:last-child {
  border-right: 0;
}

.today-summary strong {
  color: #1f2b40;
  font-size: 22px;
  letter-spacing: -.04em;
}

.today-summary span {
  max-width: 120px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.work-section {
  margin-top: 33px;
}

.section-title-row,
.case-section > header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 13px;
}

.section-title-row h2,
.case-section h2,
.deal-secondary h2,
.settings-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  letter-spacing: -.025em;
}

.section-title-row p,
.case-section header p,
.settings-section header p {
  margin: 4px 0 0;
  color: var(--quiet);
  font-size: 10px;
}

.text-link {
  border: 0;
  background: transparent;
  color: #4562a8;
  font-size: 10px;
  font-weight: 700;
}

.attention-queue {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.queue-case {
  display: grid;
  grid-template-columns: 270px minmax(360px, 1fr) 154px;
  gap: 22px;
  align-items: center;
  min-height: 116px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule-soft);
}

.queue-case:last-child {
  border-bottom: 0;
}

.queue-case--priority {
  box-shadow: inset 3px 0 var(--amber);
}

.queue-case--dormant {
  box-shadow: inset 3px 0 var(--red);
}

.case-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.case-heading h3,
.case-name {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.case-name {
  color: #294faa;
}

.case-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.case-heading p span {
  display: block;
  margin-top: 2px;
  color: #8590a0;
}

.stage-badge {
  display: inline-flex;
  width: max-content;
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef1f5;
  color: #536176;
  font-size: 9px;
  font-weight: 700;
}

.queue-meta {
  display: flex;
  gap: 16px;
  margin-top: 17px;
  color: #7a8596;
  font-size: 9px;
}

.queue-meta b {
  color: #2f3d52;
}

.queue-issues {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--rule-soft);
  border-radius: 5px;
  background: var(--rule-soft);
}

.queue-issue {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 37px;
  padding: 6px 9px;
  background: #fbfcfd;
}

.queue-issue.overdue {
  background: var(--amber-soft);
}

.queue-issue.severe {
  background: var(--red-soft);
}

.issue-state {
  width: 7px;
  height: 7px;
  border: 1px solid #aeb7c4;
  border-radius: 50%;
}

.queue-issue.overdue .issue-state {
  border-color: var(--amber);
  background: var(--amber);
}

.queue-issue.severe .issue-state {
  border-color: var(--red);
  background: var(--red);
}

.queue-issue strong,
.queue-issue p {
  display: block;
  margin: 0;
  font-size: 9px;
}

.queue-issue strong {
  color: #344156;
}

.queue-issue p {
  margin-top: 2px;
  color: #8791a0;
}

.queue-issue time {
  color: #6d7889;
  font-size: 9px;
  font-weight: 700;
}

.queue-issue.overdue time {
  color: var(--amber);
}

.queue-issue.severe time {
  color: var(--red);
}

.queue-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  flex-wrap: wrap;
}

.dormant-clock {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 15px;
}

.dormant-clock strong {
  color: var(--red);
  font-size: 20px;
}

.dormant-clock span {
  color: var(--muted);
  font-size: 9px;
}

.last-update {
  padding: 12px 14px;
  border-left: 2px solid #dce1e7;
  background: #f8f9fb;
}

.last-update span,
.last-update p {
  margin: 0;
  font-size: 10px;
}

.last-update span {
  color: #7b8696;
  font-weight: 700;
}

.last-update p {
  margin-top: 5px;
  color: #455267;
}

.update-list {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.update-row {
  display: grid;
  grid-template-columns: 29px minmax(220px, 1fr) auto 110px 10px;
  align-items: center;
  gap: 12px;
  min-height: 57px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--rule-soft);
}

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

.update-source {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 5px;
  background: #edf1f7;
  color: #4f6280;
  font-size: 9px;
  font-weight: 800;
}

.update-row strong,
.update-row p {
  margin: 0;
  font-size: 10px;
}

.update-row p {
  margin-top: 3px;
  color: var(--muted);
}

.automation-tag,
.relay-badge {
  display: inline-flex;
  width: max-content;
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--blue-soft);
  color: #4864b6;
  font-size: 8px;
  font-weight: 750;
}

.update-row time {
  color: #7d8796;
  font-size: 9px;
  text-align: right;
}

.row-arrow {
  color: #a6afba;
  font-size: 16px;
}

/* Pipeline */
.pipeline-page-header {
  margin-bottom: 19px;
}

.board-toolbar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin-bottom: 14px;
}

.board-toolbar label {
  display: grid;
  gap: 5px;
  color: #778294;
  font-size: 9px;
  font-weight: 700;
}

.board-toolbar select {
  min-width: 135px;
  height: 32px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  color: #435167;
  font: 600 10px var(--font-sans);
}

.board-filter,
.clear-board-filters {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  color: #59677a;
  font-size: 9px;
  font-weight: 700;
}

.board-filter b {
  margin-left: 3px;
  color: #8b95a3;
}

.board-filter.active {
  border-color: #95a8e6;
  background: var(--blue-soft);
  color: #3858b7;
}

.clear-board-filters {
  border-color: transparent;
  background: transparent;
  color: #7d8795;
}

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(224px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 12px;
}

.kanban-column {
  min-width: 224px;
  min-height: 580px;
  padding: 11px;
  border: 1px solid #e0e4e9;
  border-radius: 7px;
  background: #edf0f4;
  transition: background .15s ease, border-color .15s ease;
}

.kanban-column.drop-target {
  border-color: #8299df;
  background: #e8edfb;
}

.kanban-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 2px 10px;
}

.kanban-column > header > div {
  display: flex;
  align-items: center;
  gap: 7px;
}

.kanban-column h2 {
  margin: 0;
  color: #3c495d;
  font-size: 10px;
}

.kanban-column > header > b {
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #dfe4ea;
  color: #6f7b8d;
  font-size: 9px;
}

.column-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9ba6b5;
}

.kanban-column:nth-child(2) .column-dot { background: #6983d6; }
.kanban-column:nth-child(3) .column-dot { background: #8b75bd; }
.kanban-column:nth-child(4) .column-dot { background: #b48156; }
.kanban-column:nth-child(5) .column-dot { background: #57906f; }

.kanban-stack {
  display: grid;
  gap: 9px;
}

.deal-card {
  position: relative;
  display: block;
  padding: 12px;
  border: 1px solid #dbe0e6;
  border-radius: 6px;
  background: #fff;
  color: inherit;
  box-shadow: 0 1px 1px rgba(26, 36, 51, .025);
  cursor: grab;
}

.deal-card:hover {
  border-color: #b9c3d1;
}

.deal-card.dragging {
  opacity: .45;
}

.deal-card--attention {
  border-left: 3px solid var(--amber);
}

.deal-card--dormant {
  border-left: 3px solid var(--red);
}

.drag-grip {
  position: absolute;
  top: 8px;
  right: 8px;
  color: #b5bdc8;
  font-size: 13px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 18px;
}

.card-title strong {
  color: #263449;
  font-size: 10px;
}

.attention-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.dormant-label {
  padding: 2px 5px;
  border-radius: 3px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.deal-card > p {
  margin: 4px 0 10px;
  color: #7d8796;
  font-size: 9px;
}

.facility {
  padding-bottom: 9px;
  border-bottom: 1px solid var(--rule-soft);
  color: #3d4a5f;
  font-size: 11px;
  font-weight: 750;
}

.facility span {
  float: right;
  color: #8a94a2;
  font-size: 8px;
  font-weight: 500;
}

.card-outstanding {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0 5px;
  margin: 10px 0;
}

.card-outstanding > b {
  color: #2a4fbb;
  font-size: 20px;
  letter-spacing: -.05em;
}

.card-outstanding > span {
  color: #607085;
  font-size: 9px;
  font-weight: 700;
}

.card-outstanding > small {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: #7a8595;
  font-size: 8px;
}

.deal-card--attention .card-outstanding > b { color: var(--amber); }
.deal-card--dormant .card-outstanding > b { color: var(--red); }

.deal-card footer {
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px solid var(--rule-soft);
  color: #8b94a2;
  font-size: 8px;
}

.deal-card footer b {
  color: #566377;
}

.board-empty {
  padding: 70px;
  text-align: center;
  color: var(--muted);
}

/* All deals */
.list-toolbar {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 15px;
}

.list-toolbar .search-field {
  flex: 0 0 320px;
  min-height: 34px;
  padding: 8px 10px;
}

.workspace-v2 .filter-pills {
  gap: 6px;
}

.workspace-v2 .filter {
  padding: 6px 9px;
  border-radius: 5px;
  font-size: 9px;
}

.workspace-v2 .filter.active {
  border-color: #9aaee8;
  background: var(--blue-soft);
}

.all-deals-table {
  border-radius: 6px;
}

.all-deals-table .deals-table {
  min-width: 1250px;
}

.workspace-v2 .deals-table th {
  padding: 10px 11px;
  background: #f8f9fb;
  color: #707c8d;
  font: 700 8px var(--font-sans);
  letter-spacing: .02em;
  text-transform: none;
}

.workspace-v2 .deals-table td {
  padding: 11px;
  color: #4b596d;
  font-size: 9px;
}

.workspace-v2 .deals-table td:first-child {
  font-size: 10px;
}

.item-count {
  color: #344e92;
}

/* Deal detail */
.deal-page-header {
  padding-bottom: 25px;
  border-bottom: 1px solid var(--rule);
}

.workspace-v2 .back-link {
  margin-bottom: 18px;
  color: #607087;
  font-size: 10px;
}

.deal-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.deal-header-row > div > p span {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid #d8dde4;
}

.deal-header-actions {
  display: flex;
  gap: 7px;
}

.deal-header-facts {
  display: flex;
  gap: 42px;
  margin: 24px 0 0;
}

.deal-header-facts div {
  min-width: 110px;
}

.deal-header-facts dt,
.outstanding-row dt,
.dormant-case dt {
  margin-bottom: 5px;
  color: #8791a0;
  font-size: 8px;
  font-weight: 700;
}

.deal-header-facts dd,
.outstanding-row dd,
.dormant-case dd {
  margin: 0;
  color: #38465a;
  font-size: 10px;
  font-weight: 700;
}

.avatar.tiny {
  display: inline-grid;
  width: 19px;
  height: 19px;
  margin-right: 4px;
  font-size: 8px;
}

.stage-progress {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: 28px;
}

.stage-progress > div {
  position: relative;
  display: grid;
  grid-template-columns: 21px 1fr;
  align-items: center;
  gap: 7px;
  color: #8b95a3;
}

.stage-progress > div::after {
  position: absolute;
  z-index: -1;
  top: 10px;
  left: 21px;
  right: 0;
  height: 1px;
  background: #d9dee5;
  content: "";
}

.stage-progress > div:last-child::after {
  display: none;
}

.stage-progress span {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1px solid #cbd2db;
  border-radius: 50%;
  background: var(--paper);
  font-size: 8px;
}

.stage-progress b {
  font-size: 9px;
}

.stage-progress small {
  grid-column: 2;
  margin-top: -2px;
  color: var(--blue);
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
}

.stage-progress .complete,
.stage-progress .current {
  color: #3f5eb4;
}

.stage-progress .complete::after {
  background: #8599d8;
}

.stage-progress .complete span {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.stage-progress .current span {
  border: 2px solid var(--blue);
  background: #fff;
  color: var(--blue);
}

.deal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px;
  margin-top: 24px;
}

.case-section,
.stage-suggestion,
.automation-history,
.deal-information {
  margin-bottom: 18px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.case-section > header {
  align-items: center;
  margin: 0;
  padding: 16px 17px;
  border-bottom: 1px solid var(--rule-soft);
}

.section-count {
  display: inline-grid;
  place-items: center;
  min-width: 19px;
  height: 19px;
  margin-left: 4px;
  border-radius: 50%;
  background: #e8ecf2;
  color: #536177;
  font-size: 9px;
}

.outstanding-row {
  display: grid;
  grid-template-columns: 8px minmax(150px, 1.25fr) minmax(210px, 1fr) 96px;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--rule-soft);
  transition: opacity .25s ease, transform .25s ease;
}

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

.outstanding-row.priority-item {
  background: #fffcf7;
}

.outstanding-row.resolving {
  opacity: 0;
  transform: translateX(12px);
}

.item-status-mark {
  width: 8px;
  height: 8px;
  border: 1px solid #aeb7c3;
  border-radius: 50%;
}

.priority-item .item-status-mark {
  border-color: var(--amber);
  background: var(--amber);
}

.item-description strong,
.item-description span,
.item-description small {
  display: block;
}

.item-description strong {
  color: #2d3b50;
  font-size: 10px;
}

.item-description span {
  margin-top: 5px;
  color: #8a94a2;
  font-size: 8px;
}

.item-description small {
  margin-top: 5px;
  color: #4c68b4;
  font-size: 8px;
  font-weight: 700;
}

.outstanding-row dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 0;
}

.age-warning {
  color: var(--amber) !important;
}

.item-actions {
  display: grid;
  gap: 4px;
}

.item-actions .button {
  width: 100%;
}

.activity-section {
  overflow: hidden;
}

.case-timeline {
  padding: 8px 17px 14px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 58px 16px 1fr;
  min-height: 51px;
}

.timeline-row time {
  padding-top: 12px;
  color: #7c8797;
  font-size: 8px;
  text-align: right;
}

.timeline-row time span {
  display: block;
  margin-top: 2px;
  color: #4c596d;
  font-weight: 700;
}

.timeline-rail {
  position: relative;
}

.timeline-rail::after {
  position: absolute;
  top: 18px;
  bottom: -18px;
  left: 8px;
  width: 1px;
  background: #e1e5ea;
  content: "";
}

.timeline-row:last-child .timeline-rail::after {
  display: none;
}

.timeline-rail i {
  position: absolute;
  z-index: 1;
  top: 15px;
  left: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #aab4c0;
}

.timeline-row.automated .timeline-rail i {
  background: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-soft);
}

.timeline-row > div:last-child {
  padding: 11px 0 10px 9px;
}

.timeline-row strong,
.timeline-row p {
  margin: 0;
  color: #3d4a5f;
  font-size: 9px;
}

.timeline-row p {
  margin-top: 4px;
  color: #7c8797;
}

.timeline-row .relay-badge {
  margin-left: 4px;
}

.change-arrow {
  margin: 0 5px;
  color: var(--blue);
}

.new-event {
  background: #f8faff;
}

.automation-history {
  padding: 17px;
}

.automation-history > p {
  margin: 7px 0 14px;
  color: #667386;
  font-size: 9px;
  line-height: 1.5;
}

.stage-change-record {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 9px;
  padding: 11px;
  border: 1px solid var(--rule-soft);
  border-radius: 5px;
  color: #44536a;
  font-size: 8px;
  font-weight: 750;
  text-align: center;
}

.stage-change-record span:last-child {
  color: var(--blue);
}

.record-time {
  display: block;
  margin-top: 9px;
  color: #8a94a2;
  font-size: 8px;
}

.stage-suggestion {
  padding: 17px;
  border-color: #cfd8f2;
  background: #f8faff;
}

.suggestion-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.suggestion-label span {
  color: #405fb9;
  font-size: 9px;
  font-weight: 800;
}

.suggestion-label small {
  color: #7c8797;
  font-size: 8px;
}

.stage-suggestion > p {
  margin: 7px 0 13px;
  color: #5e6b7e;
  font-size: 9px;
  line-height: 1.5;
}

.stage-suggestion ul {
  display: grid;
  gap: 7px;
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #e0e6f5;
  border-radius: 5px;
  background: #fff;
  list-style: none;
}

.stage-suggestion li {
  color: #526076;
  font-size: 8px;
}

.stage-suggestion li::before {
  margin-right: 7px;
  color: var(--green);
  content: "✓";
}

.stage-suggestion > div:last-child {
  display: flex;
  gap: 5px;
}

.suggestion-confirmed {
  display: flex !important;
  gap: 10px !important;
}

.suggestion-confirmed > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
}

.suggestion-confirmed strong {
  color: #315943;
  font-size: 10px;
}

.suggestion-confirmed p {
  margin: 5px 0 0;
  color: #607267;
  font-size: 9px;
  line-height: 1.45;
}

.deal-information {
  padding: 17px;
}

.deal-information header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.deal-information dl {
  margin: 0;
}

.deal-information dl > div {
  display: flex;
  justify-content: space-between;
  padding: 9px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 9px;
}

.deal-information dt {
  color: #7e8998;
}

.deal-information dd {
  margin: 0;
  color: #344156;
  font-weight: 750;
}

.deal-information dd small {
  margin-left: 4px;
  color: var(--amber);
  font-size: 7px;
}

.information-note {
  margin: 11px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--rule-soft);
  color: #8490a0;
  font-size: 8px;
}

/* Inbox */
.inbox-page-header {
  align-items: center;
}

.auto-apply-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.auto-apply-control strong,
.auto-apply-control small {
  display: block;
  text-align: right;
}

.auto-apply-control strong {
  color: #3e4b5f;
  font-size: 9px;
}

.auto-apply-control small {
  margin-top: 2px;
  color: #8993a2;
  font-size: 8px;
}

.toggle-input {
  position: absolute;
  opacity: 0;
}

.auto-apply-control i {
  position: relative;
  width: 34px;
  height: 19px;
  border-radius: 20px;
  background: #cbd2dc;
  transition: background .15s ease;
}

.auto-apply-control i::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .15s ease;
}

.toggle-input:checked + i {
  background: var(--blue);
}

.toggle-input:checked + i::after {
  transform: translateX(15px);
}

.inbox-workspace {
  display: grid;
  grid-template-columns: 198px minmax(370px, 1fr) 340px;
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.message-rail {
  border-right: 1px solid var(--rule);
  background: #f7f8fa;
}

.message-rail > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px;
  border-bottom: 1px solid var(--rule);
}

.message-rail h2 {
  margin: 0;
  font-size: 12px;
}

.message-rail header span {
  color: #7d8796;
  font-size: 8px;
}

.message-preview {
  display: flex;
  width: 100%;
  gap: 8px;
  padding: 13px;
  border: 0;
  border-bottom: 1px solid var(--rule-soft);
  background: transparent;
  text-align: left;
}

.message-preview.active {
  background: #fff;
  box-shadow: inset 3px 0 var(--blue);
}

.sender-mark {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e3e8f0;
  color: #52627a;
  font-size: 8px;
  font-weight: 800;
}

.sender-mark.large {
  width: 31px;
  height: 31px;
}

.message-preview strong,
.message-preview b,
.message-preview small {
  display: block;
}

.message-preview strong {
  color: #39475b;
  font-size: 9px;
}

.message-preview b {
  margin-top: 5px;
  color: #263449;
  font-size: 9px;
}

.message-preview small {
  margin-top: 4px;
  color: #8a94a3;
  font-size: 8px;
}

.email-reader {
  padding: 21px 25px;
  border-right: 1px solid var(--rule);
}

.email-reader > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.email-reader > header > div {
  display: flex;
  gap: 9px;
}

.email-reader header strong,
.email-reader header p {
  display: block;
  margin: 0;
  font-size: 9px;
}

.email-reader header p {
  margin-top: 3px;
  color: #818c9c;
}

.email-reader header time {
  color: #8a94a3;
  font-size: 8px;
}

.email-subject {
  margin: 27px 0 22px;
}

.email-subject h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -.025em;
}

.email-subject p {
  margin: 5px 0 0;
  color: #8b95a3;
  font-size: 8px;
}

.email-copy {
  max-width: 620px;
  color: #3e4c60;
  font-size: 11px;
  line-height: 1.62;
}

.email-copy p {
  margin: 0 0 15px;
}

.attachment-list {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--rule-soft);
}

.attachment-list > p {
  margin: 0 0 9px;
  color: #778294;
  font-size: 8px;
  font-weight: 700;
}

.attachment-list button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border: 0;
  border-top: 1px solid #edf0f3;
  background: transparent;
  text-align: left;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 27px;
  height: 30px;
  border-radius: 4px;
  background: #e7f2ea;
  color: #397450;
  font-size: 8px;
  font-weight: 800;
}

.file-icon.pdf {
  background: #f8eaea;
  color: #a45050;
}

.attachment-list button > span:nth-child(2) {
  flex: 1;
}

.attachment-list strong,
.attachment-list small {
  display: block;
}

.attachment-list strong {
  color: #3d4a5e;
  font-size: 9px;
}

.attachment-list small {
  margin-top: 3px;
  color: #8a94a3;
  font-size: 8px;
}

.attachment-list button > b {
  color: #7b8796;
}

.relay-review {
  padding: 20px;
  background: #fafbfc;
}

.relay-review > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.relay-wordmark {
  display: flex;
  gap: 9px;
}

.relay-wordmark > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 5px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
}

.relay-wordmark h2,
.relay-wordmark p {
  margin: 0;
}

.relay-wordmark h2 {
  font-size: 12px;
}

.relay-wordmark p {
  margin-top: 3px;
  color: #7d8796;
  font-size: 8px;
}

.review-status {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--amber-soft);
  color: var(--amber);
  font-size: 8px;
  font-weight: 800;
}

.relay-review.applied .review-status {
  background: var(--green-soft);
  color: var(--green);
}

.detected-changes {
  padding: 9px 0;
}

.detected-changes > div {
  display: flex;
  gap: 9px;
  padding: 10px 2px;
  border-bottom: 1px solid var(--rule-soft);
  transition: opacity .15s ease;
}

.relay-review.applied .detected-changes > div {
  opacity: .68;
}

.check {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 800;
}

.check.complete {
  background: var(--green-soft);
  color: var(--green);
}

.check.open {
  border: 1px solid #d6dce3;
  color: #9aa3af;
}

.detected-changes strong,
.detected-changes small {
  display: block;
}

.detected-changes strong {
  color: #3d4a5e;
  font-size: 9px;
}

.detected-changes small {
  margin-top: 4px;
  color: #7c8796;
  font-size: 8px;
}

.detected-changes small i {
  margin: 0 5px;
  color: var(--blue);
  font-style: normal;
}

.case-changes {
  margin: 11px 0 13px;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
}

.case-changes > span {
  color: #85909f;
  font-size: 8px;
  font-weight: 700;
}

.case-changes h3 {
  margin: 5px 0 10px;
  font-size: 10px;
}

.case-changes dl {
  margin: 0;
}

.case-changes dl > div {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: 8px;
}

.case-changes dt {
  color: #6f7b8d;
}

.case-changes dd {
  margin: 0;
  color: #334258;
  font-weight: 800;
}

.applied-message {
  margin: 10px -13px -13px;
  padding: 10px 13px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
  font-weight: 750;
}

.review-apply {
  width: 100%;
}

.relay-review-note {
  margin: 9px 0 0;
  color: #8792a1;
  font-size: 8px;
  line-height: 1.4;
  text-align: center;
}

.inbox-stage-suggestion {
  margin: 14px 0 0;
  padding: 14px;
}

.inbox-stage-suggestion h2 {
  font-size: 13px;
}

/* Dormant */
.dormant-page-header {
  align-items: center;
}

.memory-message {
  display: flex;
  align-items: center;
  gap: 10px;
}

.memory-message > span {
  color: var(--red);
  font-size: 28px;
  font-weight: 750;
  letter-spacing: -.05em;
}

.memory-message p {
  margin: 0 !important;
  color: #7c8797 !important;
  font-size: 9px !important;
  line-height: 1.45;
}

.memory-message b {
  color: #4d5a6e;
}

.dormant-cases {
  display: grid;
  gap: 13px;
  max-width: 1050px;
}

.dormant-case {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--red);
  border-radius: 7px;
  background: #fff;
}

.dormant-case > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 18px 13px;
}

.dormant-case h2 {
  margin: 8px 0 4px;
  font-size: 14px;
  letter-spacing: -.02em;
}

.dormant-case header p {
  margin: 0;
  color: #7f8998;
  font-size: 9px;
}

.days-quiet {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.days-quiet strong {
  color: var(--red);
  font-size: 24px;
  letter-spacing: -.05em;
}

.days-quiet span {
  color: #8a94a2;
  font-size: 8px;
}

.dormant-case-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  padding: 0 18px 16px;
}

.dormant-case dl {
  display: grid;
  grid-template-columns: 100px 1fr 1.6fr;
  gap: 20px;
  margin: 0;
  padding: 13px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

.dormant-case dd {
  line-height: 1.5;
}

.suggested-action {
  padding: 12px 14px;
  border-radius: 5px;
  background: #f7f8fa;
}

.suggested-action span {
  color: #7c8796;
  font-size: 8px;
  font-weight: 750;
}

.suggested-action p {
  margin: 6px 0 0;
  color: #455267;
  font-size: 9px;
  line-height: 1.45;
}

.dormant-case > footer {
  display: flex;
  gap: 7px;
  padding: 11px 18px;
  border-top: 1px solid var(--rule-soft);
  background: #fafbfc;
}

/* Settings */
.settings-layout {
  display: grid;
  grid-template-columns: 160px minmax(0, 720px);
  gap: 30px;
}

.settings-nav {
  display: grid;
  align-content: start;
  gap: 2px;
}

.settings-nav a {
  padding: 9px 10px;
  border-radius: 5px;
  color: #707c8d;
  font-size: 10px;
  font-weight: 650;
}

.settings-nav a.active {
  background: #e8ecf2;
  color: #2e3c51;
}

.settings-section {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.settings-section > header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--rule-soft);
}

.stage-settings {
  padding: 7px 18px 15px;
}

.stage-settings > div {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  min-height: 39px;
  border-bottom: 1px solid var(--rule-soft);
}

.stage-settings .drag-grip {
  position: static;
}

.stage-settings b {
  color: #3d4a5e;
  font-size: 9px;
}

.stage-settings small {
  color: #8b95a3;
  font-size: 8px;
}

.add-stage {
  margin-top: 11px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4966b2;
  font-size: 9px;
  font-weight: 700;
}

.setting-row,
.integration-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 61px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--rule-soft);
}

.setting-row:last-child,
.integration-row:last-child {
  border-bottom: 0;
}

.setting-row > div,
.integration-row > div {
  flex: 1;
}

.setting-row strong,
.setting-row p,
.integration-row strong,
.integration-row p {
  display: block;
  margin: 0;
}

.setting-row strong,
.integration-row strong {
  color: #3b495d;
  font-size: 9px;
}

.setting-row p,
.integration-row p {
  margin-top: 4px;
  color: #858f9f;
  font-size: 8px;
}

.switch {
  position: relative;
  width: 34px;
  height: 19px;
}

.switch input {
  position: absolute;
  opacity: 0;
}

.switch span {
  display: block;
  width: 34px;
  height: 19px;
  border-radius: 20px;
  background: #cbd2dc;
}

.switch span::after {
  display: block;
  width: 13px;
  height: 13px;
  margin: 3px;
  border-radius: 50%;
  background: #fff;
  content: "";
  transition: transform .15s ease;
}

.switch input:checked + span {
  background: var(--blue);
}

.switch input:checked + span::after {
  transform: translateX(15px);
}

.number-setting {
  display: flex;
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 5px;
}

.number-setting input {
  width: 43px;
  border: 0;
  outline: 0;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
}

.number-setting span {
  padding: 8px;
  border-left: 1px solid var(--rule);
  background: #f7f8fa;
  color: #788395;
  font-size: 9px;
}

.select-setting select {
  height: 32px;
  padding: 0 28px 0 9px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  color: #465469;
  font: 600 9px var(--font-sans);
}

.integration-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 5px;
  background: #e6efff;
  color: #3970c9;
  font-size: 11px;
  font-weight: 800;
}

.integration-icon.notion {
  background: #eceef1;
  color: #384150;
}

.connected-state,
.coming-state {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 8px;
  font-weight: 700;
}

.coming-state {
  background: #eef1f5;
  color: #788395;
}

.integration-row > button {
  border: 0;
  background: transparent;
  color: #4c67ad;
  font-size: 8px;
  font-weight: 700;
}

/* Chase modal and feedback */
.workspace-v2 .modal-backdrop {
  background: rgba(20, 29, 43, .48);
}

.workspace-v2 .chase-modal {
  width: min(490px, 100%);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(12, 20, 31, .24);
}

.modal-kicker {
  margin: 0 0 6px;
  color: #7f8999;
  font-size: 9px;
  font-weight: 700;
}

.recipient-line {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 20px 0 13px;
  padding: 10px 0;
  border-top: 1px solid var(--rule-soft);
  border-bottom: 1px solid var(--rule-soft);
}

.recipient-line strong,
.recipient-line small {
  display: block;
}

.recipient-line strong {
  font-size: 9px;
}

.recipient-line small {
  margin-top: 3px;
  color: #8490a0;
  font-size: 8px;
}

.chase-selection {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.chase-selection label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #435066;
  font-size: 9px;
  font-weight: 650;
}

.chase-selection input {
  accent-color: var(--blue);
}

.workspace-v2 .email-draft {
  margin: 14px 0;
  padding: 14px;
  border-radius: 5px;
  color: #3f4d61;
  font-size: 10px;
}

.email-draft ul {
  margin: -4px 0 13px;
  padding-left: 18px;
}

.workspace-v2 .modal-actions {
  gap: 6px;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 24px;
  bottom: 24px;
  max-width: 340px;
  padding: 11px 14px;
  border-radius: 6px;
  background: #1c2a3f;
  color: #fff;
  font-size: 9px;
  font-weight: 650;
  box-shadow: 0 12px 30px rgba(15, 24, 37, .2);
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .18s ease, transform .18s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.workspace-v2 button:focus-visible,
.workspace-v2 a:focus-visible,
.workspace-v2 input:focus-visible,
.workspace-v2 select:focus-visible {
  outline: 2px solid #7891dd;
  outline-offset: 2px;
}

@media (max-width: 1120px) {
  .workspace-v2 .main-panel { padding: 30px 26px 50px; }
  .queue-case { grid-template-columns: 225px minmax(330px, 1fr) 135px; gap: 14px; }
  .inbox-workspace { grid-template-columns: 175px minmax(340px, 1fr) 310px; }
  .deal-layout { grid-template-columns: minmax(0, 1fr) 290px; }
  .outstanding-row { grid-template-columns: 8px 1fr; }
  .outstanding-row dl { grid-column: 2; }
  .item-actions { grid-column: 2; }
}

@media (max-width: 800px) {
  .workspace-v2 .sidebar { display: none; }
  .workspace-v2 .main-panel { width: 100%; padding: 24px 17px 45px; }
  .page-header, .deal-header-row { display: block; }
  .header-status, .deal-header-actions { margin-top: 14px; }
  .today-summary { grid-template-columns: 1fr 1fr; }
  .today-summary > div:nth-child(2) { border-right: 0; }
  .today-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--rule-soft); }
  .queue-case { grid-template-columns: 1fr; }
  .queue-actions { justify-content: flex-start; }
  .list-toolbar { align-items: stretch; flex-direction: column; }
  .list-toolbar .search-field { flex-basis: auto; }
  .deal-layout, .settings-layout, .dormant-case-body { grid-template-columns: 1fr; }
  .deal-header-facts { flex-wrap: wrap; gap: 20px; }
  .stage-progress { overflow-x: auto; }
  .stage-progress > div { min-width: 130px; }
  .inbox-workspace { display: block; }
  .message-rail .message-preview:not(.active) { display: none; }
  .email-reader { border-right: 0; border-bottom: 1px solid var(--rule); }
  .board-toolbar { flex-wrap: wrap; }
}

/* Guided test workspace */
.test-data-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 2px 6px;
  border: 1px solid #e4c56f;
  border-radius: 4px;
  background: #fff8df;
  color: #72500d;
  font-size: 7px;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .035em;
  text-transform: uppercase;
  vertical-align: middle;
}

.case-heading .test-data-badge,
.deals-table .test-data-badge,
.card-title .test-data-badge,
.dormant-case .test-data-badge {
  margin-left: 6px;
}

.deal-title-with-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.deal-title-with-badge h1 { margin: 0; }

.test-task-label {
  width: fit-content;
  padding: 1px 5px;
  border-radius: 3px;
  background: #fff8df;
  color: #7b5814 !important;
  font-size: 7px !important;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sidebar-proof em {
  display: block;
  margin-top: 4px;
  color: #e4c56f;
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.onboarding-card.onboarding-card--guided {
  width: min(680px, 100%);
  padding: 34px 38px;
  text-align: left;
}

.onboarding-card.onboarding-card--guided > p {
  max-width: 510px;
  margin: 0 0 22px;
}

.test-workspace-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 26px;
  border-block: 1px solid var(--rule);
}

.test-workspace-summary > div {
  padding: 15px 14px 15px 0;
}

.test-workspace-summary > div + div {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
}

.test-workspace-summary strong,
.test-workspace-summary span {
  display: block;
}

.test-workspace-summary strong {
  color: var(--ink);
  font-size: 17px;
}

.test-workspace-summary span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.onboarding-card.onboarding-card--guided h2 {
  margin: 0 0 8px;
}

.onboarding-steps {
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
}

.onboarding-steps li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
}

.onboarding-steps li > span,
.guide-steps li > span {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid #cbd3df;
  border-radius: 50%;
  color: #536077;
  font-size: 8px;
  font-weight: 800;
}

.onboarding-steps strong { font-size: 10px; }
.onboarding-steps p { margin: 2px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }

.getting-started-guide {
  margin: 0 0 20px;
  border: 1px solid #cfd8ec;
  border-left: 3px solid var(--blue);
  border-radius: 7px;
  background: #fff;
}

.getting-started-guide > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 18px 15px;
  border-bottom: 1px solid var(--rule);
}

.getting-started-guide h2 {
  margin: 7px 0 2px;
  font-size: 15px;
  letter-spacing: -.025em;
}

.getting-started-guide header p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.guide-dismiss {
  padding: 3px 0;
  border: 0;
  background: transparent;
  color: #7c8799;
  cursor: pointer;
  font-size: 8px;
  font-weight: 700;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.guide-steps li {
  min-width: 0;
  padding: 15px 15px 14px;
}

.guide-steps li + li { border-left: 1px solid var(--rule); }

.guide-steps li.complete > span {
  border-color: #95c8ab;
  background: #eaf7ef;
  color: #207248;
}

.guide-steps li.complete > span::before { content: "✓"; }
.guide-steps li.complete > span { font-size: 0; }
.guide-steps li.complete > span::before { font-size: 9px; }
.guide-steps strong { display: block; margin-top: 9px; color: var(--ink); font-size: 9px; }
.guide-steps p { min-height: 37px; margin: 3px 0 7px; color: var(--muted); font-size: 8px; line-height: 1.5; }
.guide-steps .text-link { font-size: 8px; }

@media (max-width: 1100px) {
  .guide-steps { grid-template-columns: 1fr; }
  .guide-steps li { display: grid; grid-template-columns: 24px 1fr; column-gap: 10px; }
  .guide-steps li + li { border-left: 0; border-top: 1px solid var(--rule); }
  .guide-steps strong { margin-top: 1px; }
  .guide-steps p { min-height: 0; }
  .guide-steps li .text-link { grid-column: 2; }
}

@media (max-width: 700px) {
  .onboarding-card--guided { padding: 28px 22px; }
  .test-workspace-summary { grid-template-columns: 1fr; }
  .test-workspace-summary > div + div { padding-left: 0; border-top: 1px solid var(--rule); border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* Usable MVP additions */
.flash {
  margin: -12px 0 20px;
  padding: 11px 14px;
  border: 1px solid #cfe5d9;
  border-radius: 6px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
}

.flash.alert {
  border-color: #efd2d2;
  background: var(--red-soft);
  color: var(--red);
}

.sidebar-footer form {
  margin-left: auto;
}

.sign-out-link {
  border: 0;
  background: transparent;
  color: #8290a3;
  cursor: pointer;
  font-size: 9px;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 42px 24px;
  border: 1px dashed #ced5df;
  border-radius: 7px;
  background: rgba(255, 255, 255, .55);
  text-align: center;
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  margin-bottom: 11px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  font-weight: 800;
}

.empty-state h3 {
  margin: 0;
  color: #2c3a4f;
  font-size: 14px;
}

.empty-state p {
  margin: 7px 0 15px;
  color: var(--muted);
  font-size: 10px;
}

.empty-state.compact {
  padding: 27px 20px;
  border: 0;
  background: transparent;
}

.page-empty {
  min-height: 340px;
  align-content: center;
}

.activity-type-tag {
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef1f5;
  color: #6d7889;
  font-size: 8px;
  font-weight: 700;
}

.deal-card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-activity {
  margin: 10px -14px -14px;
  padding: 8px 14px;
  border-top: 1px solid var(--rule-soft);
  color: #798597;
  font-size: 8px;
  font-weight: 650;
}

.deal-card--dormant .card-activity {
  color: var(--red);
}

.column-empty {
  min-height: 96px;
  padding: 34px 12px;
  border: 1px dashed #d6dce4;
  border-radius: 6px;
  color: #8b95a3;
  font-size: 9px;
  text-align: center;
}

.deals-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) repeat(3, 165px) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 15px;
}

.deals-toolbar select,
.deals-toolbar input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  color: #405069;
  font: 600 10px/1 var(--font-sans);
}

.deal-search {
  position: relative;
}

.deal-search > span {
  position: absolute;
  top: 10px;
  left: 11px;
  color: #8792a1;
}

.deal-search input {
  padding-left: 30px;
}

.deals-table-shell {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.deals-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.deals-table th {
  padding: 11px 13px;
  border-bottom: 1px solid var(--rule);
  color: #7d8898;
  font-size: 8px;
  font-weight: 750;
  text-align: left;
}

.deals-table td {
  padding: 13px;
  border-bottom: 1px solid var(--rule-soft);
  color: #4b596d;
  font-size: 9px;
  vertical-align: middle;
}

.deals-table tr:last-child td {
  border-bottom: 0;
}

.deals-table td:first-child a {
  display: block;
  color: #25364d;
  font-size: 10px;
  font-weight: 800;
  text-decoration: none;
}

.deals-table td small {
  display: block;
  margin-top: 4px;
  color: #8a94a2;
  font-size: 8px;
}

.owner-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.owner-chip i {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
}

.form-page {
  max-width: 900px;
}

.form-page.narrow {
  max-width: 700px;
}

.record-form,
.form-section,
.optional-fields {
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.record-form > .form-section {
  border: 0;
  border-radius: 0;
}

.form-section > header,
.optional-fields > summary {
  padding: 17px 19px;
  border-bottom: 1px solid var(--rule-soft);
}

.form-section header h2 {
  margin: 0;
  font-size: 15px;
}

.form-section header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.form-grid {
  display: grid;
  gap: 16px;
  padding: 19px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid label,
.auth-form label,
.draft-label {
  display: grid;
  gap: 7px;
  color: #4a586d;
  font-size: 9px;
  font-weight: 750;
}

.form-grid input,
.form-grid select,
.form-grid textarea,
.auth-form input,
.draft-label textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 10px;
  border: 1px solid #d8dee6;
  border-radius: 5px;
  background: #fff;
  color: #26364c;
  font: 500 11px/1.35 var(--font-sans);
}

.form-grid textarea,
.draft-label textarea {
  resize: vertical;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus,
.auth-form input:focus,
.draft-label textarea:focus {
  border-color: #7891dd;
  outline: 2px solid rgba(62, 99, 221, .1);
}

.span-two {
  grid-column: span 2;
}

.span-three {
  grid-column: span 3;
}

.money-input,
.suffix-input {
  display: flex;
  align-items: center;
  border: 1px solid #d8dee6;
  border-radius: 5px;
  background: #fff;
}

.money-input > span,
.suffix-input > span {
  padding: 0 10px;
  color: #7a8698;
  font-size: 10px;
}

.money-input input,
.suffix-input input {
  border: 0;
}

.optional-fields {
  margin: 0 19px 19px;
  background: #fbfcfd;
}

.optional-fields > summary {
  border: 0;
  color: #44546c;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.optional-fields[open] > summary {
  border-bottom: 1px solid var(--rule-soft);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding: 15px 19px;
  border-top: 1px solid var(--rule-soft);
}

.form-errors {
  margin: 16px 19px;
  padding: 12px 14px;
  border: 1px solid #efd2d2;
  border-radius: 5px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 9px;
}

.form-errors ul {
  margin: 7px 0 0;
  padding-left: 17px;
}

.deal-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.deal-title-line h1 {
  margin: 0;
  font-size: 27px;
  letter-spacing: -.04em;
}

.deal-title-line p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.deal-title-line p span {
  margin-left: 12px;
  padding-left: 12px;
  border-left: 1px solid var(--rule);
}

.deal-controls {
  display: grid;
  grid-template-columns: 180px 180px 170px auto;
  gap: 12px;
  align-items: end;
  margin-top: 22px;
  padding: 13px 15px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.deal-controls label {
  display: grid;
  gap: 5px;
  color: #7c8797;
  font-size: 8px;
  font-weight: 700;
}

.deal-controls select,
.deal-controls input {
  height: 34px;
  border: 1px solid var(--rule);
  border-radius: 5px;
  background: #fff;
  color: #34445b;
  font: 650 9px/1 var(--font-sans);
}

.compact-button {
  height: 34px;
}

.inline-item-form {
  padding: 0;
  border-bottom: 1px solid var(--rule);
  background: #f9faff;
}

.inline-form-heading {
  display: flex;
  justify-content: space-between;
  padding: 15px 17px 0;
}

.inline-form-heading h3 {
  margin: 0;
  font-size: 13px;
}

.inline-form-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.inline-form-heading button {
  border: 0;
  background: transparent;
  color: #7d8898;
  cursor: pointer;
  font-size: 20px;
}

.outstanding-form .form-actions {
  padding-top: 12px;
}

.outstanding-row-functional {
  display: grid;
  grid-template-columns: 8px minmax(180px, 1fr) minmax(280px, 1.3fr) 112px;
  gap: 13px;
  align-items: center;
  min-height: 96px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--rule-soft);
}

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

.outstanding-row-functional.high-priority {
  background: #fffbf5;
}

.outstanding-row-functional dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin: 0;
}

.outstanding-row-functional dt {
  color: #8993a2;
  font-size: 7px;
}

.outstanding-row-functional dd {
  margin: 4px 0 0;
  color: #3f4d62;
  font-size: 8px;
  font-weight: 750;
}

.item-actions.functional {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.item-actions.functional form:first-child,
.item-actions.functional form:first-child .button {
  grid-column: span 2;
  width: 100%;
}

.text-action {
  padding: 4px;
  border: 0;
  background: transparent;
  color: #65748a;
  cursor: pointer;
  font: 700 8px/1 var(--font-sans);
  text-align: center;
  text-decoration: none;
}

.text-action.danger {
  color: var(--red);
}

.resolved-items {
  margin-bottom: 18px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
}

.resolved-items summary {
  padding: 13px 16px;
  color: #4d5b70;
  cursor: pointer;
  font-size: 10px;
  font-weight: 750;
}

.resolved-items summary span {
  margin-left: 5px;
  color: #8993a2;
}

.resolved-row {
  display: flex;
  gap: 9px;
  padding: 11px 16px;
  border-top: 1px solid var(--rule-soft);
}

.resolved-row > span {
  color: var(--green);
}

.resolved-row strong,
.resolved-row small {
  display: block;
}

.resolved-row strong {
  color: #435168;
  font-size: 9px;
}

.resolved-row small {
  margin-top: 3px;
  color: #8a94a2;
  font-size: 8px;
}

.deal-notes {
  padding: 14px 17px;
  border-top: 1px solid var(--rule-soft);
}

.deal-notes strong {
  color: #657287;
  font-size: 8px;
}

.deal-notes p {
  margin: 6px 0 0;
  color: #48566a;
  font-size: 9px;
  line-height: 1.55;
}

.chase-dialog,
.info-dialog {
  position: fixed;
  inset: 0;
  width: min(500px, calc(100vw - 32px));
  margin: auto;
  padding: 23px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(18, 29, 46, .24);
}

.chase-dialog::backdrop,
.info-dialog::backdrop {
  background: rgba(20, 31, 47, .55);
  backdrop-filter: blur(2px);
}

.chase-dialog h2,
.info-dialog h2 {
  margin: 4px 0 18px;
  font-size: 20px;
  letter-spacing: -.035em;
}

.chase-dialog .recipient-line {
  margin-bottom: 15px;
}

.draft-label textarea {
  margin-top: 7px;
}

.info-dialog > p:not(.modal-kicker) {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.future-flow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0;
  padding: 13px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  color: #45546a;
  font-size: 9px;
  font-weight: 750;
}

.future-flow b {
  color: var(--blue);
}

.fixed-setting,
.not-connected-state {
  color: #66758a;
  font-size: 9px;
  font-weight: 750;
}

.not-connected-state {
  color: var(--amber);
}

.danger-button {
  border: 1px solid #edcccc;
  background: #fff;
  color: var(--red);
}

/* Authentication and onboarding */
.public-body {
  min-height: 100vh;
  background: #eef1f5;
}

.public-shell {
  min-height: 100vh;
}

.public-shell > .flash {
  position: fixed;
  z-index: 5;
  top: 18px;
  left: 50%;
  width: min(520px, calc(100vw - 32px));
  margin: 0;
  transform: translateX(-50%);
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(520px, 1.1fr);
  min-height: 100vh;
}

.auth-shell > aside {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px 48px;
  background: #17243a;
  color: #fff;
}

.auth-brand,
.onboarding-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 21px;
  letter-spacing: -.05em;
}

.auth-shell aside h1 {
  max-width: 520px;
  margin: 10px 0 16px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 1.03;
  letter-spacing: -.055em;
}

.auth-shell aside p {
  max-width: 460px;
  color: #aeb9c8;
  font-size: 14px;
  line-height: 1.55;
}

.auth-shell aside .auth-kicker {
  color: #8da9ff;
  font-size: 10px;
  font-weight: 750;
}

.auth-shell aside > small {
  color: #73849c;
  font-size: 9px;
}

.auth-shell > main {
  display: grid;
  place-items: center;
  padding: 40px;
  background: #f6f7f9;
}

.auth-form {
  width: min(390px, 100%);
}

.auth-form.registration {
  width: min(450px, 100%);
}

.auth-form h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: -.045em;
}

.auth-form > p {
  margin: 8px 0 26px;
  color: var(--muted);
  font-size: 11px;
}

.auth-form form {
  display: grid;
  gap: 15px;
}

.auth-form label > small {
  color: #8a94a2;
  font-size: 8px;
  font-weight: 500;
}

.auth-name-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-form .remember-line {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.remember-line input {
  width: auto;
  min-height: auto;
}

.workspace-v2 .button.large {
  min-height: 42px;
  justify-content: center;
  font-size: 11px;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 19px;
  color: #758196;
  font-size: 9px;
}

.auth-links a {
  color: var(--blue);
  font-weight: 750;
  text-decoration: none;
}

.simple-auth,
.onboarding-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 30px;
}

.simple-auth > .auth-brand,
.onboarding-shell > .onboarding-brand {
  position: absolute;
  top: 28px;
  left: 34px;
  color: var(--ink);
}

.simple-auth .auth-form,
.onboarding-card {
  width: min(460px, 100%);
  padding: 32px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 12px 35px rgba(28, 42, 62, .06);
}

.onboarding-card {
  text-align: center;
}

.setup-step {
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
}

.onboarding-card h1 {
  margin: 9px 0;
  font-size: 28px;
  letter-spacing: -.045em;
}

.onboarding-card > p {
  margin: 0 auto 26px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.onboarding-card h2 {
  margin: 0 0 13px;
  font-size: 13px;
}

.onboarding-actions {
  display: grid;
  gap: 8px;
}

.onboarding-actions form,
.onboarding-actions .button {
  width: 100%;
}

.onboarding-card > small {
  display: block;
  margin-top: 17px;
  color: #8a94a2;
  font-size: 8px;
}

@media (max-width: 1120px) {
  .outstanding-row-functional { grid-template-columns: 8px 1fr; }
  .outstanding-row-functional dl,
  .outstanding-row-functional .item-actions { grid-column: 2; }
  .deals-toolbar { grid-template-columns: 1fr 1fr 1fr; }
  .deal-search { grid-column: 1 / -1; }
}

@media (max-width: 800px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-shell > aside { display: none; }
  .auth-shell > main { min-height: 100vh; padding: 28px 20px; }
  .form-grid.two,
  .form-grid.three,
  .deal-controls { grid-template-columns: 1fr; }
  .span-two,
  .span-three { grid-column: auto; }
  .deal-title-line { display: block; }
  .deal-title-line .deal-header-actions { margin-top: 15px; }
  .deals-toolbar { grid-template-columns: 1fr; }
  .deal-search { grid-column: auto; }
}
