/* Driver console (prototype web version) and landing page. Tokens, fonts and buttons come from base.css. */
:root { --pink: var(--brand); --pink-dark: var(--brand-ink); --ink: var(--fg); --mint: var(--ok); --sky: #3b8fe0; }
.topbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar .brand { font-family: var(--display); font-weight: 800; font-size: 1.15rem; }
.topbar .spacer { flex: 1; }
button.secondary { background: var(--soft); color: var(--fg); }

/* ---------- status pills & truck markers ---------- */

.swatch {
  display: inline-block;
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  background: var(--c, var(--pink));
  vertical-align: -0.1rem;
  margin-right: 0.35rem;
}

.truck-marker { background: none; border: 0; }
.truck-pin {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c, var(--pink));
  border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 20px;
  position: relative;
}
.truck-pin.serving::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 3px solid var(--c, var(--pink));
  opacity: 0.6;
  animation: pulse-ring 1.8s ease-out infinite;
}
.truck-pin.stale { filter: grayscale(1); opacity: 0.6; }
@keyframes pulse-ring {
  from { transform: scale(0.8); opacity: 0.7; }
  to { transform: scale(1.5); opacity: 0; }
}
.me-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--sky);
  border: 3px solid #fff;
  box-shadow: 0 0 0 6px rgba(47, 126, 216, 0.25);
}

/* ---------- driver console ---------- */
.driver main { max-width: 720px; margin: 0 auto; padding: 1rem; display: grid; gap: 1rem; }
.status-buttons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.status-buttons button {
  padding: 1.4rem 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  background: #eef0f6;
  color: var(--ink);
  border: 3px solid transparent;
}
.status-buttons button.active[data-status="off_duty"] { background: #e4e6ee; border-color: var(--muted); }
.status-buttons button.active[data-status="serving"] { background: #daf5e7; border-color: var(--mint); }
.status-buttons .emoji { display: block; font-size: 2rem; }
.gps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; }
.gps-grid .label { font-size: 0.8rem; color: var(--muted); }
.gps-grid .value { font-weight: 600; font-size: 1.05rem; }
#driver-map { height: 260px; border-radius: var(--radius); }

/* ---------- landing / login ---------- */
.center-page { max-width: 560px; margin: 0 auto; padding: 2rem 1rem; display: grid; gap: 1rem; }
.center-page .hero-logo { width: 96px; height: 96px; border-radius: 24px; }

/* Stop requests on the driver map: single pins when zoomed in, counts when zoomed out. */
.req-marker { background: none; border: 0; }
.req-pin {
  font-size: 28px;
  line-height: 36px;
  text-align: center;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}
.req-pin.old { opacity: 0.6; }
.req-cluster {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent, #f26b8e);
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: 1rem;
  display: grid;
  place-items: center;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.requests-card .row { align-items: center; gap: 12px; }
#requests-badge { cursor: pointer; white-space: nowrap; }
#requests-badge.fresh { background: var(--accent, #f26b8e); color: #fff; }
