:root {
  --paper: #f4f0e6;
  --ink: #171717;
  --muted: #5e584e;
  --line: #ddd4c4;
  --yellow: #ffd400;
  --card: #fffdf8;
  --red: #9d1c1c;
  --red-bg: #fff1ee;
  --green: #1d6b3e;
  --shadow: 0 16px 40px rgba(40, 32, 16, 0.08);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button, input, select { font: inherit; color: inherit; }

a { color: inherit; }

.gate {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 28px 16px 48px;
}

.sheet {
  width: min(100%, 440px);
}

.sheet-narrow { width: min(100%, 380px); }

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.dek, .fine, .error, .warn, .wait { margin: 0; }

.dek { color: var(--muted); font-size: 18px; line-height: 1.4; }

form { margin-top: 22px; }

fieldset {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

legend {
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
}

.cities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.city, .go, .quiet {
  border: 0;
  cursor: pointer;
}

.city {
  min-height: 52px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: left;
}

.city.is-on {
  background: var(--ink);
  color: white;
  box-shadow: none;
}

.field { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 700; }

.field input, .filters input, .filters select, .sheet input[type="password"] {
  display: block;
  width: 100%;
  margin-top: 6px;
  min-height: 56px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 18px;
  font-weight: 500;
}

.go {
  width: 100%;
  min-height: 56px;
  margin-top: 18px;
  border-radius: 14px;
  background: var(--yellow);
  font-size: 18px;
  font-weight: 800;
}

.go:disabled { opacity: 0.6; }

.fine { margin-top: 12px; color: var(--muted); font-size: 13px; line-height: 1.4; }

.error, .warn { color: var(--red); font-size: 14px; }

.error { margin-top: 6px; }

.success { margin-top: 12px; }

.mark { width: 56px; height: 56px; }

.mark svg { width: 56px; height: 56px; }

.hp {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

.desk { padding: 28px 20px 64px; max-width: 980px; margin: 0 auto; }

.top, .lead header, .filters, .tabs {
  display: flex;
  gap: 12px;
  align-items: center;
}

.top { justify-content: space-between; align-items: flex-end; }

.desk h1 { font-size: 40px; }

.quiet {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--line);
}

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

.stats article, .lead, .roster {
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.stats article { padding: 14px 16px; }

.stats span, .roster h2 { display: block; color: var(--muted); font-size: 13px; font-weight: 600; }

.stats strong { font-size: 28px; letter-spacing: -0.04em; }

.banner, .empty {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff6d8;
}

.filters { flex-wrap: wrap; margin: 8px 0 14px; }

.filters label { flex: 1 1 180px; font-size: 13px; font-weight: 700; }

.filters input, .filters select { min-height: 46px; font-size: 16px; }

.tabs { gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }

.tabs a {
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: inset 0 0 0 1px var(--line);
}

.tabs a.is-on { background: var(--ink); color: white; }

.leads { display: grid; gap: 12px; }

.lead { padding: 16px 16px 12px; border-left: 6px solid transparent; }

.tone-overdue { border-left-color: var(--red); background: var(--red-bg); }

.tone-rented { border-left-color: var(--green); }

.tone-no_answer_sms,
.tone-coming_soon { border-left-color: var(--yellow); }

.tone-callback, .tone-taken { border-left-color: #111; }

.lead header { justify-content: space-between; color: var(--muted); font-size: 14px; }

.who { margin: 10px 0 0; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }

.lead a { font-size: 20px; font-weight: 700; text-decoration: none; }

.pill, .wait, .warn { margin-top: 8px; }

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  font-size: 14px;
}

.lead ul { margin: 10px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }

.desk .chat { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.desk .bubble {
  margin: 0;
  padding: 8px 10px;
  border-radius: 12px;
  background: #f4f0e6;
  white-space: pre-wrap;
  font-size: 14px;
}
.desk .bubble span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.desk .bubble.is-in { align-self: flex-start; background: #fff6c2; }
.desk .bubble.is-out { align-self: flex-end; background: #e6f6ea; }

.roster { margin-top: 22px; padding: 16px; }

.roster h2 { margin: 0 0 10px; }

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

.roster li { display: flex; gap: 8px; align-items: center; }

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #c4bbaa;
}

.dot.is-on { background: var(--green); }

@media (max-width: 720px) {
  .stats { grid-template-columns: 1fr 1fr; }
  h1, .desk h1 { font-size: 32px; }
}
