:root {
  --ink: #14212a;
  --muted: #64737d;
  --paper: #f4f7f6;
  --line: #dbe5e8;
  --cyan: #1aa7b8;
  --amber: #d5912f;
  --green: #168557;
}

* {
  box-sizing: border-box;
}

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

button {
  font: inherit;
}

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

.sidebar {
  padding: 24px;
  background: #18252c;
  color: white;
}

.brand {
  display: inline-block;
  margin-bottom: 42px;
  color: white;
  font-size: 24px;
  font-weight: 800;
  text-decoration: none;
}

.sidebar nav {
  display: grid;
  gap: 8px;
}

.sidebar button {
  min-height: 42px;
  padding: 0 12px;
  color: #c9d6dc;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
}

.sidebar button.active,
.sidebar button:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.workspace {
  padding: clamp(20px, 4vw, 44px);
}

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

.workspace-header p {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: 22px;
}

h3 {
  margin: 0 0 10px;
}

.workspace-header button,
.lead-card button,
.site-link {
  min-height: 42px;
  padding: 0 14px;
  color: white;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.site-link {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  background: transparent;
  text-decoration: none;
}

.workspace-header button {
  margin-left: auto;
}

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

.metrics article,
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metrics article {
  min-height: 116px;
  padding: 18px;
}

.metrics span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  display: block;
  margin-top: 24px;
  font-size: 34px;
  line-height: 1;
}

.panel {
  margin-top: 18px;
  padding: 20px;
}

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

.panel-title p,
.detail p {
  margin: 0;
  color: var(--muted);
}

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

.lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 130px 160px;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 14px;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.lead-card.hot {
  border-color: rgba(213, 145, 47, 0.44);
  box-shadow: inset 4px 0 0 var(--amber);
}

.lead-card strong {
  display: block;
}

.lead-card small {
  color: var(--muted);
}

.score {
  color: var(--green);
  font-weight: 900;
}

.status {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.detail {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(280px, 1fr);
  gap: 18px;
}

.draft {
  padding: 18px;
  background: #eef7f4;
  border: 1px solid #cde8df;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .app,
  .metrics,
  .detail,
  .lead-card {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 2;
  }

  .sidebar nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: auto;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .workspace-header button,
  .site-link,
  .lead-card button {
    width: 100%;
    justify-content: center;
  }
}
