:root {
  --bg: #0a0a0a;
  --surface: #17181a;
  --surface-2: #202124;
  --border: #2e2f33;
  --text: #f5f5f5;
  --text-muted: #a8a9ac;
  --red: #b91c1c;
  --red-active: #991b1b;
  --green: #2f9e44;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  -webkit-text-size-adjust: 100%;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.topbar .brand {
  font-weight: 700;
  letter-spacing: 0.02em;
}

header.topbar form { margin: 0; }

h1, h2, h3 {
  color: var(--text);
  line-height: 1.25;
}

h1 { font-size: 1.4rem; }
h2 { font-size: 1.15rem; margin-top: 0; }

p.subtitle { color: var(--text-muted); margin-top: -0.5rem; }

label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 1rem 0 0.3rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 0.85rem 0.9rem;
  font-size: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
}

input::placeholder { color: #6b6c70; }

input:focus {
  outline: none;
  border-color: var(--red);
}

.pin-input {
  width: 100%;
  padding: 1rem;
  font-size: 2rem;
  letter-spacing: 0.6rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
}

button, .btn {
  display: inline-block;
  width: 100%;
  padding: 0.95rem 1rem;
  margin-top: 1.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
  color: #ffffff;
  background: var(--red);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
}

button:active, .btn:active { background: var(--red-active); }

button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.error {
  background: #2a1414;
  border: 1px solid var(--red);
  color: #ff8a80;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  margin-top: 1rem;
  font-size: 0.95rem;
}

.flash {
  background: #10281a;
  border: 1px solid var(--green);
  color: #b2f2bb;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.street-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.75rem;
}

.street-card.completed {
  opacity: 0.55;
}

.street-card .street-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.street-card .starting-point {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}

.street-row-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: var(--text);
}

.check-label input[type="radio"],
.check-label input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--red);
}

.status-pill {
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.status-pill.in_progress {
  color: #ffd8a8;
  border-color: #e8590c;
}

.status-pill.completed {
  color: #b2f2bb;
  border-color: var(--green);
}

.step-indicator {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 0.25rem;
}

.yesno {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.yesno label {
  flex: 1;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 1rem;
  color: var(--text);
}

.yesno input { accent-color: var(--red); width: 20px; height: 20px; }

a { color: #ff8a80; }

.footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.78rem;
  padding: 1.5rem 1rem 2rem;
  letter-spacing: 0.02em;
}
