  .banda-demo {
    position: sticky; top: 0; z-index: 1000; background: repeating-linear-gradient(135deg, #ffcd00 0 14px, #24272a 14px 28px);
    color: #24272a; text-align: center; font: 700 13px 'Klavika', Arial, sans-serif; padding: 6px 12px;
    text-shadow: 0 0 3px #fff, 0 0 3px #fff;
  }
  .banda-demo a { color: #24272a; }
  .banda-verificacion { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
    background: #fff3cd; border-bottom: 1px solid #f0d98a; padding: 10px 16px; font-size: 14px; }
  .banda-verificacion button { min-height: 0; padding: 8px 14px; font-size: 14px; }
  .verificacion-panel { border: 2px solid #f0d98a; }
  .verificacion-panel.ok { border-color: #bbf7d0; }
  .barra-progreso { height: 8px; border-radius: 4px; background: var(--paper); overflow: hidden; margin-bottom: 6px; }
  .barra-progreso div { height: 100%; background: var(--yellow); }
  .verificacion-panel.ok .barra-progreso div { background: #166534; }
  .req-titulo { margin: 14px 0 4px; font-size: 14px; }
  .req-fila { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .req-fila:last-child { border-bottom: none; }
  .req-icono { font-size: 18px; width: 24px; text-align: center; }
  .req-fila.rechazado strong, .req-fila.caducado strong { color: #a3341e; }
  .badge-ok { font-size: 11px; font-weight: 700; background: #dcfce7; color: #166534; border-radius: 10px; padding: 2px 8px; margin-left: 6px; }
  .aviso-comision { font-size: 13px; background: var(--yellow-tint); border-radius: 8px; padding: 10px 12px; margin: 16px 0 0; line-height: 1.45; }

  .config-bar {
    background: var(--ink); color: #cfd2d4; padding: 8px 16px; font-size: 12px;
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  }
  .config-bar input {
    background: #33373a; border: 1px solid #454a4d; color: white;
    padding: 6px 8px; border-radius: 4px; font-size: 12px; flex: 1; min-width: 160px;
    margin-top: 0;
  }
  .config-bar button {
    background: var(--yellow); color: var(--ink); border: none; padding: 6px 12px;
    border-radius: 4px; font-weight: 700; font-size: 12px; cursor: pointer;
    font-family: 'Klavika', Arial, sans-serif;
  }
  header {
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 14px 16px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 10;
  }
  .session { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; }
  .session strong { color: var(--ink); font-weight: 700; }
  .container { max-width: 640px; width: 100%; margin: 0 auto; padding: 16px; box-sizing: border-box; }
  #app-screen { display: flex; flex-direction: column; align-items: center; }
  #app-screen > header, #app-screen > .nav-tabs { width: 100%; }
  #login-screen {
    min-height: calc(100vh - 41px); display: flex; align-items: center; justify-content: center; padding: 16px;
  }
  #login-screen .panel { width: 100%; max-width: 360px; margin: 0; }
  .login-brand { margin-bottom: 20px; }
  #mapa-ruta { height: 320px; border-radius: 8px; margin-bottom: 14px; }
  .ruta-info { font-size: 13px; color: var(--ink-soft); margin-bottom: 10px; }
  .paso-gps { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .paso-gps:last-child { border-bottom: none; }
  .paso-gps .dist { color: var(--ink-soft); white-space: nowrap; }
  .stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  button.stat-card { text-align: left; font: inherit; color: inherit; cursor: pointer; margin: 0; width: 100%; min-height: 0; }
  .stat-card.clicable:hover { border-color: var(--ink); }
  .stat-card.alerta { background: #fff1ee; border-color: #f3c3b7; }
  .estrella { background: none; border: none; padding: 0 2px 0 0; font-size: 20px; line-height: 1; cursor: pointer; color: var(--ink-soft); vertical-align: -1px; }
  .estrella.activa { color: #d99a00; }
  .estrella-boton.activa { background: var(--yellow-tint); border-color: #d99a00; }
  .vivo-estado { font-size: 12px; font-weight: 700; margin-top: 2px; }
  @keyframes destello { 0% { background: var(--yellow); } 100% { background: transparent; } }
  .destello { animation: destello 2s ease-out; border-radius: 4px; }
  .push-estado { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
  .stat-card.alerta .stat-value { color: #a3341e; }
  .stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
  .stat-card .stat-value { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 22px; }
  .stat-card .stat-label { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; margin-top: 2px; }
  @media (min-width: 480px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
  .nav-tabs {
    background: var(--surface); border-bottom: 1px solid var(--line);
    display: flex; gap: 4px; padding: 0 16px; position: sticky; top: 41px; z-index: 9;
  }
  .nav-tab {
    background: none; border: none; padding: 14px 18px; font: 700 15px 'Klavika', Arial, sans-serif;
    color: var(--ink-soft); cursor: pointer; border-bottom: 3px solid transparent;
  }
  .nav-tab.activa { color: var(--ink); border-bottom-color: var(--yellow); }
  .install-banner {
    background: var(--yellow-tint, #fff7d9); border-bottom: 1px solid var(--line);
    padding: 12px 16px; font-size: 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  }
  .install-banner button { flex-shrink: 0; }
  .paso-gps.paso-actual { background: var(--yellow-tint, #fff7d9); border-left: 4px solid var(--yellow); padding-left: 8px; font-weight: 700; }
  .paso-actual-grande {
    background: var(--surface); border: 2px solid var(--yellow); border-radius: 10px;
    padding: 18px; margin: 14px 0; text-align: center;
  }
  .paso-actual-grande .instruccion-grande { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
  .paso-actual-grande .via-grande { font-size: 15px; color: var(--ink-soft); }
  .paso-actual-grande .dist-grande { font-family: 'IBM Plex Mono', monospace; font-size: 18px; margin-top: 10px; }

  .detalle-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
  .detalle-ruta-titulo { font-size: 20px; font-weight: 700; }
  .fotos-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 4px; }
  .fotos-scroll img { height: 140px; width: auto; border-radius: 8px; border: 1px solid var(--line); flex-shrink: 0; }
  .precio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0; }
  .precio-box { background: var(--paper); border-radius: 8px; padding: 12px; text-align: center; }
  .precio-box .precio-label { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; }
  .precio-box .precio-num { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 20px; margin-top: 2px; }
  .precio-actual-box { background: var(--ink); color: white; border-radius: 10px; padding: 16px; text-align: center; margin: 14px 0; }
  .precio-actual-box .precio-actual-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 34px; }
  .precio-actual-box .bajada-info { font-size: 14px; color: var(--yellow); margin-top: 4px; }
  .rentabilidad-box { border: 2px solid var(--ink); border-radius: 10px; padding: 14px; text-align: center; margin: 14px 0; }
  .rentabilidad-box .rentabilidad-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 26px; color: #166534; }
  .puja-row { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .puja-row:last-child { border-bottom: none; }
  .puja-row.mia { font-weight: 700; }
  .sticky-bottom-bar {
    position: sticky; bottom: 0; background: var(--surface); border-top: 2px solid var(--ink);
    padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 20px -16px -16px -16px; z-index: 5;
  }
  .sticky-bottom-bar .precio-sticky { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 20px; }
  .sticky-bottom-bar button { flex-shrink: 0; margin-top: 0; }
  .toast-msg {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--ink); color: white; padding: 14px 22px; border-radius: 10px;
    font-size: 15px; font-weight: 600; opacity: 0; transition: opacity .3s, transform .3s;
    z-index: 200; max-width: 90%; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
  }
  .toast-msg.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
  .toast-msg.error { background: #a3341e; }
  .toast-msg.success { background: #166534; }

  .estrellas { display: inline-flex; gap: 1px; vertical-align: middle; }
  .estrellas svg { width: 14px; height: 14px; }

  .skeleton { background: linear-gradient(90deg, var(--paper) 25%, #ebe9e4 37%, var(--paper) 63%); background-size: 400% 100%; animation: skeleton-loading 1.4s ease infinite; border-radius: 6px; }
  @keyframes skeleton-loading { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
  .skeleton-row { height: 70px; margin-bottom: 10px; }

  .empty-branded { text-align: center; padding: 32px 16px; color: var(--ink-soft); }
  .empty-branded .mark { margin: 0 auto 14px; opacity: .5; }
  .empty-branded p { font-size: 15px; margin: 0; }
  .row-with-thumb { display: flex; gap: 12px; }
  .row-thumb { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
  .row-thumb-placeholder { width: 64px; height: 64px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); flex-shrink: 0; }

  .urgencia-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; margin-top: 4px; margin-right: 6px; }
  .urgencia-urge { background: #fde2e2; color: #a3341e; }
  .urgencia-pronto { background: #fff3cd; color: #7a5b00; }
  .urgencia-margen { background: #dcfce7; color: #166534; }
  .urgencia-sinfecha { background: var(--paper); color: var(--ink-soft); }
  .nav-tabs { overflow-x: auto; white-space: nowrap; }

  .nav-fullscreen {
    position: fixed; inset: 0; background: var(--ink); z-index: 500;
    display: flex; flex-direction: column;
  }
  .nav-fullscreen #mapa-nav-completa { flex: 1; min-height: 0; }
  .nav-fullscreen-top {
    background: var(--ink); color: white; padding: 16px; display: flex; align-items: center; gap: 14px;
    padding-top: max(16px, env(safe-area-inset-top, 0px));
  }
  .nav-fullscreen-top .flecha-icono { flex-shrink: 0; width: 46px; height: 46px; }
  .nav-fullscreen-top .instruccion-nav { font-size: 22px; font-weight: 700; line-height: 1.2; }
  .nav-fullscreen-top .via-nav { font-size: 14px; color: #cfd2d4; margin-top: 2px; }
  .nav-fullscreen-top .dist-nav { font-family: 'IBM Plex Mono', monospace; font-size: 26px; font-weight: 700; margin-left: auto; flex-shrink: 0; }
  .nav-fullscreen-bottom {
    background: var(--surface); padding: 14px 16px; display: flex; gap: 10px;
    padding-bottom: max(14px, env(safe-area-inset-bottom, 0px));
  }
  .nav-fullscreen-bottom button { flex: 1; margin-top: 0; }
  .nav-marcador-flecha { transition: transform 0.3s linear; }

  .parada-item {
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
    padding: 12px; margin-bottom: 8px; display: flex; align-items: center; gap: 10px;
  }
  .parada-numero {
    background: var(--ink); color: white; width: 28px; height: 28px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0;
  }
  .parada-tipo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }
  .parada-tipo.recogida { color: #166534; }
  .parada-tipo.entrega { color: #a3341e; }
  .parada-mover { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
  .parada-mover button { padding: 4px 8px; min-height: auto; font-size: 12px; margin-top: 0; }

  .campana-notif { position: relative; background: none; border: none; cursor: pointer; padding: 8px; }
  .campana-notif svg { width: 26px; height: 26px; }
  .campana-badge {
    position: absolute; top: 2px; right: 2px; background: #a3341e; color: white;
    font-size: 10px; font-weight: 700; border-radius: 10px; min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center; padding: 0 3px;
  }
  .notif-panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 380px;
    background: var(--surface); z-index: 300; box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    overflow-y: auto; padding: 16px;
  }
  .notif-item { padding: 12px; border-radius: 8px; margin-bottom: 8px; background: var(--paper); }
  .notif-item.no-leida { background: var(--yellow-tint, #fff7d9); border-left: 4px solid var(--yellow); }
  .notif-item .notif-titulo { font-weight: 700; font-size: 14px; }
  .notif-item .notif-msg { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
  .notif-item .notif-fecha { font-size: 11px; color: var(--ink-soft); margin-top: 6px; }

  .bot-estado-box { border: 2px solid var(--ink); border-radius: 10px; padding: 16px; margin-bottom: 14px; }
  .bot-estado-box.inactivo { border-color: var(--line); opacity: 0.7; }
  .modo-cards { display: flex; gap: 8px; margin: 8px 0; }
  .modo-card { flex: 1; border: 2px solid var(--line); border-radius: 8px; padding: 10px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 700; }
  .modo-card.selected { border-color: var(--yellow); background: var(--yellow-tint, #fff7d9); }

  .autocomplete-dropdown {
    position: absolute; top: 100%; left: 0; right: 0; background: var(--surface);
    border: 1px solid var(--line); border-top: none; border-radius: 0 0 8px 8px;
    max-height: 220px; overflow-y: auto; z-index: 50; box-shadow: 0 6px 14px rgba(0,0,0,0.1);
  }
  .autocomplete-item { padding: 10px 12px; font-size: 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
  .autocomplete-item:last-child { border-bottom: none; }
  .autocomplete-item:hover, .autocomplete-item.activa, .autocomplete-item.marcado { background: var(--yellow-tint); }
  .autocomplete-item { color: var(--ink); }

  .perfil-subtabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
  .perfil-subtabs button { background: none; border: none; padding: 10px 14px; font: 700 14px 'Klavika', Arial, sans-serif; color: var(--ink-soft); cursor: pointer; border-bottom: 3px solid transparent; }
  .perfil-subtabs button.activa { color: var(--ink); border-bottom-color: var(--yellow); }
  .vehiculo-card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 10px; }
  .vehiculo-card .row-actions { margin-top: 8px; }
  .rating-grande { font-size: 44px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; text-align: center; }
  .estrellas-grandes { text-align: center; font-size: 24px; margin: 6px 0 16px; }
  .efectividad-bar-bg { background: var(--paper); border-radius: 10px; height: 22px; overflow: hidden; margin-top: 8px; border: 1px solid var(--line); }
  .efectividad-bar-fill { background: #166534; height: 100%; transition: width 0.5s; display: flex; align-items: center; justify-content: flex-end; padding-right: 8px; color: white; font-size: 12px; font-weight: 700; box-sizing: border-box; }
  .estrella-selector { font-size: 36px; text-align: center; margin: 16px 0; }
  .estrella-selector span { cursor: pointer; color: #ffcd00; padding: 0 4px; }
  .firma-canvas-wrap { border: 2px dashed var(--line); border-radius: 8px; margin: 10px 0; touch-action: none; }
  .firma-canvas-wrap canvas { display: block; width: 100%; height: 150px; touch-action: none; }

  .mascota-panel { text-align: center; padding: 6px 0; }
  .mascota-box { width: 72px; height: 72px; background: var(--ink); border-radius: 16px; position: relative; margin: 0 auto; }
  .mascota-box::before { content: ''; position: absolute; top: 10px; left: 16px; right: 16px; height: 8px; background: var(--yellow); border-radius: 3px; }
  .mascota-ojos { position: absolute; top: 34px; left: 0; right: 0; display: flex; justify-content: center; gap: 16px; }
  .mascota-ojo { width: 13px; height: 13px; background: white; border-radius: 50%; position: relative; transition: transform 0.25s; }
  .mascota-ojo::after { content: ''; position: absolute; width: 6px; height: 6px; background: var(--ink); border-radius: 50%; top: 3.5px; left: 3.5px; }
  .mascota-boca { position: absolute; top: 51px; left: 0; right: 0; display: flex; justify-content: center; }
  .mascota-boca::after { content: ''; width: 14px; height: 2px; background: white; border-radius: 1px; }

  .mascota-cara.dormida .mascota-ojo { height: 3px; border-radius: 2px; margin-top: 5px; }
  .mascota-cara.dormida .mascota-ojo::after { display: none; }

  .mascota-cara.feliz .mascota-ojo { transform: scale(1.18); }
  .mascota-cara.feliz .mascota-boca::after {
    width: 18px; height: 9px; background: transparent; border: none;
    border-bottom: 2.5px solid white; border-radius: 0 0 12px 12px;
  }

  .mascota-cara.preocupada .mascota-ojo { transform: scaleY(0.8) translateY(1px); }
  .mascota-cara.preocupada .mascota-boca::after {
    width: 9px; height: 9px; background: transparent; border: 2px solid white; border-radius: 50%;
  }

  .mascota-flotante { position: fixed; bottom: 20px; right: 20px; z-index: 400; cursor: pointer; }
  @keyframes mascota-flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
  @keyframes mascota-flotar-mini { 0%, 100% { transform: scale(0.72) translateY(0); } 50% { transform: scale(0.72) translateY(-4px); } }
  @keyframes mascota-parpadeo { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(0.15); } }
  .mascota-box:not(.mini) { animation: mascota-flotar 2.6s ease-in-out infinite; }
  .mascota-box.mini { animation: mascota-flotar-mini 2.6s ease-in-out infinite; box-shadow: 0 4px 14px rgba(0,0,0,0.3); }
  .mascota-cara.atenta .mascota-ojo { animation: mascota-parpadeo 4s ease-in-out infinite; transform-origin: center; }
  .mascota-cara.atenta .mascota-ojo:nth-child(2) { animation-delay: 0.05s; }
  .mascota-flotante .campana-badge { top: -4px; right: -4px; }
  .mascota-salta { animation: mascota-salto 0.6s ease; }
  @keyframes mascota-salto {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-14px); }
    50% { transform: translateY(0); }
    70% { transform: translateY(-6px); }
  }
  .mascota-panel-flotante {
    position: fixed; bottom: 90px; right: 20px; width: 320px; max-width: calc(100vw - 32px);
    max-height: 70vh; overflow-y: auto; background: var(--surface); border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.28); padding: 14px; z-index: 401;
  }
  .ayuda-msg-item { background: var(--paper); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
  .ayuda-msg-tuyo { font-size: 13px; }
  .ayuda-msg-respuesta { font-size: 13px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); color: var(--ink-soft); }

  .boton-urgente { animation: pulso-urgente 1.6s infinite; }
  @keyframes pulso-urgente {
    0%, 100% { box-shadow: 0 0 0 0 rgba(163,52,30,0.5); }
    50% { box-shadow: 0 0 0 10px rgba(163,52,30,0); }
  }
  .btn-llamar { background: #a3341e; color: white; border-color: #a3341e; }
  .urgencia-badge.estado-curso { background: #dbeafe; color: #1e40af; }
  .nav-tab { position: relative; }
  .nav-tab-dot {
    position: absolute; top: 6px; right: 2px; width: 9px; height: 9px; border-radius: 50%;
    background: #a3341e; border: 2px solid var(--surface);
  }

  .row-tabla {
    display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; row-gap: 4px;
    grid-template-areas: "thumb ruta" "thumb precio" "thumb tiempo" "thumb accion";
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .row-tabla:last-child { border-bottom: none; }
  .col-thumb { grid-area: thumb; }
  .col-ruta { grid-area: ruta; }
  .col-precio { grid-area: precio; }
  .col-tiempo { grid-area: tiempo; }
  .col-accion { grid-area: accion; margin-top: 6px; }
  .precio-tabla-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 15px; }
  .tabla-header-desktop { display: none; }
  .detalle-grid, .detalle-col-info, .detalle-col-precio { display: contents; }

  .row-tabla-transportes {
    display: grid; grid-template-columns: 56px 1fr; column-gap: 12px; row-gap: 4px;
    grid-template-areas: "thumb ruta" "thumb estado" "thumb fechas" "thumb ingresos" "thumb accion";
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .row-tabla-transportes:last-child { border-bottom: none; }
  .col-fechas { grid-area: fechas; }
  .col-estado { grid-area: estado; }
  .col-ingresos { grid-area: ingresos; }
  .ingresos-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 15px; }
  .tabla-header-desktop-transportes { display: none; }
  .publicar-grid, .publicar-col-datos, .publicar-col-logistica { display: contents; }

  .row-tabla-pujas {
    display: grid; grid-template-columns: 1fr; row-gap: 4px;
    grid-template-areas: "ruta" "oferta" "subasta" "estado" "accion";
    padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .row-tabla-pujas:last-child { border-bottom: none; }
  .col-oferta { grid-area: oferta; }
  .col-subasta { grid-area: subasta; }
  .col-estado-puja { grid-area: estado; }
  .oferta-num { font-family: 'IBM Plex Mono', monospace; font-weight: 700; font-size: 15px; }
  .tabla-header-desktop-pujas { display: none; }

  /* Lo que el transportista tiene "vivo ahora mismo" */
  .fila-activa-ahora {
    background: #eff6ff; border-left: 4px solid #1e40af; border-radius: 8px;
    padding-left: 12px; padding-right: 12px; margin: 6px 0; border-bottom-color: transparent;
  }
  .fila-terminada { opacity: 0.55; }
  /* ===== Centro de ruta ===== */
  .cr-grid, .cr-lateral { display: contents; }
  .cr-bloque h2 { font-size: 18px; }
  .btn-mini { min-height: 0 !important; padding: 6px 12px !important; font-size: 13px !important; }
  .cr-plegable summary { cursor: pointer; list-style: none; }
  .cr-plegable summary::-webkit-details-marker { display: none; }
  .cr-plegable summary h2 { display: inline; margin: 0; }
  .cr-plegable summary::after { content: "▾"; float: right; color: var(--ink-soft); }
  .cr-plegable[open] summary::after { content: "▴"; }
  .cr-mapa-panel { padding: 0; overflow: hidden; position: relative; }
  #cr-mapa { height: 420px; }
  .cr-leyenda {
    display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 12px; font-size: 12px; color: var(--ink-soft);
    border-top: 1px solid var(--line); background: var(--surface); align-items: center;
  }
  .cr-leyenda span { display: inline-flex; align-items: center; gap: 5px; }
  .cr-ley-linea { display: inline-block; width: 22px; height: 0; border-top: 4px solid var(--ink); }
  .cr-ley-linea.vacio { border-top: 3px dashed #9aa0a6; }
  .cr-ley-linea.oportunidad { border-top: 3px dashed #d4a600; }
  .cr-ley-icono { width: 18px; height: 18px; }

  .cr-km-barra { display: flex; height: 10px; border-radius: 5px; overflow: hidden; background: var(--paper); margin: 8px 0 4px; }
  .cr-km-barra .cargado { background: var(--ink); }
  .cr-km-barra .vacio { background: repeating-linear-gradient(90deg, #c4c7ca 0 6px, #e6e7e8 6px 10px); }
  .cr-metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 10px; }
  .cr-metricas div { background: var(--surface); padding: 8px 10px; }
  .cr-metricas span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
  .cr-metricas strong { font: 600 15px 'IBM Plex Mono', monospace; }
  .cr-metricas .neg { color: #a3341e; }
  .cr-itinerario { font-size: 13px; color: var(--ink-soft); margin-top: 8px; line-height: 1.7; }
  .cr-itinerario b { color: var(--ink); font-weight: 700; }

  .cr-objetivo { display: flex; align-items: center; gap: 10px; background: var(--paper); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
  .cr-objetivo strong { flex: 1; }
  .cr-mensaje { font-size: 14px; color: var(--ink-soft); margin: 0 0 10px; }
  .cr-op {
    border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
  }
  .cr-op:hover, .cr-op.resaltada { background: var(--yellow-tint); }
  .cr-op.recomendada { border-left-color: var(--yellow); }
  .cr-op.aceptable { border-left-color: #c4c7ca; }
  .cr-op-cab { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
  .cr-op-cab strong { font-size: 15px; }
  .cr-op-margen { font: 600 16px 'IBM Plex Mono', monospace; color: #166534; white-space: nowrap; }
  .cr-op-datos { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
  .cr-op-etiqueta { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 6px; }
  .cr-op-etiqueta.recomendada { background: var(--yellow); color: var(--ink); }
  .cr-op-etiqueta.aceptable { background: var(--paper); color: var(--ink-soft); }
  .cr-op-etiqueta.en_ruta { background: var(--ink); color: white; }
  .cr-op-detalle { display: none; margin-top: 8px; font-size: 13px; }
  .cr-op.abierta .cr-op-detalle { display: block; }
  .cr-op-detalle ul { list-style: none; margin: 0 0 8px; padding: 0; }
  .cr-op-detalle li { padding: 2px 0; }
  .cr-op-detalle li.ok::before { content: "✓ "; color: #166534; font-weight: 700; }
  .cr-op-detalle li.aviso::before { content: "! "; color: #a3341e; font-weight: 700; }
  .cr-op-detalle .desglose { margin: 6px 0; }
  .cr-op-detalle button { min-height: 0; padding: 8px 14px; font-size: 13px; }
  .cr-op-margen.neg { color: #a3341e; }
  .cr-cadena { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 8px 0 4px; font-size: 13px; }
  .cr-paso { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 2px 7px 2px 5px; border-radius: 4px; }
  .cr-paso svg { width: 13px; height: 13px; }
  .cr-paso.salida { background: var(--paper); padding-left: 7px; }
  .cr-paso.recogida { background: var(--yellow); }
  .cr-paso.entrega { background: var(--ink); color: white; }
  .cr-vacio { font: 500 11px 'IBM Plex Mono', monospace; color: var(--ink-soft); border-bottom: 2px dashed #b9bdc1; padding: 0 3px; }
  .cr-cargado { font: 500 11px 'IBM Plex Mono', monospace; color: var(--ink); border-bottom: 3px solid var(--ink); padding: 0 3px; }
  .cr-flecha { color: var(--ink-soft); }
  .cr-alt-metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 10px; margin-top: 8px; font: 500 13px 'IBM Plex Mono', monospace; }
  .cr-alt-metricas span { display: block; font: 700 10px 'Klavika', Arial, sans-serif; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
  .cr-alt-metricas small { color: var(--ink-soft); }
  .aprendizaje { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
  .aprendizaje h4 { margin: 0 0 8px; font-size: 14px; }
  .aprendizaje-datos { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13px; }
  .aprendizaje-datos span { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
  .sugerencia { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--yellow-tint); border-radius: 8px; padding: 8px 10px; margin-bottom: 6px; font-size: 13px; }
  .campo-sugerido { border-color: var(--yellow) !important; background: var(--yellow-tint) !important; }
  .cr-fuente { font-size: 12px; color: var(--ink-soft); margin-top: 6px; }
  .cr-restriccion { font-size: 12px; color: #a3341e; font-weight: 600; margin-top: 4px; }
  .medidas-vehiculo { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin-top: 16px; }
  .medidas-vehiculo h4 { margin: 0 0 4px; font-size: 14px; }
  .medidas-vehiculo h4 span { font-weight: 400; color: var(--ink-soft); }
  .medidas-vehiculo p { font-size: 12px; color: var(--ink-soft); margin: 0 0 8px; }
  .medidas-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .medidas-grid label { margin-top: 8px; font-size: 13px; }
  .medidas-grid input { margin-top: 4px; min-height: 0; padding: 10px; }
  .aviso-medidas { font-size: 12px; color: #7a5b00; background: #fff3cd; border-radius: 6px; padding: 5px 8px; margin-top: 6px; }
  .co2-fila { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .co2-fila:last-child { border-bottom: none; }
  .eta-caja { background: #eef4ff; border-radius: 8px; padding: 10px 12px; margin: 10px 0 0; font-size: 14px; }
  .eta-ok { color: #166534; font-weight: 700; margin-left: 6px; font-size: 13px; }
  .eta-tarde { color: #a3341e; font-weight: 700; margin-left: 6px; font-size: 13px; }
  .opt-tabla { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 12px; }
  .opt-tabla th, .opt-tabla td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: left; }
  .opt-tabla th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
  .opt-mejor { color: #166534; font-weight: 700; }
  .opt-orden { margin: 0 0 10px; padding-left: 22px; font-size: 14px; }
  .opt-orden li { padding: 3px 0; }
  .cr-descartadas summary { font-size: 13px; color: var(--ink-soft); cursor: pointer; margin-top: 8px; }
  .cr-descartada { font-size: 13px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .cr-descartada:last-child { border-bottom: none; }
  .cr-descartada div { color: var(--ink-soft); }

  .cr-opciones-fin { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
  .cr-opcion-fin {
    background: var(--surface); border: 2px solid var(--line); border-radius: 10px; padding: 14px 10px; cursor: pointer; text-align: center;
    font: 700 15px 'Klavika', Arial, sans-serif; color: var(--ink);
  }
  .cr-opcion-fin:hover { border-color: var(--ink); background: var(--yellow-tint); }
  .cr-opcion-fin small { display: block; font-weight: 400; font-size: 12px; color: var(--ink-soft); margin-top: 4px; }
  .cr-opcion-fin .icono { font-size: 24px; display: block; margin-bottom: 4px; }

  /* Iconos del mapa */
  .mk { display: flex; align-items: center; justify-content: center; border-radius: 50%; border: 2px solid white; box-shadow: 0 1px 5px rgba(0,0,0,0.4); position: relative; }
  .mk svg { width: 60%; height: 60%; }
  .mk.recogida { background: var(--yellow); color: var(--ink); }
  .mk.entrega { background: var(--ink); color: white; }
  .mk.camion { background: white; color: #1e40af; border-color: #1e40af; border-width: 3px; }
  .mk.objetivo { background: white; color: var(--ink); border-color: var(--ink); }
  .mk.incidencia { background: #a3341e; color: white; border-radius: 6px; }
  .mk.camion.sin-senal { border-color: var(--ink-soft); color: var(--ink-soft); filter: grayscale(1); }
  .mk.activa { box-shadow: 0 0 0 4px rgba(255,205,0,0.7), 0 1px 5px rgba(0,0,0,0.4); }
  .mk.inactiva { opacity: 0.6; }
  .mk.oportunidad { background: white; color: var(--ink); border: 2px dashed #d4a600; }
  .mk.oportunidad.resaltada { background: var(--yellow); border-style: solid; }
  .mk .mk-num {
    position: absolute; top: -7px; right: -7px; background: white; color: var(--ink); border-radius: 9px; min-width: 17px; height: 17px;
    font: 700 10px 'IBM Plex Mono', monospace; display: flex; align-items: center; justify-content: center; border: 1px solid var(--ink); padding: 0 3px;
  }
  .mk-etiqueta { font: 700 11px 'IBM Plex Mono', monospace; background: var(--ink); color: var(--yellow); border-radius: 4px; padding: 1px 5px; white-space: nowrap; }
  .cr-popup { font-family: 'Klavika', Arial, sans-serif; font-size: 13px; line-height: 1.45; min-width: 170px; }
  .cr-popup .t { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #6b6f73; }
  .cr-popup .c { font-size: 15px; font-weight: 700; }
  .marcador-parada {
    width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font: 700 13px 'IBM Plex Mono', monospace; border: 2px solid white; box-shadow: 0 1px 4px rgba(0,0,0,0.35);
  }
  .marcador-parada.recogida { background: var(--yellow); color: var(--ink); }
  .marcador-parada.entrega { background: var(--ink); color: white; }

  /* ===== Pagos ===== */
  .tabla-header-desktop-pagos { display: none; }
  /* Detalle de subasta como ventana emergente */
  .detalle-popup-fondo { position: fixed; inset: 0; background: rgba(36,39,42,0.55); z-index: 90; }
  .detalle-popup:not(.hidden) {
    position: fixed; z-index: 91; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: min(820px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow-y: auto; margin: 0;
    box-shadow: 0 18px 50px rgba(0,0,0,0.3); overscroll-behavior: contain;
  }
  .detalle-popup .detalle-header { position: sticky; top: -20px; background: var(--surface); z-index: 2; padding-top: 4px; }
  body.sin-scroll { overflow: hidden; }
  .detalle-popup .detalle-col-precio { top: 64px; }
  .detalle-popup .detalle-header .detalle-ruta-titulo { font-size: 24px; }
  .det-galeria { margin-bottom: 16px; }
  .det-foto-principal { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); cursor: zoom-in; display: block; }
  .det-miniaturas { display: flex; gap: 8px; margin-top: 8px; overflow-x: auto; }
  .det-miniaturas img { width: 72px; height: 54px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; cursor: pointer; flex-shrink: 0; }
  .det-miniaturas img.activa { border-color: var(--ink); }
  .det-sin-foto { aspect-ratio: 16 / 7; border-radius: 10px; background: var(--paper); border: 1px dashed var(--line); display: flex; flex-direction: column;
    align-items: center; justify-content: center; font-size: 34px; color: var(--ink-soft); margin-bottom: 16px; }
  .det-sin-foto span { font-size: 13px; margin-top: 4px; }
  .det-bloque { margin: 0 0 16px; }
  .det-bloque h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 0 0 8px; }
  .det-bloque p { font-size: 14px; margin: 4px 0; }
  .det-ruta { border-left: 2px dashed var(--line); margin-left: 7px; padding-left: 16px; }
  .det-parada { display: flex; gap: 10px; position: relative; margin-bottom: 10px; }
  .det-punto { position: absolute; left: -24px; top: 4px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); }
  .det-punto.origen { background: var(--yellow); }
  .det-punto.destino { background: var(--ink); }
  .det-ruta-datos { font-size: 14px; color: var(--ink-soft); }
  .det-mapa { height: 190px; border-radius: 10px; margin-top: 10px; border: 1px solid var(--line); }
  .det-ficha { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .det-ficha > div { background: var(--surface); padding: 8px 12px; }
  .det-ficha span { display: block; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
  .det-ficha strong { font-size: 15px; }
  .det-etiquetas { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
  .det-etiqueta { font-size: 12px; border-radius: 12px; padding: 2px 10px; background: var(--paper); border: 1px solid var(--line); }
  .det-etiqueta.peligro { background: #fff1ee; border-color: #f3c3b7; color: #a3341e; font-weight: 700; }
  .det-etiqueta.frio { background: #eef4ff; border-color: #c9d8f5; }
  .det-etiqueta.ok { background: #e8f5ec; border-color: #bfe3cb; color: #166534; }
  .det-descripcion { background: var(--paper); border-radius: 8px; padding: 10px 12px; margin-top: 8px !important; }
  .det-aviso { font-size: 13px; color: var(--ink-soft); background: var(--paper); border-radius: 8px; padding: 10px 12px; margin: 0 0 16px; }
  .det-cargador { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; }
  .det-flota { font-size: 14px; padding: 4px 0; }
  .det-flota.si { color: #166534; }
  .det-flota.no { color: #a3341e; }
  .det-asignado { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .det-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--paper); border: 2px solid var(--line); }
  .det-avatar.cuadrado { border-radius: 8px; width: 64px; }
  .det-rentabilidad { border: 2px solid var(--ink); border-radius: 10px; padding: 12px 14px; }
  .det-linea { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 3px 0; }
  .det-linea.menos { color: var(--ink-soft); }
  .det-linea.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-weight: 700; font-size: 16px; }
  .positivo { color: #166534; }
  .negativo { color: #a3341e; }
  .det-puja { position: sticky; bottom: -20px; margin: 8px -20px -20px; padding: 14px 20px 18px; background: var(--surface);
    border-top: 2px solid var(--ink); box-shadow: 0 -8px 20px rgba(0,0,0,0.06); z-index: 3; }
  .det-puja-fila { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
  .det-puja-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); }
  .det-puja-input { display: flex; align-items: center; border: 2px solid var(--ink); border-radius: 10px; padding: 0 12px; background: #fff; }
  .det-puja-input input { border: none; margin: 0; width: 130px; font-family: 'IBM Plex Mono', monospace; font-size: 26px; font-weight: 700; padding: 8px 0; background: transparent; }
  .det-puja-input input:focus { outline: none; }
  .det-puja-input b { font-size: 22px; }
  .det-sugerencias { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
  .det-sugerencias .chip { margin: 0; }
  .det-boton-pujar { margin-top: 0 !important; min-width: 170px; min-height: 54px; font-size: 18px; background: var(--yellow) !important; color: var(--ink) !important; border: 2px solid var(--ink) !important; }
  .det-puja-calculo { font-size: 13px; color: var(--ink-soft); margin-top: 8px; }
  .det-estado-puja { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
  .det-estado-puja.ganando { color: #166534; }
  .det-estado-puja.superado { color: #a3341e; }
  .modal-box.modal-ancho { max-width: 900px; }
  .pub-detalles { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
  .pub-detalles summary { cursor: pointer; font-weight: 700; }
  .pub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 12px; }
  .pub-temp { display: flex; gap: 6px; }
  .pub-check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-top: 8px; }
  .pub-check input { width: auto; margin: 0; }
  @media (max-width: 640px) {
    .det-boton-pujar { flex: 1; }
    .det-puja-input input { width: 100px; }
    .det-ficha { grid-template-columns: 1fr 1fr; }
  }
  body.sin-scroll .mascota-flotante { display: none; }
  @media (max-width: 640px) {
    .detalle-popup:not(.hidden) { top: auto; bottom: 0; left: 0; transform: none; width: 100vw; max-height: 92vh; border-radius: 14px 14px 0 0; }
  }
  .pasarela-panel { margin-bottom: 14px; }
  /* Subastas: barra de filtros compacta y filas */
  .sub-contador { font-size: 15px; color: var(--ink-soft); font-weight: 400; }
  .sub-filtros { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; background: var(--paper); border-radius: 10px; }
  .sub-campo-zona { flex: 1 1 280px; }
  .sub-zona { display: flex; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 8px; padding: 0 4px 0 12px; min-height: 44px; text-transform: none; letter-spacing: 0; }
  .sub-zona .autocomplete-wrap { flex: 1; min-width: 0; }
  .sub-zona input { border: none; margin: 0; width: 100%; background: transparent; min-width: 0; min-height: 0; padding: 9px 8px; font-size: 16px; }
  .sub-zona input:focus { outline: none; }
  .sub-zona input:focus { outline: none; }
  .sub-zona:focus-within { border-color: var(--ink); }
  .sub-icono { font-size: 15px; }
  .sub-ubicacion { background: none; border: none; border-left: 1px solid var(--line); cursor: pointer; padding: 6px 10px; white-space: nowrap;
    font: 700 13px 'Klavika', Arial, sans-serif; color: var(--ink); }
  .sub-ubicacion:hover { background: var(--paper); }
  .sub-campo { display: flex; flex-direction: column; gap: 2px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
  .sub-campo select { margin: 0; min-height: 44px; padding: 8px 10px; width: auto; min-width: 120px; text-transform: none; letter-spacing: 0; border-width: 2px; font-size: 16px; }
  .sub-check { display: flex; align-items: center; gap: 8px; font-size: 14px; min-height: 44px; padding: 0 12px; background: var(--surface); border: 2px solid var(--line); border-radius: 8px; cursor: pointer; white-space: nowrap; }
  .sub-check input { width: auto; margin: 0; }
  .sub-activos { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 0; }
  .sub-activos:empty { display: none; }
  .sub-chip { background: var(--ink); color: #fff; border: none; border-radius: 14px; padding: 4px 12px; font: 700 13px 'Klavika', Arial, sans-serif; cursor: pointer; }
  .sub-limpiar { background: none; border: none; color: var(--ink-soft); text-decoration: underline; cursor: pointer; font-size: 13px; }
  .sub-fila { cursor: pointer; }
  .sub-fila:hover { background: var(--paper); }
  .sub-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
  .sub-tag { font-size: 11px; border-radius: 10px; padding: 1px 8px; border: 1px solid var(--line); background: var(--surface); white-space: nowrap; }
  .sub-tag.frio { background: #eef4ff; border-color: #c9d8f5; }
  .sub-tag.adr { background: #fff1ee; border-color: #f3c3b7; color: #a3341e; font-weight: 700; }
  .sub-tag.ok { background: #e8f5ec; border-color: #bfe3cb; color: #166534; }
  .sub-tag.no { color: #a3341e; }
  .sub-tag.pujado { background: var(--yellow-tint); border-color: #f0dc8a; }
  @media (max-width: 640px) {
    .sub-filtros { padding: 10px; gap: 8px; }
    .sub-campo { flex: 1 1 30%; }
    .sub-campo-zona { flex: 1 1 100%; }
    .sub-ubicacion span { display: none; }
    .sub-campo select { min-width: 0; width: 100%; }
    .sub-check { flex: 1 1 100%; justify-content: center; }
  }
  .intro-pestana { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; background: var(--yellow-tint);
    border: 1px solid #f0dc8a; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; line-height: 1.45; }
  .intro-cerrar { flex-shrink: 0; background: none; border: none; font: 700 12px 'Klavika', Arial, sans-serif; color: var(--ink-soft); cursor: pointer; padding: 2px 0; white-space: nowrap; }
  .intro-cerrar:hover { color: var(--ink); }
  .cr-enlace-transportes { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
  .pasarela-fila { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  /* Repostaje */
  .repostaje-resumen { background: var(--paper); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
  .repostaje-frontera { background: #eef4ff; border: 1px solid #c9d8f5; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
  .repostaje-litros { width: auto; margin: 0; padding: 2px 6px; font-size: 12px; }
  .repostaje-fila { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .repostaje-fila.mejor { background: var(--yellow-tint); border-radius: 8px; padding: 10px; border-bottom: none; margin-bottom: 4px; }
  .repostaje-precio { font-size: 18px; font-weight: 600; min-width: 92px; }
  .repostaje-ahorro { color: #166534; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
  .marca-gasolinera { font-size: 18px; line-height: 26px; text-align: center; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
  .marca-gasolinera.mejor { background: var(--yellow); }
  /* Economía */
  .eco-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
  .eco-cab h2 { margin: 0; }
  .eco-acciones { display: flex; gap: 8px; flex-wrap: wrap; }
  .eco-personalizado { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin: -4px 0 12px; }
  .eco-personalizado label, .eco-filtros label { font-size: 12px; color: var(--ink-soft); display: flex; flex-direction: column; gap: 2px; }
  .eco-personalizado input, .eco-filtros select, .eco-filtros input { margin-top: 0; }
  .eco-filtros { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-bottom: 12px; }
  .eco-filtros .eco-buscar { grid-column: 1 / -1; }
  .eco-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 14px; }
  .eco-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
  .eco-kpi.destacada { background: var(--yellow-tint); border-color: #f0dc8a; }
  .eco-kpi .v { font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 17px; }
  .eco-kpi .l { font-size: 11px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
  .eco-moneda { font-size: 12px; color: var(--ink-soft); margin: 0 0 6px; }
  .eco-fila-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
  .eco-nota { font-size: 12px; margin-top: 12px; }
  .eco-informe { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .eco-informe:last-child { border-bottom: none; }
  .eco-informe-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
  .eco-estado { font-size: 11px; border-radius: 10px; padding: 1px 8px; margin-left: 6px; border: 1px solid var(--line); }
  .eco-vigente { background: #e8f5ec; color: #166534; border-color: #bfe3cb; }
  .eco-desactualizado { background: #fff4e5; color: #9a4b00; border-color: #f5d3a5; }
  .eco-sustituido { color: var(--ink-soft); }
  @media (min-width: 720px) {
    .eco-kpis { grid-template-columns: repeat(4, 1fr); }
    .eco-filtros { grid-template-columns: repeat(4, 1fr) 2fr; }
    .eco-filtros .eco-buscar { grid-column: auto; }
  }
  .row-tabla-pagos { display: grid; grid-template-columns: 1fr; row-gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .row-tabla-pagos:last-child { border-bottom: none; }
  .row-tabla-pagos .num { font-family: 'IBM Plex Mono', monospace; font-size: 15px; }
  .etiqueta-movil { font-family: 'Klavika', Arial, sans-serif; color: var(--ink-soft); font-size: 13px; }
  .desglose { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; margin: 10px 0; }
  .desglose > div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
  .desglose > div:last-child { border-bottom: none; }
  .desglose .total { font-weight: 700; font-size: 17px; }

  /* ===== Documentación ===== */
  .documentos-grid { display: contents; }
  .documento-fila { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .documento-fila:last-child { border-bottom: none; }
  .aviso-caducidad { background: #fde2e2; color: #a3341e; border-radius: 8px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
  .aviso-reemplazo { background: var(--yellow-tint); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

  /* ===== Seguimiento ===== */
  .seguimiento-grid { display: contents; }
  .seguimiento-item { padding: 12px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
  .seguimiento-item:hover { background: var(--paper); }
  .seguimiento-item.seleccionado { background: var(--yellow-tint); border-color: var(--yellow); }
  #mapa-seguimiento { height: 320px; border-radius: 8px; margin: 12px 0 18px; }
  .marcador-camion {
    width: 34px; height: 34px; border-radius: 50%; background: white; border: 3px solid #1e40af;
    display: flex; align-items: center; justify-content: center; font-size: 17px; box-shadow: 0 1px 6px rgba(0,0,0,0.35);
  }
  .marcador-camion.sin-senal { border-color: var(--ink-soft); filter: grayscale(1); }
  .aviso-vivo { background: #dbeafe; color: #1e40af; border-radius: 8px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
  .aviso-sin-senal { background: var(--paper); color: var(--ink-soft); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
  .linea-tiempo { list-style: none; margin: 0; padding: 0 0 0 6px; }
  .linea-tiempo li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--line); }
  .linea-tiempo li:last-child { border-left-color: transparent; padding-bottom: 0; }
  .linea-tiempo li::before {
    content: ""; position: absolute; left: -8px; top: 2px; width: 14px; height: 14px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--line);
  }
  .linea-tiempo li.hecho { border-left-color: var(--ink); }
  .linea-tiempo li.hecho::before { background: var(--yellow); border-color: var(--ink); }
  .linea-tiempo .hito-texto { font-weight: 700; font-size: 15px; }
  .linea-tiempo li:not(.hecho) .hito-texto { color: var(--ink-soft); font-weight: 400; }

  /* ===== Mis pujas ===== */
  .pj-barra { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
  .pj-filtros { display: flex; gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; flex-wrap: wrap; }
  .pj-filtro {
    background: var(--surface); border: none; border-right: 1px solid var(--line); padding: 9px 14px; cursor: pointer;
    font: 700 14px 'Klavika', Arial, sans-serif; color: var(--ink-soft); display: flex; align-items: center; gap: 8px;
  }
  .pj-filtro:last-child { border-right: none; }
  .pj-filtro span { font: 500 12px 'IBM Plex Mono', monospace; background: var(--paper); border-radius: 10px; padding: 0 7px; }
  .pj-filtro.activo { background: var(--ink); color: white; }
  .pj-filtro.activo span { background: var(--yellow); color: var(--ink); }
  .pj-barra input[type="search"] { flex: 1; min-width: 180px; margin-top: 0; min-height: 0; padding: 9px 12px; font-size: 14px; }
  .pj-cabecera { display: none; }
  .pj-fila {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; padding: 14px 0; border-bottom: 1px solid var(--line);
  }
  .pj-fila:last-child { border-bottom: none; }
  .pj-ruta, .pj-acciones { grid-column: 1 / -1; }
  .pj-ruta strong { display: block; font-size: 16px; }
  .pj-ruta small, .pj-col small { display: block; color: var(--ink-soft); font-size: 12px; }
  .pj-col .num { font-family: 'IBM Plex Mono', monospace; font-size: 14px; }
  .pj-col .pj-et { text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; font-size: 10px; }
  .pj-tu { color: #166534 !important; font-weight: 700; }
  .pj-dif { color: #a3341e !important; font-weight: 700; }
  .pj-apagado { color: var(--ink-soft); }
  .pj-negativo { color: #a3341e; font-weight: 700; }
  .pj-badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 4px; white-space: nowrap; }
  .pj-badge.pj-amarillo { background: var(--yellow); color: var(--ink); }
  .pj-badge.pj-azul { background: #dbeafe; color: #1e40af; }
  .pj-badge.pj-rojo { background: #fde2e2; color: #a3341e; }
  .pj-badge.pj-gris { background: var(--paper); color: var(--ink-soft); }
  .pj-acciones { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
  .pj-acciones button { min-height: 0; padding: 8px 12px; font-size: 13px; }
  .pj-mejorar { display: flex; gap: 6px; }
  .pj-mejorar input { width: 100px; margin-top: 0; min-height: 0; padding: 7px 8px; font: 500 14px 'IBM Plex Mono', monospace; }
  .pj-finalizada { opacity: 0.6; }

  /* ===== Transportes en escritorio: lista de paradas + detalle ===== */
  .solo-escritorio { display: none; }
  .tr-toolbar {
    position: sticky; top: 60px; z-index: 5; display: flex; align-items: center; gap: 10px;
    background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin-bottom: 14px;
  }
  .tr-toolbar-info { flex: 1 1 100%; display: flex; gap: 28px; font-size: 12px; color: var(--ink-soft); white-space: nowrap; }
  .tr-toolbar-info strong { display: block; color: var(--ink); font: 600 17px 'IBM Plex Mono', monospace; }
  .tr-toolbar select { width: 220px; margin-top: 0; min-height: 0; padding: 9px 10px; font-size: 14px; }
  .tr-toolbar button { min-height: 0; padding: 10px 16px; font-size: 14px; }
  .tr-toolbar button:disabled { opacity: 0.4; cursor: not-allowed; }
  .tr-aviso { background: #fde2e2; color: #a3341e; border-radius: 8px; padding: 10px 14px; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
  .tr-split { display: grid; grid-template-columns: 50fr 50fr; gap: 18px; align-items: start; }
  .tr-lista, .tr-detalle { margin-bottom: 0; padding: 0; }
  .tr-lista { overflow: hidden; }
  .tr-detalle { position: sticky; top: 130px; max-height: calc(100vh - 150px); overflow-y: auto; padding: 18px 20px; }
  .tr-cabecera, .tr-fila { display: grid; grid-template-columns: 14px 24px 80px minmax(150px, 1fr) 100px 70px; gap: 8px; align-items: center; }
  .tr-cabecera {
    padding: 9px 12px; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em;
    border-bottom: 2px solid var(--ink);
  }
  .tr-fila { padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 14px; border-left: 3px solid transparent; }
  .tr-fila:hover { background: var(--paper); }
  .tr-fila.sel { background: var(--yellow-tint); border-left-color: var(--yellow); }
  .tr-fila.a-bordo .tr-num { background: #1e40af; color: white; }
  .tr-fila.arrastrando { opacity: 0.4; }
  .tr-fila.soltar-aqui { box-shadow: inset 0 3px 0 var(--ink); }
  .tr-fila.orden-mal { box-shadow: inset 3px 0 0 #a3341e; }
  .tr-asa { color: var(--line); cursor: grab; font-size: 14px; letter-spacing: -2px; user-select: none; }
  .tr-fila:hover .tr-asa { color: var(--ink-soft); }
  .tr-num {
    width: 24px; height: 24px; border-radius: 50%; background: var(--paper); display: flex; align-items: center; justify-content: center;
    font: 600 12px 'IBM Plex Mono', monospace;
  }
  .tr-hito { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; padding: 3px 7px; border-radius: 4px; text-align: center; }
  .tr-hito.recogida { background: var(--yellow); color: var(--ink); }
  .tr-hito.entrega { background: var(--ink); color: white; }
  .tr-ruta { min-width: 0; }
  .tr-ruta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tr-ruta small { display: block; color: var(--ink-soft); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .tr-fila .urgencia-badge { margin: 0; font-size: 11px; padding: 2px 8px; white-space: nowrap; }
  .tr-tramo { font: 500 12px 'IBM Plex Mono', monospace; color: var(--ink-soft); text-align: right; }
  .tr-ayuda { font-size: 12px; color: var(--ink-soft); margin: 0; padding: 10px 12px; }

  .tr-det-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
  .tr-det-cab h2 { margin: 4px 0 0; font-size: 20px; }
  .tr-det-cab .row-meta { margin-top: 2px; }
  #tr-mapa { height: 230px; border-radius: 8px; margin-bottom: 14px; }
  .tr-datos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 14px; }
  .tr-dato { padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-width: 0; }
  .tr-dato:nth-child(3n) { border-right: none; }
  .tr-dato:nth-last-child(-n+3) { border-bottom: none; }
  .tr-dato span { display: block; font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; }
  .tr-dato div { font-size: 14px; overflow-wrap: anywhere; }
  .tr-acciones { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
  .tr-acciones select { width: auto; flex: 1; min-width: 160px; margin-top: 0; min-height: 0; padding: 8px 10px; font-size: 14px; }
  .tr-acciones button, .tr-acciones a { min-height: 0; padding: 8px 14px; font-size: 14px; }
  .tr-bloque { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 14px; }
  .tr-bloque h3 { margin: 0 0 10px; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
  .tr-bloque.resguardo { border: 2px solid var(--ink); }
  .tr-res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .tr-res-grid label { margin-top: 10px; font-size: 13px; }
  .tr-res-grid label:first-child { margin-top: 0; }
  .tr-res-grid input, .tr-res-grid select { min-height: 0; padding: 9px 10px; font-size: 15px; margin-top: 4px; }
  .tr-res-grid textarea { min-height: 54px; font-size: 14px; margin-top: 4px; }
  .tr-res-grid .firma-canvas-wrap { margin: 4px 0 6px; }
  .tr-res-grid .firma-canvas-wrap canvas { height: 170px; }
  .segmentado { display: flex; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; margin-top: 4px; }
  .segmentado label { flex: 1; margin: 0 !important; text-align: center; padding: 8px 4px; font-size: 13px; cursor: pointer; border-right: 1px solid var(--line); }
  .segmentado label:last-child { border-right: none; }
  .segmentado input { display: none; }
  .segmentado label:has(input:checked) { background: var(--ink); color: white; }
  .tr-legal { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; font-weight: 400; margin: 12px 0 !important; }
  .tr-legal input { width: auto; min-height: 0; margin: 2px 0 0; }
  .tr-bloqueado { background: var(--paper); border-radius: 8px; padding: 12px 14px; font-size: 14px; color: var(--ink-soft); margin-bottom: 14px; }
  .incidencia-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
  .incidencia-item:last-child { border-bottom: none; }
  .marcador-parada.activa { transform: scale(1.35); box-shadow: 0 0 0 3px rgba(255,205,0,0.6), 0 1px 4px rgba(0,0,0,0.35); }
  .marcador-parada.inactiva { opacity: 0.55; }

  .separador-historial {
    font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em;
    padding: 18px 0 6px; border-bottom: 1px solid var(--line);
  }

  /* ===== Armazón de escritorio ===== */
  @media (min-width: 1100px) {
    #app-screen { flex-direction: row; flex-wrap: wrap; align-items: flex-start; }
    #app-screen > header { order: 1; }
    #app-screen > .nav-tabs {
      order: 2; width: 230px; min-width: 230px;
      flex-direction: column; align-items: stretch; gap: 2px;
      position: sticky; top: 41px; align-self: flex-start;
      height: calc(100vh - 41px); overflow-x: visible; overflow-y: auto;
      border-right: 1px solid var(--line); border-bottom: none;
      padding: 20px 10px;
    }
    .nav-tab {
      text-align: left; border-bottom: none; border-left: 3px solid transparent;
      border-radius: 0 8px 8px 0; padding: 13px 16px;
    }
    .nav-tab.activa { border-bottom-color: transparent; border-left-color: var(--yellow); background: var(--paper); }
    .container { order: 3; flex: 1; max-width: 1400px; margin: 0; padding: 28px 36px; }
    .install-banner { order: 4; width: 100%; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

    .row-tabla {
      grid-template-columns: 56px 2fr 1fr 1fr auto; grid-template-areas: "thumb ruta precio tiempo accion";
      align-items: center; padding: 12px 10px;
    }
    .col-accion { margin-top: 0; }
    .tabla-header-desktop {
      display: grid; grid-template-columns: 56px 2fr 1fr 1fr auto; padding: 8px 10px;
      font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em;
      border-bottom: 2px solid var(--ink);
    }
    .detalle-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: start; }
    .detalle-col-info, .detalle-col-precio { display: block; }
    .detalle-col-precio { position: sticky; top: 60px; }
    .detalle-col-precio .sticky-bottom-bar { position: static; margin: 20px 0 0 0; border-radius: 8px; border: 2px solid var(--ink); }

    .row-tabla-transportes {
      grid-template-columns: 56px 1.6fr 1fr 1fr 110px auto; grid-template-areas: "thumb ruta fechas estado ingresos accion";
      align-items: center; padding: 12px 10px;
    }
    .tabla-header-desktop-transportes {
      display: grid; grid-template-columns: 56px 1.6fr 1fr 1fr 110px auto; padding: 8px 10px;
      font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em;
      border-bottom: 2px solid var(--ink);
    }

    .row-tabla-pujas {
      grid-template-columns: 2fr 1fr 1fr 1fr auto; grid-template-areas: "ruta oferta subasta estado accion";
      align-items: center; padding: 12px 10px;
    }
    .tabla-header-desktop-pujas {
      display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; padding: 8px 10px;
      font-size: 11px; font-weight: 700; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em;
      border-bottom: 2px solid var(--ink);
    }

    #panel-perfil {
      display: grid; grid-template-columns: 1.2fr 1fr 0.9fr; gap: 24px; align-items: start;
      background: none; border: none; padding: 0;
    }
    #panel-perfil .perfil-subtabs { display: none; }
    #perfil-subtab-datos, #perfil-subtab-vehiculos, #perfil-subtab-valoracion, #perfil-subtab-centros, #perfil-subtab-semis {
      background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 20px;
    }
    #perfil-subtab-datos.hidden { display: block !important; }
    #panel-perfil[data-rol="transportista"] { grid-template-columns: 1.3fr 1fr; }
    #panel-perfil[data-rol="transportista"] #perfil-subtab-valoracion.hidden { display: block !important; }

    .publicar-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: start; }

    .solo-escritorio { display: block; }

    .pj-cabecera, .pj-fila { grid-template-columns: minmax(200px, 3fr) 100px 125px 90px 100px minmax(150px, 1.2fr) 190px; gap: 12px; align-items: center; }
    .pj-cabecera {
      display: grid; padding: 8px 10px; font-size: 11px; font-weight: 700; color: var(--ink-soft);
      text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 2px solid var(--ink);
    }
    .pj-fila { padding: 11px 10px; }
    .pj-fila:hover { background: var(--paper); }
    .pj-ruta, .pj-acciones { grid-column: auto; }
    .pj-ruta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .pj-col .pj-et { display: none; }
    .pj-acciones { justify-content: flex-end; }
    .solo-movil { display: none !important; }

    .cr-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 18px; align-items: start; }
    .cr-lateral { display: block; max-height: calc(100vh - 90px); overflow-y: auto; padding-right: 4px; position: sticky; top: 60px; }
    .cr-lateral .panel { margin-bottom: 12px; padding: 16px; }
    .cr-mapa-panel { position: sticky; top: 60px; margin-bottom: 0; }
    #cr-mapa { height: calc(100vh - 120px); min-height: 520px; }

    .tabla-header-desktop-pagos {
      display: grid; padding: 8px 10px; gap: 12px; font-size: 11px; font-weight: 700; color: var(--ink-soft);
      text-transform: uppercase; letter-spacing: 0.04em; border-bottom: 2px solid var(--ink);
    }
    .row-tabla-pagos { align-items: center; padding: 12px 10px; column-gap: 12px; }
    .pagos-cols-t { grid-template-columns: minmax(170px, 2.6fr) 90px 118px 96px 124px 100px 104px 150px; column-gap: 10px; }
    .pagos-cols-c { grid-template-columns: minmax(170px, 2.4fr) minmax(0, 1fr) 90px 90px 118px 64px 96px 100px 150px; column-gap: 10px; }
    .etiqueta-movil { display: none; }

    .documentos-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 24px; align-items: start; }
    .documentos-grid .panel { margin-bottom: 0; }
    #panel-subir-documento { position: sticky; top: 60px; }

    .seguimiento-grid { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }
    .seguimiento-grid .panel { margin-bottom: 0; }
    #mapa-seguimiento { height: 420px; }
    .publicar-col-datos, .publicar-col-logistica { display: block; }
    .publicar-col-logistica { background: var(--paper); border-radius: 8px; padding: 16px; border: 1px solid var(--line); }
  }

/* ---------- Ajustes para móvil (revisados con capturas) ---------- */
/* El mapa de Leaflet crea capas con z-index alto: se encierra para que no tape la barra de puja */
.det-mapa, #mapa-ruta, #cr-mapa { position: relative; z-index: 0; }
.det-puja { z-index: 5; }
/* Rentabilidad: el importe siempre en una línea */
.det-linea span:last-child { white-space: nowrap; }
@media (max-width: 640px) {
  /* Cabecera en una sola fila: sin el rol y con «Salir» compacto */
  header { flex-wrap: nowrap; gap: 6px; }
  .session { flex-wrap: nowrap; gap: 4px; }
  .session > span:not(.campana-badge) { display: none; }
  .session .usuario-texto { display: none; }
  .btn-usuario { padding: 2px; }
  .session .btn-ghost { padding: 6px 10px; min-height: 0; font-size: 13px; margin: 0; }
  .session .campana-notif, .session .btn-buscar-ref { padding: 6px; }
  /* Tarjetas de resumen: una fila que se desliza, para que las subastas se vean enseguida */
  .stats-grid { display: flex; overflow-x: auto; gap: 8px; margin: 0 0 12px; padding: 0 0 4px; scroll-snap-type: x proximity; }
  .stats-grid .stat-card { flex: 0 0 auto; min-width: 128px; padding: 10px 12px; scroll-snap-align: start; }
  .stats-grid .stat-value { font-size: 18px; }
  /* Detalle: botones de la cabecera solo con icono y título en su propia línea */
  .detalle-popup .detalle-header { flex-wrap: wrap; }
  .detalle-popup .detalle-header .detalle-ruta-titulo { font-size: 20px; }
  .estrella-boton, .detalle-popup .detalle-header .btn-ghost { padding: 6px 10px; min-height: 0; font-size: 13px; }
}
@media (max-width: 640px) {
  .stats-grid .stat-card { width: auto; max-width: 170px; }
  .sub-check { flex: 1 1 40% !important; font-size: 13px; padding: 0 8px; }
}
/* Los importes nunca se parten («430,00 / €») */
.row-meta .num, .precio-tabla-num, .num { white-space: nowrap; }
/* Escritorio: el contenido se ajusta al hueco junto al menú (una tabla ancha ya no lo manda debajo) */
@media (min-width: 1100px) {
  .container { min-width: 0; flex-basis: 0; }
  #lista-pagos, #pagos-cabecera { min-width: 0; }
}
.row-tabla-pagos .row-meta { white-space: normal; }

/* Mis transportes (escritorio): resumen en una fila y los botones debajo */
.tr-toolbar { flex-wrap: wrap; }
/* En la demo, la banda de aviso va arriba del todo: el panel de notificaciones empieza debajo */
body:has(.banda-demo) .notif-panel { top: 30px; }

  /* ---- Portti Copilot ---- */
  .cp-cabecera { margin-bottom: 16px; }
  .cp-cab { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
  .cp-cab > div:first-child { flex: 1 1 320px; min-width: 0; }
  .cp-acciones { display: flex; gap: 6px; flex-wrap: wrap; }
  .cp-objetivos { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 12px; }
  .cp-objetivo { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--paper); min-width: 0; }
  .cp-objetivo > span { display: block; font-size: 12px; color: var(--ink-soft); }
  .cp-objetivo strong { display: block; font-size: 15px; margin-top: 2px; }
  .cp-sugerencia { border-style: dashed; }
  .cp-barra { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-top: 6px; }
  .cp-barra > div { height: 100%; background: var(--yellow); }
  .cp-metricas { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px 12px; margin-top: 8px; font: 500 13px 'IBM Plex Mono', monospace; }
  .cp-metricas span { display: block; font-family: 'Klavika', Arial, sans-serif; font-weight: 400; font-size: 11px; color: var(--ink-soft); }
  .cp-cumple { margin-top: 8px; font-size: 13px; display: grid; gap: 2px; }
  .cp-cumple .si { color: #166534; }
  .cp-cumple .no { color: #b42318; }
  .cp-porque { font-size: 13px; margin-bottom: 8px; display: grid; gap: 2px; }
  .cp-simular { margin-top: 8px; }
  .cp-conclusion { background: var(--yellow-tint); border-left: 4px solid var(--yellow); padding: 10px 12px; border-radius: 6px; font-weight: 500; margin-bottom: 12px; }
  .cp-escenarios { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; margin-bottom: 12px; }
  .cp-escenario { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 0; }
  .cp-escenario.aceptar { border-top: 3px solid #166534; }
  .cp-escenario.alternativa { border-top: 3px solid var(--yellow); }
  .cp-escenario.vacio { border-top: 3px solid #c4c7ca; }
  .cp-esc-cab { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
  .cp-factores { font-size: 13px; margin-bottom: 8px; display: grid; gap: 2px; }
  .cp-ok { color: #166534; font-family: 'Klavika', Arial, sans-serif; }
  .cp-tarde { color: #b42318; font-family: 'Klavika', Arial, sans-serif; }
  .cp-carga-acciones { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
  .cp-descartar { color: var(--ink-soft) !important; }
  .cp-motivos { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
  .cp-hist-cab { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
  .cp-hist-cab select { width: auto; margin: 0; }
  .cp-historial { margin-top: 12px; border-top: 1px solid var(--line); }
  .cp-hist-fila { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .cp-hist-ruta { flex: 1 1 260px; min-width: 0; }
  .cp-resultado { font-size: 12px; padding: 3px 8px; border-radius: 10px; background: var(--paper); white-space: nowrap; }
  .cp-resultado.ok { background: #dcfce7; color: #166534; }
  .cp-resultado.no { background: #fee4e2; color: #b42318; }
  .cp-resultado.pend { background: var(--yellow-tint); color: #7a5b00; }
  .cp-resultado.gris { color: var(--ink-soft); }
  .cp-calculado { font-size: 12px; color: var(--ink-soft); margin: -4px 0 10px; }
  .cp-esperar { border: 1px solid var(--line); border-left: 4px solid var(--ink-soft); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
  .btn-link { background: none; border: 0; padding: 0; min-height: 0; margin: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; width: auto; }
  .fila-factura { display: grid; grid-template-columns: 1.3fr 1.4fr auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  @media (max-width: 640px) { .fila-factura { grid-template-columns: 1fr auto; } .fila-factura > span:nth-child(2) { grid-column: 1 / -1; order: 3; } }

  /* ---- Cargador Pro ---- */
  .pub-herramientas { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .pub-herramientas select { width: auto; min-width: 200px; margin: 0; }
  .pub-centros { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .pub-orientativo { background: var(--yellow-tint); border-left: 4px solid var(--yellow); border-radius: 6px; padding: 10px 12px; margin-top: 8px; font-size: 14px; }
  .pub-orientativo .btn-mini { margin-top: 6px; }
  .pub-botones { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
  .fila-centro { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
  .fila-centro > div:first-child { flex: 1 1 260px; min-width: 0; }
  .ana-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin-bottom: 14px; }
  .ana-kpi { background: var(--paper); border-radius: 8px; padding: 10px 12px; min-width: 0; }
  .ana-kpi > span:first-child { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); }
  .ana-kpi strong { display: block; font-size: 20px; margin: 4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ana-kpi .row-meta { font-size: 12px; }
  .ana-dos { display: grid; grid-template-columns: 1fr; gap: 20px; }
  .ana-titulo { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); margin: 10px 0 6px; }
  .ana-barras { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding-bottom: 20px; overflow-x: auto; }
  .ana-barra { flex: 1 0 16px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; position: relative; }
  .ana-barra > div { background: var(--yellow); border-radius: 3px 3px 0 0; }
  .ana-barra span { position: absolute; bottom: -18px; left: 0; right: 0; text-align: center; font-size: 10px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
  .ana-fila { display: grid; grid-template-columns: 1fr auto 130px; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; align-items: baseline; }
  .ana-fila > span:last-child { text-align: right; font-size: 12px; }
  @media (min-width: 1000px) { .ana-dos { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 640px) {
    .pub-centros, .pub-botones { grid-template-columns: 1fr; }
    .ana-fila { grid-template-columns: 1fr auto; } .ana-fila > span:last-child { grid-column: 1 / -1; text-align: left; }
  }
  .sub-tag.fijo { background: #e8f5ec; border-color: #bfe3cb; color: #166534; font-weight: 700; }
  .oferta-recomendacion { background: var(--yellow-tint); border-left: 4px solid var(--yellow); border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
  .oferta-modos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
  .oferta-modo { display: flex; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px; cursor: pointer; font-weight: 400; margin: 0; }
  .oferta-modo input { width: auto; margin: 3px 0 0; }
  .oferta-modo:has(input:checked) { border-color: var(--ink); background: var(--paper); }
  .pub-ventana { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .texto-error { color: #a3341e; }
  @media (max-width: 640px) { .oferta-modos { grid-template-columns: 1fr; } }
  .cp-confirmada { border: 1px solid #bfe3cb; background: #f1faf4; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
  .cp-oferta { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px 12px; margin-top: 8px; padding: 8px 10px; background: var(--paper); border-radius: 6px; font: 500 13px 'IBM Plex Mono', monospace; }
  .cp-oferta span { display: block; font-family: 'Klavika', Arial, sans-serif; font-weight: 400; font-size: 11px; color: var(--ink-soft); }
  .cp-oferta small { font-family: 'Klavika', Arial, sans-serif; font-weight: 400; font-size: 11px; color: var(--ink-soft); }
  .cp-oferta .total { font-weight: 700; }
  .cp-carga-acciones { align-items: center; }
  .cp-carga-nombre { flex: 1 1 220px; font-size: 13px; min-width: 0; }
  .cp-estado { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 9px; margin-left: 4px; white-space: nowrap; }
  .cp-estado.fijo { background: #e8f5ec; color: #166534; }
  .cp-estado.ganando { background: #e5eefc; color: #1d4ed8; }
  .cp-estado.superado { background: #fde2d8; color: #a3341e; }
  .cp-estado.subasta { background: var(--paper); color: var(--ink-soft); }
  .cp-aceptar-todas { margin: 4px 0 8px; }
  .cp-pack { border: 2px solid var(--ink); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface); }
  .cp-pack-paradas { margin: 10px 0; padding-left: 20px; font-size: 14px; display: grid; gap: 4px; }


  /* ---- Transporte modular: quién pone el semirremolque ---- */
  .equipo-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; border-radius: 6px;
    padding: 3px 8px; border: 1px solid var(--line); color: var(--ink-soft); background: var(--surface); white-space: nowrap; }
  .equipo-badge.proporcionado { background: var(--ink); color: var(--yellow); border-color: var(--ink); }
  .equipo-badge.proporcionado.tercero { background: #1e4f7a; color: #fff; border-color: #1e4f7a; }
  .equipo-texto { font-size: 13px; color: var(--ink-soft); }
  .sub-equipo { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
  .sub-equipo .row-meta { font-size: 12px; }
  .equipo-bloque { border: 2px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 14px; }
  .equipo-bloque.proporcionado { border-color: var(--ink); background: #fffbea; }
  .equipo-cabecera { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .equipo-cabecera .equipo-badge { font-size: 14px; padding: 5px 10px; }
  .equipo-semi { margin-top: 10px; display: grid; gap: 8px; }
  .equipo-semi strong { display: block; }
  .equipo-pasos { display: grid; gap: 8px; }
  .equipo-paso { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; border-radius: 4px; padding: 2px 6px; margin-bottom: 2px; }
  .equipo-paso.engancha { background: var(--yellow); color: var(--ink); }
  .equipo-paso.deja { background: var(--ink); color: #fff; }
  .equipo-instr { font-size: 13px; background: var(--surface); border-left: 3px solid var(--yellow); padding: 4px 8px; margin-top: 4px; }
  .equipo-confirmar { border: 2px solid var(--ink); border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; display: grid; gap: 4px; justify-items: start; }
  .equipo-linea-puja { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; color: var(--ink-soft); }
  .tr-semi { display: flex; gap: 10px; align-items: flex-start; border: 2px solid var(--ink); border-radius: 8px; padding: 10px 12px; margin: 10px 0; background: #fffbea; font-size: 14px; }
  .tr-semi .equipo-badge { flex-shrink: 0; }
  .pub-equipo { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--surface); }
  .pub-equipo-opciones { display: grid; gap: 6px; }
  .pub-equipo-op { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; margin: 0; font-weight: 400; }
  .pub-equipo-op input { width: auto; margin: 3px 0 0; min-height: 0; }
  .pub-equipo-op span { display: grid; gap: 2px; }
  .pub-equipo-op small { color: var(--ink-soft); font-size: 12px; }
  .pub-equipo-op.activa { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--yellow); }
  .pub-semi-elegir { display: flex; gap: 8px; align-items: center; }
  .pub-semi-elegir select { flex: 1; margin: 0; }
  .modalidad-operativa { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: var(--surface); }
  .clase-vehiculo { font-weight: 700; color: var(--ink); }
  .cp-equipo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; }
  .cr-semi { display: inline-block; font-size: 11px; font-weight: 700; background: var(--ink); color: var(--yellow); border-radius: 4px; padding: 1px 6px; margin-left: 4px; white-space: nowrap; }

  /* ---- Mercancía · Pack · Plan ---- */
  .pub-regimen { display: grid; gap: 6px; margin-bottom: 4px; }
  .pub-regimen-op { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; margin: 0; font-weight: 400; }
  .pub-regimen-op input { width: auto; margin: 3px 0 0; min-height: 0; }
  .pub-regimen-op span { display: grid; gap: 2px; }
  .pub-regimen-op small { color: var(--ink-soft); font-size: 12px; }
  .pub-regimen-op.activa { border-color: var(--ink); box-shadow: inset 3px 0 0 var(--yellow); }
  .pack-badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.02em; border-radius: 6px; padding: 3px 8px; background: #4b2a7a; color: #fff; white-space: nowrap; }
  .pack-badge.subasta { background: #4b2a7a; } .pack-badge.fijo { background: #6d3fb0; }
  .pack-cab { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
  .pack-estado { font-size: 12px; font-weight: 700; color: var(--ink-soft); }
  .pack-estado.activo { color: #1e4f7a; } .pack-estado.adjudicado { color: #166534; } .pack-estado.cancelado, .pack-estado.desierto { color: #a3341e; }
  .pack-fila, .pack-propuesta { border-bottom: 1px solid var(--line); padding: 10px 0; display: grid; gap: 4px; }
  .pack-propuesta { border: 2px solid #6d3fb0; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
  .packs-titulo { font-size: 15px; margin: 6px 0 8px; }
  .pack-tarjeta { border: 2px solid #6d3fb0; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 4px; cursor: pointer; background: var(--surface); }
  .pack-tarjeta .action { justify-self: start; }
  .pack-precio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
  .pack-precio .num { font-size: 18px; font-weight: 700; }
  .pack-tramos { padding-left: 20px; display: grid; gap: 6px; }
  .asesor-fila { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .asesor-fila > div:first-child { flex: 1 1 260px; }
  .filtros-mis-cargas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
  .filtro-chip { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; font: 700 13px 'Klavika', Arial, sans-serif; cursor: pointer; min-height: 0; width: auto; margin: 0; }
  .filtro-chip.activo { background: var(--ink); color: #fff; border-color: var(--ink); }
  .sub-tag.subasta { background: #e8f0f8; border-color: #bcd3ea; color: #1e4f7a; font-weight: 700; }
  .cp-oferta .certeza span:first-child { font-weight: 700; }
  .cp-escenarios { display: grid; gap: 2px; margin: 6px 0; font-size: 13px; border-top: 1px dashed var(--line); padding-top: 6px; }
  .cp-escenarios > div { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .cp-escenarios > div.maximo { color: var(--ink-soft); font-style: italic; }
  .cr-semi.pack { background: #6d3fb0; color: #fff; }
  .cp-oferta .cp-escenarios, .cp-oferta > .row-meta { grid-column: 1 / -1; font-family: 'Klavika', Arial, sans-serif; }
  .cp-escenarios span { display: inline; font-size: 12px; }
  .cp-escenarios .num { font-family: 'IBM Plex Mono', monospace; color: var(--ink); }
  .cp-escenarios > div { padding: 3px 0; border-bottom: 1px dotted var(--line); }

  /* ---------- Portti Market Waves ---------- */
  .olas-oferta { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
  .olas-opciones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
  .olas-opcion.urgente:has(input:checked) { border-color: #b42318; background: #fdecea; }
  .olas-programar { background: var(--paper); border-radius: 8px; padding: 10px 12px; }
  .olas-programar.hidden { display: none; }
  @media (max-width: 640px) { .olas-opciones { grid-template-columns: 1fr; } }

  .sub-tag.urgente { background: #fdecea; border-color: #f5c2bd; color: #b42318; font-weight: 700; }
  .sub-tag.ola { background: #e8f0fb; border-color: #c7d7f2; color: #1d4e89; }

  #banner-ola { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
  .ola-banner { display: flex; align-items: center; gap: 14px; background: var(--ink); color: #fff; border-radius: 10px; padding: 12px 16px; cursor: pointer; }
  .ola-banner.activa { background: #0f5132; }
  .ola-banner .ola-hora { font-weight: 800; font-size: 18px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
  .ola-banner .ola-hora .num { color: var(--yellow); }
  .ola-banner .ola-texto { flex: 1; font-size: 14px; color: #e6e8ea; }
  .ola-banner .btn-ghost { color: #fff; border-color: #fff; }
  .ola-pulso { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 0 rgba(52, 211, 153, .7); animation: ola-pulso 1.6s infinite; }
  @keyframes ola-pulso { 70% { box-shadow: 0 0 0 10px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
  @media (max-width: 640px) {
    #banner-ola { position: sticky; top: 0; z-index: 5; }
    .ola-banner { flex-wrap: wrap; gap: 6px 10px; padding: 12px; }
    .ola-banner .ola-hora { font-size: 20px; }
    .ola-banner .ola-texto { flex-basis: 100%; order: 3; }
  }

  .panel-ola { position: fixed; inset: 0; background: rgba(15, 17, 20, .55); z-index: 1100; display: none; }
  .panel-ola.abierto { display: block; }
  .panel-ola-caja { position: absolute; inset: 16px; background: var(--surface); border-radius: 12px; padding: 16px 20px; overflow: auto; }
  .panel-ola-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
  .panel-ola-cab h2 { margin: 0; }
  .ola-rejilla { display: grid; grid-template-columns: 250px minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
  .ola-col h4 { margin: 12px 0 8px; display: flex; align-items: center; gap: 8px; }
  .ola-izq label { margin-top: 10px; }
  .ola-check { display: flex; gap: 6px; align-items: center; font-weight: 400; }
  .ola-check input { width: auto; margin: 0; }
  .mapa-ola { height: 300px; border-radius: 10px; border: 1px solid var(--line); }
  .ola-op { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; background: var(--surface); }
  .ola-op.previa { border-style: dashed; }
  .ola-op-cab { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .ola-op-eco { display: flex; align-items: baseline; gap: 10px; margin: 6px 0; flex-wrap: wrap; }
  .eco-certeza { font-size: 12px; border-radius: 999px; padding: 2px 8px; background: var(--paper); }
  .eco-certeza.estimado { background: #eef0f2; color: #475467; }
  .eco-certeza.potencial { background: #e8f0fb; color: #1d4e89; }
  .eco-certeza.confirmable { background: #e8f5ec; color: #166534; }
  .ola-bloqueada { font-weight: 600; }
  .ola-tarjeta { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: var(--paper); }
  .ola-tarjeta h4 { margin-top: 0; }
  .ola-hora-grande { font-size: 40px; font-weight: 800; line-height: 1; }
  .ola-cifras { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
  .ola-cifras div { background: var(--surface); border-radius: 8px; padding: 8px; }
  .ola-cifras strong { display: block; font-size: 22px; }
  .ola-cifras span { font-size: 12px; color: var(--muted, #667085); }
  .ola-eco { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid var(--line); }
  .ola-copilot { margin-top: 8px; background: #e8f0fb; border-radius: 8px; padding: 8px 12px; cursor: pointer; font-size: 14px; }
  .ola-copilot .row-meta { display: block; }
  body.sin-scroll { overflow: hidden; }
  @media (max-width: 1100px) { .ola-rejilla { grid-template-columns: minmax(0, 1fr) 300px; } .ola-izq { grid-column: 1 / -1; order: 3; } }
  @media (max-width: 760px) {
    .panel-ola-caja { inset: 0; border-radius: 0; padding: 12px 16px; }
    .ola-rejilla { grid-template-columns: minmax(0, 1fr); }
    .ola-der { order: -1; }           /* en el móvil, la ola y la cuenta atrás lo primero */
    .mapa-ola { height: 220px; }
  }

  /* Los campos de fecha y hora de Chrome tienen un ancho mínimo propio: en el móvil ensanchaban toda la página
     (y los modales se veían desplazados). Se ajustan al ancho disponible. */
  input[type="datetime-local"], input[type="date"], input[type="time"] { min-width: 0; max-width: 100%; box-sizing: border-box; }
  .form-grid-2 > *, .form-row > * { min-width: 0; }

  /* Usuario en la barra: abre «Mi perfil» (en el móvil solo se ve la inicial) */
  .btn-usuario { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid transparent; border-radius: 999px;
    padding: 3px 10px 3px 3px; cursor: pointer; font: inherit; font-size: 13px; color: var(--ink-soft); margin: 0; min-height: 0; width: auto; }
  .btn-usuario:hover, .btn-usuario.activa { border-color: var(--line); background: var(--paper); }
  .btn-usuario strong { color: var(--ink); font-weight: 700; }
  .avatar-usuario { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: inline-flex;
    align-items: center; justify-content: center; font-weight: 800; font-size: 14px; flex: none; }

  /* Iconos del menú */
  .nav-tab { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
  .tab-icono { width: 18px; height: 18px; flex: none; opacity: .75; }
  .nav-tab.activa .tab-icono, .nav-tab:hover .tab-icono { opacity: 1; }
  .nav-tab.activa .tab-icono { color: var(--ink); }
  @media (min-width: 1100px) { .nav-tab { display: flex; gap: 12px; } .tab-icono { width: 20px; height: 20px; } }
  @media (max-width: 640px) { .nav-tab { gap: 6px; } .tab-icono { width: 16px; height: 16px; } }

  /* ---------- Portti Copilot por pestañas ---------- */
  .cp-titulo { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
  .cp-titulo h2 { margin: 0; }
  .cp-pestanas { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
  .cp-pestanas button { background: none; border: none; border-bottom: 3px solid transparent; border-radius: 0; padding: 10px 14px; margin: 0; min-height: 0;
    font: 700 14px 'Klavika', Arial, sans-serif; color: var(--ink-soft); cursor: pointer; white-space: nowrap; width: auto; }
  .cp-pestanas button.activa { color: var(--ink); border-bottom-color: var(--yellow); }
  .cp-cuenta:not(:empty) { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
  .cp-explica { background: #e8f0fb; border-left: 4px solid #1d4e89; border-radius: 6px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; line-height: 1.45; }
  .cp-estado { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
  .cp-dato { background: var(--paper); border-radius: 8px; padding: 10px 12px; }
  .cp-dato span { display: block; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
  .cp-dato strong { font-size: 18px; }
  #cp-recomendacion h3 { margin: 0 0 10px; }
  .cp-rec-item { border: 1px solid var(--line); border-left: 4px solid var(--yellow); border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; line-height: 1.5; }
  .cp-rec-item.urgente { border-left-color: #6d3fb0; }
  .cp-rec-item.suave { border-left-color: var(--line); }
  .cp-rec-item > strong { display: block; font-size: 16px; margin-bottom: 4px; }
  .cp-rec-item button { margin: 8px 8px 0 0; }
  .cp-rec-ruta { font-weight: 700; margin-bottom: 4px; }
  .cp-como summary { cursor: pointer; }
  .cp-como ol { margin: 10px 0 0; padding-left: 20px; line-height: 1.55; }
  .cp-ajuste h3 { margin: 0 0 4px; font-size: 16px; }
  .cp-ajuste .row-meta { margin: 0 0 10px; }
  .cp-leyenda-certeza { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; margin: 0 0 12px; }
  .certeza-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
  .certeza-dot.confirmado { background: #166534; }
  .certeza-dot.aceptar { background: #34d399; }
  .certeza-dot.potencial { background: #1d4e89; }
  @media (max-width: 640px) { .cp-pestanas button { padding: 8px 10px; font-size: 13px; } .cp-estado { grid-template-columns: 1fr 1fr; gap: 8px; } .cp-dato { padding: 8px 10px; } .cp-dato strong { font-size: 16px; } }

  /* ---------- Copilot · vista sencilla ---------- */
  .cp-titulo { flex-wrap: wrap; }
  .cp-modo { margin-left: auto !important; }
  #cp-sencillo { max-width: 860px; }
  .cs-estado { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: grid; gap: 6px; font-size: 16px; margin-bottom: 14px; }
  .cs-aviso { background: #fff4e5; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; }
  .cs-titulo { margin: 18px 0 10px; font-size: 18px; }
  .cs-carta { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
  .cs-carta.buena { border-left: 5px solid #16a34a; }
  .cs-carta.pack { border-left-color: #6d3fb0; }
  .cs-cab { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
  .cs-ruta { font-size: 20px; font-weight: 800; }
  .cs-tipo { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
  .cs-tipo.fijo { background: #e8f5ec; color: #166534; }
  .cs-tipo.subasta { background: #e8f0fb; color: #1d4e89; }
  .cs-gana { font-size: 18px; margin: 8px 0 2px; }
  .cs-gana b { font-size: 24px; color: #166534; }
  .cs-sub { font-size: 13px; color: var(--ink-soft); }
  .cs-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
  .cs-chips span { background: var(--paper); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
  .cs-explica { font-size: 13px; color: var(--ink-soft); margin: 8px 0 0; }
  .cs-acciones { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
  .cs-acciones .primary, .cs-acciones .action { margin: 0; width: auto; }
  .cs-acciones .btn-ghost { margin: 0; }
  .cs-porque { margin: 10px 0 0; padding-left: 4px; list-style: none; font-size: 14px; line-height: 1.6; }
  .cs-porque.hidden { display: none; }
  .cs-porque .aviso { color: #9a3412; }
  .cs-vacio { background: var(--paper); border-radius: 10px; padding: 16px; font-size: 15px; }
  .cs-encadenar { background: #f3eefb; border-radius: 10px; padding: 12px 14px; margin: 14px 0; line-height: 1.5; }
  .cs-mas { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
  .cs-mas .btn-ghost { margin: 0; }
  .cs-nota { font-size: 12px; color: var(--ink-soft); }
  @media (max-width: 640px) {
    .cs-ruta { font-size: 18px; }
    .cs-acciones .primary, .cs-acciones .action { flex: 1 1 100%; }
    .cs-mas .btn-ghost { flex: 1 1 calc(50% - 8px); }
  }
