/* ─────────────────────────────────────────────
   app.css — RouteRunner
   Dark, high-contrast, mobile-first.
   Designed for readability in a van cab.
───────────────────────────────────────────── */

/* ── Tokens ─────────────────────────────────── */
:root {
  /* Surfaces */
  --bg:          #1A1A1F;
  --surface:     #26262C;
  --surface-2:   #303038;
  --border:      #3A3A44;

  /* Text */
  --text-primary:   #F0F0F2;
  --text-secondary: #8A8A96;
  --text-muted:     #55555F;

  /* Accent — amber, current stop / active state */
  --accent:      #F5A623;
  --accent-dim:  rgba(245, 166, 35, 0.12);

  /* Status */
  --green:       #4CAF7D;
  --green-dim:   rgba(76, 175, 125, 0.12);
  --red:         #E05252;
  --red-dim:     rgba(224, 82, 82, 0.12);
  --blue:        #5B9BD5;

  /* Type */
  --font: 'Inter', system-ui, -apple-system, sans-serif;

  /* Sizes */
  --header-h:    60px;
  --fab-size:    56px;
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   20px;
  --radius-xl:   24px;

  /* Safe area */
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top:    env(safe-area-inset-top, 0px);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100dvh;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
}

/* ── Header ─────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding-top: var(--safe-top);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: var(--header-h);
}

.header-title-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.header-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.header-route-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Progress bar */
.progress-track {
  height: 3px;
  background: var(--border);
  position: relative;
}

.progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
  border-radius: 0 2px 2px 0;
}

/* ── Icon button ─────────────────────────────── */
.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon:active,
.btn-icon:hover { background: var(--surface); color: var(--text-primary); }

/* ── Main ────────────────────────────────────── */
.app-main {
  padding-top: calc(var(--header-h) + var(--safe-top));
  padding-bottom: calc(var(--fab-size) + 32px + var(--safe-bottom));
  min-height: 100dvh;
}

/* ── Empty state ─────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 32px;
  text-align: center;
  color: var(--text-secondary);
}

.empty-icon { color: var(--text-muted); margin-bottom: 4px; }
.empty-title { font-size: 18px; font-weight: 600; color: var(--text-primary); }
.empty-body  { font-size: 14px; line-height: 1.5; }
.empty-body strong { color: var(--text-primary); }

/* ── Stop list ───────────────────────────────── */
.stop-list {
  list-style: none;
  padding: 12px 0 0;
}

/* ── Stop item ───────────────────────────────── */
.stop-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.1s;
  position: relative;
}

.stop-item:active { background: var(--surface); }

/* Current stop — the signature design element:
   dramatically larger, amber left-border */
.stop-item.is-current {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 16px 20px 20px;
  border-left: 3px solid var(--accent);
}

.stop-item.is-complete {
  opacity: 0.45;
}

.stop-item.is-skipped {
  opacity: 0.3;
}

/* Stop number badge */
.stop-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
  margin-top: 1px;
}

.stop-item.is-current .stop-num {
  width: 44px;
  height: 44px;
  font-size: 20px;
  font-weight: 700;
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.stop-item.is-complete .stop-num {
  background: var(--green-dim);
  border-color: transparent;
  color: var(--green);
}

.stop-item.is-complete .stop-num::after {
  content: '✓';
  font-size: 14px;
}

/* Stop body */
.stop-body {
  flex: 1;
  min-width: 0;
}

.stop-eircode {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  line-height: 1.2;
}

.stop-item.is-current .stop-eircode {
  font-size: 18px;
}

.stop-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ── Badges ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 4px;
  line-height: 1;
}

.badge-delivery  { background: var(--surface-2); color: var(--text-secondary); }
.badge-collection { background: var(--blue); color: #fff; opacity: 0.9; }
.badge-priority  { background: var(--accent-dim); color: var(--accent); }
.badge-pinned    { background: var(--surface-2); color: var(--text-muted); }
.badge-window    { background: var(--surface-2); color: var(--text-secondary); }

/* ── FAB ─────────────────────────────────────── */
.fab {
  position: fixed;
  bottom: calc(24px + var(--safe-bottom));
  right: 20px;
  width: var(--fab-size);
  height: var(--fab-size);
  border-radius: 50%;
  background: var(--accent);
  color: #1A1A1F;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(245, 166, 35, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
  z-index: 90;
  -webkit-tap-highlight-color: transparent;
}

.fab:active {
  transform: scale(0.93);
  box-shadow: 0 2px 10px rgba(245, 166, 35, 0.25);
}

/* ── Bottom sheets ───────────────────────────── */
.sheet-backdrop[hidden] { display: none !important; }

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}

.sheet-backdrop.visible { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 201;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  border-top: 1px solid var(--border);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 90dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: var(--safe-bottom);
}

.sheet.visible { transform: translateY(0); }

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin: 12px auto 0;
}

.sheet-content {
  padding: 20px 20px 8px;
}

.sheet-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ── Form fields ─────────────────────────────── */
.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.field-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

.field-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 16px; /* prevent iOS zoom */
  transition: border-color 0.15s;
  outline: none;
  -webkit-appearance: none;
}

.field-input::placeholder { color: var(--text-muted); }
.field-input:focus { border-color: var(--accent); }
.field-input.error { border-color: var(--red); }

.field-hint {
  display: block;
  font-size: 12px;
  margin-top: 6px;
  color: var(--text-muted);
  min-height: 16px;
}

.field-hint.error { color: var(--red); }

/* Toggle group (Delivery / Collection) */
.toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-btn {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

/* ── Sheet actions ───────────────────────────── */
.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  margin-top: 24px;
  margin-bottom: 12px;
}

.btn-primary {
  padding: 15px;
  border-radius: var(--radius-md);
  border: none;
  background: var(--accent);
  color: #1A1A1F;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  padding: 15px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-secondary:active { background: var(--surface-2); }

/* ── Geocode status ──────────────────────────── */
.geocode-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Optimise sheet ──────────────────────────── */
.optimise-result {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 16px;
}

.optimise-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.optimise-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.optimise-stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.optimise-stat-value.accent { color: var(--accent); }

.optimise-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

.optimise-improvement {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 4px;
}

.optimise-improvement strong { color: var(--green); }

/* ── Toast ───────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(80px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 20px;
  border-radius: var(--radius-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  white-space: nowrap;
  z-index: 300;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ── Stop detail sheet content ───────────────── */
.detail-eircode {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}

.detail-address {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.4;
}

.detail-actions-primary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.btn-action {
  padding: 14px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.btn-action:active { background: var(--surface-2); }

.btn-action.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.btn-action-complete {
  background: var(--green-dim);
  border-color: var(--green);
  color: var(--green);
  padding: 16px;
  border-radius: var(--radius-md);
  border-width: 1.5px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-bottom: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.btn-action-complete:active { opacity: 0.8; }

.btn-navigate {
  background: var(--accent);
  color: #1A1A1F;
  border: none;
  padding: 16px;
  border-radius: var(--radius-md);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-bottom: 16px;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.btn-navigate:active { opacity: 0.85; }

.detail-meta {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.detail-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.detail-meta-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.btn-danger {
  margin-top: 4px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--red-dim);
  background: var(--red-dim);
  color: var(--red);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}

/* ── Utility ─────────────────────────────────── */
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ─────────────────────────────────────────────
   BATCH + MULTI-SELECT ADDITIONS
───────────────────────────────────────────── */

/* ── Batch header row ────────────────────────── */
.batch-header {
  display: flex;
  list-style: none;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.batch-header + .batch-header { margin-top: 0; }

.batch-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 0;
}

.batch-colour-stripe {
  width: 4px;
  align-self: stretch;
  background: var(--batch-colour, var(--border));
  flex-shrink: 0;
}

.batch-colour-stripe--general {
  background: var(--border);
}

.batch-header-body {
  flex: 1;
  padding: 12px 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.batch-name {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--batch-colour, var(--text-secondary));
}

.batch-header--general .batch-name {
  color: var(--text-muted);
}

.batch-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.batch-collapse-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

/* ── Stop batch colour accent ────────────────── */
.stop-item {
  border-left: 3px solid transparent;
  transition: border-color 0.15s, background 0.1s;
}

/* Batch-assigned stops get a subtle left accent */
.stop-item[style*="--stop-batch-colour"] {
  border-left-color: var(--stop-batch-colour);
}

/* Current stop always amber, overrides batch colour */
.stop-item.is-current {
  border-left-color: var(--accent);
}

/* ── Multi-select stop state ─────────────────── */
.stop-item.is-selected {
  background: rgba(91, 155, 213, 0.08);
}

.stop-item.is-selected .stop-num {
  background: #5B9BD5;
  border-color: #5B9BD5;
  color: #fff;
}

.stop-item.select-mode {
  cursor: default;
}

/* ── Multi-select action bar ─────────────────── */
.multiselect-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 150;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}

.ms-bar-inner {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ms-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.ms-actions {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
}

.ms-actions::-webkit-scrollbar { display: none; }

.ms-action-btn {
  flex-shrink: 0;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.ms-action-general { color: var(--text-secondary); }
.ms-action-cancel  { border-color: transparent; color: var(--text-muted); }

.ms-batch-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--batch-colour, var(--border));
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.ms-batch-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--batch-colour);
  flex-shrink: 0;
}

/* ── Batch detail sheet ──────────────────────── */
.batch-preview-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: -12px 0 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.colour-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.colour-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
  -webkit-tap-highlight-color: transparent;
}

.colour-swatch.active {
  border-color: var(--text-primary);
  transform: scale(1.15);
}

.batch-detail-actions {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}

.btn-action-full {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s;
}

.btn-action-full:active { background: var(--surface-2); }

/* ── Optimise mode toggles ───────────────────── */
.opt-modes {
  background: var(--bg);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 20px;
}

.opt-mode-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  gap: 12px;
}

.opt-mode-row:last-child { border-bottom: none; }

.opt-mode-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.opt-mode-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.opt-mode-desc {
  font-size: 12px;
  color: var(--text-muted);
}

/* iOS-style toggle */
.opt-toggle {
  -webkit-appearance: none;
  appearance: none;
  width: 44px;
  height: 26px;
  background: var(--border);
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.opt-toggle::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.opt-toggle:checked {
  background: var(--accent);
}

.opt-toggle:checked::after {
  transform: translateX(18px);
}

/* ── Manual order indicator ──────────────────────────────────────────────── */
.stop-item.is-manual-order {
  border-left: 3px solid #F5A623;
}

.badge-manual {
  background: rgba(245, 166, 35, 0.15);
  color: #F5A623;
  border: 1px solid rgba(245, 166, 35, 0.3);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Pinned stop indicator ───────────────────────────────────────────────── */
.stop-item.is-pinned {
  border-left: 3px solid #9B59B6;
}

.badge-pinned {
  background: rgba(155, 89, 182, 0.15);
  color: #9B59B6;
  border: 1px solid rgba(155, 89, 182, 0.3);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Time window badges ──────────────────────────────────────────────────── */
.badge-window {
  background: rgba(155, 89, 182, 0.15);
  color: #9B59B6;
  border: 1px solid rgba(155, 89, 182, 0.3);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-constrained {
  background: rgba(155, 89, 182, 0.25);
  color: #C39BD3;
  border: 1px solid #9B59B6;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-constrained::before {
  content: '📌 ';
}

/* ── Slotted in stop ─────────────────────────────────────────────────────── */
.stop-item.is-slotted {
  border-left: 3px solid #3498DB;
}

.badge-slotted {
  background: rgba(52, 152, 219, 0.15);
  color: #5DADE2;
  border: 1px solid rgba(52, 152, 219, 0.3);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

/* ── Slotted-in stop ─────────────────────────────────────────────────────── */
.stop-item.is-slotted-in {
  border-left: 3px solid #4CAF50;
}

.badge-slotted {
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
  border: 1px solid rgba(76, 175, 80, 0.3);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}
