/* Mobile-first, clean UI */
:root {
  --bg: #0b0e11;
  --panel: #111418;
  --card: #151a21;
  --text: #e8f0fe;
  --muted: #98a2b3;
  --accent: #4aa3ff;
  --ok: #40c057;
  --warn: #f59f00;
  --bad: #e03131;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
}
.app-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: 48px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px; background: linear-gradient(180deg, #0b3d91, #0a2f70);
  color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.brand { font-weight: 700; letter-spacing: 0.2px; }
#app { padding-top: 48px; height: calc(100vh - 48px); display: grid; grid-template-rows: 1fr auto auto; }
#map { height: 100%; width: 100%; }
#controlBar {
  display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 6px;
  background: var(--panel); padding: 6px; border-top: 1px solid #20242b;
}
.btn {
  border: 1px solid #2a2f39; background: #182028; color: var(--text); padding: 8px 10px;
  border-radius: 8px; font-weight: 600;
}
.btn:hover { filter: brightness(1.1); }
.btn-tab.active { background: #243040; border-color: #37506b; }
.btn-ghost { background: transparent; border-color: #2a2f39; }
#listPanel {
  max-height: 42vh; overflow-y: auto; background: var(--panel);
  border-top: 1px solid #20242b; padding: 8px;
}
.card {
  background: var(--card); border: 1px solid #22262d; border-radius: 12px;
  margin: 8px 0; overflow: hidden;
}
.card-header { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 10px; }
.seqBadge {
  width: 28px; height: 28px; background: var(--accent); color: #001028;
  border-radius: 999px; display: grid; place-items: center; font-weight: 800;
}
.title { font-weight: 700; }
.dates { font-size: 12px; color: var(--muted); }
.card-body { padding: 0 10px 10px 10px; }
.card-body .photo {
  width: 100%; height: 160px; object-fit: cover; border-radius: 8px; background: #0f1216; display: none;
}
.card-body .meta, .card-body .services { margin-top: 8px; display: grid; gap: 4px; }
.card-body .notes { margin-top: 8px; color: var(--muted); white-space: pre-wrap; }
.driveRow .ok { color: var(--ok); }
.driveRow .warn { color: var(--warn); }
.driveRow .bad { color: var(--bad); }

/* Leaflet tweaks */
.leaflet-container { background: #0a0c10; }
.leaflet-control-attribution { background: rgba(0,0,0,0.4); color: #cbd5e1; }
.marker-seq {
  background: #0b3d91; color: #fff; border: 2px solid #fff; border-radius: 999px;
  width: 28px; height: 28px; display: grid; place-items: center; font-weight: 800;
  box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}
