:root {
  /* Paleta WCAG AAA diseñada con Kostra (glm-5.3) para Rancagua Paso a Paso */
  --bg: #FBF6EE;
  --surface: #FFFFFF;
  --surface-soft: #F5EFE4;
  --ink: #1C1B18;
  --muted: #4A4640;
  --border: #DDD4C6;
  --border-strong: #BFB39F;

  --copper: #9C4A1A;
  --copper-btn: #7A3A12;
  --copper-btn-hover: #5E2B0C;
  --copper-light: #C97C4A;
  --copper-soft: #F9EDE3;

  --transit: #0A4C8B;
  --transit-dark: #073766;
  --transit-soft: #E8F1FA;

  --green: #146B34;
  --green-soft: #E6F4EB;
  --amber: #8A5A00;
  --amber-soft: #FEF4DF;
  --red: #B3231E;
  --red-soft: #FDECEB;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(28, 27, 24, 0.06);
  --shadow-md: 0 10px 30px rgba(28, 27, 24, 0.12);
  --shadow-device: 0 24px 64px rgba(15, 23, 42, 0.28);

  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background: #1B1D21;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
}

/* ==================== MOCKUP STUDIO TOOLBAR ==================== */
.studio-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #121417;
  color: #F4F1EA;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.65rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.studio-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.86rem;
  font-weight: 700;
}

.studio-pill {
  background: rgba(201, 124, 74, 0.2);
  color: #F2B88B;
  border: 1px solid rgba(201, 124, 74, 0.45);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.studio-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.studio-group {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
}

.studio-btn {
  background: transparent;
  color: #D5D2CA;
  border: none;
  border-radius: 8px;
  padding: 0.36rem 0.68rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
}

.studio-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
}

.studio-btn.is-active {
  background: var(--copper-btn);
  color: #FFFFFF;
}

.studio-btn.is-alert {
  background: #2C2418;
  color: #FCD34D;
  border: 1px solid rgba(252, 211, 77, 0.4);
}

.api-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #F59E0B;
}

.api-dot.online { background: #22C55E; }
.api-dot.offline { background: #EF4444; }

/* ==================== STAGE & DEVICE FRAMES ==================== */
.stage {
  min-height: calc(100vh - 56px);
  padding: 1.25rem 1rem 2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background: radial-gradient(circle at top center, #262A31 0%, #16181C 72%);
}

.device-frame {
  background: var(--bg);
  color: var(--ink);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease;
}

/* Celular 390 x 844 */
.device-frame[data-viewport="mobile"] {
  width: 396px;
  max-width: 100%;
  height: 836px;
  border-radius: 40px;
  border: 10px solid #0E1013;
  box-shadow: var(--shadow-device), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Tablet / Tótem 1120 x 760 */
.device-frame[data-viewport="tablet"] {
  width: 1120px;
  max-width: 100%;
  height: 760px;
  border-radius: 28px;
  border: 12px solid #0E1013;
  box-shadow: var(--shadow-device), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Pantalla completa responsiva */
.device-frame[data-viewport="full"] {
  width: 100%;
  max-width: 1400px;
  min-height: calc(100vh - 96px);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow-md);
}

/* Status bar simulada solo en modo celular */
.mobile-statusbar {
  display: none;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 1.25rem 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--ink);
  background: var(--surface);
}

.device-frame[data-viewport="mobile"] .mobile-statusbar {
  display: flex;
}

/* ==================== APP HEADER ==================== */
.app-header {
  background: var(--surface);
  border-bottom: 1.5px solid var(--border);
  padding: 0.65rem 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
  z-index: 20;
}

.app-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.app-logo {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--copper-btn), var(--copper-light));
  color: #FFFFFF;
  font-weight: 800;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 3px 8px rgba(122, 58, 18, 0.25);
}

.app-title {
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
}

.app-subtitle {
  font-size: 0.71rem;
  color: var(--muted);
  font-weight: 600;
}

.header-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.34rem 0.62rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  border-color: var(--copper);
}

.chip-btn.is-peak {
  background: var(--amber-soft);
  border-color: var(--amber);
  color: var(--amber);
}

.chip-btn.is-hot {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.chip-btn.is-rain {
  background: var(--transit-soft);
  border-color: var(--transit);
  color: var(--transit);
}

.chip-btn.is-senior-toggle {
  background: var(--copper-soft);
  border-color: var(--copper);
  color: var(--copper-btn);
}

.chip-btn.is-senior-toggle.active {
  background: var(--ink);
  border-color: var(--ink);
  color: #FFFFFF;
}

/* Banner offline */
.offline-banner {
  background: var(--amber-soft);
  color: #5C3B00;
  border-bottom: 1.5px solid #E5B95C;
  padding: 0.48rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-shrink: 0;
}

.offline-banner[hidden] { display: none; }

/* ==================== APP SHELL: MOBILE vs TABLET ==================== */
.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
  overflow: hidden;
}

/* Rail izquierdo (solo Tablet y Full) */
.tablet-rail {
  display: none;
  width: 84px;
  background: var(--surface);
  border-right: 1.5px solid var(--border);
  padding: 0.7rem 0.4rem;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.device-frame[data-viewport="tablet"] .tablet-rail,
.device-frame[data-viewport="full"] .tablet-rail {
  display: flex;
}

.rail-btn {
  width: 100%;
  padding: 0.6rem 0.25rem;
  border-radius: 12px;
  border: 1.5px solid transparent;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
}

.rail-btn .nav-ico { font-size: 1.25rem; line-height: 1; }

.rail-btn:hover { background: var(--surface-soft); color: var(--ink); }
.rail-btn.is-active {
  background: var(--copper-soft);
  border-color: var(--copper-light);
  color: var(--copper-btn);
}

/* Workspace interno */
.app-content {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
}

/* En Tablet/Full: Split screen persistente (Mapa izquierda + Panel derecho) */
.device-frame[data-viewport="tablet"] .app-content,
.device-frame[data-viewport="full"] .app-content {
  grid-template-columns: 1.15fr 0.95fr;
}

.device-frame[data-viewport="tablet"].senior-active .app-content,
.device-frame[data-viewport="full"].senior-active .app-content {
  grid-template-columns: 0.88fr 1.12fr;
}

/* Columna Mapa */
.map-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  gap: 0.7rem;
  border-right: 1.5px solid var(--border);
  background: var(--bg);
}

.device-frame[data-viewport="mobile"] .map-pane {
  border-right: none;
}

.device-frame[data-viewport="mobile"] .map-pane.mobile-hidden {
  display: none;
}

/* Columna Paneles */
.panel-pane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-y: auto;
  padding: 0.75rem;
  gap: 0.75rem;
  background: var(--bg);
}

.device-frame[data-viewport="mobile"] .panel-pane.mobile-hidden {
  display: none;
}

.tab-section {
  display: none;
  flex-direction: column;
  gap: 0.75rem;
}

.tab-section.is-active {
  display: flex;
}

/* Bottom Tab Bar (solo Celular) */
.mobile-tabbar {
  display: none;
  background: var(--surface);
  border-top: 1.5px solid var(--border);
  padding: 0.35rem 0.3rem 0.55rem;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  flex-shrink: 0;
  z-index: 25;
}

.device-frame[data-viewport="mobile"] .mobile-tabbar {
  display: grid;
}

.tab-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 0.35rem 0.15rem;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.66rem;
  font-weight: 700;
  cursor: pointer;
}

.tab-btn .nav-ico { font-size: 1.18rem; line-height: 1; }
.tab-btn.is-active {
  color: var(--copper-btn);
  background: var(--copper-soft);
}

/* ==================== CARDS & TYPOGRAPHY ==================== */
.card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}

.card-sub {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.52rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-green { background: var(--green-soft); color: var(--green); border: 1px solid #B5DEC2; }
.badge-amber { background: var(--amber-soft); color: var(--amber); border: 1px solid #EBD094; }
.badge-red { background: var(--red-soft); color: var(--red); border: 1px solid #F2BCB9; }
.badge-blue { background: var(--transit-soft); color: var(--transit); border: 1px solid #B6D3EE; }
.badge-copper { background: var(--copper-soft); color: var(--copper-btn); border: 1px solid #E8C5AD; }

/* ==================== INTERACTIVE DUAL MAP (LEAFLET + SVG) ==================== */
.map-card {
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex-shrink: 0;
}

.map-switcher {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 2px;
  gap: 2px;
  flex-shrink: 0;
}

.map-sw-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 0.28rem 0.52rem;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

.map-sw-btn:hover { color: var(--ink); }
.map-sw-btn.is-active {
  background: var(--transit);
  color: #FFFFFF;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.map-stage-box {
  position: relative;
  width: 100%;
  height: 310px;
  flex-shrink: 0;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: linear-gradient(180deg, #F6F1E6 0%, #EFE8D9 100%);
  overflow: hidden;
}

.device-frame[data-viewport="tablet"] .map-stage-box,
.device-frame[data-viewport="full"] .map-stage-box {
  height: 385px;
}

.leaflet-map,
.svg-map-wrap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.leaflet-map[hidden],
.svg-map-wrap[hidden] {
  display: none !important;
}

.rancagua-svg {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}

.rancagua-svg:active {
  cursor: grabbing;
}

.svg-zoom-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 10;
}

.svg-zoom-btn {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1.5px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}

.svg-zoom-btn:hover {
  background: var(--surface-soft);
}

.map-engine-pill {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 450;
  background: rgba(28, 27, 24, 0.84);
  color: #FFFFFF;
  font-size: 0.69rem;
  font-weight: 700;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  pointer-events: none;
}

/* Etiquetas permanentes limpias en Leaflet */
.rpp-leaflet-label {
  background: rgba(251, 246, 238, 0.94) !important;
  border: 1.5px solid #1C1B18 !important;
  color: #1C1B18 !important;
  font-family: var(--font-sans) !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16) !important;
}

.rpp-leaflet-label::before {
  display: none !important;
}

.map-edge-line {
  cursor: pointer;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}

.map-node-group {
  cursor: pointer;
}

.map-node-group:hover .node-ring {
  stroke-width: 1.5;
}

@keyframes pulseIncident {
  0% { transform: scale(1); opacity: 0.85; }
  70% { transform: scale(1.65); opacity: 0; }
  100% { transform: scale(1.65); opacity: 0; }
}

.pulse-ring {
  transform-box: fill-box;
  transform-origin: center;
  animation: pulseIncident 1.8s infinite ease-out;
}

/* ==================== STOP SHEET / FICHA DE PARADERO ==================== */
.stop-card {
  border-left: 4px solid var(--transit);
}

.stop-hint-box {
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
  font-size: 0.8rem;
  color: var(--ink);
  margin: 0.5rem 0 0.65rem;
  border: 1px solid var(--border);
}

.lines-stack {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.line-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.58rem 0.68rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #FCFBF8;
}

.line-name {
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--ink);
}

.line-dest {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.line-right {
  text-align: right;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
}

/* ==================== BUTTONS & INPUTS ==================== */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  border-radius: 12px;
  padding: 0.58rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--copper-btn);
  color: #FFFFFF;
}
.btn-primary:hover { background: var(--copper-btn-hover); }

.btn-transit {
  background: var(--transit);
  color: #FFFFFF;
}
.btn-transit:hover { background: var(--transit-dark); }

.btn-secondary {
  background: var(--surface-soft);
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: #EBE3D5; }

.btn-sm {
  padding: 0.4rem 0.68rem;
  font-size: 0.77rem;
  border-radius: 9px;
}

.btn-block { width: 100%; }

.voice-box {
  display: flex;
  gap: 0.45rem;
}

.field-input, .field-select, .field-textarea {
  width: 100%;
  padding: 0.58rem 0.72rem;
  border-radius: 11px;
  border: 1.5px solid var(--border-strong);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}

.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: 2.5px solid var(--transit);
  outline-offset: 1px;
}

.field-label {
  display: block;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.28rem;
}

.quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.38rem;
}

.q-chip {
  padding: 0.38rem 0.65rem;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.q-chip:hover { border-color: var(--transit); }
.q-chip.is-selected {
  background: var(--transit);
  border-color: var(--transit);
  color: #FFFFFF;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

/* ==================== VERDICT & ROUTE CARDS ==================== */
.verdict-card {
  border-radius: var(--radius-md);
  padding: 0.85rem;
  border: 2px solid var(--green);
  background: var(--green-soft);
}

.verdict-card.is-transit {
  border-color: var(--transit);
  background: var(--transit-soft);
}

.verdict-card.is-hot {
  border-color: var(--copper);
  background: var(--copper-soft);
}

.verdict-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.verdict-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.metric-pill {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(28, 27, 24, 0.12);
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  text-align: center;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
}

.metric-lbl {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
}

.alt-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.alt-card.is-recommended {
  border: 2px solid var(--transit);
  box-shadow: 0 4px 14px rgba(10, 76, 139, 0.1);
}

.honesty-alert {
  background: var(--amber-soft);
  border: 1.5px solid #D99B26;
  color: #5C3B00;
  border-radius: 10px;
  padding: 0.55rem 0.68rem;
  font-size: 0.79rem;
  font-weight: 700;
}

.step-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  font-size: 0.83rem;
}

/* ==================== MODO ABUELOS (WCAG AAA) ==================== */
.senior-banner {
  background: #1C1B18;
  color: #FFFFFF;
  border-radius: var(--radius-md);
  padding: 0.9rem;
}

.senior-banner h2 {
  margin: 0;
  font-size: 1.32rem;
  font-weight: 800;
}

.senior-banner p {
  margin: 0.25rem 0 0;
  font-size: 1rem;
  color: #E5DFD3;
}

.senior-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.senior-choice-btn {
  min-height: 62px;
  padding: 0.75rem;
  border-radius: 14px;
  border: 2.5px solid var(--ink);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-align: center;
}

.senior-choice-btn.is-selected {
  background: var(--transit);
  border-color: var(--transit);
  color: #FFFFFF;
}

.senior-route-box {
  background: #FFFFFF;
  border: 3px solid var(--ink);
  border-radius: 18px;
  padding: 1rem;
}

.senior-step {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 0.55rem 0;
  border-bottom: 1.5px solid var(--border);
}

.senior-step:last-child { border-bottom: none; }

.senior-num {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--copper-btn);
  color: #FFFFFF;
  font-size: 1.05rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.senior-cta {
  min-height: 60px;
  font-size: 1.06rem;
  font-weight: 800;
  border-radius: 14px;
  width: 100%;
}

/* ==================== PII & INCIDENTS ==================== */
.pii-preview {
  background: #1C1B18;
  color: #F4F1EA;
  border-radius: 12px;
  padding: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.77rem;
  line-height: 1.5;
}

.pii-tag {
  background: #D97706;
  color: #1C1B18;
  padding: 0.08rem 0.35rem;
  border-radius: 5px;
  font-weight: 800;
}

.security-block-box {
  background: var(--red-soft);
  border: 2px solid var(--red);
  color: var(--red);
  border-radius: 12px;
  padding: 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
}

.incident-item {
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  border: 1.5px solid var(--border);
  background: #FFFDF9;
  font-size: 0.82rem;
}

.incident-item.type-choque { border-left: 5px solid var(--red); }
.incident-item.type-atascamiento { border-left: 5px solid var(--amber); }
.incident-item.type-obra_vereda, .incident-item.type-desvio { border-left: 5px solid var(--copper); }

/* ==================== JURY / TRANSPARENCY ==================== */
.preset-card {
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 0.8rem;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.77rem;
}

.matrix-table th, .matrix-table td {
  text-align: left;
  padding: 0.48rem 0.4rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.matrix-table th {
  font-weight: 800;
  color: var(--muted);
}

/* ==================== MODAL TARJETA GIGANTE AL CONDUCTOR ==================== */
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 60;
}

.modal-backdrop[hidden] { display: none; }

.driver-card-modal {
  width: 100%;
  max-width: 560px;
  background: #FFFDF7;
  color: #111111;
  border: 6px solid #111111;
  border-radius: 24px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
}

.driver-card-eyebrow {
  display: inline-block;
  background: #111111;
  color: #FFFFFF;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.driver-card-dest {
  font-size: clamp(2rem, 6vw, 2.9rem);
  font-weight: 900;
  line-height: 1.08;
  color: #0A4C8B;
  margin: 0.3rem 0 0.75rem;
  text-transform: uppercase;
}

.driver-card-ask {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.3;
  color: #111111;
  margin: 0 0 1.2rem;
}

.toast {
  position: absolute;
  bottom: 72px;
  left: 50%;
  transform: translateX(-50%);
  background: #1C1B18;
  color: #FFFFFF;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.79rem;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  z-index: 70;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast[hidden] { display: none; }
