.real-route-menu-note { margin: 0 0 10px; color: var(--r360-color-slate-600); font-size: .82rem; line-height: 1.45; }
.real-route-dialog {
  width: min(1120px, calc(100vw - 28px)); max-width: none;
  max-height: calc(100dvh - 28px); margin: auto; padding: 20px;
  border: 1px solid var(--r360-color-slate-300); border-radius: 16px;
  background: #fff; color: var(--r360-color-navy-950);
  box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
  overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box;
  font-family: var(--r360-font-sans);
}
.real-route-dialog::backdrop { background: rgba(15, 23, 42, .6); }
.real-route-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.real-route-header h3 { margin: 0; }
.real-route-header p { margin: 5px 0 0; color: var(--r360-color-slate-600); font-size: .86rem; }
.real-route-header .btn-close-modal { flex: 0 0 auto; }
.real-route-filters { display: grid; grid-template-columns: minmax(190px, 1.35fr) minmax(150px, .8fr) minmax(180px, 1fr) auto; align-items: end; gap: 10px; }
.real-route-filters label { display: grid; gap: 5px; min-width: 0; color: var(--r360-color-slate-700); font-size: .78rem; font-weight: 700; }
.real-route-filters input, .real-route-filters select { width: 100%; min-height: 42px; padding: 8px; border: 1px solid var(--r360-color-slate-300); border-radius: 9px; background: #fff; color: var(--r360-color-navy-950); font: inherit; box-sizing: border-box; }
.real-route-filters input:focus-visible, .real-route-filters select:focus-visible { outline: none; box-shadow: var(--r360-focus-ring); }
.real-route-filters button { white-space: nowrap; }
.real-route-status { padding: 10px 12px; margin: 14px 0; border-radius: 9px; background: var(--r360-color-blue-50); color: var(--r360-color-slate-700); line-height: 1.4; font-size: .82rem; }
.real-route-status[data-state="error"] { background: var(--r360-color-danger-50); color: var(--r360-color-danger-700); }
.real-route-status[data-state="success"] { background: var(--r360-color-success-50); color: var(--r360-color-success-700); }
.real-route-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.real-route-metrics article { padding: 10px; border: 1px solid var(--r360-color-slate-200); border-radius: 10px; background: var(--r360-color-slate-50); }
.real-route-metrics strong { display: block; color: var(--r360-color-navy-800); font-size: 1.2rem; }
.real-route-metrics span { color: var(--r360-color-slate-600); font-size: .74rem; }
.real-route-caveat { margin: 12px 0; padding: 8px 10px; border-left: 3px solid var(--r360-color-warning-700); background: var(--r360-color-warning-50); color: var(--r360-color-slate-700); font-size: .8rem; }
.real-route-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 14px; }
.real-route-map { min-height: 425px; border: 1px solid var(--r360-color-slate-200); border-radius: 10px; overflow: hidden; }
.real-route-details { min-width: 0; }
.real-route-details h4 { margin: 12px 0 8px; color: var(--r360-color-navy-950); }
.real-route-legend { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--r360-color-slate-600); font-size: .72rem; }
.real-route-legend span { display: inline-flex; align-items: center; gap: 5px; }
.real-route-key { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #2563eb; }
.real-route-key--track { background: #0f766e; }
.real-route-key--geofence { background: #a78bfa; border: 2px solid #7c3aed; box-sizing: border-box; }
.real-route-legend-stop, .real-route-legend-inferred { color: #0f766e; }
.real-route-legend-client--near { color: #1d4ed8; }
.real-route-legend-client--far { color: #64748b; }
.real-route-legend-client--unplanned { color: #dc2626; }
.real-route-stop-marker, .real-route-client-marker {
  display: grid; place-items: center; box-sizing: border-box;
  border: 2px solid #fff; box-shadow: 0 2px 7px rgba(15, 23, 42, .34);
  font-size: 12px; font-weight: 800;
}
.real-route-stop-marker { border-radius: 50%; background: #0f766e; color: #fff; }
.real-route-stop-marker--inferred { border-color: #0f766e; background: #fff; color: #0f766e; }
.real-route-stop-marker--outside { border-style: dashed; }
.real-route-client-marker { border-radius: 6px; color: #fff; font-size: 10px; }
.real-route-client-marker--itinerary-near { background: #1d4ed8; }
.real-route-client-marker--itinerary-far { background: #64748b; }
.real-route-client-marker--non-itinerary-near { background: #dc2626; }
.real-route-stop-list { max-height: 368px; overflow-y: auto; display: grid; align-content: start; gap: 8px; }
.real-route-stop { padding: 9px; border: 1px solid var(--r360-color-slate-200); border-radius: 9px; background: #fff; color: var(--r360-color-slate-700); font-size: .78rem; }
.real-route-stop strong { color: var(--r360-color-navy-800); }
.real-route-stop small { display: block; margin-top: 3px; line-height: 1.4; }
.real-route-stop details { margin-top: 6px; }
.real-route-stop summary { cursor: pointer; color: var(--r360-color-navy-800); font-weight: 700; }
.real-route-stop details small { overflow-wrap: anywhere; }
.real-route-locate, .real-route-more {
  min-height: 34px; padding: 5px 10px; border: 1px solid var(--r360-color-slate-300);
  border-radius: 7px; background: #fff; color: var(--r360-color-navy-800);
  font: inherit; font-weight: 700; cursor: pointer;
}
.real-route-locate { margin-top: 7px; }
.real-route-locate:hover, .real-route-more:hover { background: var(--r360-color-blue-50); }
.real-route-empty { margin: 0; color: var(--r360-color-slate-600); font-size: .82rem; }
@media (max-width: 760px) {
  .real-route-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); padding: 14px; }
  .real-route-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .real-route-filters label:first-child { grid-column: 1 / -1; }
  .real-route-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .real-route-layout { grid-template-columns: 1fr; }
  .real-route-map { min-height: 300px; }
  .real-route-stop-list { max-height: 240px; }
}
@media (max-width: 420px) {
  .real-route-filters { grid-template-columns: 1fr; }
  .real-route-filters label:first-child { grid-column: auto; }
}

