*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #1a1a1a;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

main {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a56db;
  margin-bottom: 0.375rem;
}

.subtitle {
  color: #555;
  margin-bottom: 1.75rem;
  line-height: 1.5;
}

/* ── Fields ── */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #333;
}

input[type="text"],
input[type="tel"],
input[type="email"],
select {
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

input:focus, select:focus { border-color: #1a56db; }

.address-row { display: flex; gap: 0.5rem; }
.address-row input { flex: 1; }

/* ── Buttons ── */

#locate-btn, #lookup-btn, button[type="submit"] {
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

#locate-btn {
  white-space: nowrap;
  background: #f0f4ff;
  border: 1.5px solid #c7d4f9;
  color: #1a56db;
}
#locate-btn:hover { background: #e0e9ff; }

#lookup-btn {
  width: 100%;
  background: #1a56db;
  color: #fff;
  border: none;
  padding: 0.75rem;
  margin-top: 0.25rem;
}
#lookup-btn:hover { background: #1447c0; }
#lookup-btn:disabled { background: #93aee8; cursor: not-allowed; }

button[type="submit"] {
  width: 100%;
  background: #1a56db;
  color: #fff;
  border: none;
  padding: 0.75rem;
  margin-top: 0.25rem;
}
button[type="submit"]:hover { background: #1447c0; }
button[type="submit"]:disabled { background: #93aee8; cursor: not-allowed; }

.btn-ghost {
  width: 100%;
  background: none;
  border: none;
  color: #6b7280;
  font-size: 0.875rem;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0.4rem;
  text-decoration: underline;
}
.btn-ghost:hover { color: #374151; }

/* ── Schedule card ── */

#schedule-card {
  background: #f0f4ff;
  border: 1.5px solid #c7d4f9;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.schedule-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

#schedule-street {
  font-weight: 700;
  font-size: 1.05rem;
}

.side-badge {
  background: #1a56db;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  text-transform: uppercase;
}

.schedule-date {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 0.75rem;
}

.sweep-window {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}

.sweep-window .day { font-weight: 600; min-width: 3rem; }
.sweep-window .time { color: #374151; }
.sweep-window .next-tag {
  font-size: 0.7rem;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.next-sweep {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: #1a56db;
  font-weight: 600;
}

/* ── Radio group ── */

.radio-group { display: flex; gap: 1.5rem; }

.radio {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
}

/* ── Checkbox group ── */

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 1rem;
  cursor: pointer;
}

.checkbox-option input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: #1a56db;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Result messages ── */

#subscribe-result, .error-msg {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.6;
}

#subscribe-result.success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
#subscribe-result.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.error-msg { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.hidden { display: none !important; }
