/* ── KdeJsem – Custom Styles ──────────────────────────── */
/* Complements Tailwind – dark-first, mobile-first        */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --bg-primary: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #22263a;
  --bg-surface: #252a3a;
  --text-primary: #e8eaed;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --glass: rgba(26, 29, 39, 0.85);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
}

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

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ── Scrollbar ──────────────────────────────────────── */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 9px;
}

/* ── Layout ─────────────────────────────────────────── */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: 100px;
}

/* ── Header ─────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 20px;
}

.app-logo {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.03em;
}

.app-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.app-badge.driver {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-indigo);
}

.app-badge.viewer {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

/* ── Cards ──────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-1px);
}

.card-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* ── Route selector ─────────────────────────────────── */
.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.route-btn {
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
}

.route-btn:hover {
  border-color: var(--accent-indigo);
  background: var(--bg-card-hover);
}

.route-btn.active {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.12);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
}

/* ── Waypoint list ──────────────────────────────────── */
.waypoint-list {
  list-style: none;
}

.waypoint-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: background 0.2s;
  cursor: default;
}

.waypoint-item:hover {
  background: var(--bg-surface);
}

.waypoint-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.3s;
  box-shadow: none;
}

.waypoint-item.passed .waypoint-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

.waypoint-item.current .waypoint-dot {
  background: var(--accent-indigo);
  box-shadow: 0 0 12px rgba(99, 102, 241, 0.5);
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.35);
  }
}

.waypoint-name {
  font-weight: 500;
  font-size: 0.95rem;
  flex: 1;
}

.waypoint-eta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.waypoint-item.passed .waypoint-name {
  color: var(--text-muted);
}

.waypoint-item.current .waypoint-name {
  color: var(--accent-indigo);
  font-weight: 700;
}

/* ── Big action button ──────────────────────────────── */
.big-btn {
  width: 100%;
  padding: 22px;
  border: none;
  border-radius: var(--radius);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  letter-spacing: 0.01em;
  position: relative;
  overflow: hidden;
}

.big-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
  pointer-events: none;
}

.big-btn-start {
  background: linear-gradient(135deg, var(--accent-emerald), #059669);
  color: white;
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.3);
}

.big-btn-start:hover {
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.big-btn-start:active {
  transform: translateY(1px);
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.25);
}

.big-btn-next {
  background: linear-gradient(135deg, var(--accent-indigo), #4f46e5);
  color: white;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3);
}

.big-btn-next:hover {
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.big-btn-next:active {
  transform: translateY(1px);
}

.big-btn-stop {
  background: linear-gradient(135deg, var(--accent-rose), #e11d48);
  color: white;
  box-shadow: 0 6px 24px rgba(244, 63, 94, 0.3);
}

.big-btn-stop:hover {
  box-shadow: 0 8px 32px rgba(244, 63, 94, 0.4);
  transform: translateY(-1px);
}

.big-btn-stop:active {
  transform: translateY(1px);
}

.big-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
}

/* ── ETA adjust ─────────────────────────────────────── */
.eta-adjust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 12px;
}

.eta-adjust-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.3rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.eta-adjust-btn:hover {
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.1);
}

.eta-adjust-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
  min-width: 80px;
  text-align: center;
}

/* ── Control row ────────────────────────────────────── */
.control-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.control-row .big-btn {
  flex: 1;
  padding: 16px;
  font-size: 1rem;
}

/* ── Map ────────────────────────────────────────────── */
.map-container {
  width: 100%;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.map-container .leaflet-container {
  height: 100%;
  width: 100%;
  background: #1a1d27;
}

/* ── Status indicator ───────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.live {
  background: var(--accent-emerald);
  animation: pulse-dot 1.5s infinite;
}

.status-dot.idle {
  background: var(--text-muted);
}

.status-dot.stale {
  background: var(--accent-amber);
}

/* ── Progress bar ───────────────────────────────────── */
.progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 9px;
  overflow: hidden;
  margin: 12px 0;
}

.progress-fill {
  height: 100%;
  border-radius: 9px;
  background: linear-gradient(90deg, var(--accent-indigo), var(--accent-cyan));
  transition: width 0.6s ease;
  min-width: 0;
}

/* ── Viewer ETA display ─────────────────────────────── */
.eta-display {
  text-align: center;
  padding: 20px 0;
}

.eta-time {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.eta-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* ── Viewer info grid ───────────────────────────────── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-cell {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
}

.info-value {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.info-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ── Stale overlay ──────────────────────────────────── */
.stale-overlay {
  position: relative;
}

.stale-overlay::after {
  content: '⚠ Data starší než 5 min';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(245, 158, 11, 0.9);
  color: #1a1d27;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  white-space: nowrap;
  z-index: 1000;
}

/* ── Idle state (viewer) ────────────────────────────── */
.idle-state {
  text-align: center;
  padding: 60px 20px;
}

.idle-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.idle-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Animations ─────────────────────────────────────── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.4s ease both;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-up {
  animation: slideUp 0.5s ease both;
}

/* ── Leaflet dark tiles override ────────────────────── */
.leaflet-tile-pane {
  filter: brightness(0.7) contrast(1.1) saturate(0.8);
}

.leaflet-control-attribution {
  display: none !important;
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 380px) {
  .app-container {
    padding: 12px;
  }

  .eta-time {
    font-size: 2.4rem;
  }

  .big-btn {
    padding: 18px;
    font-size: 1.05rem;
  }
}

/* ── Pulse ring for current position ────────────────── */
.pulse-ring {
  border: 3px solid var(--accent-indigo);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: pulsering 1.5s ease-out infinite;
}

@keyframes pulsering {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* ── Toast messages ─────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  box-shadow: var(--shadow-card);
  z-index: 9999;
  transition: transform 0.4s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Modal overlay ──────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  z-index: 5000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  border: 1px solid var(--border-subtle);
  border-bottom: none;
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  padding: 24px 20px 40px;
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.modal-overlay.open .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* ── Form inputs ────────────────────────────────────── */
.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}

.form-input:focus {
  border-color: var(--accent-indigo);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 8px;
}

/* ── Waypoint editor (inside modal) ─────────────────── */
.wp-editor-item {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 8px;
  position: relative;
}

.wp-editor-item .wp-number {
  position: absolute;
  top: 8px;
  left: 12px;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.wp-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(244, 63, 94, 0.1);
  color: var(--accent-rose);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.wp-remove:hover {
  background: rgba(244, 63, 94, 0.25);
}

/* ── Add waypoint button ────────────────────────────── */
.add-wp-btn {
  width: 100%;
  padding: 12px;
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 16px;
}

.add-wp-btn:hover {
  border-color: var(--accent-indigo);
  color: var(--accent-indigo);
}

/* ── Route manager card actions ─────────────────────── */
.route-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.route-action-btn {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.route-action-btn:hover {
  border-color: var(--accent-indigo);
  color: var(--text-primary);
}

.route-action-btn.delete {
  color: var(--accent-rose);
}

.route-action-btn.delete:hover {
  border-color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.1);
}

/* ── Manage routes link ─────────────────────────────── */
.manage-routes-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.manage-routes-btn:hover {
  border-color: var(--accent-indigo);
  color: var(--text-primary);
}

/* ── Floating action button ─────────────────────────── */
.fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-indigo), #4f46e5);
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  z-index: 4000;
  transition: all 0.25s;
}

.fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 32px rgba(99, 102, 241, 0.5);
}

.fab:active {
  transform: scale(0.95);
}

.fab.spinning svg {
  animation: fabSpin 0.8s ease;
}

@keyframes fabSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ── Car animation for next waypoint ────────────────── */
.car-anim {
  display: inline-block;
  animation: carDrive 1.5s ease-in-out infinite;
  font-size: 0.9rem;
}

@keyframes carDrive {
  0% {
    transform: translateX(-6px);
    opacity: 0.5;
  }

  50% {
    transform: translateX(6px);
    opacity: 1;
  }

  100% {
    transform: translateX(-6px);
    opacity: 0.5;
  }
}

/* ── Delay badge ────────────────────────────────────── */
.delay-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 0;
}

.delay-badge.late {
  background: rgba(244, 63, 94, 0.12);
  color: var(--accent-rose);
}

.delay-badge.ahead {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
}

.delay-badge.ontime {
  background: rgba(107, 114, 128, 0.12);
  color: var(--text-muted);
}

/* ── Waypoint actual time column ────────────────────── */
.waypoint-actual {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}

.waypoint-actual.passed {
  color: var(--accent-emerald);
}

/* ── Color input ────────────────────────────────────── */
.color-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-input-wrap input[type="color"] {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.color-input-wrap input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 2px;
}

.color-input-wrap input[type="color"]::-webkit-color-swatch {
  border-radius: 6px;
  border: 2px solid var(--border-subtle);
}

/* ── Reaction overlay (fullscreen emoji) ────────────── */
.reaction-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.reaction-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.reaction-overlay.hide {
  opacity: 0;
}

.reaction-emoji {
  font-size: 8rem;
  animation: reactionBounce 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
  filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.3));
}

@keyframes reactionBounce {
  0% {
    transform: scale(0.2) rotate(-10deg);
    opacity: 0;
  }

  50% {
    transform: scale(1.3) rotate(5deg);
    opacity: 1;
  }

  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* ── Reaction bar (driver) ──────────────────────────── */
.reaction-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 12px;
}

.reaction-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid var(--border-subtle);
  background: var(--bg-surface);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s;
  position: relative;
}

.reaction-btn:hover {
  border-color: var(--route-color, var(--accent-indigo));
  background: var(--route-bg-subtle, rgba(99, 102, 241, 0.08));
  transform: scale(1.15);
}

.reaction-btn:active {
  transform: scale(0.9);
}

.reaction-btn.sent {
  border-color: var(--route-color, var(--accent-indigo));
  background: var(--route-bg-medium, rgba(99, 102, 241, 0.15));
  animation: reactionSent 0.4s ease;
}

@keyframes reactionSent {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

/* ── Pause banner ───────────────────────────────────── */
.pause-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  margin-bottom: 16px;
  animation: pausePulse 2s ease-in-out infinite;
}

.pause-banner-icon {
  font-size: 2.5rem;
  margin-bottom: 6px;
}

.pause-banner-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.pause-banner-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

@keyframes pausePulse {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

/* ── Pause toggle button (driver) ───────────────────── */
.pause-toggle {
  width: 100%;
  padding: 14px;
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent-amber);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 8px;
}

.pause-toggle:hover {
  background: rgba(245, 158, 11, 0.08);
}

.pause-toggle.active {
  background: rgba(245, 158, 11, 0.15);
  border-color: var(--accent-amber);
  animation: pausePulse 2s ease-in-out infinite;
}

/* ── Dynamic route color theme ──────────────────────── */
body.themed .card {
  box-shadow: var(--shadow-card), var(--route-glow, none);
}

body.themed .progress-fill {
  background: linear-gradient(90deg, var(--route-color, var(--accent-indigo)), var(--accent-cyan));
}

body.themed .eta-time {
  background: linear-gradient(135deg, var(--route-color, var(--accent-indigo)), var(--accent-cyan));
  -webkit-background-clip: text;
  background-clip: text;
}

body.themed .waypoint-item.current .waypoint-dot {
  background: var(--route-color, var(--accent-indigo));
  box-shadow: 0 0 12px rgba(var(--route-rgb, 99, 102, 241), 0.5);
}

body.themed .waypoint-item.current .waypoint-name {
  color: var(--route-color, var(--accent-indigo));
}

body.themed .status-bar {
  border-left: 3px solid var(--route-color, var(--accent-indigo));
}

body.themed .fab {
  background: linear-gradient(135deg, var(--route-color, var(--accent-indigo)), rgba(var(--route-rgb, 99, 102, 241), 0.7));
  box-shadow: 0 6px 24px rgba(var(--route-rgb, 99, 102, 241), 0.4);
}

body.themed .route-btn.active {
  border-color: var(--route-color, var(--accent-indigo));
  background: var(--route-bg-subtle, rgba(99, 102, 241, 0.12));
  box-shadow: 0 0 20px rgba(var(--route-rgb, 99, 102, 241), 0.1);
}

body.themed .big-btn-next {
  background: linear-gradient(135deg, var(--route-color, var(--accent-indigo)), rgba(var(--route-rgb, 99, 102, 241), 0.8));
  box-shadow: 0 6px 24px rgba(var(--route-rgb, 99, 102, 241), 0.3);
}

/* ── Best time badge ────────────────────────────────── */
.best-time-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
}

.best-time-badge.new-record {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  animation: reactionSent 0.5s ease;
}