:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-strong: #111827;
  --text: #172033;
  --muted: #667085;
  --line: #d9dee8;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --success: #0f8a5f;
  --warning: #b86b00;
  --shadow: 0 18px 50px rgba(31, 41, 55, 0.08);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea {
  font: inherit;
}

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

.sidebar {
  background: #111827;
  color: #f9fafb;
  padding: 28px 22px;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #e1ecff;
  color: #123e99;
  font-weight: 800;
}

.brand span:last-child,
.eyebrow,
.helper,
.metrics small {
  color: var(--muted);
}

.brand span:last-child {
  display: block;
  color: #aab3c2;
  font-size: 13px;
  margin-top: 2px;
}

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

.nav a {
  color: #d5dbe6;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

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

.topbar,
.panel-heading,
.hero-band,
.crawl-summary,
.locale-switcher {
  display: flex;
  align-items: center;
}

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

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
}

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

h1 {
  margin-bottom: 0;
  font-size: 32px;
}

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

.locale-switcher {
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.locale-switcher button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.locale-switcher .selected {
  background: #111827;
  color: #ffffff;
}

.hero-band {
  justify-content: space-between;
  gap: 28px;
  background: #dbeafe;
  border: 1px solid #b7cffd;
  border-radius: 8px;
  padding: 26px;
  margin-bottom: 24px;
}

.hero-band p {
  max-width: 720px;
  margin: 10px 0 0;
  color: #42526e;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(78px, 1fr));
  gap: 10px;
  min-width: 300px;
}

.metrics div {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 8px;
  padding: 13px;
}

.metrics span {
  display: block;
  font-size: 25px;
  font-weight: 800;
}

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

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
  min-width: 0;
}

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

.panel-heading {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

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

label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cdd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  color: var(--text);
  background: #ffffff;
}

textarea {
  resize: vertical;
}

.primary-button,
.secondary-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 750;
}

.primary-button {
  background: var(--primary);
  color: var(--primary-ink);
  padding: 12px 16px;
}

.secondary-button {
  background: #eef2ff;
  color: #2447a6;
  padding: 9px 14px;
}

.icon-button {
  width: 38px;
  height: 38px;
  background: #f2f4f7;
  color: #1f2937;
  font-size: 18px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
}

.status.ready,
.status.new {
  background: #e7f7ef;
  color: var(--success);
}

.status.muted {
  background: #f2f4f7;
  color: #667085;
}

.crawl-summary {
  gap: 16px;
  margin-bottom: 18px;
}

.progress-ring {
  flex: 0 0 auto;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, #fff 70%, transparent 72%),
    conic-gradient(var(--primary) 72%, #e6eaf2 0);
  font-weight: 850;
}

.crawl-summary p {
  color: var(--muted);
  margin: 7px 0 0;
}

.timeline {
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.timeline li {
  padding: 6px 0;
}

.timeline .done {
  color: var(--success);
}

.timeline .active {
  color: var(--warning);
  font-weight: 750;
}

.code-box {
  overflow-x: auto;
  background: var(--surface-strong);
  color: #f9fafb;
  border-radius: 8px;
  padding: 18px;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.helper {
  margin: 12px 0 0;
}

.conversation-list,
.lead-list {
  display: grid;
  gap: 12px;
}

.list-item {
  border: 1px solid #e4e8f0;
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.list-item strong {
  display: block;
  margin-bottom: 5px;
}

.list-item p {
  color: var(--muted);
  margin-bottom: 0;
}

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

  .sidebar {
    position: static;
    padding: 18px;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav a {
    white-space: nowrap;
  }

  .topbar,
  .hero-band {
    align-items: stretch;
    flex-direction: column;
  }

  .metrics {
    min-width: 0;
  }

  .content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .main {
    padding: 18px;
  }

  h1 {
    font-size: 27px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }
}
