:root {
  color: #18202f;
  background: #eef1f5;
  font-family:
    Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

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

button {
  cursor: pointer;
}

.crm-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100dvh;
  background: #eef1f5;
}

.sidebar {
  border-right: 1px solid #dce2ea;
  background: #f8fafc;
  padding: 24px 18px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand-lockup strong,
.brand-lockup span {
  display: block;
}

.brand-lockup strong {
  font-size: 15px;
}

.brand-lockup span {
  color: #667085;
  font-size: 12px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: #22324a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

.nav-list {
  display: grid;
  gap: 6px;
}

.nav-item {
  border-radius: 8px;
  color: #4b5565;
  font-size: 14px;
  padding: 10px 12px;
  text-decoration: none;
}

.nav-item.active,
.nav-item:hover {
  background: #e7ecf3;
  color: #18202f;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 6px;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 26px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  line-height: 1.35;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.ghost-button,
.primary-button,
.segmented-control button {
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid #cfd6e1;
  padding: 0 14px;
  transition:
    background 120ms ease,
    transform 120ms ease;
}

.ghost-button:active,
.primary-button:active,
.segmented-control button:active {
  transform: translateY(1px);
}

.ghost-button {
  background: #ffffff;
  color: #344054;
}

.primary-button {
  border-color: #22324a;
  background: #22324a;
  color: #ffffff;
}

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

.summary-card,
.panel {
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #ffffff;
}

.summary-card {
  padding: 16px;
}

.summary-card span,
.summary-card small {
  display: block;
  color: #667085;
  font-size: 13px;
}

.summary-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 30px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  padding: 18px;
}

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

.panel-header.compact {
  align-items: center;
}

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

.brief-grid div {
  border-top: 1px solid #edf0f4;
  padding-top: 12px;
}

.brief-grid dt {
  color: #667085;
  font-size: 12px;
  margin-bottom: 6px;
}

.brief-grid dd {
  margin: 0;
  color: #263244;
  font-size: 14px;
  line-height: 1.45;
}

.status-pill,
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.count-badge {
  background: #edf2f7;
  color: #344054;
}

.status-not_contacted {
  background: #f1f5f9;
  color: #475569;
}

.status-contacted {
  background: #e0f2fe;
  color: #075985;
}

.status-in_private_pool {
  background: #dcfce7;
  color: #166534;
}

.status-qualified {
  background: #fef3c7;
  color: #92400e;
}

.status-won {
  background: #d1fae5;
  color: #047857;
}

.status-lost {
  background: #fee2e2;
  color: #991b1b;
}

.followup-list {
  display: grid;
  gap: 10px;
}

.followup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #edf0f4;
  padding-top: 12px;
}

.followup-row strong,
.followup-row span {
  display: block;
}

.followup-row strong {
  font-size: 14px;
}

.followup-row span,
.followup-row time {
  color: #667085;
  font-size: 12px;
}

.segmented-control {
  display: inline-flex;
  gap: 4px;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #f8fafc;
  padding: 3px;
}

.segmented-control button {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: #667085;
  font-size: 13px;
  padding: 0 10px;
}

.segmented-control button.active {
  background: #ffffff;
  color: #18202f;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.08);
}

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

.crm-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: auto;
}

.crm-table th,
.crm-table td {
  border-top: 1px solid #edf0f4;
  padding: 13px 10px;
  text-align: left;
  vertical-align: middle;
}

.crm-table th {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.crm-table td {
  color: #344054;
  font-size: 13px;
}

.crm-table th:nth-child(1),
.crm-table td:nth-child(1) {
  width: 24%;
}

.crm-table th:nth-child(4),
.crm-table td:nth-child(4) {
  width: 15%;
}

.crm-table th:nth-child(8),
.crm-table td:nth-child(8) {
  width: 98px;
  white-space: nowrap;
}

.creator-cell strong,
.creator-cell span {
  display: block;
}

.creator-cell strong {
  color: #18202f;
  font-size: 14px;
  margin-bottom: 4px;
}

.creator-cell span {
  color: #667085;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.progress-cell {
  display: grid;
  gap: 6px;
}

.progress-cell span {
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf2f7;
}

.progress-track div {
  height: 100%;
  border-radius: inherit;
  background: #22324a;
}

.handoff-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.funnel-rows {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.funnel-rows div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #edf0f4;
  padding-top: 10px;
}

.funnel-rows span,
.integration-copy {
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

.funnel-rows strong {
  font-size: 18px;
}

.mock-shell {
  min-height: 100dvh;
  padding: 32px;
  background: #eef1f5;
}

.mock-console {
  max-width: 1180px;
  margin: 0 auto;
}

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

.ghost-link {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #cfd6e1;
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  padding: 0 14px;
  text-decoration: none;
}

.mock-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
  gap: 16px;
}

.mock-panel {
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 18px;
}

.mock-form {
  align-self: start;
  display: grid;
  gap: 14px;
}

.mock-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.mock-form input,
.mock-form select,
.mock-form textarea {
  width: 100%;
  border: 1px solid #cfd6e1;
  border-radius: 8px;
  background: #ffffff;
  color: #18202f;
  padding: 10px 12px;
}

.mock-form textarea {
  min-height: 132px;
  resize: vertical;
}

.mock-form input:focus,
.mock-form select:focus,
.mock-form textarea:focus {
  border-color: #22324a;
  outline: 3px solid rgb(34 50 74 / 0.14);
}

.mock-form button:disabled {
  cursor: not-allowed;
  opacity: 0.54;
}

.form-error {
  margin: 0;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

.mock-chat {
  min-height: 624px;
  display: grid;
  grid-template-rows: auto 1fr;
}

.mock-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.mock-chat-log {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
}

.empty-chat {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 240px;
  border: 1px dashed #cfd6e1;
  border-radius: 8px;
  color: #667085;
  text-align: center;
}

.empty-chat strong {
  color: #344054;
}

.chat-bubble {
  max-width: 78%;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 12px;
}

.chat-bubble.creator {
  justify-self: end;
  border-color: #22324a;
  background: #22324a;
  color: #ffffff;
}

.chat-bubble.assistant {
  justify-self: start;
}

.chat-bubble span {
  display: block;
  margin-bottom: 6px;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  opacity: 0.74;
}

.chat-bubble p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.55;
}

.chat-bubble a {
  display: inline-flex;
  margin-top: 10px;
  border-radius: 8px;
  background: #e7ecf3;
  color: #18202f;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.apply-shell {
  min-height: 100dvh;
  padding: 32px;
  background: #eef1f5;
}

.settings-shell {
  min-height: 100dvh;
  padding: 28px;
  background: #eef1f5;
}

.settings-panel {
  max-width: 980px;
  margin: 0 auto;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 26px;
}

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

.settings-note {
  max-width: 620px;
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.5;
}

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

.settings-section {
  border-top: 1px solid #edf0f4;
  padding-top: 20px;
}

.settings-section-heading {
  margin-bottom: 14px;
}

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

.settings-grid label,
.callback-list label,
.account-row label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.settings-grid input,
.callback-list input,
.account-row select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cfd6e1;
  border-radius: 8px;
  background: #ffffff;
  color: #18202f;
  padding: 0 11px;
}

.callback-list {
  display: grid;
  gap: 12px;
}

.copy-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-field input {
  min-width: 0;
  background: #f8fafc;
}

.settings-actions,
.account-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 16px;
}

.account-row label {
  flex: 1;
}

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

.status-grid div {
  border: 1px solid #edf0f4;
  border-radius: 8px;
  padding: 12px;
}

.status-grid span,
.status-grid strong {
  display: block;
}

.status-grid span {
  color: #667085;
  font-size: 12px;
  margin-bottom: 6px;
}

.status-grid strong {
  color: #18202f;
  font-size: 14px;
}

.apply-panel {
  max-width: 820px;
  margin: 0 auto;
  border: 1px solid #dce2ea;
  border-radius: 8px;
  background: #ffffff;
  padding: 24px;
}

.apply-header {
  display: grid;
  gap: 6px;
  margin-bottom: 22px;
}

.apply-header span {
  color: #667085;
  font-size: 13px;
}

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

.apply-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.apply-form label,
.choice-group {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.choice-group {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid #dce2ea;
  border-radius: 8px;
  padding: 14px;
}

.choice-group legend {
  padding: 0 6px;
  color: #667085;
}

.choice-group label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.apply-form input,
.apply-form textarea {
  width: 100%;
  border: 1px solid #cfd6e1;
  border-radius: 8px;
  background: #ffffff;
  color: #18202f;
  padding: 10px 12px;
}

.apply-form input[type="checkbox"] {
  width: auto;
}

.apply-form textarea {
  min-height: 96px;
  resize: vertical;
}

.apply-form input:focus,
.apply-form textarea:focus {
  border-color: #22324a;
  outline: 3px solid rgb(34 50 74 / 0.14);
}

.form-success {
  margin: 0;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1100px) {
  .crm-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .summary-grid,
  .brief-grid,
  .dashboard-grid,
  .handoff-grid,
  .mock-layout {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .workspace {
    padding: 16px;
  }

  .topbar,
  .panel-header,
  .mock-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
  }

  .ghost-button,
  .primary-button {
    flex: 1;
  }

  .summary-grid,
  .brief-grid,
  .dashboard-grid,
  .handoff-grid,
  .mock-layout {
    grid-template-columns: 1fr;
  }

  .mock-shell {
    padding: 16px;
  }

  .apply-shell {
    padding: 16px;
  }

  .settings-shell {
    padding: 16px;
  }

  .settings-panel {
    padding: 18px;
  }

  .settings-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .settings-header,
  .settings-actions,
  .account-row {
    align-items: stretch;
    flex-direction: column;
  }

  .mock-chat {
    min-height: 420px;
  }

  .chat-bubble {
    max-width: 100%;
  }

  .apply-panel {
    padding: 18px;
  }

  .apply-grid,
  .choice-group {
    grid-template-columns: 1fr;
  }
}
