/* ========================================
   Road Quality — page styles
   ======================================== */

.simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-title {
  font-weight: 700;
  font-size: 0.9rem;
}

.topbar-btn {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
}

.page {
  max-width: 1180px;
  margin: 64px auto 0;
  padding: 0 14px;
}

.lead {
  margin-bottom: 18px;
}

.lead h1 {
  margin: 0 0 8px;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.lead p {
  margin: 0 0 6px;
  color: var(--muted);
  max-width: 80ch;
}

.hero-note {
  font-size: 0.86rem;
  background: rgba(27, 91, 214, 0.06);
  border-left: 3px solid var(--brand-2);
  padding: 8px 12px;
  border-radius: 0 8px 8px 0;
}

.layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 16px;
  align-items: start;
}

.capture h2,
.map-panel h2,
.about h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  color: #102c57;
}

.field {
  display: block;
  margin-bottom: 12px;
}

.field span {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.field select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
}

.consent {
  margin: 14px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(11, 138, 110, 0.04);
}

.consent-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.consent-row input {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
}

.consent-row a {
  color: var(--brand-2);
  font-weight: 700;
}

.capture-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.capture-actions button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.status-msg {
  margin: 12px 0 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  min-height: 20px;
}

.status-msg.ok {
  color: #0a8f66;
}

.status-msg.warn {
  color: #9a6700;
}

.status-msg.err {
  color: #b01515;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.stat {
  text-align: center;
  padding: 10px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.stat-value {
  display: block;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand);
}

.stat-label {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 2px;
}

.queue-info {
  margin-top: 14px;
  font-size: 0.84rem;
  color: var(--muted);
}

.link-btn {
  background: none;
  border: none;
  color: var(--brand-2);
  font-weight: 700;
  cursor: pointer;
  font-size: 0.84rem;
  padding: 0 4px;
  text-decoration: underline;
}

.fine-print {
  margin: 10px 0 0;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.map-panel {
  min-height: 520px;
}

.map-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.map-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-controls select {
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 0.84rem;
  background: var(--surface);
  color: var(--ink);
}

.map-canvas {
  width: 100%;
  height: 440px;
  border-radius: 12px;
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 10px;
  background: #eef1f6;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--muted);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.swatch {
  width: 16px;
  height: 6px;
  border-radius: 3px;
  display: inline-block;
}

.swatch.good {
  background: #1a9850;
}

.swatch.fair {
  background: #fee08b;
}

.swatch.poor {
  background: #fc8d59;
}

.swatch.verypoor {
  background: #d73027;
}

.swatch.event {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffb000;
  border: 2px solid #7a1f0f;
}

.summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.summary-stat {
  text-align: center;
  padding: 12px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.summary-stat span {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-2);
}

.summary-stat small {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.about {
  margin-top: 16px;
}

.about-list {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.about-list strong {
  color: var(--ink);
}

.privacy-page {
  max-width: 780px;
  margin: 64px auto 0;
  padding: 0 14px;
}

.privacy-page h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.3rem, 2.6vw, 1.8rem);
}

.privacy-page h2 {
  margin-top: 22px;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #102c57;
}

.privacy-page p,
.privacy-page li {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

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

@media (max-width: 560px) {
  .live-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .map-canvas {
    height: 340px;
  }
}
