:root {
  color-scheme: light;
  --bg: #f6f7f4;
  --panel: #ffffff;
  --ink: #0f1d18;
  --muted: #66746d;
  --line: #dfe5df;
  --green: #16814b;
  --green-dark: #0f5f38;
  --danger: #b42318;
  --amber: #a15c07;
  --shadow: 0 24px 80px rgba(18, 30, 24, 0.09);
}

* {
  box-sizing: border-box;
}

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

button,
input,
textarea {
  font: inherit;
}

a {
  color: inherit;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px;
}

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

.login-card,
.panel,
.lead-card,
.table-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card {
  width: min(100%, 420px);
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand img {
  height: 28px;
  width: auto;
}

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

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

h1 {
  margin-bottom: 0;
  max-width: 720px;
  font-size: clamp(34px, 7vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.06em;
}

h2 {
  margin-bottom: 10px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.muted {
  color: var(--muted);
}

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

.hero {
  display: grid;
  gap: 18px;
  margin-bottom: 24px;
}

.hero p {
  max-width: 620px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 24px 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  background: var(--green);
  color: white;
  font-weight: 760;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    opacity 0.15s ease,
    background 0.15s ease;
}

.button:hover {
  background: var(--green-dark);
}

.button:active {
  transform: translateY(1px);
}

.button.secondary {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.button.secondary:hover {
  background: #f8faf8;
}

.button.danger {
  background: var(--danger);
}

.button[disabled] {
  cursor: not-allowed;
  opacity: 0.48;
}

.grid {
  display: grid;
  gap: 16px;
}

.layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.panel {
  padding: 18px;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 14px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  letter-spacing: -0.04em;
}

.lead-card {
  min-height: 360px;
  padding: 24px;
}

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

.lead-title {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.badge {
  display: inline-flex;
  border-radius: 999px;
  background: #edf5ef;
  color: var(--green-dark);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.lead-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 24px;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  overflow-wrap: anywhere;
}

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

.call-actions,
.outcomes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.outcomes .button {
  flex: 1 1 145px;
}

.note-box {
  width: 100%;
  min-height: 96px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  resize: vertical;
}

.table-panel {
  overflow: hidden;
}

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

.search {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.lead-list {
  max-height: 620px;
  overflow: auto;
}

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 14px;
  cursor: pointer;
  background: white;
  color: var(--ink);
  text-align: left;
}

.row:hover,
.row.active {
  background: #f4faf6;
}

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

.row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.status-dot {
  align-self: center;
  border-radius: 999px;
  background: #edf0ed;
  padding: 5px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-dot.done {
  background: #e8f5ed;
  color: var(--green-dark);
}

.status-dot.hot {
  background: #fff4e5;
  color: var(--amber);
}

.message {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  padding: 13px 14px;
  color: var(--muted);
  line-height: 1.45;
}

.message.error {
  border-color: rgba(180, 35, 24, 0.32);
  color: var(--danger);
}

.message.ok {
  border-color: rgba(22, 129, 75, 0.28);
  color: var(--green-dark);
}

.login-card label {
  display: block;
  margin: 24px 0 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.login-card input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.login-card .button {
  width: 100%;
  margin-top: 14px;
}

@media (max-width: 900px) {
  .layout,
  .stats,
  .lead-meta {
    grid-template-columns: 1fr;
  }

  .shell {
    padding: 18px;
  }

  .topbar {
    margin-bottom: 28px;
  }

  .hero p {
    font-size: 16px;
  }
}

