@font-face {
  font-family: "Switzer Variable";
  src: url("/media/fonts/switzer-variable.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #030405;
  --panel: rgba(255, 255, 255, 0.018);
  --panel-strong: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.18);
  --line-strong: rgba(255, 255, 255, 0.42);
  --text: #fff;
  --muted: rgba(255, 255, 255, 0.58);
  --accent: #00b27a;
  --accent-hover: #fff;
  --accent-text-on-hover: #030405;
  --accent-glow: rgba(0, 178, 122, 0.24);
  --danger: #ff5a3d;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Switzer Variable", "Switzer", "Roboto", sans-serif;
  font-weight: 300;
  line-height: 1.1;
}

button {
  border: 1px solid var(--text);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 400;
  min-height: 44px;
  padding: 0 16px;
  transition: background 240ms ease, border-color 240ms ease, box-shadow 240ms ease, color 240ms ease;
}

button:hover,
button:focus-visible {
  background: var(--accent-hover);
  color: var(--accent-text-on-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 0 22px rgba(255, 255, 255, 0.2);
  outline: 0;
}

button.secondary-button {
  background: transparent;
  color: var(--text);
}

button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.dashboard-shell {
  width: 100%;
  margin: 0;
  padding: 24px 1em 32px;
}

.is-hidden {
  display: none !important;
}

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

.login-panel {
  display: grid;
  gap: 16px;
  width: min(440px, 100%);
  border: 1px dashed var(--line-strong);
  border-radius: 0;
  background: var(--panel);
  padding: 24px;
}

.login-panel h1 {
  margin-bottom: 8px;
  font-size: clamp(42px, 14vw, 76px);
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.login-panel input {
  border: 1px dashed var(--line-strong);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font: inherit;
  min-height: 46px;
  padding: 0 12px;
}

.login-panel input:focus {
  border-color: var(--text);
  outline: 0;
}

.login-status {
  min-height: 20px;
  color: var(--danger);
}

.dashboard-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  min-height: 104px;
  border-bottom: 1px dashed var(--line-strong);
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(48px, 9vw, 120px);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 0.85;
  text-transform: uppercase;
}

h2 {
  font-size: 16px;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

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

.stats-grid article,
.lead-list-panel,
.lead-detail-panel {
  border: 1px dashed var(--line);
  border-radius: 0;
  background: var(--panel);
}

.stats-grid article {
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
}

.stats-grid span,
.panel-heading span,
.meta-label,
.lead-card time {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.stats-grid strong {
  font-size: clamp(20px, 4vw, 42px);
  font-weight: 400;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  min-height: 56vh;
}

.lead-list-panel,
.lead-detail-panel {
  min-height: 520px;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed var(--line);
  padding: 16px;
}

.lead-list {
  display: grid;
  max-height: calc(100vh - 300px);
  overflow: auto;
}

.lead-card {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  border-bottom: 1px dashed var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  min-height: auto;
  padding: 16px;
  text-align: left;
}

.lead-card.is-active,
.lead-card:hover {
  background: var(--panel-strong);
  color: var(--text);
}

.lead-card.is-active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.lead-card strong {
  font-size: 17px;
  font-weight: 500;
}

.lead-card p {
  color: var(--muted);
  line-height: 1.45;
}

.lead-detail-panel {
  padding: 22px;
}

.detail-header {
  display: grid;
  gap: 10px;
  border-bottom: 1px dashed var(--line);
  padding-bottom: 18px;
}

.detail-header h2 {
  font-size: clamp(28px, 5vw, 64px);
  line-height: 0.96;
}

.detail-meta,
.field-grid,
.signal-list,
.stack-list {
  display: grid;
  gap: 10px;
}

.detail-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 12px;
}

.meta-block,
.field-block {
  border: 1px dashed var(--line);
  border-radius: 0;
  padding: 12px;
}

.meta-block strong,
.field-block strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
}

.field-grid {
  margin-top: 18px;
}

.field-block p {
  margin-top: 8px;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pill-row span {
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  color: var(--text);
  padding: 6px 10px;
}

.empty-state {
  display: grid;
  min-height: 460px;
  place-items: center;
  color: var(--muted);
  text-transform: uppercase;
}

@media (max-width: 860px) {
  .dashboard-header {
    align-items: start;
    flex-direction: column;
  }

  .header-actions {
    justify-content: stretch;
    width: 100%;
  }

  .header-actions button {
    flex: 1;
  }

  .stats-grid,
  .dashboard-grid,
  .detail-meta {
    grid-template-columns: 1fr;
  }

  .lead-list-panel,
  .lead-detail-panel {
    min-height: auto;
  }

  .lead-list {
    max-height: none;
  }
}