:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --ink: #17202a;
  --muted: #64748b;
  --line: #d8e0e8;
  --blue: #1457d9;
  --blue-dark: #0d3f9e;
  --green: #1f8a5b;
  --amber: #b86b00;
  --red: #b42318;
  --shadow: 0 18px 50px rgba(18, 32, 49, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

.button-link {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  display: inline-flex;
  min-height: 36px;
  padding: 0 12px;
  text-decoration: none;
}

button:hover {
  border-color: #9eb4ca;
}

.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.primary:hover {
  background: var(--blue-dark);
  border-color: var(--blue-dark);
}

.secondary {
  background: #f8fafc;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #101820;
  color: #e6edf3;
  padding: 20px 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 24px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #2fb7a5;
  color: #071114;
  font-weight: 800;
}

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

.brand span {
  color: #9fb0c0;
  font-size: 12px;
  margin-top: 2px;
}

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

.nav-item,
.saved-searches button,
.nav-link {
  align-items: center;
  display: flex;
  justify-content: flex-start;
  width: 100%;
  background: transparent;
  color: #d8e0e8;
  border-color: transparent;
  text-align: left;
  text-decoration: none;
}

.nav-item.active,
.nav-item:hover,
.saved-searches button:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.12);
}

.section-title {
  color: #9fb0c0;
  font-size: 12px;
  font-weight: 700;
  margin: 28px 8px 8px;
  text-transform: uppercase;
}

.saved-searches button.segment-active {
  background: rgba(47, 183, 165, 0.16);
  border-color: rgba(47, 183, 165, 0.28);
  color: #f7fffd;
}

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

.topbar,
.panel-heading,
.search-strip,
.table-actions {
  display: flex;
  align-items: center;
}

.preview-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.preview-controls button {
  min-height: 30px;
  padding: 0 10px;
}

.topbar {
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin: 0 0 4px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 28px;
  line-height: 1.16;
  margin-bottom: 0;
}

h2 {
  font-size: 16px;
  margin-bottom: 0;
}

h3 {
  font-size: 14px;
  margin-bottom: 12px;
}

.topbar-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.auth-status {
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  min-height: 36px;
  padding: 8px 12px;
}

.inline-login {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  padding: 12px;
}

.inline-login form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(160px, 1fr) minmax(160px, 1fr) auto auto;
}

.inline-login label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 4px;
}

.inline-login p {
  margin: 8px 0 0;
}

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

.metric,
.filters-panel,
.records-panel,
.insights-panel,
.upload-portal,
.upload-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 16px;
}

.metric span,
.metric small {
  color: var(--muted);
  display: block;
  font-size: 12px;
}

.metric strong {
  display: block;
  font-size: 26px;
  margin: 4px 0 2px;
}

.user-admin-panel {
  margin-bottom: 14px;
  padding: 14px;
}

.user-admin-form {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  margin-bottom: 12px;
}

.user-admin-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

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

.user-row {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 1fr) auto minmax(220px, auto);
  padding: 10px;
}

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

.user-row span {
  color: var(--muted);
  font-size: 12px;
}

.credit-pill {
  background: #edf7f2;
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
}

.credit-form {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(110px, 1fr) auto;
}

.search-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 12px;
  padding: 12px;
  margin-bottom: 14px;
}

.search-strip label,
.intent-runner label,
.upload-options label,
.mapping-list label {
  color: var(--muted);
  display: grid;
  flex: 1;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.search-box {
  flex: 2;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
}

.content-grid {
  display: grid;
  grid-template-columns: 260px minmax(520px, 1fr) 330px;
  gap: 14px;
  align-items: start;
}

.user-data-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.primary-data-panel {
  box-shadow: 0 18px 60px rgba(20, 87, 217, 0.11);
}

.people-workspace {
  overflow: hidden;
}

.people-header,
.people-toolbar,
.selection-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 14px;
}

.people-toolbar {
  justify-content: flex-start;
  overflow-x: auto;
}

.people-search {
  display: block;
  min-width: 260px;
}

.people-search span {
  display: none;
}

.people-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 560px;
}

.people-filter-rail {
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}

.filter-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 10px;
}

.filter-stats div {
  background: #f1f5f9;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px;
}

.filter-stats span,
.filter-stats strong {
  display: block;
}

.filter-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.filter-stats strong {
  font-size: 14px;
  margin-top: 2px;
}

.people-filter-rail details {
  border-top: 1px solid var(--line);
  padding: 0;
}

.people-filter-rail summary {
  cursor: pointer;
  font-weight: 900;
  list-style: none;
  padding: 14px;
}

.people-filter-rail label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
  padding: 0 14px 10px;
}

.people-filter-rail .full-width {
  margin: 14px;
  width: calc(100% - 28px);
}

.index-status {
  font-size: 12px;
  line-height: 1.4;
  padding: 0 14px 14px;
}

.people-results {
  min-width: 0;
}

.selection-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.people-table-wrap {
  max-height: 620px;
}

.people-data-table {
  min-width: 1120px;
}

.people-data-table th,
.people-data-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 12px;
  text-align: left;
  vertical-align: middle;
}

.people-data-table th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  position: sticky;
  top: 0;
  z-index: 1;
}

.people-data-table td:first-child,
.people-data-table th:first-child {
  text-align: center;
  width: 42px;
}

.people-data-table input[type="checkbox"] {
  min-height: 0;
  width: auto;
}

.people-data-table tr.selected {
  background: #eef5ff;
}

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

.person-cell span,
.company-cell span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.email-cell {
  color: #164f8f;
  font-weight: 800;
}

.subsection-header {
  margin: 18px 0 12px;
}

.subsection-header h2 {
  font-size: 20px;
  margin: 0;
}

.intent-cockpit,
.activation-strip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  padding: 14px;
}

.intent-cockpit {
  display: grid;
  gap: 12px;
}

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

.intent-stage {
  align-items: start;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 5px;
  height: auto;
  min-height: 112px;
  padding: 12px;
  text-align: left;
}

.intent-stage:hover {
  background: #eef5ff;
  border-color: #b8cdf1;
}

.intent-stage span {
  align-items: center;
  background: #dff5ef;
  border-radius: 999px;
  color: var(--green);
  display: inline-flex;
  font-size: 12px;
  font-weight: 900;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.intent-stage strong,
.intent-stage small {
  display: block;
}

.intent-stage small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.activation-strip {
  align-items: center;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.3fr) auto;
}

.integration-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
}

.integration-form {
  align-items: end;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.2fr) auto;
}

.integration-form.compact {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.integration-form label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.integration-divider {
  border-top: 1px solid var(--line);
  height: 1px;
}

.collector-panel {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(180px, 0.8fr) repeat(4, minmax(120px, 1fr)) auto;
  padding-top: 12px;
}

.collector-panel label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.collector-panel button {
  align-self: end;
}

.collector-panel .crawler-result {
  grid-column: 1 / -1;
}

.collector-source-grid {
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px 10px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 10px;
}

.collector-source-grid label {
  align-items: center;
  color: #334155;
  display: flex;
  gap: 7px;
  min-height: 28px;
}

.collector-source-grid input {
  min-height: 0;
  width: auto;
}

.disabled-source {
  color: var(--muted) !important;
}

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

.intent-result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.intent-result-card .panel-heading {
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 12px;
}

.intent-result-card h3 {
  font-size: 16px;
  margin: 0;
}

.intent-list {
  display: grid;
  gap: 0;
  max-height: 430px;
  overflow: auto;
}

.intent-list.empty-state {
  color: var(--muted);
  display: block;
  padding: 18px;
}

.intent-list-item {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
}

.intent-list-item:last-child {
  border-bottom: 0;
}

.intent-list-item strong,
.intent-list-item span {
  display: block;
}

.intent-list-item span,
.intent-list-item p,
.intent-list-item a {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.intent-list-item p {
  grid-column: 1 / -1;
  margin: 0;
}

.intent-list-item a {
  color: var(--blue);
  font-weight: 800;
  grid-column: 1 / -1;
  text-decoration: none;
}

.intent-score-block {
  align-items: end;
  display: grid;
  justify-items: end;
}

.intent-score {
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
}

.stage {
  border-radius: 999px;
  font-weight: 900;
  padding: 4px 8px;
}

.stage.cold {
  background: #eef2f7;
  color: #475569;
}

.stage.warm {
  background: #fff6d8;
  color: var(--amber);
}

.stage.hot {
  background: #ffe9dc;
  color: #c2410c;
}

.stage.sales-ready {
  background: #e8f5ef;
  color: var(--green);
}

.activation-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activation-items span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 10px;
}

.compact-data-heading {
  border-top: 0;
}

.uploaded-filter-bar {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(240px, 1.4fr) repeat(5, minmax(135px, 1fr)) auto;
  padding: 12px 14px;
}

.uploaded-filter-bar label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 800;
  gap: 5px;
}

.uploaded-filter-bar input {
  min-height: 34px;
}

.uploaded-filter-bar button {
  align-self: end;
  min-width: 76px;
}

.uploaded-filter-bar .filter-wide {
  grid-column: span 2;
}

.filters-panel,
.records-panel,
.insights-panel {
  min-width: 0;
  overflow: hidden;
}

.panel-heading {
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
}

fieldset {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 0;
  padding: 14px;
}

fieldset:last-child {
  border-bottom: 0;
}

legend {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 8px;
}

fieldset label {
  color: #334155;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 9px 0;
}

fieldset input {
  width: auto;
  min-height: auto;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-preview-table {
  min-width: max-content;
  table-layout: auto;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.data-preview-table th,
.data-preview-table td {
  max-width: 180px;
  min-width: 110px;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  vertical-align: top;
  white-space: normal;
}

.data-preview-table th {
  font-size: 12px;
}

.data-preview-table td {
  font-size: 12px;
}

.data-preview-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-preview-table .col-name {
  min-width: 130px;
}

.data-preview-table .col-email {
  min-width: 190px;
}

.data-preview-table .col-url {
  max-width: 220px;
  min-width: 180px;
}

.data-preview-table .col-number {
  min-width: 115px;
}

.data-preview-table .col-list-text {
  max-width: 260px;
  min-width: 220px;
}

.data-preview-table .col-long-text {
  max-width: 280px;
  min-width: 230px;
}

.preview-cell-content {
  display: block;
  line-height: 1.25;
  max-height: 58px;
  overflow: auto;
}

.col-long-text .preview-cell-content,
.col-list-text .preview-cell-content {
  overflow-wrap: break-word;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #eef5ff;
}

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

.company-cell span,
.muted {
  color: var(--muted);
  font-size: 12px;
}

.score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 28px;
  border-radius: 999px;
  background: #e8f5ef;
  color: var(--green);
  font-weight: 800;
}

.score.intent {
  background: #fff3dc;
  color: var(--amber);
}

.status {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status.verified {
  background: #e8f5ef;
  color: var(--green);
}

.status.needs-cleanup {
  background: #fff3dc;
  color: var(--amber);
}

.status.risky {
  background: #fee4e2;
  color: var(--red);
}

.score-pill {
  background: #e8f5ef;
  border-radius: 999px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
}

.detail-panel,
.intent-runner {
  padding: 14px;
}

.detail-title {
  margin-bottom: 12px;
}

.detail-title strong {
  display: block;
  font-size: 18px;
}

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

.detail-item {
  background: var(--surface-soft);
  border-radius: 7px;
  padding: 10px;
}

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

.signal-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.signal-list li {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px;
  font-size: 13px;
}

.intent-runner {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.full-width {
  width: 100%;
}

.crawler-result {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
  padding: 10px;
}

.hidden {
  display: none !important;
}

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

.login-panel {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.admin-brand {
  color: var(--ink);
  justify-content: center;
  padding-bottom: 16px;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 12px;
  max-width: 420px;
  padding: 22px;
  width: 100%;
}

.login-card label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 5px;
}

.login-card h1 {
  font-size: 24px;
  margin-bottom: 4px;
}

.login-error {
  color: var(--red);
  font-size: 13px;
  margin: 0;
  min-height: 18px;
}

.credential-note {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: #334155;
  display: grid;
  font-size: 12px;
  gap: 4px;
  margin-top: 4px;
  padding: 10px;
}

.credential-note strong,
.credential-note span {
  display: block;
}

.admin-workspace {
  max-width: 1480px;
  margin: 0 auto;
}

.upload-portal {
  margin-top: 16px;
  overflow: hidden;
}

.upload-status {
  background: #eef5ff;
  border: 1px solid #c9dcff;
  border-radius: 999px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  padding: 6px 10px;
  white-space: nowrap;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(260px, 1fr) minmax(240px, 0.8fr);
  gap: 14px;
  padding: 14px;
}

.upload-card {
  box-shadow: none;
  padding: 14px;
}

.upload-card h3 {
  margin-bottom: 12px;
}

.drop-zone {
  align-items: center;
  background: #f8fafc;
  border: 1px dashed #9eb4ca;
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  min-height: 168px;
  padding: 18px;
  place-items: center;
  text-align: center;
}

.drop-zone.dragging,
.drop-zone:hover {
  background: #eef5ff;
  border-color: var(--blue);
}

.drop-zone input {
  display: none;
}

.drop-zone small {
  color: var(--muted);
  max-width: 360px;
}

.drop-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #dff5ef;
  color: var(--green);
  font-size: 26px;
  font-weight: 600;
}

.upload-options,
.mapping-list,
.required-fields,
.validation-list {
  display: grid;
  gap: 10px;
}

.upload-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.validation-list {
  color: #334155;
  font-size: 13px;
  margin-bottom: 12px;
}

.validation-list div {
  align-items: center;
  display: flex;
  gap: 8px;
  min-height: 28px;
}

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

.required-fields span,
.header-schema span {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
}

.upload-help {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 12px 0 0;
}

.header-schema-panel {
  margin: 0 14px 14px;
}

.duplicate-panel,
.progress-panel {
  margin: 0 14px 14px;
}

.progress-body {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.progress-bar {
  background: #edf2f7;
  border: 1px solid var(--line);
  border-radius: 999px;
  height: 12px;
  overflow: hidden;
}

.progress-bar span {
  background: var(--blue);
  display: block;
  height: 100%;
  width: 0;
}

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

.progress-grid div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

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

.progress-grid span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.progress-grid strong {
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.duplicate-rules {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
}

.duplicate-rules div {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px;
}

.duplicate-rules strong,
.duplicate-rules span {
  display: block;
}

.duplicate-rules strong {
  font-size: 13px;
  margin-bottom: 4px;
}

.duplicate-rules span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.header-schema {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 190px;
  overflow: auto;
  padding: 14px;
}

.empty-state {
  color: var(--muted);
  padding: 22px 14px;
  text-align: center;
}

.check-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.check-dot.good {
  background: var(--green);
}

.check-dot.warn {
  background: var(--amber);
}

.validation-card {
  display: grid;
  align-content: start;
  gap: 10px;
}

.upload-review-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 14px;
  padding: 0 14px 14px;
}

.compact-heading {
  margin: -14px -14px 12px;
}

.import-history ol {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.import-history li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.import-history li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.import-history strong,
.import-history span {
  display: block;
}

.import-history-button {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: inherit;
  display: block;
  height: auto;
  min-height: 0;
  padding: 8px;
  text-align: left;
  width: 100%;
}

.import-history-button:hover {
  background: #eef5ff;
  border-color: transparent;
}

.import-history span {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

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

  .sidebar {
    display: none;
  }

  .content-grid {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .intent-stage-grid,
  .collector-panel,
  .collector-source-grid,
  .intent-results-grid,
  .people-layout,
  .activation-strip {
    grid-template-columns: 1fr;
  }

  .people-filter-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .uploaded-filter-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .uploaded-filter-bar .filter-wide {
    grid-column: span 3;
  }

  .insights-panel {
    grid-column: 1 / -1;
  }

  .upload-grid,
  .upload-review-grid,
  .duplicate-rules,
  .progress-grid {
    grid-template-columns: 1fr;
  }
}

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

  .topbar,
  .search-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: stretch;
  }

  .topbar-actions button {
    flex: 1;
  }

  .metrics-grid,
  .content-grid,
  .upload-options,
  .uploaded-filter-bar {
    grid-template-columns: 1fr;
  }

  .uploaded-filter-bar .filter-wide {
    grid-column: auto;
  }

  h1 {
    font-size: 23px;
  }
}
