:root {
  --bg: #f7f5f1;
  --panel: #fbfaf7;
  --panel-2: #ffffff;
  --text: #171512;
  --muted: #8a8378;
  --line: #e4ded4;
  --line-strong: #d7d0c5;
  --steel: #171512;
  --steel-2: #2f2b25;
  --amber: #c66d27;
  --green: #2e8a51;
  --blue: #426f9d;
  --violet: #6a62a8;
  --red: #b94843;
  --shadow: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 13px;
}

.auth-screen {
  align-items: center;
  background: rgba(247, 245, 241, 0.96);
  display: grid;
  inset: 0;
  justify-items: center;
  padding: 24px;
  position: fixed;
  z-index: 100;
}

.auth-screen[hidden] {
  display: none;
}

.auth-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  max-width: 360px;
  padding: 22px;
  width: 100%;
}

.auth-card h2 {
  font-size: 22px;
}

.auth-card .field {
  margin-bottom: 0;
}

.auth-error {
  color: var(--red);
  font-size: 12px;
  min-height: 16px;
}

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

button {
  border: 0;
  cursor: pointer;
}

.shell {
  min-height: 100vh;
}

.topbar {
  align-items: center;
  background: rgba(251, 250, 247, 0.96);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  min-height: 50px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 20;
}

.eyebrow {
  color: var(--muted);
  display: inline;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 10px 0 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  display: inline;
  font-size: 14px;
  line-height: 1.1;
}

h2 {
  font-size: 15px;
}

h3 {
  font-size: 14px;
}

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

.notification-button {
  align-items: center;
  display: inline-flex;
  gap: 7px;
}

.notification-button span {
  background: var(--red);
  border-radius: 999px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
  min-width: 20px;
  padding: 3px 6px;
  text-align: center;
}

.primary,
.ghost,
.mini {
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 750;
  min-height: 30px;
  padding: 0 12px;
}

.primary {
  background: #111;
  border-color: #111;
  color: #fff;
}

.ghost,
.mini {
  background: var(--panel);
  color: var(--text);
}

.mini {
  min-height: 30px;
  padding: 0 10px;
}

.dashboard {
  display: grid;
  gap: 0;
  grid-template-columns: minmax(0, 1fr) 374px;
  margin: 0;
  max-width: none;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  margin: 12px 24px;
  max-width: none;
  padding: 14px;
}

.guide.collapsed {
  display: none;
}

.shell.import-mode .workspace,
.shell.import-mode .dashboard,
.shell.import-mode .kanban,
.shell.import-mode .activity-page,
.shell.activity-mode .workspace,
.shell.activity-mode .dashboard,
.shell.activity-mode .kanban,
.shell.activity-mode .contact-import {
  display: none;
}

.ghost.active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.contact-import {
  padding: 18px 24px 24px;
}

.notification-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin: 12px 24px;
  padding: 14px;
}

.notification-panel.collapsed {
  display: none;
}

.notification-list,
.activity-list {
  display: grid;
  gap: 8px;
}

.notification-item,
.activity-event {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  text-align: left;
}

.notification-item.danger {
  border-color: #e0b4ae;
  box-shadow: inset 3px 0 0 var(--red);
}

.notification-item.warning {
  border-color: #e5c295;
  box-shadow: inset 3px 0 0 var(--amber);
}

.notification-item.info {
  box-shadow: inset 3px 0 0 var(--blue);
}

.notification-item strong,
.activity-event strong {
  color: var(--text);
  font-size: 13px;
}

.notification-item span,
.notification-item small,
.activity-event span,
.activity-event p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.activity-page {
  padding: 18px 24px 24px;
}

.activity-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.activity-head h2 {
  font-size: 24px;
}

.activity-filters,
.activity-summary {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 12px;
}

.activity-summary {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
}

.activity-summary div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 12px;
}

.activity-summary span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.activity-summary strong {
  font-size: 24px;
  line-height: 1;
}

.import-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.import-head h2 {
  font-size: 24px;
}

.import-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.import-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.import-layout {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  min-height: calc(100vh - 130px);
}

.import-queue {
  background: var(--panel);
  border-right: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: calc(100vh - 130px);
  overflow: auto;
  padding: 12px;
}

.import-queue-item {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 5px;
  min-height: 78px;
  padding: 10px;
  text-align: left;
}

.import-queue-item.active {
  border-color: #111;
  box-shadow: inset 3px 0 0 #111;
}

.import-queue-item strong {
  font-size: 12px;
  line-height: 1.25;
}

.import-queue-item span,
.import-queue-item small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.import-detail {
  display: grid;
  gap: 12px;
  align-content: start;
  max-height: calc(100vh - 130px);
  overflow: auto;
  padding: 18px;
}

.import-company {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 520px;
}

.import-company span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.import-company h3 {
  font-size: 24px;
  line-height: 1.15;
  margin-top: 4px;
}

.import-company p,
.import-source-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.import-source-note {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.import-source-note strong {
  color: var(--text);
}

.contact-funnel.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-funnel.compact .contact-funnel-card {
  min-height: 78px;
}

.import-contact-groups {
  display: grid;
  gap: 12px;
}

.import-contact-section {
  display: grid;
  gap: 8px;
}

.import-empty {
  align-content: center;
  border: 1px solid var(--line);
  display: grid;
  justify-items: center;
  min-height: 420px;
  text-align: center;
}

.import-empty p {
  color: var(--muted);
  max-width: 520px;
}

.guide-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.guide-grid div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 6px;
  padding: 11px;
}

.guide-grid strong {
  color: var(--steel);
  font-size: 13px;
}

.guide-grid span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.metric-grid {
  display: grid;
  gap: 0;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.metric {
  background: var(--panel);
  border-right: 1px solid var(--line);
  min-height: 104px;
  padding: 18px 20px;
}

.metric span {
  color: var(--muted);
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  font-size: 24px;
  line-height: 1.05;
}

.metric small {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.25;
  margin-top: 6px;
}

.status-panel {
  background: var(--panel);
  border-left: 1px solid var(--line);
  padding: 18px 20px;
}

.status-panel .panel-head {
  margin-bottom: 8px;
}

.status-bars {
  display: grid;
  gap: 7px;
}

.activity-report {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
}

.activity-report h3 {
  font-size: 12px;
}

.activity-report div {
  display: grid;
  gap: 6px 10px;
  grid-template-columns: repeat(4, auto);
}

.activity-report span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.activity-report strong {
  font-size: 13px;
}

.status-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: 88px 1fr 36px;
}

.status-row span,
.status-row strong {
  font-size: 11px;
}

.status-row span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-row strong {
  text-align: right;
}

.bar {
  background: #eee9e1;
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.bar i {
  background: var(--muted);
  display: block;
  height: 100%;
}

.kanban {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin: 0;
  max-width: none;
  padding: 18px 24px 22px;
}

.kanban-board {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(7, minmax(170px, 1fr));
  overflow-x: auto;
}

.kanban-column {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 318px;
  min-width: 170px;
  padding: 9px;
}

.kanban-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kanban-title strong {
  font-size: 12px;
}

.kanban-title span {
  background: #eee9e1;
  border-radius: 999px;
  color: var(--text);
  font-size: 11px;
  font-weight: 850;
  padding: 3px 7px;
}

.kanban-items {
  align-content: start;
  display: flex;
  flex-direction: column;
  gap: 7px;
  overflow-y: auto;
  padding-right: 3px;
  scrollbar-gutter: stable;
}

.kanban-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 5px;
  display: grid;
  gap: 4px;
  flex: 0 0 auto;
  min-height: 68px;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.kanban-card.due {
  border-color: var(--amber);
  box-shadow: inset 3px 0 0 var(--amber);
}

.kanban-card strong {
  font-size: 12px;
  line-height: 1.25;
}

.kanban-card span,
.kanban-card small,
.kanban-empty {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  margin: 0;
}

.workspace {
  display: grid;
  gap: 0;
  grid-template-columns: 280px 460px minmax(620px, 1fr);
  height: calc(100vh - 178px);
  margin: 0;
  max-width: none;
  min-height: 620px;
}

.filters,
.list-panel,
.detail-panel {
  background: var(--panel);
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: var(--shadow);
  min-height: 0;
}

.filters {
  height: 100%;
  align-self: start;
  min-height: 0;
  overflow: auto;
  padding: 16px;
  position: sticky;
  top: 50px;
}

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

.panel-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

input,
select,
textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  min-height: 32px;
  padding: 8px 10px;
  width: 100%;
}

textarea {
  min-height: 82px;
  resize: vertical;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 0 10px;
}

.chip.active {
  background: #111;
  border-color: #111;
  color: #fff;
}

.toggles {
  display: grid;
  gap: 10px;
}

.quick-queues {
  display: grid;
  gap: 7px;
  grid-template-columns: 1fr 1fr;
  margin-top: 9px;
}

.quick-queues .mini:last-child {
  grid-column: 1 / -1;
}

.queue-field {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 10px;
  padding: 10px;
}

.queue-field summary {
  align-items: center;
  cursor: pointer;
  display: grid;
  gap: 4px;
  grid-template-columns: minmax(0, 1fr) auto;
  list-style: none;
}

.queue-field summary::-webkit-details-marker {
  display: none;
}

.queue-field summary::after {
  color: var(--muted);
  content: "▾";
  font-size: 13px;
  transform: rotate(-90deg);
  transition: transform 0.16s ease;
}

.queue-field[open] summary::after {
  transform: rotate(0);
}

.queue-field summary small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  grid-column: 1 / 2;
  letter-spacing: 0;
  text-transform: none;
}

.queue-field .mini {
  background: #fff;
  border: 1px solid var(--line);
}

.toggles label {
  align-items: center;
  color: var(--text);
  display: flex;
  font-size: 12px;
  gap: 8px;
}

.toggles input {
  min-height: 16px;
  width: 16px;
}

.list-panel {
  display: grid;
  grid-template-rows: auto 1fr;
  height: 100%;
  max-height: none;
  padding: 16px 12px;
}

.company-list {
  align-content: start;
  display: grid;
  gap: 6px;
  overflow: auto;
  padding: 0 0 16px;
}

.company-row {
  align-self: start;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 7px;
  min-height: 92px;
  overflow: hidden;
  padding: 11px 10px;
  text-align: left;
}

.list-more {
  background: #111;
  border-radius: 5px;
  color: #fff;
  font-weight: 850;
  min-height: 42px;
}

.company-row.active {
  border-color: #111;
  box-shadow: inset 3px 0 0 #111;
}

.row-title {
  align-items: start;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.row-title strong {
  font-size: 12px;
  line-height: 1.25;
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-badges {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: flex-end;
  max-width: 124px;
}

.badge {
  border-radius: 4px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.badge.a {
  background: #111;
  color: #fff;
}

.badge.b {
  background: #f4eadf;
  color: var(--amber);
}

.badge.c {
  background: #f2e9df;
  color: #765037;
}

.status-badge {
  border-radius: 999px;
  display: inline-flex;
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
  padding: 5px 7px;
  white-space: nowrap;
}

.status-badge.new {
  background: #eee9e1;
  color: var(--muted);
}

.status-badge.work {
  background: #e9eef3;
  color: var(--blue);
}

.status-badge.call,
.status-badge.paused {
  background: #fff2df;
  color: var(--amber);
}

.status-badge.interest,
.status-badge.proposal,
.status-badge.negotiation {
  background: #e7f4ef;
  color: var(--green);
}

.status-badge.bad {
  background: #f7eaea;
  color: var(--red);
}

.meta {
  color: var(--muted);
  display: block;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta span + span::before {
  color: var(--line-strong);
  content: " · ";
  margin: 0 4px;
}

.products {
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-panel {
  border-right: 0;
  background: var(--bg);
  height: 100%;
  max-height: none;
  overflow: auto;
  padding: 16px 28px 24px;
}

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

.detail-title h2 {
  font-size: 22px;
  line-height: 1.18;
}

.score {
  align-items: center;
  background: transparent;
  border-radius: 0;
  color: #111;
  display: grid;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 28px;
  font-weight: 900;
  height: 64px;
  justify-items: center;
  min-width: 72px;
}

.score span {
  color: var(--muted);
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
  margin: 14px 0;
  overflow-x: auto;
}

.tab {
  background: transparent;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 800;
  min-height: 36px;
  padding: 0;
}

.tab.active {
  border-color: var(--steel);
  color: var(--steel);
}

.grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.info {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px;
}

.info.wide {
  grid-column: 1 / -1;
}

.info span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 5px;
  text-transform: uppercase;
}

.info p,
.info a {
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.info a {
  color: var(--text);
  font-weight: 800;
}

.crm-grid {
  display: grid;
  gap: 12px;
}

.action-strip {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 1fr auto auto;
  margin-bottom: 12px;
}

.action-strip .field {
  margin-bottom: 0;
}

.form-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
}

.edit-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.edit-grid .wide,
.notes-field {
  grid-column: 1 / -1;
}

.section-title {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-funnel {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-funnel-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 4px;
  min-height: 96px;
  padding: 11px;
}

.contact-funnel-card span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.contact-funnel-card strong {
  font-size: 24px;
  line-height: 1;
}

.contact-funnel-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  margin: 0;
}

.suggested-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  padding: 11px;
}

.suggested-section {
  display: grid;
  gap: 7px;
}

.suggested-section + .suggested-section {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.suggested-section-head {
  align-items: baseline;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.suggested-section-head strong {
  font-size: 12px;
}

.suggested-section-head span {
  color: var(--muted);
  font-size: 11px;
}

.suggested-list {
  display: grid;
  gap: 8px;
}

.suggested-contact {
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr) auto;
  padding: 9px;
}

.suggested-contact.ready {
  border-left: 3px solid var(--green);
}

.suggested-contact.review {
  border-left: 3px solid var(--amber);
}

.suggested-contact.general,
.suggested-contact.weak {
  border-left: 3px solid var(--line-strong);
}

.contact-actions {
  display: flex;
  gap: 6px;
}

.suggested-contact strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.suggested-contact span,
.suggested-contact p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  margin: 0;
}

.suggested-contact a,
.contact-card a {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 8px;
  padding: 11px;
}

.contact-card div:first-child {
  align-items: start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.contact-card strong {
  font-size: 14px;
}

.contact-card span,
.contact-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  margin: 0;
}

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

.call-desk {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr 0.95fr;
  margin-bottom: 10px;
}

.call-flow {
  align-items: stretch;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 10px;
  grid-template-columns: 0.8fr 1.25fr 0.85fr auto;
  margin-bottom: 10px;
  padding: 10px;
}

.clear-status {
  align-self: end;
  white-space: nowrap;
}

.call-flow .field {
  margin-bottom: 0;
}

.call-flow div {
  display: grid;
  gap: 4px;
}

.call-flow span,
.decision-help p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.call-flow strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.call-card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 7px;
  padding: 10px;
}

.call-card .field {
  margin-bottom: 8px;
}

.plan-card textarea {
  min-height: 58px;
}

.call-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.call-card h3 {
  font-size: 15px;
  line-height: 1.25;
}

.call-card p,
.call-card a,
.call-card .call-lines span {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.call-lines {
  display: grid;
  gap: 5px;
}

.decision-help {
  display: grid;
  gap: 2px;
  margin-bottom: 6px;
}

.decision-help input {
  margin-top: 4px;
}

.callout-workspace {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 12px;
  padding: 10px;
}

.outcome-grid {
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 10px;
}

.outcome {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 8px 9px;
  text-align: left;
}

.outcome:hover,
.outcome:focus-visible {
  border-color: #111;
  box-shadow: inset 3px 0 0 #111;
}

.outcome strong {
  color: var(--text);
  font-size: 12px;
  line-height: 1.2;
}

.outcome span {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.3;
}

.call-script {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.call-script pre {
  color: #16212c;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

.history {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.history-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.history-item strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.history-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.script-box {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #16212c;
  font-size: 14px;
  line-height: 1.5;
  margin-top: 12px;
  min-height: 260px;
  padding: 14px;
  white-space: pre-wrap;
}

.empty {
  align-content: center;
  color: var(--muted);
  display: grid;
  min-height: 260px;
  place-items: center;
  text-align: center;
}

.empty.compact {
  min-height: 120px;
  padding: 16px;
}

.call-hero {
  display: grid;
  gap: 8px;
  grid-template-columns: 1.4fr 1fr 1fr;
  margin-bottom: 10px;
}

.call-hero div {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  gap: 5px;
  padding: 10px;
}

.call-hero span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.call-hero strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.product-select {
  font-size: 13px;
  font-weight: 750;
  margin-top: 4px;
}

.last-touch-card h3 {
  font-size: 14px;
}

.last-touch-card p {
  color: var(--muted);
}

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

  .metric-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .guide-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workspace {
    grid-template-columns: 280px 1fr;
  }

  .call-desk,
  .outcome-grid,
  .call-flow,
  .call-hero,
  .contact-funnel,
  .import-layout,
  .import-company,
  .suggested-contact {
    grid-template-columns: 1fr;
  }

  .import-queue,
  .import-detail {
    max-height: none;
  }

  .detail-panel {
    grid-column: 1 / -1;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .shell {
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .topbar,
  .detail-title,
  .form-row,
  .action-strip,
  .edit-grid {
    align-items: stretch;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .topbar,
  .top-actions {
    display: grid;
  }

  .topbar {
    padding: 12px;
    position: static;
  }

  .dashboard,
  .guide-grid,
  .metric-grid,
  .activity-filters,
  .activity-summary,
  .contact-funnel,
  .contact-funnel.compact,
  .grid {
    grid-template-columns: 1fr;
  }

  .notification-panel,
  .activity-page {
    margin: 12px;
    padding: 12px;
  }

  .activity-head {
    align-items: stretch;
    display: grid;
    gap: 10px;
  }

  .workspace {
    display: contents;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .contact-import {
    padding: 12px;
  }

  .import-head,
  .import-actions {
    align-items: stretch;
    display: grid;
  }

  .filters {
    order: 1;
    height: auto;
    overflow: visible;
    position: static;
    min-height: auto;
  }

  .detail-panel {
    order: 2;
  }

  .kanban {
    order: 3;
  }

  .dashboard {
    order: 4;
  }

  .list-panel {
    order: 5;
    height: auto;
    max-height: none;
  }

  .company-list {
    max-height: none;
    overflow: visible;
    padding-bottom: 8px;
  }

  .detail-panel {
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .dashboard {
    max-height: none;
    overflow: visible;
  }

  .kanban {
    padding: 16px 12px 20px;
  }

  .kanban-board {
    grid-template-columns: 1fr;
    max-height: none;
    overflow: visible;
  }

  .kanban-column {
    max-height: none;
  }

  .kanban-items {
    overflow: visible;
  }
}
