:root {
            --app-height: 100%;
            --hn-blue: #0c4a8e;
            --hn-blue-light: #1a6bb5;
            --hn-sky: #38bdf8;
            --hn-white: #ffffff;
            /* Safe areas: notch / status bar / home indicator (web).
             * En APK, body.capacitor-* sobrescribe con --native-safe-* de MainActivity. */
            --safe-top: env(safe-area-inset-top, 0px);
            --safe-bottom: env(safe-area-inset-bottom, 0px);
            --safe-left: env(safe-area-inset-left, 0px);
            --safe-right: env(safe-area-inset-right, 0px);
        }
        /* Inter + fuentes de emoji del sistema (evita cuadros/?? en Windows) */
        html, body { 
            font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
                'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
            font-variant-emoji: emoji;
            background-color: #f8fafc; 
            overflow: hidden; 
            height: 100dvh;
            width: 100%;
            position: fixed;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        /* Inputs/textareas del panel ops: heredar stack con emoji */
        textarea,
        input,
        select,
        .ops-input,
        #wa-invite-message {
            font-family: inherit;
            font-variant-emoji: emoji;
        }
        
        #app-interface {
            display: flex;
            flex-direction: column;
            height: 100dvh;
            width: 100%;
            overflow: hidden;
            padding-top: var(--safe-top);
            padding-bottom: var(--safe-bottom);
            padding-left: var(--safe-left);
            padding-right: var(--safe-right);
            box-sizing: border-box;
        }

        /*
         * App nativa (Capacitor): estilo WhatsApp — se adapta a CADA pantalla.
         * Usa el inset real del sistema (reloj / notch / punch-hole / home indicator)
         * inyectado por MainActivity (--native-safe-*). Sin huecos fijos enormes:
         * en un teléfono sin notch baja poco; con notch/Dynamic Island sube lo justo.
         */
        body.capacitor-native {
            --safe-top: var(--native-safe-top, max(env(safe-area-inset-top, 0px), 24px));
            --safe-bottom: var(--native-safe-bottom, max(env(safe-area-inset-bottom, 0px), 8px));
            --safe-left: var(--native-safe-left, env(safe-area-inset-left, 0px));
            --safe-right: var(--native-safe-right, env(safe-area-inset-right, 0px));
        }

        body.capacitor-android {
            /* Fallback solo si el nativo aún no inyectó: status bar típico ~24–28dp */
            --safe-top: var(--native-safe-top, max(env(safe-area-inset-top, 0px), 28px));
            --safe-bottom: var(--native-safe-bottom, max(env(safe-area-inset-bottom, 0px), 12px));
        }

        body.capacitor-android #app-interface,
        body.capacitor-ios #app-interface {
            padding-top: var(--safe-top);
            padding-bottom: var(--safe-bottom);
            padding-left: var(--safe-left);
            padding-right: var(--safe-right);
        }

        body.capacitor-android #app-header,
        body.capacitor-ios #app-header {
            /* Respiro visual bajo el safe-area (el reloj ya lo cubre --safe-top del shell) */
            padding-top: 0.4rem;
        }

        body.capacitor-android .header-toolbar {
            min-height: 3.5rem;
            padding-top: 0.2rem;
            padding-bottom: 0.35rem;
        }

        body.capacitor-android .header-icon-btn {
            min-width: 2.6rem;
            min-height: 2.6rem;
        }

        body.capacitor-android .hn-flag-stripe {
            /* La franja de bandera también queda bajo el safe-area del shell */
            flex-shrink: 0;
        }

        /*
         * TODO full-screen fixed (admin / supervisor / perfil / setup / auth / modales).
         * inset:0 ignora el padding de #app-interface → hay que aplicar safe-area aquí.
         * Estilo WhatsApp: solo el inset real del sistema + respiro mínimo.
         */
        body.capacitor-native .ops-panel,
        body.capacitor-android .ops-panel,
        body.capacitor-native #profile-manage-panel,
        body.capacitor-android #profile-manage-panel {
            padding-top: var(--safe-top) !important;
            padding-bottom: var(--safe-bottom) !important;
            padding-left: var(--safe-left);
            padding-right: var(--safe-right);
            box-sizing: border-box;
        }

        body.capacitor-android .ops-topbar,
        body.capacitor-native .ops-topbar {
            /* Barra admin/supervisor: contenido bajo el reloj (padding del panel ya lo da) */
            padding-top: 0.45rem !important;
            min-height: 3.25rem;
        }

        body.capacitor-native .driver-setup-screen,
        body.capacitor-android .driver-setup-screen {
            padding-top: 0; /* la barra interna ya usa safe-top */
            padding-bottom: var(--safe-bottom, 8px);
        }

        /* Modales fijos genéricos: respetar reloj / home indicator en APK */
        body.capacitor-android .fixed.inset-0,
        body.capacitor-native .fixed.inset-0 {
            padding-top: max(0.5rem, var(--safe-top, 0px));
            padding-bottom: max(0.5rem, var(--safe-bottom, 0px));
            padding-left: max(0.5rem, var(--safe-left, 0px));
            padding-right: max(0.5rem, var(--safe-right, 0px));
            box-sizing: border-box;
        }

        /* Cámara full-screen: botones fuera de la status bar y de la nav bar */
        body.capacitor-native .camera-capture-overlay,
        body.capacitor-android .camera-capture-overlay {
            padding-top: var(--safe-top, 0px);
            padding-bottom: 0;
            padding-left: var(--safe-left, 0px);
            padding-right: var(--safe-right, 0px);
        }

        /* Conductor sin viaje (APK): sheet medio, NO full-screen */
        body.capacitor-native.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-android.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) #control-panel {
            top: auto !important;
            bottom: 0 !important;
            height: auto !important;
            max-height: min(55dvh, 26rem) !important;
            padding-top: 0.35rem !important;
            padding-bottom: max(0.55rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
            border-radius: 1.75rem 1.75rem 0 0 !important;
        }

        /* Viaje activo en APK: faja BAJA (mapa grande); scroll interno */
        body.capacitor-native.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-android.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel {
            top: auto !important;
            bottom: 0 !important;
            height: auto !important;
            max-height: min(36dvh, 16rem) !important;
            padding-top: 0.1rem !important;
            padding-bottom: max(0.45rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
        }

        body.capacitor-native.client-mode.is-searching:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-android.client-mode.is-searching:not(.panel-minimized):not(.panel-collapsed) #control-panel {
            top: auto !important;
            bottom: 0 !important;
            height: auto !important;
            max-height: min(58dvh, 28rem) !important;
            padding-top: 0.35rem !important;
            padding-bottom: max(0.55rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
            border-radius: 1.75rem 1.75rem 0 0 !important;
        }

        body.capacitor-native.trip-active #control-panel,
        body.capacitor-android.trip-active #control-panel {
            /* El panel de viaje activo no debe subir hasta el reloj */
            padding-bottom: max(0.85rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        /* Header fijo arriba â€” el logo no invade el panel de viajes */
        #app-header {
            flex-shrink: 0;
            overflow: visible;
            z-index: 250;
            position: relative;
            isolation: isolate;
        }

        .header-toolbar {
            position: relative;
            min-height: 3.5rem;
            display: grid;
            grid-template-columns: auto 1fr auto;
            align-items: center;
            gap: 0.35rem;
            overflow: visible;
        }

        .header-slot-left { grid-column: 1; justify-self: start; position: relative; z-index: 3; }
        .header-slot-center { grid-column: 2; justify-self: center; width: 100%; max-width: 100%; }
        .header-slot-right {
            grid-column: 3;
            justify-self: end;
            position: relative;
            z-index: 4;
        }

        .header-actions-mobile {
            position: relative;
            z-index: 5;
        }

        #app-logo-center {
            top: auto;
            left: auto;
            transform: none;
        }

        .header-icon-btn {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            flex-shrink: 0;
            cursor: pointer;
            border: none;
            background-clip: padding-box;
        }

        .service-zone-collapse-bar {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.65rem 0.75rem;
            text-align: left;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            background: transparent;
            border: none;
            cursor: pointer;
        }

        .service-zone-collapse-title {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            flex-shrink: 0;
        }

        .service-zone-summary {
            flex: 1;
            min-width: 0;
            font-size: 0.72rem;
            font-weight: 800;
            color: #1e40af;
            text-align: right;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .service-zone-chevron {
            font-size: 0.65rem;
            color: #94a3b8;
            transition: transform 0.2s ease;
            flex-shrink: 0;
        }

        #service-zone-picker.zone-collapsed .service-zone-chevron {
            transform: rotate(180deg);
        }

        #service-zone-picker.zone-collapsed .service-zone-body {
            display: none !important;
        }

        #service-zone-picker.zone-collapsed #client-setup-collapsed-radius {
            display: block !important;
        }

        .client-setup-collapsed-radius {
            background: rgba(248, 250, 252, 0.95);
        }

        .client-setup-panel .service-type-picker {
            margin-bottom: 0.15rem;
        }

        .service-zone-map-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.5rem 0.75rem;
            background: rgba(255, 255, 255, 0.97);
            border: 1px solid #dbeafe;
            border-radius: 999px;
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
            font-size: 0.68rem;
            font-weight: 800;
            color: #1e3a8a;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
        }

        .sr-only {
            position: absolute;
            width: 1px;
            height: 1px;
            padding: 0;
            margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }

        /* â€”â€” Ciudad: tarjeta compacta en panel de viajes â€”â€” */
        .city-zone-compact {
            border-radius: 1.15rem;
            background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
            border: 1px solid #dbeafe;
            box-shadow: 0 4px 18px rgba(37, 99, 235, 0.08);
            overflow: hidden;
        }

        .city-zone-compact-btn {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            width: 100%;
            padding: 0.85rem 1rem;
            text-align: left;
            background: transparent;
            border: none;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s ease;
        }

        .city-zone-compact-btn:active {
            background: rgba(59, 130, 246, 0.06);
        }

        .city-zone-compact-icon {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            flex-shrink: 0;
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
        }

        .city-zone-compact-text {
            flex: 1;
            min-width: 0;
        }

        .city-zone-compact-label {
            display: block;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #64748b;
            margin-bottom: 0.15rem;
        }

        .city-zone-compact-value {
            display: block;
            font-size: 0.92rem;
            font-weight: 900;
            color: #1e3a8a;
            line-height: 1.2;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .city-zone-compact-meta {
            display: block;
            font-size: 0.62rem;
            font-weight: 600;
            color: #64748b;
            margin-top: 0.1rem;
        }

        .city-zone-compact-action {
            flex-shrink: 0;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: #2563eb;
            background: #fff;
            border: 1px solid #bfdbfe;
            padding: 0.45rem 0.7rem;
            border-radius: 0.65rem;
        }

        /* â€”â€” Barra ciudad pasajero â€”â€” */
        .passenger-city-card {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 0.8rem 1rem;
            border-radius: 1.15rem;
            background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
            border: 1px solid #bae6fd;
            box-shadow: 0 4px 16px rgba(14, 165, 233, 0.1);
        }

        .passenger-city-card-icon {
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 0.75rem;
            background: #fff;
            color: #0284c7;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.95rem;
            flex-shrink: 0;
            border: 1px solid #e0f2fe;
        }

        .passenger-city-card-btn {
            flex-shrink: 0;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            color: #0369a1;
            background: #fff;
            border: 1px solid #7dd3fc;
            padding: 0.5rem 0.85rem;
            border-radius: 0.7rem;
            cursor: pointer;
            touch-action: manipulation;
        }

        /* â€”â€” Modal selector de ciudad â€”â€” */
        #city-picker-modal {
            animation: cityModalFadeIn 0.22s ease-out;
        }

        @keyframes cityModalFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        .city-modal-sheet {
            animation: cityModalSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @keyframes cityModalSlideUp {
            from { opacity: 0; transform: translateY(1.25rem) scale(0.98); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .city-modal-header {
            padding: 1.25rem 1.25rem 1rem;
            background: linear-gradient(145deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
            color: #fff;
            position: relative;
            overflow: hidden;
        }

        .city-modal-header::after {
            content: "";
            position: absolute;
            top: -40%;
            right: -15%;
            width: 55%;
            height: 140%;
            background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 70%);
            pointer-events: none;
        }

        .city-modal-header h3 {
            font-size: 1.15rem;
            font-weight: 900;
            letter-spacing: -0.02em;
            margin: 0;
            position: relative;
            z-index: 1;
        }

        .city-modal-header p {
            font-size: 0.68rem;
            font-weight: 600;
            opacity: 0.88;
            margin: 0.25rem 0 0;
            position: relative;
            z-index: 1;
        }

        .city-modal-close {
            position: absolute;
            top: 1rem;
            right: 1rem;
            z-index: 2;
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 999px;
            border: none;
            background: rgba(255, 255, 255, 0.18);
            color: #fff;
            font-size: 1.1rem;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            backdrop-filter: blur(6px);
        }

        .city-modal-body {
            padding: 1.1rem 1.15rem 1.25rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            min-height: 0;
            flex: 1;
            overflow: hidden;
        }

        .city-modal-current {
            display: flex;
            align-items: center;
            gap: 0.85rem;
            padding: 0.9rem 1rem;
            border-radius: 1rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .city-modal-current-icon {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #dbeafe, #bfdbfe);
            color: #1d4ed8;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }

        .city-modal-current-name {
            font-size: 1.05rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.2;
        }

        .city-modal-current-meta {
            font-size: 0.68rem;
            font-weight: 600;
            color: #64748b;
            margin-top: 0.15rem;
        }

        .city-modal-search-wrap {
            position: relative;
        }

        .city-modal-search-wrap i {
            position: absolute;
            left: 0.9rem;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
            font-size: 0.85rem;
            pointer-events: none;
        }

        .city-modal-search {
            width: 100%;
            padding: 0.75rem 0.9rem 0.75rem 2.35rem;
            border-radius: 0.9rem;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            font-size: 0.85rem;
            font-weight: 600;
            color: #0f172a;
            outline: none;
            transition: border-color 0.15s, box-shadow 0.15s;
        }

        .city-modal-search:focus {
            border-color: #93c5fd;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
            background: #fff;
        }

        .city-modal-actions {
            display: flex;
            gap: 0.5rem;
        }

        .city-modal-gps-btn {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.7rem 0.75rem;
            border-radius: 0.85rem;
            border: none;
            background: linear-gradient(135deg, #059669, #10b981);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            cursor: pointer;
            box-shadow: 0 6px 16px rgba(16, 185, 129, 0.28);
        }

        .city-modal-radius-label {
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
            margin-bottom: 0.45rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .city-modal-radius-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }

        .city-modal-radius-chip {
            padding: 0.4rem 0.7rem;
            border-radius: 999px;
            border: 1px solid #e2e8f0;
            background: #fff;
            font-size: 0.62rem;
            font-weight: 800;
            color: #475569;
            cursor: pointer;
            transition: all 0.15s ease;
        }

        .city-modal-radius-chip.is-active {
            background: #2563eb;
            border-color: #2563eb;
            color: #fff;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
        }

        .city-modal-list {
            flex: 1;
            min-height: 12rem;
            max-height: min(42dvh, 320px);
            overflow: auto;
            border-radius: 1rem;
            border: 1px solid #e2e8f0;
            background: #fff;
            -webkit-overflow-scrolling: touch;
        }

        .zone-dept-header {
            position: sticky;
            top: 0;
            z-index: 1;
            padding: 0.5rem 1rem 0.35rem;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #64748b;
            background: #f1f5f9;
            border-bottom: 1px solid #e2e8f0;
        }

        .zone-city-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 0.8rem 1rem;
            cursor: pointer;
            border-bottom: 1px solid #f1f5f9;
            transition: background 0.12s ease;
            touch-action: manipulation;
        }

        .zone-city-row:last-child {
            border-bottom: none;
        }

        .zone-city-row:hover {
            background: #f8fafc;
        }

        .zone-city-row.is-selected {
            background: linear-gradient(90deg, #eff6ff 0%, #f8fafc 100%);
        }

        .zone-city-row.is-selected .zone-city-name {
            color: #1d4ed8;
        }

        .zone-city-name {
            font-size: 0.88rem;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.25;
        }

        .zone-city-dept {
            font-size: 0.65rem;
            font-weight: 600;
            color: #94a3b8;
            margin-top: 0.1rem;
        }

        .zone-city-check {
            width: 1.5rem;
            height: 1.5rem;
            border-radius: 999px;
            background: #2563eb;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.55rem;
            flex-shrink: 0;
        }

        .zone-city-empty {
            padding: 2rem 1rem;
            text-align: center;
            color: #94a3b8;
            font-size: 0.8rem;
            font-weight: 600;
        }

        .city-modal-footnote {
            font-size: 0.62rem;
            font-weight: 600;
            color: #94a3b8;
            text-align: center;
            line-height: 1.45;
            padding: 0 0.25rem;
        }

        body.city-modal-open {
            overflow: hidden;
        }

        html[data-theme="dark"] .city-zone-compact {
            background: linear-gradient(135deg, #1e293b 0%, #1e3a5f 100%);
            border-color: #334155;
        }

        html[data-theme="dark"] .city-zone-compact-value {
            color: #93c5fd;
        }

        html[data-theme="dark"] .passenger-city-card {
            background: linear-gradient(135deg, #0c4a6e 0%, #075985 100%);
            border-color: #0369a1;
        }

        html[data-theme="dark"] .city-modal-sheet {
            background: #1e293b;
        }

        html[data-theme="dark"] .city-modal-current {
            background: #0f172a;
            border-color: #334155;
        }

        html[data-theme="dark"] .city-modal-current-name {
            color: #f1f5f9;
        }

        html[data-theme="dark"] .city-modal-search {
            background: #0f172a;
            border-color: #334155;
            color: #f1f5f9;
        }

        html[data-theme="dark"] .zone-city-row {
            border-bottom-color: #334155;
        }

        html[data-theme="dark"] .zone-city-name {
            color: #f1f5f9;
        }

        body.zone-picker-collapsed #control-panel {
            max-height: min(50%, 46dvh);
        }

        @media (max-width: 639px) {
            body.zone-picker-collapsed #control-panel {
                max-height: min(46%, 42dvh);
            }
        }

        .header-more-menu {
            position: fixed;
            left: 0.5rem;
            right: 0.5rem;
            z-index: 500;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 1rem;
            box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
            padding: 0.35rem;
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
            max-height: min(70dvh, 420px);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
        }

        .header-more-menu.hidden {
            display: none !important;
        }

        .header-more-item {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            width: 100%;
            padding: 0.7rem 0.85rem;
            border-radius: 0.75rem;
            font-size: 0.8rem;
            font-weight: 700;
            color: #1e293b;
            text-align: left;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .header-more-item:active {
            background: #f1f5f9;
        }

        .header-more-item-danger {
            color: #dc2626;
        }

        /* MenÃº â‹®: no mostrar Copas (se veÃ­an feas en Android; ranking sigue en el mapa) */
        #header-menu-copa,
        #header-menu-pcopa,
        #header-more-menu .header-more-item-copa {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            height: 0 !important;
            max-height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
            border: none !important;
            opacity: 0 !important;
        }

        /* Copa HonduRaite â€” estilos (por si se reactivan en el futuro) */
        .header-more-item-copa {
            position: relative;
            margin: 0.15rem 0 0.25rem;
            padding: 0.72rem 0.7rem;
            gap: 0.7rem;
            border: 1px solid rgba(180, 83, 9, 0.45);
            background:
                linear-gradient(145deg, #fffbeb 0%, #fde68a 28%, #fbbf24 62%, #f59e0b 100%);
            color: #78350f !important;
            box-shadow:
                0 8px 20px rgba(180, 83, 9, 0.22),
                0 0 0 1px rgba(255, 255, 255, 0.45) inset,
                0 1px 0 rgba(255, 255, 255, 0.55) inset;
            overflow: hidden;
            isolation: isolate;
        }

        .header-more-item-copa::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -10%;
            width: 55%;
            height: 200%;
            background: linear-gradient(
                105deg,
                transparent 0%,
                rgba(255, 255, 255, 0.45) 42%,
                rgba(255, 255, 255, 0.08) 50%,
                transparent 58%
            );
            transform: skewX(-18deg);
            pointer-events: none;
            z-index: 0;
            animation: header-copa-shine 3.2s ease-in-out infinite;
        }

        .header-more-item-copa:active {
            background:
                linear-gradient(145deg, #fef3c7 0%, #fcd34d 35%, #f59e0b 70%, #d97706 100%);
            transform: scale(0.985);
        }

        .header-copa-icon {
            position: relative;
            z-index: 1;
            flex-shrink: 0;
            width: 2.35rem;
            height: 2.35rem;
            border-radius: 0.75rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(160deg, #78350f 0%, #92400e 40%, #b45309 100%);
            color: #fde68a;
            font-size: 1rem;
            box-shadow:
                0 4px 12px rgba(120, 53, 15, 0.4),
                0 0 0 2px rgba(255, 255, 255, 0.25) inset,
                0 -1px 0 rgba(0, 0, 0, 0.15) inset;
        }

        .header-copa-copy {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.1rem;
            min-width: 0;
            flex: 1;
        }

        .header-copa-title {
            font-size: 0.84rem;
            font-weight: 900;
            letter-spacing: -0.01em;
            line-height: 1.15;
            color: #78350f;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
        }

        .header-copa-sub {
            font-size: 0.68rem;
            font-weight: 700;
            color: #92400e;
            opacity: 0.88;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .header-copa-live {
            position: relative;
            z-index: 1;
            flex-shrink: 0;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            color: #ef4444 !important;
            background: transparent;
            padding: 0.15rem 0.15rem;
            border: none;
            box-shadow: none;
            text-shadow: 0 0 8px rgba(239, 68, 68, 0.35);
            animation: header-copa-live-pulse 1.8s ease-in-out infinite;
        }

        @keyframes header-copa-live-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.72; }
        }

        @keyframes header-copa-shine {
            0%, 100% { transform: skewX(-18deg) translateX(-30%); opacity: 0.35; }
            45%, 55% { transform: skewX(-18deg) translateX(180%); opacity: 0.7; }
        }

        @media (max-width: 639px) {
            .header-map-logo {
                max-height: 2.15rem;
                max-width: 5.5rem;
            }

            .header-brand-fallback {
                font-size: 0.95rem;
                letter-spacing: -0.02em;
            }
        }

        @media (min-width: 640px) {
            .header-toolbar {
                min-height: 4rem;
                display: flex;
                align-items: center;
                justify-content: space-between;
            }

            .header-slot-left,
            .header-slot-center,
            .header-slot-right {
                grid-column: auto;
            }

            #app-logo-center {
                position: absolute;
                left: 50%;
                top: 50%;
                transform: translate(-50%, -50%);
                max-width: 52%;
                pointer-events: none;
            }
        }

        .header-brand-fallback {
            font-weight: 900;
            color: var(--hn-blue);
            line-height: 1;
            white-space: nowrap;
        }

        .header-map-logo {
            max-height: 3.5rem;
            max-width: 14rem;
            width: auto;
            height: auto;
            filter: drop-shadow(0 2px 6px rgba(15, 23, 42, 0.18));
        }

        @media (min-width: 640px) {
            .header-toolbar {
                min-height: 4.5rem;
            }

            .header-map-logo {
                max-height: 3.85rem;
                max-width: 16rem;
            }
        }

        @media (min-width: 768px) {
            .header-toolbar {
                min-height: 5rem;
            }

            .header-map-logo {
                max-height: 4.5rem;
                max-width: 20rem;
            }
        }

        @media (min-width: 1024px) {
            .header-toolbar {
                min-height: 5.5rem;
            }

            .header-map-logo {
                max-height: 5rem;
                max-width: 24rem;
            }
        }

        @media (min-width: 1280px) {
            .header-map-logo {
                max-height: 5.75rem;
                max-width: 28rem;
            }
        }

        html[data-theme="dark"] .header-map-logo {
            filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.5));
        }

        html[data-theme="dark"] .header-brand-fallback {
            color: #93c5fd;
        }

        .app-shell {
            flex: 1;
            position: relative;
            min-height: 0;
            overflow: hidden;
        }

        #map-container {
            position: absolute;
            inset: 0;
            z-index: 0;
            pointer-events: auto;
        }

        #map { height: 100%; width: 100%; position: absolute; inset: 0; transition: opacity 0.35s ease; }

        .moto-star-banner {
            animation: moto-glow 4s ease-in-out infinite;
        }

        @keyframes moto-glow {
            0%, 100% { box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25); }
            50% { box-shadow: 0 12px 32px rgba(124, 58, 237, 0.4); }
        }

        .service-type-picker {
            position: relative;
            z-index: 6;
            touch-action: manipulation;
        }

        .service-type-btn {
            min-height: 3.25rem;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
            overflow: hidden;
            isolation: isolate;
        }

        .service-type-btn > * {
            pointer-events: none;
        }

        .trip-route-fields {
            position: relative;
            z-index: 4;
        }

        .trip-route-actions {
            position: relative;
            z-index: 12;
            isolation: isolate;
        }

        gmp-place-autocomplete {
            display: block;
            width: 100%;
            position: relative;
            z-index: 1;
        }

        .trip-origin-wrap,
        .trip-dest-wrap {
            position: relative;
            z-index: 6;
        }

        .trip-origin-wrap.is-autocomplete-active,
        .trip-dest-wrap.is-autocomplete-active {
            z-index: 30;
        }

        /*
         * Al editar origen/destino (sobre todo borrar y buscar de nuevo):
         * el teclado + WebView no deben mezclar el campo con reloj/status bar.
         * softInputMode=adjustNothing en Android; aquí anclamos el sheet en px.
         */
        :root {
            --vv-height: 100dvh;
            --vv-offset-top: 0px;
            --keyboard-inset: 0px;
            /* Piso mínimo bajo status bar (APK); JS puede subir --search-safe-top */
            --search-safe-top: max(var(--safe-top, env(safe-area-inset-top, 0px)), 36px);
        }

        /* Escudo sólido bajo reloj/batería: nada de UI se “mezcla” visualmente ahí */
        #status-bar-shield {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            height: var(--search-safe-top, 36px);
            background: #f8fafc;
            z-index: 50000;
            pointer-events: none;
        }

        html[data-theme="dark"] #status-bar-shield {
            background: #0f172a;
        }

        body.trip-autocomplete-open #status-bar-shield {
            display: block !important;
        }

        body.trip-autocomplete-open,
        body.trip-autocomplete-open #app-interface,
        body.trip-autocomplete-open #map,
        body.trip-autocomplete-open #map-container {
            overflow: hidden !important;
            overscroll-behavior: none !important;
            touch-action: none;
        }

        body.trip-autocomplete-open #app-interface {
            touch-action: manipulation;
        }

        /* Header oculto mientras se busca: no compite con reloj ni con el input */
        body.trip-autocomplete-open #app-header,
        body.trip-autocomplete-open .hn-flag-stripe {
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        body.trip-autocomplete-open.client-mode #control-panel,
        body.trip-autocomplete-open #control-panel {
            position: fixed !important;
            left: 0 !important;
            right: 0 !important;
            /* JS escribe top/bottom en inline; fallback CSS: */
            top: var(--search-safe-top, 36px) !important;
            bottom: max(0px, var(--keyboard-inset, 0px)) !important;
            height: auto !important;
            max-height: none !important;
            min-height: 0 !important;
            width: 100% !important;
            margin: 0 !important;
            border-radius: 1rem 1rem 0 0 !important;
            z-index: 40000 !important;
            transform: none !important;
            translate: none !important;
            box-shadow: 0 -10px 36px rgba(15, 23, 42, 0.22) !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
            padding-top: 0.65rem !important;
            padding-bottom: max(0.5rem, var(--safe-bottom, 0px)) !important;
            background: #ffffff !important;
        }

        html[data-theme="dark"] body.trip-autocomplete-open #control-panel {
            background: #0f172a !important;
        }

        body.trip-autocomplete-open #control-panel #panel-content,
        body.trip-autocomplete-open #panel-content {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            max-height: none !important;
            touch-action: pan-y;
            /* Empuja el bloque de ruta hacia abajo un poco más */
            padding-top: 0.35rem !important;
        }

        /* Prioridad al campo que se está editando */
        body.trip-autocomplete-open .trip-origin-wrap.is-autocomplete-active,
        body.trip-autocomplete-open .trip-dest-wrap.is-autocomplete-active,
        body.trip-autocomplete-open .trip-extra-stop-wrap.is-autocomplete-active {
            z-index: 50;
            position: relative;
            background: inherit;
            border-radius: 0.85rem;
            padding: 0.15rem 0;
        }

        body.trip-autocomplete-open gmp-place-autocomplete {
            z-index: 51;
            position: relative;
        }

        /* Admin: modo pin de puntos caros — cursor cruz sobre el mapa */
        body.admin-fixed-fare-picking,
        body.admin-fixed-fare-picking #map,
        body.admin-fixed-fare-picking .map-container {
            cursor: crosshair !important;
        }

        #admin-fp-search-results button:last-child {
            border-bottom: 0 !important;
        }

        /* Flash suave al actualizar tarifa (punto caro / noche) — se ve “viva” sin delatar el sistema */
        #price-display.fare-price-flash {
            animation: fare-price-pop 0.45s ease;
        }
        @keyframes fare-price-pop {
            0% { transform: scale(1); }
            40% { transform: scale(1.06); }
            100% { transform: scale(1); }
        }

        /* En búsqueda: menos ruido visual (ocultar lo que no es ruta) */
        body.trip-autocomplete-open #passenger-home-hub,
        body.trip-autocomplete-open #passenger-mode-bar,
        body.trip-autocomplete-open .trip-step-advanced,
        body.trip-autocomplete-open .trip-step-service,
        body.trip-autocomplete-open .trip-step-passengers,
        body.trip-autocomplete-open .trip-step-when,
        body.trip-autocomplete-open .trip-step-request,
        body.trip-autocomplete-open #ride-options,
        body.trip-autocomplete-open #fare-card,
        body.trip-autocomplete-open #favorites-bar,
        body.trip-autocomplete-open #client-stores-section {
            display: none !important;
        }

        .trip-step-card.trip-step-route {
            overflow: visible;
        }

        .add-extra-stop-btn {
            position: relative;
            z-index: 1;
        }

        /* EnvÃ­os: solo recogida â†’ entrega, sin paradas cobradas */
        body.trip-service-delivery #standard-extra-stops-wrap {
            display: none !important;
        }

        #btn-calculate-trip,
        #fare-request-btn,
        #btn-use-location,
        #btn-dest-map,
        .favorite-chip {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
            isolation: isolate;
        }

        #btn-calculate-trip,
        #fare-request-btn {
            min-height: 48px;
            position: relative;
            z-index: 8;
        }

        #btn-use-location,
        #btn-dest-map {
            min-width: 44px;
            min-height: 44px;
            z-index: 15;
        }

        #btn-calculate-trip > *,
        #fare-request-btn > *,
        #btn-use-location > *,
        #btn-dest-map > *,
        .favorite-chip > * {
            pointer-events: none;
        }

        [data-trip-action],
        [data-accept-trip],
        [data-decline-trip],
        .trip-drag-handle[data-trip-action] {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
        }

        [data-trip-action] > *:not(input):not(textarea):not(select),
        [data-accept-trip] > *,
        [data-decline-trip] > * {
            pointer-events: none;
        }

        .trip-touch-btn {
            min-height: 48px;
            position: relative;
            z-index: 4;
            isolation: isolate;
        }

        #active-trip-panel {
            position: relative;
            z-index: 5;
        }

        .client-pin-hero {
            margin-left: 0.25rem;
            margin-right: 0.25rem;
            padding: 0.85rem 1rem;
            border-radius: 1.25rem;
            text-align: center;
            background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
            border: 2px solid #f59e0b;
            box-shadow: 0 10px 28px rgba(245, 158, 11, 0.18);
        }

        .client-pin-hero-kicker {
            margin: 0 0 0.5rem;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #b45309;
        }

        .client-pin-hero-btn {
            background: #d97706;
            color: #fff;
            border: none;
            border-radius: 1rem;
            padding: 0.85rem 1rem;
            font-size: 0.72rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            box-shadow: 0 6px 18px rgba(217, 119, 6, 0.28);
        }

        .client-pin-hero-label {
            margin: 0;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            opacity: 0.92;
        }

        .client-pin-hero-code {
            margin: 0.2rem 0 0;
            font-size: clamp(1.5rem, 7vw, 2.25rem);
            font-weight: 900;
            letter-spacing: 0.35em;
            color: #fff;
            line-height: 1;
            text-align: left;
        }

        .client-pin-hero-hint {
            margin: 0.5rem 0 0;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1.35;
            color: #92400e;
        }

        .client-pin-gmaps-btn {
            margin-top: 0.55rem;
            padding: 0.65rem 0.85rem;
            border-radius: 0.9rem;
            background: #fff;
            border: 1px solid #fcd34d;
            color: #1d4ed8;
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            box-shadow: 0 4px 14px rgba(30, 64, 175, 0.12);
        }

        .client-pin-gmaps-btn:active {
            transform: scale(0.98);
        }

        body.trip-active #control-panel #client-pin-display,
        body.trip-active #control-panel #driver-pin-hero,
        body.trip-active #control-panel #chat-section {
            display: none !important;
        }

        html[data-theme="dark"] .client-pin-hero {
            background: linear-gradient(180deg, #422006 0%, #78350f 100%);
            border-color: #f59e0b;
            box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
        }

        html[data-theme="dark"] .client-pin-hero-kicker,
        html[data-theme="dark"] .client-pin-hero-label {
            color: #fcd34d;
        }

        html[data-theme="dark"] .client-pin-hero-btn {
            background: #b45309;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
        }

        html[data-theme="dark"] .client-pin-hero-code {
            color: #fff7ed;
        }

        html[data-theme="dark"] .client-pin-hero-hint {
            color: #fde68a;
        }

        .driver-route-hero,
        .driver-pin-hero,
        .driver-dest-hero {
            margin-left: 0.25rem;
            margin-right: 0.25rem;
            padding: 0.85rem 1rem;
            border-radius: 1.25rem;
            text-align: center;
        }

        .driver-route-hero {
            background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
            border: 2px solid #10b981;
            box-shadow: 0 10px 28px rgba(16, 185, 129, 0.18);
        }

        .driver-pin-hero,
        .driver-dest-hero {
            background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
            border: 2px solid #3b82f6;
            box-shadow: 0 10px 28px rgba(59, 130, 246, 0.15);
        }

        .driver-route-hero-kicker,
        .driver-pin-hero-kicker {
            margin: 0 0 0.5rem;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #047857;
        }

        .driver-pin-hero-kicker {
            color: #1d4ed8;
        }

        .driver-route-hero-btn,
        .driver-pin-hero-btn {
            background: #059669;
            color: #fff;
            border: none;
            border-radius: 1rem;
            padding: 0.85rem 1rem;
            font-size: 0.72rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            box-shadow: 0 6px 18px rgba(5, 150, 105, 0.28);
        }

        .driver-pin-hero-btn {
            background: #2563eb;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
        }

        .driver-route-hero-label {
            margin: 0;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            opacity: 0.9;
        }

        .driver-route-hero-addr {
            margin: 0.2rem 0 0;
            font-size: 0.72rem;
            font-weight: 700;
            line-height: 1.3;
            opacity: 0.95;
        }

        .driver-pin-hero-hint {
            margin: 0;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1.35;
            color: #1e40af;
        }

        /* Al minimizar el panel NO mantener el botÃ³n de ruta GMaps a pantalla grande */
        body.trip-active #control-panel.panel-collapsed #driver-route-hero,
        body.trip-active #control-panel.panel-collapsed #driver-destination-controls,
        body.trip-active #control-panel.panel-collapsed #driver-panel-pin,
        body.trip-active.panel-minimized #control-panel #driver-route-hero,
        body.trip-active.panel-minimized #control-panel #driver-destination-controls,
        body.trip-active.panel-minimized #control-panel #driver-panel-pin {
            display: none !important;
        }

        html[data-theme="dark"] .driver-route-hero {
            background: linear-gradient(180deg, #064e3b 0%, #065f46 100%);
            border-color: #34d399;
        }

        html[data-theme="dark"] .driver-pin-hero,
        html[data-theme="dark"] .driver-dest-hero {
            background: linear-gradient(180deg, #1e3a8a 0%, #1e40af 100%);
            border-color: #60a5fa;
        }

        html[data-theme="dark"] .driver-route-hero-kicker {
            color: #6ee7b7;
        }

        html[data-theme="dark"] .driver-pin-hero-kicker {
            color: #93c5fd;
        }

        html[data-theme="dark"] .driver-pin-hero-hint {
            color: #bfdbfe;
        }

        .driver-offer-distance-hero {
            margin-bottom: 0.75rem;
            padding: 0.75rem 0.85rem;
            border-radius: 1rem;
            background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
            border: 2px solid #f59e0b;
            box-shadow: 0 6px 18px rgba(245, 158, 11, 0.15);
        }

        .driver-offer-distance-kicker {
            margin: 0 0 0.5rem;
            font-size: 0.6rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #b45309;
            text-align: center;
        }

        .driver-offer-distance-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            justify-content: center;
            margin-bottom: 0.45rem;
        }

        .driver-offer-dist-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.62rem;
            font-weight: 800;
            padding: 0.3rem 0.55rem;
            border-radius: 9999px;
            background: #fff;
            border: 1px solid rgba(0, 0, 0, 0.08);
            color: #374151;
        }

        .driver-offer-dist-pickup {
            color: #1d4ed8;
            border-color: #bfdbfe;
            background: #eff6ff;
        }

        .driver-offer-dist-trip {
            color: #047857;
            border-color: #a7f3d0;
            background: #ecfdf5;
        }

        .driver-offer-dist-total {
            color: #b45309;
            border-color: #fcd34d;
            background: #fffbeb;
        }

        .driver-offer-dist-time {
            color: #6d28d9;
            border-color: #ddd6fe;
            background: #f5f3ff;
        }

        .driver-offer-distance-hint {
            margin: 0;
            font-size: 0.62rem;
            font-weight: 700;
            line-height: 1.35;
            text-align: center;
            color: #92400e;
        }

        html[data-theme="dark"] .driver-offer-distance-hero {
            background: linear-gradient(180deg, #451a03 0%, #78350f 100%);
            border-color: #fbbf24;
        }

        html[data-theme="dark"] .driver-offer-distance-kicker,
        html[data-theme="dark"] .driver-offer-distance-hint {
            color: #fde68a;
        }

        html[data-theme="dark"] .driver-offer-dist-chip {
            background: rgba(0, 0, 0, 0.25);
            border-color: rgba(255, 255, 255, 0.12);
            color: #f3f4f6;
        }

        .driver-assigned-card {
            background: #fff;
            border-color: #e2e8f0;
        }

        .driver-assigned-card.driver-view-passenger {
            background: #fff;
            border-color: #e2e8f0;
            box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
        }

        .driver-assigned-status {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            padding: 12px 16px;
            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
            color: #fff;
        }

        .driver-assigned-status.tone-en-route {
            background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
        }

        .driver-assigned-status.tone-arrived {
            background: linear-gradient(135deg, #047857 0%, #22c55e 100%);
        }

        .driver-assigned-status.tone-reserved {
            background: linear-gradient(135deg, #b45309 0%, #f59e0b 100%);
        }

        .driver-assigned-status-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

        .driver-status-badge {
            font-size: 13px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            line-height: 1.2;
        }

        .driver-status-sub {
            font-size: 10px;
            font-weight: 600;
            opacity: 0.92;
            line-height: 1.3;
        }

        .driver-status-eta {
            flex-shrink: 0;
            font-size: 18px;
            font-weight: 900;
            background: rgba(255, 255, 255, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.35);
            border-radius: 12px;
            padding: 6px 10px;
            line-height: 1;
        }

        .driver-vehicle-panel {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .driver-plate-badge {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 4px;
            padding: 14px 12px;
            border-radius: 14px;
            border: 2px solid #1e293b;
            background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        }

        .driver-assigned-card.vehicle-moto .driver-plate-badge {
            border-color: #6d28d9;
            background: linear-gradient(180deg, #f5f3ff 0%, #ede9fe 100%);
        }

        .driver-assigned-card.vehicle-taxi .driver-plate-badge {
            border-color: #ca8a04;
            background: linear-gradient(180deg, #fefce8 0%, #fef08a 100%);
        }

        .driver-plate-label {
            font-size: 9px;
            font-weight: 900;
            letter-spacing: 0.2em;
            text-transform: uppercase;
            color: #64748b;
        }

        .driver-plate-value {
            font-size: 26px;
            font-weight: 900;
            letter-spacing: 0.12em;
            color: #0f172a;
            line-height: 1;
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
        }

        .driver-vehicle-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            padding: 10px;
            border-radius: 14px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .driver-vehicle-row {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }

        .driver-vehicle-row-full {
            grid-column: 1 / -1;
        }

        .driver-vehicle-key {
            font-size: 9px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #64748b;
        }

        .driver-vehicle-val {
            font-size: 11px;
            font-weight: 800;
            color: #0f172a;
            text-transform: uppercase;
            line-height: 1.25;
            word-break: break-word;
        }

        .driver-vehicle-photos-label {
            font-size: 9px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
            margin-bottom: 8px;
        }

        .driver-vehicle-photos-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .driver-vehicle-photo-card {
            display: flex;
            flex-direction: column;
            gap: 4px;
            border-radius: 12px;
            overflow: hidden;
            border: 1px solid #e2e8f0;
            background: #fff;
            text-decoration: none;
            transition: transform 0.12s ease, box-shadow 0.12s ease;
        }

        .driver-vehicle-photo-card:active {
            transform: scale(0.98);
        }

        .driver-vehicle-photo-card img {
            width: 100%;
            aspect-ratio: 4 / 3;
            object-fit: cover;
            background: #f1f5f9;
            display: block;
        }

        .driver-vehicle-photo-card span {
            font-size: 9px;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #475569;
            text-align: center;
            padding: 6px 4px 8px;
        }

        .driver-license-photo-card img {
            aspect-ratio: 3 / 2;
            object-fit: contain;
            background: #f8fafc;
        }

        .demand-heatmap-legend {
            background: rgba(255, 255, 255, 0.94);
            border: 1px solid #fecaca;
            border-radius: 14px;
            padding: 8px 12px;
            box-shadow: 0 8px 24px rgba(185, 28, 28, 0.18);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            z-index: 45;
        }

        /* Chip de ciudad siempre accesible (pasajeros y conductores) â€” no ocultar por heatmap */

        .demand-legend-pulse {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 999px;
            background: linear-gradient(135deg, #ef4444, #b91c1c);
            color: #fff;
            font-size: 11px;
            font-weight: 900;
            animation: demand-legend-bounce 1.8s ease-in-out infinite;
        }

        @keyframes demand-legend-bounce {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-3px); }
        }

        .demand-hotspot {
            position: relative;
            width: 42px;
            height: 52px;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            pointer-events: none;
            transform: translateY(-6px);
        }

        .demand-dollar-float {
            position: absolute;
            bottom: 0;
            font-size: 15px;
            font-weight: 900;
            color: #fef08a;
            text-shadow: 0 1px 0 #b45309, 0 2px 6px rgba(127, 29, 29, 0.55);
            animation: demand-dollar-rise 2.4s ease-in-out infinite;
            opacity: 0;
        }

        .demand-dollar-float:nth-child(1) { left: 4px; font-size: 13px; }
        .demand-dollar-float:nth-child(2) { left: 14px; font-size: 16px; }
        .demand-dollar-float:nth-child(3) { left: 24px; font-size: 14px; }
        .demand-dollar-float:nth-child(4) { left: 10px; font-size: 18px; }

        @keyframes demand-dollar-rise {
            0% { opacity: 0; transform: translateY(10px) scale(0.65); }
            18% { opacity: 1; transform: translateY(0) scale(1); }
            72% { opacity: 0.92; transform: translateY(-22px) scale(1.08); }
            100% { opacity: 0; transform: translateY(-38px) scale(0.8); }
        }

        .demand-hotspot-count {
            position: absolute;
            bottom: -2px;
            right: -4px;
            min-width: 16px;
            height: 16px;
            padding: 0 4px;
            border-radius: 999px;
            background: #7f1d1d;
            color: #fff;
            font-size: 8px;
            font-weight: 900;
            line-height: 16px;
            text-align: center;
            border: 1.5px solid #fef08a;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
        }

        .demand-hotspot-tier-3 .demand-dollar-float,
        .demand-hotspot-tier-4 .demand-dollar-float {
            color: #fde047;
            text-shadow: 0 1px 0 #a16207, 0 2px 8px rgba(127, 29, 29, 0.65);
        }

        html[data-theme="dark"] .demand-heatmap-legend {
            background: rgba(15, 23, 42, 0.92) !important;
            border-color: #7f1d1d !important;
        }

        html[data-theme="dark"] #demand-heatmap-legend-text {
            color: #fecaca !important;
        }

        .trip-actions-sticky {
            position: relative;
            z-index: 20;
            isolation: isolate;
            flex-shrink: 0;
            padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
        }

        #searching-state [data-trip-action],
        #rating-screen [data-trip-action],
        #cancellation-survey-screen [data-trip-action],
        #nav-hud-bottom [data-trip-action],
        .nav-fab[data-trip-action] {
            z-index: 6;
        }

        .star-btn,
        .tip-btn {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            min-width: 44px;
            min-height: 44px;
        }

        #chat-section:not(.collapsed) {
            position: relative;
            z-index: 8;
        }

        .svc-star-badge {
            position: absolute;
            top: 4px;
            right: 4px;
            background: #7c3aed;
            color: white;
            font-size: 8px;
            font-weight: 900;
            width: 16px;
            height: 16px;
            border-radius: 999px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid white;
            pointer-events: none;
        }

        .svc-star-badge.svc-star-amber {
            background: #d97706;
            width: auto;
            min-width: 22px;
            padding: 0 4px;
            font-size: 7px;
        }

        .service-type-moto.active {
            border-color: #7c3aed !important;
            background: #f5f3ff !important;
            color: #6d28d9 !important;
        }

        .service-type-delivery.active {
            border-color: #d97706 !important;
            background: #fffbeb !important;
            color: #b45309 !important;
        }

        .service-type-flete.active,
        #svc-btn-flete_paila.service-type-btn.active {
            border-color: #059669 !important;
            background: #ecfdf5 !important;
            color: #047857 !important;
        }

        #svc-btn-flete_camion.service-type-btn.active {
            border-color: #475569 !important;
            background: #f1f5f9 !important;
            color: #334155 !important;
        }

        .service-type-grua.active,
        #svc-btn-grua.service-type-btn.active {
            border-color: #e11d48 !important;
            background: #fff1f2 !important;
            color: #9f1239 !important;
            box-shadow: 0 4px 14px rgba(225, 29, 72, 0.18);
        }

        .favorite-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.4rem 0.65rem;
            border-radius: 999px;
            border: 1px solid #e2e8f0;
            background: white;
            font-size: 10px;
            font-weight: 800;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .favorite-chip:active {
            transform: scale(0.96);
            background: #f1f5f9;
        }

        .favorite-chip-save {
            border-color: #bfdbfe;
            color: #2563eb;
            background: #eff6ff;
        }

        .add-extra-stop-btn {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            width: 100%;
            margin-top: 0.55rem;
            padding: 0.7rem 0.85rem;
            border-radius: 1rem;
            border: 1.5px dashed #93c5fd;
            background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 55%, #ffffff 100%);
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
            text-align: left;
            transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
        }

        .add-extra-stop-btn:active {
            transform: scale(0.98);
        }

        .add-extra-stop-btn.is-active {
            border-style: solid;
            border-color: #3b82f6;
            background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
        }

        .add-extra-stop-btn-icon {
            flex-shrink: 0;
            width: 2.35rem;
            height: 2.35rem;
            border-radius: 0.8rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(145deg, #2563eb 0%, #3b82f6 100%);
            color: #fff;
            font-size: 0.95rem;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
        }

        .add-extra-stop-btn-text {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.15rem;
        }

        .add-extra-stop-btn-label {
            font-size: 0.72rem;
            font-weight: 900;
            color: #1e3a8a;
            letter-spacing: 0.02em;
            line-height: 1.2;
        }

        .add-extra-stop-btn-badge {
            display: inline-flex;
            align-items: center;
            font-size: 0.56rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #1d4ed8;
            background: rgba(255, 255, 255, 0.88);
            border: 1px solid #bfdbfe;
            border-radius: 9999px;
            padding: 0.1rem 0.42rem;
        }

        .add-extra-stop-btn-chevron {
            flex-shrink: 0;
            font-size: 0.62rem;
            color: #3b82f6;
            transition: transform 0.2s ease;
        }

        .add-extra-stop-btn.is-active .add-extra-stop-btn-chevron {
            transform: rotate(180deg);
        }

        @media (max-width: 380px) {
            .add-extra-stop-btn {
                padding: 0.5rem 0.6rem;
                gap: 0.4rem;
                margin-top: 0.35rem;
            }
            .add-extra-stop-btn-icon {
                width: 1.9rem;
                height: 1.9rem;
                font-size: 0.8rem;
            }
            .add-extra-stop-btn-label {
                font-size: 0.65rem;
            }
        }

        html[data-theme="dark"] .add-extra-stop-btn {
            border-color: #3b82f6;
            background: linear-gradient(135deg, #1e3a5f 0%, #172554 100%);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
        }

        html[data-theme="dark"] .add-extra-stop-btn-label {
            color: #dbeafe;
        }

        html[data-theme="dark"] .add-extra-stop-btn-badge {
            color: #93c5fd;
            background: rgba(15, 23, 42, 0.65);
            border-color: #334155;
        }

        /* Cleaner extra stops adder - no longer looks like a separate heavy panel */
        #standard-stops-adder {
            box-shadow: none;
        }
        #standard-stops-adder .trip-input-field {
            font-size: 0.9rem;
        }

        /* Very small screens (Samsung A16 etc ~360px) */
        @media (max-width: 380px) {
            #standard-stops-adder {
                padding: 0.4rem 0.5rem;
                margin-top: 0.35rem;
            }
            #standard-stops-adder .relative.flex.gap-1\.5 {
                gap: 0.25rem;
            }
            #standard-stops-adder .w-11 {
                width: 2rem !important;
            }
            #standard-stops-adder .text-\[8\.5px\] {
                font-size: 7px;
                line-height: 1.1;
            }
            #standard-stops-adder .flex.gap-2 {
                gap: 0.3rem;
            }
            #standard-stops-adder button {
                font-size: 9px !important;
                padding-top: 0.35rem !important;
                padding-bottom: 0.35rem !important;
            }
        }

        #fare-card.fare-moto {
            background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 55%, #8b5cf6 100%);
        }

        #fare-card.fare-delivery {
            background: linear-gradient(135deg, #b45309 0%, #d97706 55%, #f59e0b 100%);
        }

        #fare-card.fare-flete-paila {
            background: linear-gradient(135deg, #047857 0%, #059669 55%, #10b981 100%);
        }

        #fare-card.fare-flete-camion {
            background: linear-gradient(135deg, #334155 0%, #475569 55%, #64748b 100%);
        }

        #fare-card.fare-grua {
            background: linear-gradient(135deg, #9f1239 0%, #e11d48 55%, #fb7185 100%);
        }

        /* Selector de personas al pedir viaje (obligatorio 1–4) — tarjeta expandible */
        /* Progresión de pedir viaje: FLOTANTE sobre el mapa (NO en el panel central) */
        .booking-float-layer {
            position: fixed;
            left: max(0.65rem, var(--safe-left, env(safe-area-inset-left, 0px)));
            right: max(0.65rem, var(--safe-right, env(safe-area-inset-right, 0px)));
            bottom: max(0.85rem, calc(0.55rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))));
            z-index: 620;
            pointer-events: none;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            max-height: min(62vh, 34rem);
        }
        .booking-float-layer.hidden {
            display: none !important;
        }
        .booking-float-stack,
        .passenger-booking-progress {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            min-width: 0;
            max-height: inherit;
            overflow-x: hidden;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            pointer-events: auto;
            padding-bottom: 0.15rem;
        }
        .booking-float-card,
        .booking-progress-step {
            min-width: 0;
            pointer-events: auto;
            border-radius: 1.15rem;
            background: #fff;
            border: 1px solid #e2e8f0;
            box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18), 0 2px 8px rgba(15, 23, 42, 0.08);
            padding: 0.65rem 0.7rem 0.7rem;
        }
        .booking-progress-step.hidden {
            display: none !important;
        }
        .booking-progress-step--appear {
            animation: booking-progress-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
        }
        @keyframes booking-progress-in {
            from {
                opacity: 0;
                transform: translateY(18px) scale(0.96);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        .booking-progress-step--active .add-extra-stop-btn {
            border-style: solid;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.16);
        }
        /* Con tarjetas flotantes: panel minimizado + FAB para reabrir origen/destino */
        body.booking-float-active.client-mode .panel-expand-fab {
            display: inline-flex !important;
            bottom: calc(5.75rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            z-index: 630 !important;
        }
        body.booking-float-active.client-mode.panel-minimized #control-panel,
        body.booking-float-active.client-mode #control-panel.panel-collapsed {
            /* deja el mapa libre; la interacción es en las tarjetas flotantes */
            max-height: 0 !important;
            min-height: 0 !important;
            opacity: 0;
            pointer-events: none;
            overflow: hidden !important;
        }
        body.is-searching .booking-float-layer,
        body.trip-active .booking-float-layer,
        body.passenger-mode-home .booking-float-layer,
        body.driver-mode .booking-float-layer,
        body.map-pick-mode .booking-float-layer {
            display: none !important;
        }
        html[data-theme="dark"] .booking-float-card,
        html[data-theme="dark"] .booking-progress-step {
            background: #0f172a;
            border-color: #334155;
            box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
        }
        .trip-step-passengers {
            padding: 0.75rem 0.85rem 0.85rem;
        }
        .trip-passengers-wrap {
            transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
        }
        .trip-passengers-wrap--missing .add-passengers-btn {
            border-color: #f59e0b !important;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #ffffff 100%) !important;
            box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
            animation: trip-pax-pulse 1.4s ease-in-out infinite;
        }
        .trip-passengers-wrap--missing .add-passengers-btn .add-extra-stop-btn-icon {
            background: linear-gradient(145deg, #d97706 0%, #f59e0b 100%);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
        }
        .trip-passengers-wrap--missing .add-passengers-btn .add-extra-stop-btn-label {
            color: #92400e;
        }
        .trip-passengers-wrap--missing .add-passengers-btn .add-extra-stop-btn-badge {
            color: #b45309;
            border-color: #fcd34d;
            background: rgba(255, 255, 255, 0.95);
        }
        @keyframes trip-pax-pulse {
            0%, 100% { box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22); }
            50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12); }
        }
        .trip-pax-chip[aria-pressed="true"] {
            transform: scale(1.04);
        }
        .add-passengers-btn {
            margin-top: 0;
        }
        .add-passengers-btn.is-chosen:not(.is-active) {
            border-style: solid;
            border-color: #34d399;
            background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 55%, #ffffff 100%);
        }
        .add-passengers-btn.is-chosen:not(.is-active) .add-extra-stop-btn-icon {
            background: linear-gradient(145deg, #059669 0%, #10b981 100%);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28);
        }
        .add-passengers-btn.is-chosen:not(.is-active) .add-extra-stop-btn-label {
            color: #065f46;
        }
        .add-passengers-btn.is-chosen:not(.is-active) .add-extra-stop-btn-badge {
            color: #047857;
            border-color: #a7f3d0;
            background: rgba(255, 255, 255, 0.92);
        }
        .trip-passengers-adder {
            margin-top: 0.55rem;
            padding: 0.65rem 0.7rem 0.75rem;
            background: #f8fafc;
            border-radius: 0.9rem;
            border: 1px solid #e2e8f0;
            box-shadow: none;
        }
        .trip-step-when {
            padding: 0.75rem 0.85rem 0.85rem;
        }
        .add-service-btn {
            margin-top: 0;
        }
        .add-service-btn .add-extra-stop-btn-icon {
            background: linear-gradient(145deg, #1d4ed8 0%, #2563eb 100%);
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
        }
        .add-service-btn:not(.is-active) {
            border-color: #93c5fd;
            background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ffffff 100%);
        }
        .add-service-btn:not(.is-active) .add-extra-stop-btn-label {
            color: #1e3a8a;
        }
        .add-service-btn:not(.is-active) .add-extra-stop-btn-badge {
            color: #2563eb;
            border-color: #bfdbfe;
        }
        .add-service-btn.is-chosen:not(.is-active) {
            border-style: solid;
            border-color: #60a5fa;
            background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #ffffff 100%);
        }
        .trip-service-adder {
            margin-top: 0.55rem;
            padding: 0.65rem 0.7rem 0.75rem;
            background: #f8fafc;
            border-radius: 0.9rem;
            border: 1px solid #e2e8f0;
            box-shadow: none;
        }
        .trip-service-adder .trip-service-picker {
            grid-template-columns: repeat(auto-fit, minmax(4.6rem, 1fr));
        }
        .trip-service-adder .trip-ride-options {
            margin-top: 0.65rem;
        }
        .trip-service-choice-wrap--missing .add-service-btn {
            border-color: #3b82f6 !important;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 55%, #ffffff 100%) !important;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
        }
        html[data-theme="dark"] .add-service-btn:not(.is-active) {
            border-color: #1d4ed8;
            background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
        }
        html[data-theme="dark"] .add-service-btn:not(.is-active) .add-extra-stop-btn-label {
            color: #bfdbfe;
        }
        html[data-theme="dark"] .trip-service-adder {
            background: #0f172a;
            border-color: #334155;
        }
        html[data-theme="dark"] .add-service-btn.is-chosen:not(.is-active) {
            border-color: #2563eb;
            background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
        }
        html[data-theme="dark"] .add-service-btn.is-chosen:not(.is-active) .add-extra-stop-btn-label {
            color: #93c5fd;
        }

        .add-when-btn {
            margin-top: 0;
        }
        .add-when-btn .add-extra-stop-btn-icon {
            background: linear-gradient(145deg, #7c3aed 0%, #8b5cf6 100%);
            box-shadow: 0 4px 12px rgba(124, 58, 237, 0.28);
        }
        .add-when-btn:not(.is-active) {
            border-color: #c4b5fd;
            background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 55%, #ffffff 100%);
        }
        .add-when-btn:not(.is-active) .add-extra-stop-btn-label {
            color: #5b21b6;
        }
        .add-when-btn:not(.is-active) .add-extra-stop-btn-badge {
            color: #7c3aed;
            border-color: #ddd6fe;
        }
        .add-when-btn.is-chosen:not(.is-active) {
            border-style: solid;
            border-color: #a78bfa;
            background: linear-gradient(135deg, #f5f3ff 0%, #faf5ff 55%, #ffffff 100%);
        }
        .add-when-btn.is-chosen.is-later:not(.is-active) {
            border-color: #f59e0b;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #ffffff 100%);
        }
        .add-when-btn.is-chosen.is-later:not(.is-active) .add-extra-stop-btn-icon {
            background: linear-gradient(145deg, #d97706 0%, #f59e0b 100%);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.28);
        }
        .add-when-btn.is-chosen.is-later:not(.is-active) .add-extra-stop-btn-label {
            color: #92400e;
        }
        .add-when-btn.is-chosen.is-later:not(.is-active) .add-extra-stop-btn-badge {
            color: #b45309;
            border-color: #fcd34d;
        }
        .trip-when-adder {
            margin-top: 0.55rem;
            padding: 0.65rem 0.7rem 0.75rem;
            background: #f8fafc;
            border-radius: 0.9rem;
            border: 1px solid #e2e8f0;
            box-shadow: none;
        }
        .trip-when-adder .trip-when-panel {
            margin: 0;
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none;
        }
        .trip-step-request {
            padding: 0.75rem 0.85rem 0.85rem;
        }
        .trip-step-badge--request {
            background: linear-gradient(145deg, #059669 0%, #10b981 100%);
        }
        html[data-theme="dark"] .add-when-btn:not(.is-active) {
            border-color: #6d28d9;
            background: linear-gradient(135deg, #2e1065 0%, #1e1b4b 100%);
        }
        html[data-theme="dark"] .add-when-btn:not(.is-active) .add-extra-stop-btn-label {
            color: #ddd6fe;
        }
        html[data-theme="dark"] .trip-when-adder {
            background: #0f172a;
            border-color: #334155;
        }
        html[data-theme="dark"] .add-when-btn.is-chosen.is-later:not(.is-active) {
            border-color: #d97706;
            background: linear-gradient(135deg, #451a03 0%, #0f172a 100%);
        }
        html[data-theme="dark"] .add-when-btn.is-chosen.is-later:not(.is-active) .add-extra-stop-btn-label {
            color: #fde68a;
        }
        .trip-request-hint {
            margin: 0.55rem 0 0;
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
            line-height: 1.35;
            text-align: center;
        }
        .trip-step-request.is-ready .trip-request-hint {
            display: none;
        }
        html[data-theme="dark"] .trip-passengers-adder {
            background: #0f172a;
            border-color: #334155;
        }
        html[data-theme="dark"] .trip-request-hint {
            color: #64748b;
        }
        html[data-theme="dark"] .add-passengers-btn.is-chosen:not(.is-active) {
            border-color: #059669;
            background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
        }
        html[data-theme="dark"] .add-passengers-btn.is-chosen:not(.is-active) .add-extra-stop-btn-label {
            color: #a7f3d0;
        }

        .login-screen, .setup-screen, .rating-screen, .cancellation-survey-screen { 
            background: linear-gradient(165deg, #041e42 0%, var(--hn-blue) 38%, #0f4c8a 68%, #1e5f9e 100%);
            z-index: 10000; 
            position: fixed;
            inset: 0;
            overflow-y: auto;
            padding-top: var(--safe-top, env(safe-area-inset-top, 0px));
            padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
            padding-left: var(--safe-left, env(safe-area-inset-left, 0px));
            padding-right: var(--safe-right, env(safe-area-inset-right, 0px));
            box-sizing: border-box;
        }

        /* Auth / rating: inset real del sistema (como WhatsApp), sin forzar cm fijos */
        body.capacitor-native .login-screen,
        body.capacitor-native .setup-screen,
        body.capacitor-native .rating-screen,
        body.capacitor-native .cancellation-survey-screen,
        body.capacitor-android .login-screen,
        body.capacitor-android .setup-screen,
        body.capacitor-android .rating-screen,
        body.capacitor-android .cancellation-survey-screen {
            padding-top: calc(var(--safe-top, 0px) + 0.35rem) !important;
            padding-bottom: calc(var(--safe-bottom, 0px) + 0.35rem) !important;
            padding-left: var(--safe-left, 0px) !important;
            padding-right: var(--safe-right, 0px) !important;
        }

        .rating-screen.rating-screen-driver-overlay {
            inset: auto 0 0 0;
            top: auto;
            max-height: 72dvh;
            z-index: 13000;
            background: linear-gradient(180deg, rgba(4, 30, 66, 0.15) 0%, rgba(4, 30, 66, 0.92) 28%, #0f4c8a 100%);
            align-items: flex-end;
            padding-top: 0;
            padding-bottom: max(1rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-rating-active.driver-mode #control-panel {
            display: none !important;
        }

        body.driver-rating-active #driver-incoming-offer:not(.hidden) {
            position: fixed;
            left: max(10px, var(--safe-left, env(safe-area-inset-left, 0px)));
            right: max(10px, var(--safe-right, env(safe-area-inset-right, 0px)));
            top: max(72px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 56px));
            z-index: 10050;
            margin: 0;
        }

        /* --- LOGIN MÓVIL: logo hero grande --- */
        /* El safe-area ya lo aplica .login-screen; aquí solo respiro visual */
        .login-hero {
            padding-top: 2rem;
        }

        body.capacitor-native .login-hero {
            padding-top: 0.75rem;
        }

        .login-logo-wrap {
            position: relative;
            width: clamp(7.5rem, 38vw, 10.5rem);
            height: clamp(7.5rem, 38vw, 10.5rem);
            margin-bottom: 1.25rem;
        }

        .login-logo-glow {
            position: absolute;
            inset: -14px;
            border-radius: 50%;
            background: radial-gradient(circle, rgba(59, 130, 246, 0.55) 0%, rgba(14, 165, 233, 0.2) 45%, transparent 72%);
            filter: blur(10px);
            animation: login-glow-pulse 3s ease-in-out infinite;
        }

        @keyframes login-glow-pulse {
            0%, 100% { opacity: 0.75; transform: scale(0.96); }
            50% { opacity: 1; transform: scale(1.04); }
        }

        .login-logo-box {
            position: relative;
            z-index: 1;
            width: 100%;
            height: 100%;
            border-radius: 2rem;
            background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
            box-shadow:
                0 22px 50px rgba(0, 0, 0, 0.38),
                0 0 0 1px rgba(255, 255, 255, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            padding: 0.85rem;
        }

        .login-logo-img,
        .auth-hero-logo-img {
            width: 100%;
            height: 100%;
            object-fit: contain;
            display: none;
        }

        .login-logo-img.auth-logo-loaded,
        .login-logo-box .auth-hero-logo-img.auth-logo-loaded,
        #login-firebase-logo.auth-logo-loaded {
            display: block !important;
        }

        .driver-setup-mini-logo.auth-logo-loaded {
            display: block !important;
            width: 2rem;
            height: 2rem;
        }

        .login-logo-fallback {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 1.35rem;
            overflow: hidden;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 55%, #0ea5e9 100%);
            color: white;
            font-size: clamp(2.75rem, 12vw, 3.75rem);
            box-shadow: inset 0 -4px 12px rgba(0, 0, 0, 0.15);
        }

        .login-default-icon-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: inherit;
        }

        .login-brand-title {
            font-size: clamp(1.85rem, 8vw, 2.35rem);
            font-weight: 900;
            letter-spacing: -0.03em;
            color: #ffffff;
            line-height: 1.1;
            text-shadow: 0 2px 20px rgba(37, 99, 235, 0.35);
        }

        .login-brand-sub {
            margin-top: 0.35rem;
            font-size: 0.7rem;
            font-weight: 700;
            letter-spacing: 0.22em;
            text-transform: uppercase;
            color: rgba(191, 219, 254, 0.95);
        }

        .login-brand-tagline {
            margin-top: 0.4rem;
            font-size: 0.72rem;
            font-weight: 600;
            color: rgba(226, 232, 240, 0.75);
            letter-spacing: 0.02em;
        }

        .hn-flag-stripe {
            height: 3px;
            background: linear-gradient(90deg, var(--hn-blue) 0%, var(--hn-blue) 33%, #ffffff 33%, #ffffff 66%, var(--hn-blue) 66%, var(--hn-blue) 100%);
        }

        .service-type-btn.active {
            transform: scale(1.02);
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
        }

        .service-type-btn.active[data-svc="moto"],
        #svc-btn-moto.service-type-btn.active {
            border-color: #7c3aed !important;
            background: #f5f3ff !important;
            color: #6d28d9 !important;
            box-shadow: 0 4px 14px rgba(124, 58, 237, 0.2);
        }

        .service-type-btn.active[data-svc="delivery"],
        #svc-btn-delivery.service-type-btn.active {
            border-color: #d97706 !important;
            background: #fffbeb !important;
            color: #b45309 !important;
            box-shadow: 0 4px 14px rgba(217, 119, 6, 0.2);
        }

        #svc-btn-flete_paila.service-type-btn.active {
            border-color: #059669 !important;
            background: #ecfdf5 !important;
            color: #047857 !important;
            box-shadow: 0 4px 14px rgba(5, 150, 105, 0.2);
        }

        #svc-btn-flete_camion.service-type-btn.active {
            border-color: #475569 !important;
            background: #f1f5f9 !important;
            color: #334155 !important;
            box-shadow: 0 4px 14px rgba(71, 85, 105, 0.2);
        }

        #fare-card.fare-moto { background: linear-gradient(135deg, #6d28d9, #7c3aed) !important; }
        #fare-card.fare-delivery { background: linear-gradient(135deg, #d97706, #f59e0b) !important; }
        #fare-card.fare-flete-paila { background: linear-gradient(135deg, #047857, #10b981) !important; }
        #fare-card.fare-flete-camion { background: linear-gradient(135deg, #334155, #64748b) !important; }
        #fare-card.fare-grua { background: linear-gradient(135deg, #9f1239, #e11d48) !important; }

        .login-welcome-msg {
            margin-top: 0.65rem;
            font-size: 0.8rem;
            font-weight: 600;
            color: rgba(226, 232, 240, 0.85);
            max-width: 18rem;
            margin-left: auto;
            margin-right: auto;
            line-height: 1.35;
        }

        .login-card {
            background: #ffffff;
            border-top: 1px solid rgba(255, 255, 255, 0.6);
        }

        .auth-form-scroll {
            scrollbar-width: thin;
            scrollbar-color: #cbd5e1 transparent;
        }

        /* Login mÃ¡s compacto en celular */
        @media (max-width: 639px) {
            .login-hero {
                padding-top: 0.85rem;
                padding-bottom: 0.35rem;
            }

            body.capacitor-native .login-hero {
                padding-top: 0.55rem;
            }

            .login-logo-wrap {
                width: clamp(4.5rem, 24vw, 5.5rem);
                height: clamp(4.5rem, 24vw, 5.5rem);
                margin-bottom: 0.5rem;
            }

            .login-brand-title {
                font-size: 1.45rem;
            }

            .login-brand-sub {
                font-size: 0.58rem;
            }

            .login-brand-tagline {
                font-size: 0.6rem;
                margin-top: 0.2rem;
            }

            .login-card {
                padding-top: 1.25rem !important;
            }
        }

        .login-hero-compact .login-logo-wrap {
            width: clamp(3rem, 14vw, 3.75rem);
            height: clamp(3rem, 14vw, 3.75rem);
            margin-bottom: 0.25rem;
        }

        .login-hero-compact .login-brand-title { font-size: 1rem; }
        .login-hero-compact .login-brand-sub { font-size: 0.52rem; }
        .login-hero-compact .login-brand-tagline { font-size: 0.5rem; }

        /* Registro conductor â€” mÃ³vil primero, formulario completo con fotos */
        .driver-setup-screen {
            position: fixed;
            inset: 0;
            z-index: 20000;
            background: linear-gradient(165deg, #041e42 0%, var(--hn-blue) 38%, #0f4c8a 68%, #1e5f9e 100%);
            display: none;
            flex-direction: column;
            overflow: hidden;
        }

        .driver-setup-screen.auth-screen-open {
            display: flex !important;
        }

        .driver-setup-bar {
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            /* Pantalla full-screen fixed: sí necesita safe-top propio */
            padding: max(0.5rem, var(--safe-top, env(safe-area-inset-top, 0px))) 0.75rem 0.5rem;
            background: rgba(4, 30, 66, 0.92);
            border-bottom: 1px solid rgba(255, 255, 255, 0.12);
            min-height: 3.25rem;
            box-sizing: border-box;
        }

        body.capacitor-native .driver-setup-bar,
        body.capacitor-android .driver-setup-bar {
            /* Atrás/cerrar debajo del reloj (inset real + respiro táctil) */
            padding-top: calc(var(--safe-top, 0px) + 0.45rem) !important;
            padding-bottom: 0.55rem;
            min-height: calc(2.85rem + var(--safe-top, 0px));
        }

        .driver-setup-bar button,
        .driver-setup-bar [onclick] {
            min-width: 2.75rem;
            min-height: 2.75rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            touch-action: manipulation;
        }

        .driver-setup-bar-brand {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
        }

        .driver-setup-mini-logo {
            width: 2rem;
            height: 2rem;
            object-fit: contain;
            border-radius: 0.5rem;
            background: white;
            padding: 0.15rem;
        }

        .driver-setup-body {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 0.65rem 0.75rem 1.25rem;
            max-width: 28rem;
            width: 100%;
            margin: 0 auto;
        }

        .setup-step {
            background: #fff;
            border-radius: 1rem;
            padding: 0.75rem;
            margin-bottom: 0.55rem;
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
        }

        .setup-step-head {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            margin-bottom: 0.45rem;
        }

        .setup-step-num {
            width: 1.35rem;
            height: 1.35rem;
            border-radius: 999px;
            color: #fff;
            font-size: 0.65rem;
            font-weight: 900;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .setup-step-title {
            font-size: 0.82rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.2;
        }

        .setup-step-desc {
            font-size: 0.68rem;
            color: #64748b;
            line-height: 1.4;
            margin-bottom: 0.55rem;
        }

        .setup-input {
            width: 100%;
            padding: 0.7rem 0.8rem;
            border: 1px solid #e2e8f0;
            border-radius: 0.85rem;
            font-size: 0.9rem;
            background: #f8fafc;
            min-height: 2.8rem;
        }

        .setup-input:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
        }

        .driver-type-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.2rem;
            min-height: 3.25rem;
            padding: 0.6rem 0.35rem;
            border-radius: 0.95rem;
            border: 2px solid #e2e8f0;
            background: #f8fafc;
            font-size: 0.64rem;
            font-weight: 900;
            text-transform: uppercase;
            color: #64748b;
            transition: all 0.15s ease;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .driver-type-btn i { font-size: 1.15rem; }

        .driver-type-btn.active[data-type="auto"] {
            border-color: #2563eb;
            background: #eff6ff;
            color: #1d4ed8;
        }

        .driver-type-btn.active[data-type="moto"] {
            border-color: #7c3aed;
            background: #f5f3ff;
            color: #6d28d9;
        }

        .driver-type-btn.active[data-type="taxi"] {
            border-color: #ca8a04;
            background: #fefce8;
            color: #a16207;
        }

        .driver-type-btn.active[data-type="paila"] {
            border-color: #059669;
            background: #ecfdf5;
            color: #047857;
        }

        .driver-type-btn.active[data-type="camion"] {
            border-color: #475569;
            background: #f1f5f9;
            color: #334155;
        }

        .driver-type-btn.active[data-type="grua"],
        .driver-type-btn--grua.active {
            border-color: #e11d48;
            background: #fff1f2;
            color: #9f1239;
        }

        .driver-type-btn--flete span,
        .driver-type-btn--grua span {
            letter-spacing: 0.02em;
        }

        .freight-panel .trip-advanced-block-title {
            color: #047857;
        }

        .freight-panel textarea,
        .freight-panel input[type="text"],
        .freight-panel input[type="tel"] {
            border-color: #a7f3d0 !important;
        }

        .tow-panel .trip-advanced-block-title {
            color: #9f1239;
        }

        .tow-panel textarea,
        .tow-panel input[type="text"],
        .tow-panel input[type="tel"],
        .tow-panel select {
            border-color: #fecdd3 !important;
        }

        .tow-photo-slot img {
            width: 100%;
            height: 5.5rem;
            object-fit: cover;
            border-radius: 0.65rem;
        }

        .login-services-grid {
            display: grid;
            grid-template-columns: repeat(6, minmax(0, 1fr));
            gap: 0.35rem;
        }

        @media (max-width: 400px) {
            .login-services-grid {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        .setup-photo-slot {
            min-height: 3.75rem;
            background: #f1f5f9;
            border: 1px dashed #cbd5e1;
            border-radius: 0.8rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            text-align: center;
            padding: 0.25rem;
            overflow: hidden;
            touch-action: manipulation;
        }

        .setup-photo-slot img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            border-radius: 0.65rem;
        }

        .setup-photo-face {
            width: 6rem;
            height: 6rem;
            margin: 0 auto;
            border-radius: 1rem;
            border: 2px dashed #60a5fa;
            background: #eff6ff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            overflow: hidden;
            touch-action: manipulation;
        }

        .setup-photo-face img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .setup-photo-doc {
            min-height: 4.6rem;
        }

        @media (max-width: 420px) {
            .driver-type-btn {
                min-height: 3rem;
                padding: 0.5rem 0.25rem;
                font-size: 0.58rem;
            }
            .setup-photo-slot {
                min-height: 3.4rem;
            }
            .setup-photo-face {
                width: 5.5rem;
                height: 5.5rem;
            }
        }

        @media (min-width: 768px) {
            .login-screen {
                justify-content: center;
                padding: 1.5rem;
            }
            .login-hero {
                padding-top: 1.5rem;
            }
            .login-card {
                flex: 0 1 auto;
                border-radius: 2.5rem !important;
                margin-bottom: 1rem;
            }
        }

        /* --- INTERFAZ DE NAVEGACIÃ“N (compacta, no media pantalla) --- */
        #nav-hud-top {
            position: fixed;
            top: max(8px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 6px));
            left: 50%;
            transform: translateX(-50%);
            width: min(340px, calc(100vw - 1.25rem));
            max-width: min(340px, calc(100vw - 1.25rem));
            background: #0f766e;
            color: white;
            border-radius: 0.85rem;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
            z-index: 2100;
            display: none;
            flex-direction: column;
            align-items: stretch;
            gap: 0;
            padding: 0;
            overflow: hidden;
            pointer-events: auto;
            touch-action: none;
            max-height: 4.75rem;
        }

        #nav-hud-top.is-drag-positioned {
            transform: none;
        }

        #nav-hud-top.is-dragging {
            opacity: 0.94;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
            cursor: grabbing;
        }

        .nav-hud-top-chrome {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.35rem;
            padding: 0.12rem 0.4rem 0;
            cursor: grab;
            user-select: none;
            min-height: 1.35rem;
        }

        .nav-hud-top-drag-hint {
            font-size: 0.55rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.45);
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }

        .nav-hud-top-min-btn {
            width: 1.55rem;
            height: 1.55rem;
            border: 0;
            border-radius: 9999px;
            background: rgba(255, 255, 255, 0.16);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.68rem;
            flex-shrink: 0;
        }

        .nav-hud-top-expand-icon {
            display: none;
        }

        .nav-hud-top-body {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            padding: 0 0.6rem 0.45rem;
            min-height: 0;
        }

        .nav-hud-step-icon-wrap {
            width: 1.85rem;
            height: 1.85rem;
            border-radius: 9999px;
            background: rgba(255, 255, 255, 0.18);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .nav-hud-step-icon-wrap #nav-step-icon,
        .nav-hud-step-icon-wrap i {
            font-size: 0.85rem !important;
            color: #fff !important;
            line-height: 1;
        }

        .nav-hud-step-text {
            margin: 0;
            font-size: 0.82rem !important;
            font-weight: 800 !important;
            line-height: 1.15 !important;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 100%;
        }

        .nav-hud-step-dist {
            margin: 0.1rem 0 0;
            font-size: 0.65rem !important;
            font-weight: 600 !important;
            opacity: 0.85;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        body.nav-hud-top-minimized #nav-hud-top {
            width: auto !important;
            min-width: 2.75rem;
            max-width: none;
            max-height: none;
            border-radius: 9999px;
        }

        body.nav-hud-top-minimized #nav-hud-top .nav-hud-top-body,
        body.nav-hud-top-minimized #nav-hud-top .nav-hud-top-drag-hint {
            display: none;
        }

        body.nav-hud-top-minimized #nav-hud-top .nav-hud-top-chrome {
            padding: 0.4rem 0.45rem;
        }

        body.nav-hud-top-minimized #nav-hud-top .nav-hud-top-min-icon {
            display: none;
        }

        body.nav-hud-top-minimized #nav-hud-top .nav-hud-top-expand-icon {
            display: inline;
        }

        /* Base bottom: oculto; en driver-nav se convierte en chip pequeÃ±o */
        #nav-hud-bottom {
            position: absolute;
            bottom: 0;
            left: 0;
            width: auto;
            max-width: min(200px, 52vw);
            background: transparent;
            padding: 0;
            border-radius: 0.85rem;
            box-shadow: none;
            z-index: 2000;
            display: none;
        }

        .nav-hud-eta-kicker {
            font-size: 0.55rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.7);
        }

        .nav-hud-eta-time {
            font-size: 1.05rem !important;
            font-weight: 900 !important;
            line-height: 1 !important;
            color: #bbf7d0 !important;
        }

        .nav-hud-eta-meta {
            display: block;
            margin-top: 0.12rem;
            font-size: 0.58rem;
            font-weight: 700;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.75);
        }

        .nav-route-loading {
            position: absolute;
            inset: 0;
            z-index: 1850;
            display: flex;
            align-items: center;
            justify-content: center;
            pointer-events: none;
        }

        .nav-route-loading.hidden {
            display: none !important;
        }

        .nav-route-loading-card {
            background: rgba(255, 255, 255, 0.96);
            padding: 1.25rem 1.75rem;
            border-radius: 1.25rem;
            box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.75rem;
            border: 1px solid rgba(37, 99, 235, 0.12);
        }

        .nav-route-loading-spinner {
            width: 3rem;
            height: 3rem;
            border-radius: 9999px;
            background: #dbeafe;
            color: #2563eb;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
        }

        .nav-route-loading-text {
            margin: 0;
            font-size: 0.9rem;
            font-weight: 800;
            color: #1e3a5f;
            letter-spacing: 0.03em;
            text-transform: uppercase;
        }

        html[data-theme="dark"] .nav-route-loading-card {
            background: rgba(15, 23, 42, 0.94);
            border-color: rgba(96, 165, 250, 0.2);
        }

        html[data-theme="dark"] .nav-route-loading-text {
            color: #e2e8f0;
        }

        html[data-theme="dark"] .nav-route-loading-spinner {
            background: rgba(37, 99, 235, 0.2);
            color: #60a5fa;
        }

        .nav-fab {
            position: absolute;
            right: calc(0.75rem + var(--safe-right, 0px));
            width: 3rem;
            height: 3rem;
            background: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            z-index: 2200; /* above everything including expanded driver panel */
            color: #1e293b;
            cursor: pointer;
            border: 1px solid #f1f5f9;
            transition: all 0.3s ease;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }
        
        .nav-fab.active {
            background-color: #2563eb;
            color: white;
            border-color: #2563eb;
        }

        .nav-fab.hidden {
            display: none !important;
            pointer-events: none !important;
            visibility: hidden !important;
        }

        #fab-center {
            bottom: 210px;
            left: calc(0.75rem + var(--safe-left, 0px));
            width: auto;
            border-radius: 30px;
            padding: 0 20px;
            font-weight: 800;
            font-size: 12px;
            gap: 8px;
            color: #2563eb;
            min-height: 2.8rem;
        }
        #fab-traffic {
            bottom: 210px;
            right: calc(0.75rem + var(--safe-right, 0px));
        }

        #control-panel {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 100;
            width: 100%;
            /* CORTO a propósito: mapa usable; el contenido hace scroll */
            max-height: min(46dvh, 22rem);
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: rgba(255, 255, 255, 0.98);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-radius: 1.75rem 1.75rem 0 0;
            border-top: 1px solid rgba(226, 232, 240, 0.9);
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.15);
            padding: 0.1rem 0 0;
            padding-bottom: max(0.55rem, calc(0.35rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))));
            touch-action: pan-y;
            pointer-events: auto;
            cursor: grab;
            transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.38s;
        }

        #control-panel.is-dragging {
            cursor: grabbing;
        }

        #control-panel button,
        #control-panel a,
        #control-panel input,
        #control-panel textarea,
        #control-panel select,
        #control-panel label,
        #control-panel [data-trip-action],
        #control-panel [role="button"],
        #control-panel gmp-place-autocomplete {
            cursor: pointer;
        }

        #control-panel.panel-hidden {
            transform: translateY(100%);
            visibility: hidden;
            pointer-events: none;
        }

        .control-panel-header {
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            min-height: 2rem;
            margin-bottom: 0.55rem;
            flex-shrink: 0;
            cursor: grab;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
        }

        .control-panel-header:active {
            cursor: grabbing;
        }

        .control-panel-drag-hint {
            position: absolute;
            left: 0.65rem;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.55rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #94a3b8;
            pointer-events: none;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }

        .control-panel-grab {
            width: 48px;
            height: 5px;
            background: #cbd5e1;
            border-radius: 999px;
        }

        #control-panel.panel-is-floating {
            position: fixed !important;
            width: min(380px, calc(100vw - 1.25rem)) !important;
            /* Nunca más alto que la pantalla útil (si no, al pegarlo arriba se pierde el final) */
            max-height: min(70dvh, calc(100dvh - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 1rem), 480px) !important;
            left: 12px;
            right: auto !important;
            bottom: auto !important;
            border-radius: 1.25rem !important;
            border: 1px solid rgba(226, 232, 240, 0.95);
            box-shadow: 0 16px 48px rgba(15, 23, 42, 0.22);
            cursor: grab;
            touch-action: pan-y;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
        }

        #control-panel.panel-is-floating #panel-content,
        #control-panel.is-drag-positioned #panel-content {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        /* Flotante de “Tu conductor” / trip floats: caben en pantalla + scroll */
        .trip-float.is-drag-positioned,
        #client-trip-float.is-drag-positioned {
            max-height: min(70dvh, calc(100dvh - var(--safe-top, 0px) - var(--safe-bottom, 0px) - 1rem)) !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        #client-trip-float.is-drag-positioned .trip-float-full-view,
        #client-trip-float.is-drag-positioned .client-trip-float-body {
            max-height: none;
        }

        #control-panel.is-dragging {
            transition: none !important;
            z-index: 12000 !important;
            box-shadow: 0 22px 56px rgba(15, 23, 42, 0.28);
            touch-action: none !important;
        }

        #control-panel.is-dragging #panel-content {
            touch-action: none !important;
            overflow: hidden;
        }

        #control-panel.panel-is-floating.panel-hidden {
            transform: none !important;
        }

        /* Chevron min/max: click puro (no pan/drag del panel) */
        #control-panel > .panel-hide-btn,
        #panel-hide-btn,
        .panel-hide-btn,
        .panel-hide-btn.trip-touch-btn {
            position: absolute !important;
            right: 0.45rem !important;
            top: 0.35rem !important;
            left: auto !important;
            bottom: auto !important;
            transform: none !important;
            width: 2.5rem !important;
            height: 2.5rem !important;
            min-width: 2.5rem !important;
            min-height: 2.5rem !important; /* no heredar 48px de .trip-touch-btn */
            max-width: 2.5rem !important;
            max-height: 2.5rem !important;
            border: none !important;
            border-radius: 999px !important;
            background: rgba(241, 245, 249, 0.98) !important;
            color: #475569 !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            /* critical: el panel usa pan-y/grab; este botÃ³n debe ser solo tap */
            touch-action: manipulation !important;
            -webkit-user-drag: none !important;
            user-select: none !important;
            -webkit-user-select: none !important;
            -webkit-touch-callout: none !important;
            -webkit-tap-highlight-color: rgba(15, 23, 42, 0.08);
            cursor: pointer !important;
            z-index: 500 !important;
            pointer-events: auto !important;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12) !important;
            transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
            padding: 0 !important;
            margin: 0 !important;
            opacity: 1 !important;
            visibility: visible !important;
        }

        /* El panel no debe â€œrobarâ€ el gesto del chevron con cursor grab */
        body.trip-active #control-panel #panel-hide-btn,
        body.driver-mode #control-panel #panel-hide-btn {
            cursor: pointer !important;
            touch-action: manipulation !important;
        }

        .panel-hide-btn i,
        #panel-hide-btn i {
            font-size: 0.78rem !important;
            line-height: 1 !important;
            pointer-events: none !important;
        }

        .panel-hide-btn:hover,
        .panel-hide-btn:focus-visible,
        #panel-hide-btn:hover,
        #panel-hide-btn:focus-visible {
            background: #e2e8f0 !important;
            color: #1e293b !important;
        }

        .panel-hide-btn:active,
        #panel-hide-btn:active {
            transform: scale(0.92) !important;
        }

        /* Minimizado: chevron apunta arriba (maximizar) */
        .panel-hide-btn.is-collapsed,
        body.panel-minimized .panel-hide-btn,
        body.panel-collapsed .panel-hide-btn,
        #control-panel.panel-collapsed .panel-hide-btn,
        body.panel-minimized #panel-hide-btn,
        #control-panel.panel-collapsed #panel-hide-btn {
            color: #0f766e !important;
            background: #ecfdf5 !important;
        }

        .panel-expand-fab {
            display: none;
            position: absolute;
            left: 50%;
            bottom: calc(0.8rem + var(--safe-bottom, 0px));
            transform: translateX(-50%);
            z-index: 110;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            padding: 0.7rem 1.25rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            border: none;
            border-radius: 999px;
            box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
            font-size: 0.72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
        }

        body.panel-hidden .panel-expand-fab {
            display: inline-flex;
        }

        /* Conductor sin viaje: al minimizar el panel se oculta (display:none).
           Mostrar FAB «Abrir panel» para poder volver (antes quedaba atrapado). */
        body.driver-mode.panel-minimized:not(.trip-active) .panel-expand-fab,
        body.driver-mode.panel-collapsed:not(.trip-active) .panel-expand-fab {
            display: inline-flex !important;
            z-index: 200 !important;
        }

        body.driver-mode.panel-minimized:not(.trip-active) #fab-center,
        body.driver-mode.panel-collapsed:not(.trip-active) #fab-center {
            bottom: 78px;
        }

        body.panel-hidden #fab-center,
        body.panel-hidden #fab-traffic {
            bottom: 78px;
        }

        body.panel-hidden.zone-picker-collapsed #control-panel,
        body.panel-hidden #control-panel {
            max-height: min(58%, 62dvh);
        }

        #control-panel::before {
            display: none;
        }

        body.client-mode #control-panel {
            position: absolute !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            top: auto !important;
            width: 100% !important;
            margin: 0 !important;
            cursor: default;
            touch-action: pan-y;
        }

        body.client-mode #control-panel.panel-is-floating {
            border-radius: 1.75rem 1.75rem 0 0 !important;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.15) !important;
        }

        body.client-mode .control-panel-header {
            /* Pasajero ya tiene Â«MinimizarÂ»; esta asa duplicada solo quita espacio */
            display: none !important;
            min-height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        body.client-mode .control-panel-drag-hint,
        body.client-mode .control-panel-grab {
            display: none !important;
        }

        body.driver-mode #control-panel {
            position: absolute !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            width: 100% !important;
            margin: 0 !important;
            cursor: default !important;
            touch-action: pan-y;
            display: flex !important;
            flex-direction: column !important;
        }

        /*
         * Conductor SIN viaje: ya NO pantalla completa.
         * Sheet medio-bajo (~55% max) + scroll en la lista → se ve el final.
         */
        body.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) #control-panel {
            top: auto !important;
            bottom: 0 !important;
            height: auto !important;
            max-height: min(55dvh, 26rem) !important;
            min-height: 0 !important;
            border-radius: 1.75rem 1.75rem 0 0 !important;
            z-index: 12000 !important;
            padding-top: 0.35rem;
            padding-bottom: max(0.55rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.15) !important;
            overflow: hidden !important;
            display: flex !important;
            flex-direction: column !important;
        }

        body.driver-mode:not(.panel-minimized):not(.panel-collapsed) #panel-content {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            max-height: none !important;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            -webkit-overflow-scrolling: touch;
            padding-bottom: max(0.85rem, calc(0.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)))) !important;
        }

        body.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) #driver-view {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
        }

        body.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) #requests-list,
        body.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) .driver-radar-list {
            flex: 1 1 auto !important;
            min-height: 0 !important;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            padding-bottom: max(1rem, calc(0.65rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)))) !important;
        }

        body.driver-mode #control-panel.panel-is-floating,
        body.driver-mode #control-panel.is-drag-positioned {
            border-radius: 1.75rem 1.75rem 0 0 !important;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.15) !important;
        }

        body.driver-mode #control-panel.is-dragging {
            cursor: default !important;
        }

        body.driver-mode .control-panel-header {
            cursor: default;
            touch-action: pan-y;
        }

        body.driver-mode .control-panel-drag-hint,
        body.driver-mode .control-panel-grab {
            display: none;
        }

        body.driver-mode.panel-minimized #control-panel {
            display: none !important;
        }

        body.driver-mode:not(.panel-minimized) #driver-earnings-float,
        body.driver-mode:not(.panel-minimized) #driver-objectives-active {
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        /*
         * Viaje activo (conductor): ocultar flotantes que tapan el mapa / HUD
         * y bloquean la âœ• de copas o el minimizar de ganancias.
         */
        body.trip-active.driver-mode #driver-earnings-float,
        body.trip-active.driver-mode #driver-objectives-active,
        body.trip-active.driver-mode #public-pcopa-strip,
        body.trip-active.driver-mode #public-copa-strip,
        body.trip-active.driver-mode #driver-copa-map-strip,
        body.trip-active.driver-mode .driver-copa-promo-strip {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        #panel-content {
            min-height: 0;
            flex: 1 1 auto;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
            padding-bottom: max(0.75rem, calc(0.4rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))));
            scrollbar-width: thin;
            scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
        }

        /* Scrollbars finas / casi invisibles en paneles de la app */
        #panel-content::-webkit-scrollbar,
        #control-panel::-webkit-scrollbar,
        .driver-active-body::-webkit-scrollbar,
        #active-trip-panel::-webkit-scrollbar,
        #driver-view::-webkit-scrollbar,
        #client-view::-webkit-scrollbar,
        #requests-list::-webkit-scrollbar,
        .trip-panel-scroll::-webkit-scrollbar {
            width: 4px;
            height: 4px;
        }

        #panel-content::-webkit-scrollbar-track,
        #control-panel::-webkit-scrollbar-track,
        .driver-active-body::-webkit-scrollbar-track,
        #active-trip-panel::-webkit-scrollbar-track,
        #driver-view::-webkit-scrollbar-track,
        #client-view::-webkit-scrollbar-track,
        #requests-list::-webkit-scrollbar-track,
        .trip-panel-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        #panel-content::-webkit-scrollbar-thumb,
        #control-panel::-webkit-scrollbar-thumb,
        .driver-active-body::-webkit-scrollbar-thumb,
        #active-trip-panel::-webkit-scrollbar-thumb,
        #driver-view::-webkit-scrollbar-thumb,
        #client-view::-webkit-scrollbar-thumb,
        #requests-list::-webkit-scrollbar-thumb,
        .trip-panel-scroll::-webkit-scrollbar-thumb {
            background: rgba(148, 163, 184, 0.4);
            border-radius: 999px;
            border: 1px solid transparent;
            background-clip: padding-box;
        }

        #panel-content::-webkit-scrollbar-thumb:hover,
        .driver-active-body::-webkit-scrollbar-thumb:hover,
        #requests-list::-webkit-scrollbar-thumb:hover {
            background: rgba(100, 116, 139, 0.55);
        }

        /* En viaje / navegaciÃ³n del conductor: ocultar scrollbar (sigue scrollable al tacto) */
        body.trip-active.driver-mode #panel-content,
        body.trip-active.driver-mode .driver-active-body,
        body.trip-active.driver-mode #active-trip-panel,
        body.trip-active.driver-mode #control-panel,
        body.driver-nav-mode #panel-content,
        body.driver-nav-mode .driver-active-body {
            scrollbar-width: none; /* Firefox */
            -ms-overflow-style: none; /* IE/legacy */
        }

        body.trip-active.driver-mode #panel-content::-webkit-scrollbar,
        body.trip-active.driver-mode .driver-active-body::-webkit-scrollbar,
        body.trip-active.driver-mode #active-trip-panel::-webkit-scrollbar,
        body.trip-active.driver-mode #control-panel::-webkit-scrollbar,
        body.driver-nav-mode #panel-content::-webkit-scrollbar,
        body.driver-nav-mode .driver-active-body::-webkit-scrollbar {
            width: 0 !important;
            height: 0 !important;
            display: none !important;
            background: transparent !important;
        }

        /* MÃ³vil en general: scrollbars menos molestas en el panel */
        @media (max-width: 768px) {
            #panel-content,
            .driver-active-body,
            #control-panel {
                scrollbar-width: none;
                -ms-overflow-style: none;
            }

            #panel-content::-webkit-scrollbar,
            .driver-active-body::-webkit-scrollbar,
            #control-panel::-webkit-scrollbar {
                width: 0 !important;
                height: 0 !important;
                display: none !important;
            }
        }

        #requests-list {
            padding-bottom: 0.5rem;
            scrollbar-width: thin;
            scrollbar-color: rgba(148, 163, 184, 0.4) transparent;
        }
        body.driver-mode #client-view,
        body.driver-mode #fare-card,
        body.driver-mode #searching-state { display: none !important; }

        /* Pasajero con viaje activo: solo panel de viaje, sin formulario de pedido */
        body.trip-active:not(.driver-mode) #client-view,
        body.trip-active:not(.driver-mode) #trip-panel-setup {
            display: none !important;
        }

        body.driver-mode #client-service-type-wrap,
        body.driver-mode #service-type-picker,
        body.driver-mode #moto-campaign-banner {
            display: none !important;
        }

        body.is-searching #client-service-type-wrap,
        body.trip-active #client-service-type-wrap {
            display: none !important;
        }

        .client-service-type-wrap {
            flex-shrink: 0;
        }

        /* â€”â€” Panel de viajes reorganizado â€”â€” */
        #panel-content.trip-panel-scroll {
            padding: 0 1rem 0.65rem;
        }

        /* Ciudad operativa: solo chip en el mapa, no en panel central del pasajero */
        #trip-panel-setup #service-zone-picker,
        #trip-panel-setup .city-zone-compact {
            display: none !important;
        }

        .trip-panel-setup {
            flex-shrink: 0;
            padding-bottom: 0.6rem;
            margin-bottom: 0.5rem;
            border-bottom: 1px solid #f1f5f9;
        }

        body.trip-active #trip-panel-setup,
        body.is-searching #trip-panel-setup {
            display: none !important;
        }

        body.driver-mode #trip-panel-setup {
            display: none !important;
        }

        body.trip-active.driver-mode #service-zone-picker,
        body.trip-active.driver-mode #trip-panel-setup .trip-context-grid {
            display: none !important;
        }

        body.trip-active.driver-mode #driver-destination-controls.driver-dest-hero--top {
            margin-left: 0;
            margin-right: 0;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed #trip-panel-setup {
            display: none !important;
        }

        .trip-context-grid {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.45rem;
            margin-bottom: 0.5rem;
        }

        .trip-context-grid:has(.wallet-compact:not(.hidden)) {
            grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
        }

        .city-zone-compact--grid {
            min-width: 0;
        }

        .city-zone-compact--grid .city-zone-compact-btn {
            padding: 0.6rem 0.7rem;
            gap: 0.55rem;
        }

        .city-zone-compact--grid .city-zone-compact-icon {
            width: 2.1rem;
            height: 2.1rem;
            border-radius: 0.7rem;
            font-size: 0.85rem;
        }

        .city-zone-compact--grid .city-zone-compact-value {
            font-size: 0.82rem;
        }

        .city-zone-compact--grid .city-zone-compact-meta {
            font-size: 0.58rem;
        }

        .wallet-compact {
            display: none;
            align-items: center;
            justify-content: space-between;
            gap: 0.4rem;
            min-width: 0;
            padding: 0.55rem 0.65rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
            border: 1px solid #bbf7d0;
            box-shadow: 0 3px 12px rgba(16, 185, 129, 0.08);
        }

        .wallet-compact:not(.hidden) {
            display: flex;
        }

        .wallet-compact-main {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            min-width: 0;
        }

        .wallet-compact-icon {
            width: 1.85rem;
            height: 1.85rem;
            border-radius: 0.6rem;
            background: #10b981;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            flex-shrink: 0;
        }

        .wallet-compact-text {
            min-width: 0;
        }

        .wallet-compact-label {
            display: block;
            font-size: 0.52rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
            line-height: 1.1;
        }

        .wallet-compact-amount {
            display: block;
            font-size: 0.88rem;
            font-weight: 900;
            color: #047857;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .wallet-compact-actions {
            display: flex;
            gap: 0.25rem;
            flex-shrink: 0;
        }

        .wallet-compact-btn {
            width: 1.75rem;
            height: 1.75rem;
            border-radius: 0.55rem;
            border: 1px solid #a7f3d0;
            background: #fff;
            color: #059669;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .wallet-compact-btn--primary {
            background: #10b981;
            border-color: #10b981;
            color: #fff;
        }

        .trip-service-wrap {
            margin-top: 0.15rem;
        }

        .trip-service-picker {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.35rem;
        }

        .trip-service-chip {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.15rem;
            min-height: 2.85rem;
            padding: 0.4rem 0.2rem;
            border-radius: 0.85rem;
            border: 1.5px solid #e2e8f0;
            background: #fff;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            color: #64748b;
            transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
        }

        .trip-service-chip i {
            font-size: 1rem;
            line-height: 1;
        }

        .trip-service-chip.active[data-service-type="auto"],
        #svc-btn-auto.trip-service-chip.active {
            border-color: #2563eb !important;
            background: #eff6ff !important;
            color: #1d4ed8 !important;
        }

        .trip-service-chip.active[data-service-type="taxi"],
        #svc-btn-taxi.trip-service-chip.active {
            border-color: #ca8a04 !important;
            background: #fefce8 !important;
            color: #a16207 !important;
        }

        .trip-client-flow {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            min-width: 0;
        }

        .trip-flow-header {
            padding-top: 0.15rem;
        }

        .trip-flow-title {
            font-size: 1.05rem;
            font-weight: 900;
            color: #0f172a;
            letter-spacing: -0.02em;
            line-height: 1.2;
        }

        .trip-flow-subtitle {
            margin-top: 0.15rem;
            font-size: 0.62rem;
            font-weight: 700;
            color: #2563eb;
            letter-spacing: 0.04em;
        }

        .trip-step-card {
            border-radius: 1.15rem;
            border: 1px solid #e8edf3;
            background: #fff;
            box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
            overflow: hidden;
        }

        .trip-step-route {
            padding: 0.75rem 0.85rem 0.85rem;
        }

        @media (max-width: 380px) {
            .trip-step-route,
            .trip-step-service,
            .trip-step-card {
                padding-left: 0.55rem !important;
                padding-right: 0.55rem !important;
            }
            .trip-step-head {
                margin-bottom: 0.35rem;
                gap: 0.3rem;
            }
            #control-panel .trip-panel-scroll {
                padding-bottom: 0.25rem;
            }
        }

        .trip-step-service {
            padding: 0.75rem 0.85rem 0.85rem;
        }

        .trip-step-request .trip-fare-card {
            margin-top: 0.65rem;
        }

        .trip-step-head {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            margin-bottom: 0.55rem;
        }

        .trip-step-badge {
            width: 1.35rem;
            height: 1.35rem;
            border-radius: 999px;
            background: #2563eb;
            color: #fff;
            font-size: 0.62rem;
            font-weight: 900;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }

        .trip-step-badge--muted {
            background: #e2e8f0;
            color: #64748b;
        }

        .trip-step-title {
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #475569;
        }

        .trip-favorites-bar {
            margin-bottom: 0.5rem;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
        }

        .trip-favorites-bar::-webkit-scrollbar {
            display: none;
        }

        .trip-hint-text {
            font-size: 0.62rem;
            font-weight: 600;
            color: #94a3b8;
            line-height: 1.4;
            margin-top: 0.15rem;
        }

        .trip-route-actions {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            margin-top: 0.65rem;
        }

        .trip-btn-primary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            width: 100%;
            padding: 0.85rem 1rem;
            border: none;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
            cursor: pointer;
        }

        .trip-btn-primary:active {
            transform: scale(0.98);
        }

        .trip-btn-secondary {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            width: 100%;
            padding: 0.65rem 1rem;
            border: 1px solid #e2e8f0;
            border-radius: 0.9rem;
            background: #f8fafc;
            color: #64748b;
            font-size: 0.58rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            cursor: pointer;
        }

        .trip-advanced-toggle {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            width: 100%;
            padding: 0.75rem 0.85rem;
            border: none;
            background: transparent;
            text-align: left;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .trip-advanced-toggle-left {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #475569;
            flex-shrink: 0;
        }

        .trip-advanced-toggle-hint {
            flex: 1;
            min-width: 0;
            font-size: 0.58rem;
            font-weight: 600;
            color: #94a3b8;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .trip-advanced-chevron {
            flex-shrink: 0;
            font-size: 0.65rem;
            color: #94a3b8;
            transition: transform 0.2s ease;
        }

        .trip-advanced-toggle.is-open .trip-advanced-chevron {
            transform: rotate(180deg);
        }

        .trip-advanced-body {
            padding: 0 0.85rem 0.85rem;
            border-top: 1px solid #f1f5f9;
        }

        .trip-advanced-block {
            padding-top: 0.65rem;
        }

        .trip-advanced-block-title {
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #b45309;
            margin-bottom: 0.45rem;
        }

        /* —— Programar viaje / envío / flete (fácil, multi-servicio) —— */
        .trip-when-panel {
            margin-top: 0.65rem;
            margin-bottom: 0.35rem;
            padding: 0.85rem 0.85rem 0.9rem;
            border-radius: 1.15rem;
            border: 1.5px solid #dbeafe;
            background: linear-gradient(160deg, #f8fafc 0%, #eff6ff 55%, #f0f9ff 100%);
            box-shadow: 0 4px 16px rgba(37, 99, 235, 0.07);
        }
        .trip-when-head {
            margin-bottom: 0.55rem;
        }
        .trip-when-title {
            margin: 0;
            font-size: 0.78rem;
            font-weight: 900;
            color: #1e3a8a;
            letter-spacing: -0.01em;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        .trip-when-title i { color: #2563eb; }
        .trip-when-sub {
            margin: 0.2rem 0 0;
            font-size: 0.62rem;
            font-weight: 600;
            color: #64748b;
            line-height: 1.3;
        }
        .trip-when-modes {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.45rem;
        }
        .trip-when-mode-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            min-height: 2.75rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.9rem;
            border: 1.5px solid #cbd5e1;
            background: #fff;
            color: #334155;
            font-size: 0.72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
        }
        .trip-when-mode-btn.is-active {
            border-color: #2563eb;
            background: linear-gradient(145deg, #2563eb, #1d4ed8);
            color: #fff;
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
        }
        .trip-when-mode-btn:not(.is-active):active {
            background: #f1f5f9;
        }
        .trip-when-schedule {
            margin-top: 0.7rem;
            padding-top: 0.65rem;
            border-top: 1px dashed #bfdbfe;
        }
        .trip-when-presets-label {
            margin: 0 0 0.4rem;
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: #64748b;
        }
        .trip-when-presets {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .trip-when-preset {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.45rem 0.65rem;
            border-radius: 999px;
            border: 1.5px solid #e2e8f0;
            background: #fff;
            color: #1e40af;
            font-size: 0.65rem;
            font-weight: 800;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
        }
        .trip-when-preset i {
            font-size: 0.62rem;
            opacity: 0.85;
        }
        .trip-when-preset.is-active {
            border-color: #1d4ed8;
            background: #dbeafe;
            color: #1e3a8a;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
        }
        .trip-when-preset:active {
            transform: scale(0.98);
        }
        .trip-when-custom {
            margin-top: 0.65rem;
            padding: 0.65rem;
            border-radius: 0.9rem;
            background: rgba(255, 255, 255, 0.9);
            border: 1px solid #e2e8f0;
        }
        .trip-when-custom-grid {
            display: grid;
            grid-template-columns: 1.15fr 0.85fr;
            gap: 0.5rem;
        }
        .trip-when-field {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
            min-width: 0;
        }
        .trip-when-field span {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #64748b;
        }
        .trip-when-input {
            width: 100%;
            min-height: 2.6rem;
            padding: 0.5rem 0.65rem;
            border-radius: 0.75rem;
            border: 1.5px solid #cbd5e1;
            background: #fff;
            font-size: 0.85rem;
            font-weight: 700;
            color: #0f172a;
            outline: none;
        }
        .trip-when-input:focus {
            border-color: #60a5fa;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }
        .trip-when-hint {
            margin: 0.4rem 0 0;
            font-size: 0.58rem;
            font-weight: 600;
            color: #94a3b8;
            line-height: 1.3;
        }
        .trip-when-summary {
            display: flex;
            align-items: flex-start;
            gap: 0.55rem;
            margin-top: 0.65rem;
            padding: 0.65rem 0.75rem;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            border: 1px solid #6ee7b7;
            color: #065f46;
        }
        .trip-when-summary > i {
            margin-top: 0.15rem;
            color: #059669;
            font-size: 0.95rem;
            flex-shrink: 0;
        }
        .trip-when-summary-text {
            margin: 0;
            font-size: 0.82rem;
            font-weight: 900;
            color: #064e3b;
            line-height: 1.25;
            text-transform: capitalize;
        }
        .trip-when-summary-note {
            margin: 0.15rem 0 0;
            font-size: 0.6rem;
            font-weight: 600;
            color: #047857;
            line-height: 1.3;
        }
        html[data-theme="dark"] .trip-when-panel {
            border-color: #1e3a5f;
            background: linear-gradient(160deg, #0f172a 0%, #172554 100%);
        }
        html[data-theme="dark"] .trip-when-title { color: #bfdbfe; }
        html[data-theme="dark"] .trip-when-sub { color: #94a3b8; }
        html[data-theme="dark"] .trip-when-mode-btn {
            background: #1e293b;
            border-color: #334155;
            color: #e2e8f0;
        }
        html[data-theme="dark"] .trip-when-mode-btn.is-active {
            background: linear-gradient(145deg, #2563eb, #1d4ed8);
            border-color: #3b82f6;
            color: #fff;
        }
        html[data-theme="dark"] .trip-when-preset {
            background: #1e293b;
            border-color: #334155;
            color: #93c5fd;
        }
        html[data-theme="dark"] .trip-when-preset.is-active {
            background: #1e3a8a;
            border-color: #3b82f6;
            color: #dbeafe;
        }
        html[data-theme="dark"] .trip-when-input {
            background: #0f172a;
            border-color: #334155;
            color: #f1f5f9;
        }
        html[data-theme="dark"] .trip-when-custom {
            background: rgba(15, 23, 42, 0.7);
            border-color: #334155;
        }
        html[data-theme="dark"] .trip-when-summary {
            background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
            border-color: #059669;
            color: #a7f3d0;
        }
        html[data-theme="dark"] .trip-when-summary-text { color: #ecfdf5; }
        html[data-theme="dark"] .trip-when-summary-note { color: #6ee7b7; }

        .trip-fare-card {
            border-radius: 1.25rem !important;
            margin-top: 0.65rem !important;
            margin-bottom: 0.5rem !important;
            padding: 1.1rem 1rem 1rem !important;
            background: linear-gradient(145deg, #1d4ed8, #2563eb) !important;
            color: #fff;
            box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
        }
        .fare-price-hero {
            font-size: 2.35rem;
            font-weight: 900;
            line-height: 1;
            letter-spacing: -0.02em;
            margin: 0 0 0.2rem;
            color: #fff;
        }
        .fare-card-label {
            font-size: 0.62rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: rgba(255, 255, 255, 0.82);
            margin: 0 0 0.55rem;
        }
        .fare-birthday-note {
            font-size: 0.72rem;
            font-weight: 700;
            color: #fbcfe8;
            margin: 0 0 0.45rem;
        }
        .fare-card-details {
            margin-bottom: 0.75rem;
        }
        .fare-route-summary,
        .fare-extra-line,
        .fare-eta-line {
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.88);
            margin: 0.15rem 0 0;
            line-height: 1.35;
        }
        .fare-eta-line { font-weight: 700; }
        .fare-request-btn {
            width: 100%;
            background: #fff;
            color: #1d4ed8;
            font-weight: 900;
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.95rem 1rem;
            border-radius: 1rem;
            border: none;
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
        }

        .trip-input-field {
            border-radius: 0.9rem !important;
            border: 1.5px solid #e2e8f0 !important;
            background: #f8fafc !important;
            min-height: 2.75rem;
        }

        .camera-capture-overlay {
            position: fixed;
            inset: 0;
            z-index: 50000;
            background: #000;
            display: flex;
            flex-direction: column;
            align-items: stretch;
            justify-content: stretch;
        }

        .camera-capture-panel {
            flex: 1;
            display: flex;
            flex-direction: column;
            min-height: 0;
        }

        .camera-capture-video {
            flex: 1;
            width: 100%;
            object-fit: cover;
            background: #111;
        }

        .camera-capture-actions {
            display: flex;
            gap: 0.75rem;
            padding: 1rem 1rem calc(1rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
            background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
        }

        .camera-capture-btn {
            flex: 1;
            min-height: 48px;
            border: none;
            border-radius: 1rem;
            font-size: 0.8rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            touch-action: manipulation;
        }

        .camera-capture-btn--cancel {
            background: rgba(255, 255, 255, 0.15);
            color: #fff;
        }

        .camera-capture-btn--shoot {
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            flex: 1.4;
        }

        body.camera-capture-open {
            overflow: hidden;
        }

        [data-reg-photo-pick],
        [data-camera-target] {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
        }

        .map-pick-overlay {
            position: fixed;
            inset: 0;
            z-index: 250;
            pointer-events: none;
            overflow: visible;
        }

        .map-pick-overlay:not(.hidden) {
            display: block;
            width: 0;
            height: 0;
        }

        .map-pick-sheet {
            pointer-events: none;
            position: fixed;
            top: max(0.75rem, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 0.55rem));
            left: 50%;
            transform: translateX(-50%) translateY(-8px);
            width: min(22.5rem, calc(100% - 1.25rem - var(--safe-left, 0px) - var(--safe-right, 0px)));
            padding: 0.85rem 1rem 0.8rem;
            border-radius: 1.15rem;
            background: rgba(255, 255, 255, 0.97);
            color: #0f172a;
            text-align: left;
            box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(15, 23, 42, 0.05);
            z-index: 251;
            opacity: 0;
            transition: opacity 0.28s ease, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
        }

        body.map-pick-mode .map-pick-sheet {
            opacity: 1;
            transform: translateX(-50%) translateY(0);
        }

        .map-pick-title {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 900;
            letter-spacing: -0.01em;
            color: #0f172a;
            line-height: 1.2;
        }

        .map-pick-address {
            margin: 0.35rem 0 0;
            font-size: 0.82rem;
            font-weight: 700;
            color: #1e293b;
            line-height: 1.35;
            min-height: 1.15em;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .map-pick-address.is-loading {
            color: #94a3b8;
            font-weight: 600;
        }

        .map-pick-label {
            margin: 0.4rem 0 0;
            font-size: 0.72rem;
            font-weight: 600;
            color: #64748b;
            line-height: 1.3;
            text-transform: none;
            letter-spacing: 0;
        }

        .map-pick-pin-wrap {
            position: fixed;
            left: 50%;
            top: 50%;
            width: 0;
            height: 0;
            pointer-events: none;
            z-index: 251;
        }

        .map-pick-pin {
            position: absolute;
            left: 50%;
            bottom: 0;
            transform: translate(-50%, 0);
            color: #16a34a;
            font-size: 2.85rem;
            line-height: 1;
            filter: drop-shadow(0 4px 8px rgba(22, 163, 74, 0.35));
            transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), filter 0.18s ease;
            will-change: transform;
        }

        .map-pick-pin-dot {
            position: absolute;
            left: 50%;
            top: 0;
            width: 8px;
            height: 8px;
            margin-left: -4px;
            margin-top: -2px;
            border-radius: 50%;
            background: #0f172a;
            opacity: 0.85;
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
            z-index: 1;
        }

        .map-pick-pin-shadow {
            position: absolute;
            left: 50%;
            top: 2px;
            width: 18px;
            height: 7px;
            margin-left: -9px;
            border-radius: 50%;
            background: rgba(15, 23, 42, 0.28);
            filter: blur(1px);
            transform: scale(1);
            transition: transform 0.18s ease, opacity 0.18s ease;
        }

        body.map-pick-mode .map-pick-pin-wrap.is-lifting .map-pick-pin {
            transform: translate(-50%, -14px) scale(1.06);
            filter: drop-shadow(0 10px 12px rgba(22, 163, 74, 0.28));
        }

        body.map-pick-mode .map-pick-pin-wrap.is-lifting .map-pick-pin-shadow {
            transform: scale(0.55);
            opacity: 0.45;
        }

        body.map-pick-mode .map-pick-pin-wrap.is-settling .map-pick-pin {
            animation: map-pick-pin-bounce 0.42s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @keyframes map-pick-pin-bounce {
            0% { transform: translate(-50%, -14px) scale(1.06); }
            55% { transform: translate(-50%, 2px) scale(0.96); }
            100% { transform: translate(-50%, 0) scale(1); }
        }

        .map-pick-actions {
            pointer-events: none;
            position: fixed;
            left: max(0.75rem, var(--safe-left, 0px));
            right: max(0.75rem, var(--safe-right, 0px));
            bottom: max(1rem, var(--safe-bottom, env(safe-area-inset-bottom, 1rem)));
            display: flex;
            gap: 0.55rem;
            z-index: 252;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.28s ease 0.05s, transform 0.32s cubic-bezier(0.22, 1, 0.36, 1) 0.05s;
        }

        body.map-pick-mode .map-pick-actions {
            opacity: 1;
            transform: translateY(0);
        }

        .map-pick-btn {
            border: none;
            border-radius: 1rem;
            font-size: 0.82rem;
            font-weight: 900;
            letter-spacing: 0.01em;
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
            pointer-events: auto;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            min-height: 3.15rem;
            transition: transform 0.12s ease, filter 0.12s ease;
        }

        .map-pick-btn:active {
            transform: scale(0.97);
        }

        .map-pick-btn--cancel {
            flex: 0 0 30%;
            max-width: 7.5rem;
            background: #fff;
            color: #475569;
        }

        .map-pick-btn--confirm {
            flex: 1;
            background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
            color: #fff;
            font-size: 0.92rem;
        }

        .map-pick-btn--confirm:disabled {
            opacity: 0.65;
            filter: grayscale(0.15);
        }

        body.map-pick-mode.map-pick-mobile #control-panel,
        body.map-pick-mode.map-pick-mobile #control-panel.panel-hidden,
        body.map-pick-mode.map-pick-mobile #control-panel.panel-is-floating {
            display: none !important;
            opacity: 0 !important;
            visibility: hidden !important;
            pointer-events: none !important;
            transform: translateY(120%) !important;
        }

        body.map-pick-mode #map-container {
            z-index: 120;
        }

        /* Full-screen map gestures on Android / iOS (Capacitor WebView) */
        html.map-pick-mode,
        body.map-pick-mode {
            overflow: hidden !important;
            overscroll-behavior: none;
            position: relative;
            height: 100%;
            width: 100%;
        }

        body.map-pick-mode #map,
        body.map-pick-mode #map-container {
            /* Allow Google Maps pan + pinch-zoom with one/two fingers */
            touch-action: pan-x pan-y pinch-zoom;
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }

        body.map-pick-mode .panel-expand-fab {
            display: none !important;
        }

        body.map-pick-mode.map-pick-mobile .map-pick-actions {
            bottom: max(1.25rem, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 1rem));
        }

        /* Bigger hit targets + safe areas on phones */
        @media (max-width: 768px) {
            body.map-pick-mode .map-pick-sheet {
                top: max(0.65rem, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 0.45rem));
                width: min(100% - 1rem, 24rem);
                padding: 0.9rem 1rem 0.85rem;
            }

            body.map-pick-mode .map-pick-title {
                font-size: 1.02rem;
            }

            body.map-pick-mode .map-pick-address {
                font-size: 0.88rem;
            }

            body.map-pick-mode .map-pick-btn {
                min-height: 3.35rem;
                font-size: 0.9rem;
            }

            body.map-pick-mode .map-pick-btn--confirm {
                font-size: 1rem;
            }

            body.map-pick-mode .map-pick-pin {
                font-size: 3.05rem;
            }
        }

        /* Prefer reduced motion: still works, less bounce */
        @media (prefers-reduced-motion: reduce) {
            body.map-pick-mode .map-pick-sheet,
            body.map-pick-mode .map-pick-actions,
            body.map-pick-mode .map-pick-pin {
                transition: none !important;
                animation: none !important;
            }
        }

        #driver-view {
            padding-top: 0.25rem;
        }

        body.driver-mode #driver-view {
            flex: 1 1 auto;
            min-height: 0;
            overflow: hidden;
        }

        body.driver-mode .driver-view-header,
        body.driver-mode .driver-radar-status,
        body.driver-mode #driver-incoming-offer,
        body.driver-mode #driver-objectives-pending {
            flex-shrink: 0;
        }

        .driver-radar-status {
            display: flex;
            align-items: flex-start;
            gap: 0.6rem;
            padding: 0.6rem 0.7rem;
            margin-bottom: 0.45rem;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
            border: 1px solid #bfdbfe;
        }

        .driver-radar-status-icon {
            color: #2563eb;
            font-size: 1rem;
            margin-top: 0.1rem;
            flex-shrink: 0;
            animation: driver-radar-pulse 2s ease-in-out infinite;
        }

        @keyframes driver-radar-pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.45; }
        }

        .driver-radar-status-main {
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #1e40af;
            line-height: 1.35;
            word-break: break-word;
        }

        .driver-radar-status-sub {
            font-size: 0.56rem;
            font-weight: 600;
            color: #64748b;
            margin-top: 0.12rem;
            line-height: 1.35;
            word-break: break-word;
        }

        body.driver-mode .driver-radar-list {
            flex: 1 1 auto;
            min-height: 4.5rem;
            -webkit-overflow-scrolling: touch;
        }

        .trip-queue-badge {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #334155;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            padding: 0.15rem 0.45rem;
            border-radius: 999px;
            white-space: nowrap;
        }

        .driver-city-bar {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            width: 100%;
            padding: 0.7rem 0.85rem;
            border-radius: 1rem;
            border: 1.5px solid #bfdbfe;
            background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.08);
        }

        .driver-city-bar.hidden {
            display: none !important;
        }

        .driver-city-bar-icon {
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 0.75rem;
            background: #2563eb;
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.95rem;
        }

        .driver-city-bar-text {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }

        .driver-city-bar-label {
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
        }

        .driver-city-bar-value {
            font-size: 0.82rem;
            font-weight: 900;
            color: #0f172a;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .driver-city-bar-action {
            flex-shrink: 0;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #2563eb;
            background: #fff;
            border: 1px solid #bfdbfe;
            border-radius: 999px;
            padding: 0.3rem 0.55rem;
        }

        html[data-theme="dark"] .driver-city-bar {
            background: linear-gradient(135deg, rgba(30, 58, 138, 0.35) 0%, rgba(15, 23, 42, 0.9) 100%);
            border-color: rgba(59, 130, 246, 0.45);
        }

        html[data-theme="dark"] .driver-city-bar-label {
            color: #94a3b8;
        }

        html[data-theme="dark"] .driver-city-bar-value {
            color: #f8fafc;
        }

        html[data-theme="dark"] .driver-city-bar-action {
            background: rgba(15, 23, 42, 0.8);
            border-color: rgba(59, 130, 246, 0.5);
            color: #93c5fd;
        }

        body.trip-active #control-panel { max-height: min(42dvh, 19rem); }

        /* Pasajero buscando: sheet medio (no full-screen; se ve el final con scroll) */
        body.client-mode.is-searching:not(.panel-minimized):not(.panel-collapsed) #control-panel {
            top: auto !important;
            bottom: 0 !important;
            height: auto !important;
            max-height: min(55dvh, 26rem) !important;
            min-height: 0 !important;
            border-radius: 1.75rem 1.75rem 0 0 !important;
            z-index: 12000 !important;
            padding-top: 0.5rem;
            padding-bottom: 0.45rem;
            box-shadow: none !important;
        }

        body.is-searching #map-container {
            opacity: 0.06;
            pointer-events: none;
        }

        /* Antes se ocultaba el chevron en bÃºsqueda y el pasajero no podÃ­a bajar el panel */
        body.is-searching #control-panel .panel-hide-btn,
        body.is-searching #control-panel #panel-hide-btn {
            display: flex !important;
            visibility: visible !important;
            pointer-events: auto !important;
            opacity: 1 !important;
            z-index: 500 !important;
        }

        /* Pasajero: asa Minimizar (web + Android) â€” compacta, sin barra extra abajo */
        .passenger-panel-min-btn {
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.15rem;
            width: 100%;
            margin: 0;
            padding: 0.22rem 0.5rem 0.2rem;
            border: none;
            background: transparent;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
            position: relative;
            z-index: 30;
            pointer-events: auto;
        }

        .passenger-panel-min-label {
            font-size: 0.55rem;
            font-weight: 800;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #94a3b8;
            line-height: 1;
            pointer-events: none;
        }

        /* Una sola rayita (la del botÃ³n Minimizar); sin segunda barra debajo */
        body.client-mode #passenger-panel-min-btn .trip-sheet-grabber {
            width: 2rem;
            height: 0.22rem;
            margin-bottom: 0;
        }

        body.client-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #passenger-panel-min-btn,
        body.client-mode.is-searching:not(.panel-minimized) #control-panel:not(.panel-collapsed) #passenger-panel-min-btn,
        body.client-mode.trip-active:not(.panel-minimized) #control-panel:not(.panel-collapsed) #passenger-panel-min-btn {
            display: flex !important;
        }

        body.driver-mode #passenger-panel-min-btn,
        body.client-mode.panel-minimized #passenger-panel-min-btn,
        body.client-mode #control-panel.panel-collapsed #passenger-panel-min-btn {
            display: none !important;
        }

        body.client-mode.panel-minimized #control-panel #passenger-panel-min-btn.is-collapsed,
        body.client-mode #control-panel.panel-collapsed #passenger-panel-min-btn {
            /* Cuando estÃ¡ minimizado usamos chevron ^ / mini contenido; no duplicar */
            display: none !important;
        }

        /* Mini-faja al maximizar de nuevo: chevron siempre */
        body.client-mode.panel-minimized #panel-hide-btn,
        body.client-mode #control-panel.panel-collapsed #panel-hide-btn {
            display: flex !important;
            visibility: visible !important;
            pointer-events: auto !important;
            opacity: 1 !important;
            z-index: 500 !important;
            background: #ecfdf5 !important;
            color: #0f766e !important;
        }

        /* Booking / idle pasajero minimizado (no solo bÃºsqueda) */
        body.client-mode.panel-minimized #control-panel,
        body.client-mode #control-panel.panel-collapsed {
            max-height: min(34dvh, 240px) !important;
            height: auto !important;
            top: auto !important;
            bottom: 0 !important;
            overflow: hidden !important;
        }

        /*
         * Pasajero buscando: panel minimizado = faja abajo + mapa usable.
         * Gana a las reglas capacitor full-screen de is-searching.
         */
        body.client-mode.is-searching.panel-minimized #control-panel,
        body.client-mode.is-searching #control-panel.panel-collapsed,
        body.client-mode.is-searching.panel-collapsed #control-panel,
        body.capacitor-native.client-mode.is-searching.panel-minimized #control-panel,
        body.capacitor-android.client-mode.is-searching.panel-minimized #control-panel,
        body.capacitor-native.client-mode.is-searching #control-panel.panel-collapsed,
        body.capacitor-android.client-mode.is-searching #control-panel.panel-collapsed {
            top: auto !important;
            bottom: 0 !important;
            left: 0 !important;
            right: 0 !important;
            height: auto !important;
            max-height: min(34dvh, 240px) !important;
            min-height: 0 !important;
            border-radius: 1.35rem 1.35rem 0 0 !important;
            z-index: 12000 !important;
            overflow: hidden !important;
            box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.18) !important;
            padding-top: 0.35rem !important;
            padding-bottom: max(0.45rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        }

        body.client-mode.is-searching.panel-minimized #map-container,
        body.client-mode.is-searching #control-panel.panel-collapsed ~ #map-container,
        body.is-searching.panel-minimized #map-container,
        body.is-searching.panel-collapsed #map-container {
            opacity: 1 !important;
            pointer-events: auto !important;
        }

        body.client-mode.is-searching.panel-minimized #searching-state .passenger-pending-wrap,
        body.client-mode.is-searching #control-panel.panel-collapsed #searching-state .passenger-pending-wrap {
            max-height: none;
        }

        body.client-mode.is-searching.panel-minimized #panel-content,
        body.client-mode.is-searching #control-panel.panel-collapsed #panel-content {
            overflow: hidden !important;
            max-height: min(30dvh, 210px) !important;
        }

        body.is-searching #panel-content {
            display: flex;
            flex-direction: column;
            min-height: 0;
            max-height: none;
            /* Permitir que el hijo (#searching-state) scrollee y muestre Cancelar */
            overflow: hidden;
            overflow-y: visible;
        }

        body.is-searching #client-view {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
        }

        body.is-searching #passenger-booking-route,
        body.is-searching #passenger-booking-advanced,
        body.is-searching #passenger-booking-service {
            display: none !important;
        }
        body.is-searching #booking-float-layer {
            display: none !important;
        }

        body.is-searching #searching-state {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow-x: hidden;
            overflow-y: auto !important;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
            margin-top: 0 !important;
            /* Hueco para el botón fijo "Cancelar solicitud" */
            padding-bottom: calc(4.25rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            /* scroll-behavior auto: la animación no pelea con scroll-smooth del documento */
            scroll-behavior: auto;
        }

        /* La animación de avatares NO debe bloquear el scroll del panel */
        body.is-searching #searching-state .passenger-notify-fly-stage {
            flex: 0 0 auto;
            max-height: none;
            overflow: visible;
        }
        body.is-searching #searching-state .passenger-notify-avatars {
            flex: 0 0 auto;
            max-height: 7.5rem;
            overflow-x: auto;
            overflow-y: hidden;
            overscroll-behavior-x: contain;
            /* No capturar gestos verticales del panel */
            touch-action: pan-x;
        }
        body.is-searching #searching-state .passenger-notify-fly-msg {
            pointer-events: none !important;
        }

        /* Subir tarifa mientras busca conductor */
        .passenger-boost-price {
            margin: 0.55rem 0 0.65rem;
            padding: 0.75rem 0.85rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 55%, #fef3c7 100%);
            border: 1px solid #fdba74;
            box-shadow: 0 6px 18px rgba(234, 88, 12, 0.12);
        }

        .passenger-boost-price.hidden {
            display: none !important;
        }

        .passenger-boost-price-title {
            margin: 0;
            font-size: 0.78rem;
            font-weight: 900;
            color: #9a3412;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .passenger-boost-price-sub {
            margin: 0.25rem 0 0.55rem;
            font-size: 0.68rem;
            font-weight: 700;
            color: #9a3412;
            line-height: 1.35;
            opacity: 0.92;
        }

        .passenger-boost-price-current {
            margin: 0 0 0.55rem;
            font-size: 0.95rem;
            font-weight: 900;
            color: #7c2d12;
        }

        .passenger-boost-price-row {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 0.45rem;
        }

        .passenger-boost-price-btn {
            min-height: 2.75rem;
            border-radius: 0.85rem;
            border: 1px solid #fb923c;
            background: #fff;
            color: #c2410c;
            font-size: 0.78rem;
            font-weight: 900;
            -webkit-tap-highlight-color: transparent;
        }

        .passenger-boost-price-btn--hot {
            background: #ea580c;
            border-color: #c2410c;
            color: #fff;
        }

        .passenger-boost-price-custom {
            width: 100%;
            margin-top: 0.45rem;
            min-height: 2.5rem;
            border-radius: 0.85rem;
            border: 1px dashed #fdba74;
            background: transparent;
            color: #9a3412;
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        html[data-theme="dark"] .passenger-boost-price {
            background: linear-gradient(135deg, #431407 0%, #7c2d12 100%);
            border-color: #ea580c;
        }

        html[data-theme="dark"] .passenger-boost-price-title,
        html[data-theme="dark"] .passenger-boost-price-sub,
        html[data-theme="dark"] .passenger-boost-price-current,
        html[data-theme="dark"] .passenger-boost-price-custom {
            color: #ffedd5;
        }

        html[data-theme="dark"] .passenger-boost-price-btn {
            background: #0f172a;
            border-color: #ea580c;
            color: #fdba74;
        }

        /* Cancelar SIEMPRE visible (fijo abajo) mientras se busca conductor */
        body.is-searching #searching-cancel-btn,
        body.is-searching #searching-state .passenger-pending-cancel {
            position: fixed !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            z-index: 13050 !important;
            flex-shrink: 0 !important;
            margin: 0 !important;
            width: 100% !important;
            max-width: none !important;
            min-height: 3.25rem !important;
            padding: 0.85rem 1rem max(1rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            background: #ffffff !important;
            border: none !important;
            border-top: 1px solid #fecaca !important;
            box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08) !important;
            pointer-events: auto !important;
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            visibility: visible !important;
            opacity: 1 !important;
            color: #dc2626 !important;
            text-decoration: none !important;
            font-size: 0.85rem !important;
            font-weight: 900 !important;
            letter-spacing: 0.02em;
            text-transform: uppercase;
            border-radius: 0 !important;
        }

        html[data-theme="dark"] body.is-searching #searching-cancel-btn,
        html[data-theme="dark"] body.is-searching #searching-state .passenger-pending-cancel {
            background: #0f172a !important;
            border-top-color: #7f1d1d !important;
            color: #fca5a5 !important;
            box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35) !important;
        }

        /* Countdown mÃ¡s compacto para no empujar el cancelar fuera de vista */
        body.is-searching #searching-state .passenger-pending-countdown {
            margin-top: 0.45rem;
            padding: 0.5rem 0.7rem 0.55rem;
            max-width: 15.5rem;
        }
        body.is-searching #searching-state .passenger-pending-countdown-ring {
            width: 3.25rem;
            height: 3.25rem;
        }
        body.is-searching #searching-state .passenger-pending-countdown-time {
            font-size: 1.15rem;
        }
        body.is-searching #searching-state .passenger-pending-hero {
            flex-shrink: 0;
            margin-bottom: 0.45rem;
        }
        body.is-searching #searching-state .passenger-pending-route,
        body.is-searching #searching-state .passenger-pending-foot {
            flex-shrink: 0;
        }

        body.is-searching.passenger-search-multi-offers #searching-state {
            justify-content: flex-start;
            gap: 0.3rem;
            padding-top: 0.15rem;
        }

        body.is-searching.passenger-search-multi-offers .passenger-pending-hero {
            margin-bottom: 0.2rem;
            flex-shrink: 0;
        }

        body.is-searching.passenger-search-multi-offers .passenger-pending-pulse {
            width: 2.25rem;
            height: 2.25rem;
            margin-bottom: 0.25rem;
            font-size: 0.9rem;
        }

        body.is-searching.passenger-search-multi-offers .passenger-pending-title {
            font-size: 0.72rem;
        }

        body.is-searching.passenger-search-multi-offers .passenger-pending-sub {
            font-size: 0.62rem;
            margin-top: 0.05rem;
        }

        body.is-searching.passenger-search-multi-offers .passenger-pending-route,
        body.is-searching.passenger-search-multi-offers .passenger-pending-foot {
            display: none !important;
        }

        body.is-searching.passenger-search-multi-offers .passenger-offers-panel {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            margin: 0;
        }

        body.is-searching.passenger-search-multi-offers .passenger-offers-title {
            flex-shrink: 0;
            margin-bottom: 0.4rem;
        }

        body.is-searching.passenger-search-multi-offers .passenger-offers-list {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            touch-action: pan-y;
            padding-right: 0.1rem;
            padding-bottom: 0.2rem;
        }

        body.is-searching.passenger-search-multi-offers .passenger-offer-card {
            flex-shrink: 0;
        }

        body.is-searching.passenger-search-multi-offers .passenger-pending-cancel {
            flex-shrink: 0;
            margin-top: 0.35rem;
            padding-bottom: max(0.25rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.is-searching.passenger-search-single-offer #searching-state {
            justify-content: flex-start;
            gap: 0.35rem;
        }

        body.is-searching.passenger-search-single-offer .passenger-pending-hero {
            margin-bottom: 0.35rem;
        }

        body.is-searching.passenger-search-single-offer .passenger-pending-pulse {
            width: 2.6rem;
            height: 2.6rem;
            margin-bottom: 0.35rem;
            font-size: 1rem;
        }

        body.is-searching.passenger-search-single-offer .passenger-pending-title {
            font-size: 0.78rem;
        }

        body.is-searching.passenger-search-single-offer .passenger-pending-sub {
            font-size: 0.66rem;
            margin-top: 0.1rem;
        }

        body.is-searching.passenger-search-single-offer .passenger-pending-route,
        body.is-searching.passenger-search-single-offer .passenger-pending-foot {
            display: none !important;
        }

        body.is-searching.passenger-search-single-offer .passenger-offers-panel {
            flex: 1 1 auto;
            min-height: 0;
            display: flex;
            flex-direction: column;
            margin: 0;
        }

        body.is-searching.passenger-search-single-offer .passenger-offers-list {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        body.is-searching.passenger-search-single-offer .passenger-offer-card {
            display: flex;
            flex-direction: column;
            justify-content: center;
            min-height: 0;
            padding: 0.85rem 0.9rem;
        }

        body.is-searching.passenger-search-single-offer .passenger-pending-cancel {
            flex-shrink: 0;
            margin-top: auto;
        }

        .trip-request-card {
            padding: 0.9rem;
            background: #fff;
            border: 1px solid #e2e8f0;
            border-radius: 1.1rem;
            box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
        }

        /* â€”â€” Conductor: tarjeta de oferta compacta (negociar sin scroll) â€”â€” */
        .driver-offer-card {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            padding: 0.75rem;
        }

        .driver-offer-card--highlight {
            border: 2px solid #3b82f6;
            box-shadow: 0 8px 22px rgba(59, 130, 246, 0.18);
        }

        .driver-offer-card--selected {
            border: 2px solid #059669;
            box-shadow: 0 8px 22px rgba(5, 150, 105, 0.2);
        }

        .driver-offer-card--selected .driver-offer-preview-btn {
            background: #059669;
            color: #fff;
            border-color: #047857;
        }

        .driver-offer-preview-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            width: 100%;
            padding: 0.45rem 0.65rem;
            border-radius: 0.75rem;
            border: 1px solid #a7f3d0;
            background: #ecfdf5;
            color: #047857;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        /* Banner "Ruta hacia…" desactivado: no molestar en oferta/mapa */
        #driver-offer-map-hint,
        body.driver-offer-popup-open #driver-offer-map-hint,
        body.driver-offer-preview-active #driver-offer-map-hint,
        body.driver-offer-map-peek #driver-offer-map-hint {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        .driver-offer-map-hint-card {
            display: flex;
            align-items: flex-start;
            gap: 0.55rem;
            padding: 0.55rem 0.75rem;
            border-radius: 1rem;
            background: rgba(255, 255, 255, 0.96);
            border: 1px solid #a7f3d0;
            box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
            backdrop-filter: blur(8px);
        }

        .driver-offer-map-hint-back {
            flex-shrink: 0;
            align-self: center;
            min-height: 2.5rem;
            padding: 0.4rem 0.7rem;
            border-radius: 0.75rem;
            border: 1px solid #059669;
            background: #059669;
            color: #fff;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            white-space: nowrap;
            -webkit-tap-highlight-color: transparent;
        }

        .driver-offer-map-hint-back.hidden {
            display: none !important;
        }

        body.driver-offer-map-peek #driver-offer-map-hint,
        body.driver-offer-map-peek #driver-offer-map-hint-back {
            display: none !important;
        }

        .driver-offer-map-hint-icon {
            color: #059669;
            margin-top: 0.1rem;
            flex-shrink: 0;
        }

        .driver-offer-map-hint-title {
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #065f46;
            line-height: 1.25;
        }

        .driver-offer-map-hint-sub {
            font-size: 0.58rem;
            font-weight: 700;
            color: #64748b;
            margin-top: 0.15rem;
            line-height: 1.3;
        }

        body.driver-offer-preview-active.panel-minimized #driver-offer-map-hint,
        body.driver-offer-preview-active.panel-hidden #driver-offer-map-hint {
            display: none !important;
        }

        html[data-theme="dark"] .driver-offer-map-hint-card {
            background: rgba(15, 23, 42, 0.94);
            border-color: #065f46;
        }

        html[data-theme="dark"] .driver-offer-map-hint-title {
            color: #6ee7b7;
        }

        html[data-theme="dark"] .driver-offer-map-hint-sub {
            color: #94a3b8;
        }

        .driver-offer-top {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.5rem;
        }

        .driver-offer-top .driver-offer-name {
            flex: 1;
            min-width: 0;
            text-align: left;
        }

        .driver-offer-top .driver-offer-badges {
            flex-shrink: 0;
            justify-content: flex-end;
        }

        .driver-offer-neg-tag {
            font-size: 0.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #b45309;
            background: #fef3c7;
            border: 1px solid #fcd34d;
            padding: 0.1rem 0.35rem;
            border-radius: 999px;
        }

        .driver-offer-meta {
            min-width: 0;
            flex: 1;
            text-align: right;
        }

        .driver-offer-name {
            margin: 0;
            font-size: 0.72rem;
            font-weight: 900;
            color: #111827;
            line-height: 1.25;
        }

        .driver-offer-badges {
            display: flex;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 0.25rem;
            margin-top: 0.2rem;
        }

        .driver-offer-direct-badge {
            font-size: 0.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: #fff;
            background: #059669;
            padding: 0.12rem 0.4rem;
            border-radius: 999px;
            white-space: nowrap;
        }

        .driver-offer-counter {
            margin: 0;
            font-size: 0.62rem;
            font-weight: 800;
            color: #047857;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
            border-radius: 0.65rem;
            padding: 0.35rem 0.5rem;
        }

        .driver-offer-counter--hero {
            font-size: 0.72rem;
            padding: 0.55rem 0.65rem;
            border-width: 2px;
            border-color: #34d399;
            background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
            line-height: 1.4;
        }

        .driver-offer-waiting {
            margin: 0;
            font-size: 0.62rem;
            font-weight: 700;
            color: #1d4ed8;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            border-radius: 0.65rem;
            padding: 0.35rem 0.5rem;
        }

        .driver-offer-neg-toggle {
            display: block;
            width: 100%;
            margin: 0;
            padding: 0.35rem 0.5rem;
            border: none;
            background: transparent;
            color: #64748b;
            font-size: 0.58rem;
            font-weight: 800;
            text-decoration: underline;
            text-underline-offset: 2px;
            cursor: pointer;
        }

        .driver-offer-neg-toggle:active {
            color: #334155;
        }

        .driver-offer-rejected {
            margin: 0;
            font-size: 0.62rem;
            font-weight: 800;
            color: #b45309;
            background: #fff7ed;
            border: 1px solid #fdba74;
            border-radius: 0.65rem;
            padding: 0.35rem 0.5rem;
            line-height: 1.35;
        }

        .driver-offer-alert {
            margin: 0;
            font-size: 0.58rem;
            font-weight: 900;
            border-radius: 0.65rem;
            padding: 0.35rem 0.5rem;
        }

        .driver-offer-alert--warn {
            color: #b91c1c;
            background: #fef2f2;
            border: 1px solid #fecaca;
        }

        .driver-offer-alert--first {
            color: #6d28d9;
            background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
            border: 1px solid #c4b5fd;
        }

        /* Otros conductores que ya abrieron la misma solicitud */
        .driver-offer-viewers-line {
            margin: 0.35rem 0 0.15rem;
            padding: 0.4rem 0.55rem;
            border-radius: 0.65rem;
            font-size: 0.68rem;
            font-weight: 800;
            line-height: 1.35;
            color: #1e40af;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            border: 1px solid #93c5fd;
            display: flex;
            align-items: flex-start;
            gap: 0.4rem;
        }
        .driver-offer-viewers-line i {
            margin-top: 0.1rem;
            color: #2563eb;
            flex-shrink: 0;
        }
        .driver-offer-viewers-line--solo {
            color: #475569;
            background: #f8fafc;
            border-color: #e2e8f0;
        }
        .driver-offer-viewers-line--solo i { color: #64748b; }
        html[data-theme="dark"] .driver-offer-viewers-line {
            color: #bfdbfe;
            background: rgba(30, 58, 138, 0.35);
            border-color: rgba(96, 165, 250, 0.4);
        }
        html[data-theme="dark"] .driver-offer-viewers-line--solo {
            color: #94a3b8;
            background: rgba(15, 23, 42, 0.45);
            border-color: rgba(71, 85, 105, 0.55);
        }

        /* Banner programado: bien visible para el conductor */
        .driver-offer-card--scheduled {
            border-color: #f59e0b !important;
            box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.35);
        }
        .driver-offer-sched-banner {
            margin: 0.35rem 0 0.5rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
            border: 1.5px solid #f59e0b;
        }
        .driver-offer-sched-banner-title {
            margin: 0;
            font-size: 0.65rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #b45309;
        }
        .driver-offer-sched-banner-when {
            margin: 0.2rem 0 0;
            font-size: 0.95rem;
            font-weight: 900;
            color: #92400e;
            line-height: 1.25;
        }
        .driver-offer-sched-banner-sub {
            margin: 0.25rem 0 0;
            font-size: 0.58rem;
            font-weight: 700;
            color: #a16207;
            line-height: 1.3;
        }
        .driver-offer-sched-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: #fff;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            padding: 0.12rem 0.4rem;
            border-radius: 999px;
            white-space: nowrap;
        }

        .driver-offer-first-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: #fff;
            background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
            padding: 0.12rem 0.4rem;
            border-radius: 999px;
            white-space: nowrap;
            vertical-align: middle;
        }

        .driver-offer-detail-line--first {
            color: #6d28d9;
            font-weight: 800;
        }

        .driver-offer-route {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.55rem;
            border-radius: 0.75rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            font-size: 0.62rem;
            font-weight: 700;
            color: #475569;
            line-height: 1.3;
        }

        /* Ruta completa en oferta: 🚗 ti→cliente + 📍 ruta del cliente (sin truncar) */
        .driver-offer-route-full {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
            padding: 0.5rem 0.55rem;
            border-radius: 0.85rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .driver-offer-route-full--compact {
            max-height: 7.25rem;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 0.4rem 0.5rem;
            gap: 0.35rem;
            overscroll-behavior: contain;
        }

        .driver-offer-route-leg {
            display: flex;
            align-items: flex-start;
            gap: 0.4rem;
            min-width: 0;
        }

        .driver-offer-route-emoji {
            flex-shrink: 0;
            font-size: 0.95rem;
            line-height: 1.2;
            width: 1.25rem;
            text-align: center;
        }

        .driver-offer-route-leg-body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.12rem;
        }

        .driver-offer-route-leg-label {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #64748b;
            line-height: 1.2;
        }

        .driver-offer-route-leg--to-client .driver-offer-route-leg-label {
            color: #b45309;
        }

        .driver-offer-route-leg--client .driver-offer-route-leg-label {
            color: #047857;
        }

        .driver-offer-route-leg-addr {
            font-size: 0.72rem;
            font-weight: 700;
            color: #0f172a;
            line-height: 1.3;
            word-break: break-word;
            white-space: normal;
        }

        .driver-offer-route-point {
            min-width: 0;
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .driver-offer-route-point b {
            color: #059669;
            margin-right: 0.15rem;
        }

        .driver-offer-route-point:last-child b {
            color: #dc2626;
        }

        .driver-offer-route-arrow {
            flex-shrink: 0;
            font-size: 0.55rem;
            color: #94a3b8;
        }

        .driver-offer-route-chain {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
            padding: 0.5rem 0.55rem;
            border-radius: 0.75rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .driver-offer-route-chain--embedded {
            padding: 0.25rem 0 0;
            border: 0;
            background: transparent;
            border-radius: 0;
            gap: 0.22rem;
        }

        .driver-offer-route-chain-row {
            display: flex;
            align-items: flex-start;
            gap: 0.45rem;
            min-width: 0;
        }

        .driver-offer-route-num {
            flex-shrink: 0;
            width: 1.35rem;
            height: 1.35rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.58rem;
            font-weight: 900;
            color: #fff;
            background: #3b82f6;
        }

        .driver-offer-route-num--origin { background: #059669; }
        .driver-offer-route-num--dest { background: #dc2626; }
        .driver-offer-route-num--stop { background: #2563eb; }

        .driver-offer-route-addr {
            flex: 1;
            min-width: 0;
            font-size: 0.68rem;
            font-weight: 700;
            color: #334155;
            line-height: 1.35;
            word-break: break-word;
            white-space: normal;
        }

        html[data-theme="dark"] .driver-offer-route-full {
            background: #0f172a;
            border-color: #1e293b;
        }

        html[data-theme="dark"] .driver-offer-route-leg-addr,
        html[data-theme="dark"] .driver-offer-route-addr {
            color: #e2e8f0;
        }

        html[data-theme="dark"] .driver-offer-route-leg-label {
            color: #94a3b8;
        }

        html[data-theme="dark"] .driver-offer-route-leg--to-client .driver-offer-route-leg-label {
            color: #fbbf24;
        }

        html[data-theme="dark"] .driver-offer-route-leg--client .driver-offer-route-leg-label {
            color: #34d399;
        }

        .driver-offer-stats {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem;
        }

        .driver-offer-stat {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.58rem;
            font-weight: 800;
            padding: 0.22rem 0.45rem;
            border-radius: 999px;
            background: #fff;
            border: 1px solid #e2e8f0;
            color: #334155;
            white-space: nowrap;
        }

        .driver-offer-stat--pickup {
            color: #1d4ed8;
            border-color: #bfdbfe;
            background: #eff6ff;
        }

        .driver-offer-stat--trip {
            color: #047857;
            border-color: #a7f3d0;
            background: #ecfdf5;
        }

        .driver-offer-stat--time {
            color: #6d28d9;
            border-color: #ddd6fe;
            background: #f5f3ff;
        }

        .driver-offer-stat--ref {
            color: #b45309;
            border-color: #fcd34d;
            background: #fffbeb;
        }

        .driver-offer-stat--loading {
            color: #64748b;
            background: #f1f5f9;
        }

        .driver-offer-details {
            font-size: 0.62rem;
        }

        .driver-offer-details summary {
            cursor: pointer;
            font-weight: 800;
            color: #64748b;
            list-style: none;
            padding: 0.2rem 0;
        }

        .driver-offer-details summary::-webkit-details-marker {
            display: none;
        }

        .driver-offer-details summary::before {
            content: 'â–¸ ';
            color: #94a3b8;
        }

        .driver-offer-details[open] summary::before {
            content: 'â–¾ ';
        }

        .driver-offer-details-body {
            margin-top: 0.25rem;
            padding: 0.45rem 0.55rem;
            border-radius: 0.75rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .driver-offer-detail-line {
            margin: 0 0 0.35rem;
            font-size: 0.58rem;
            font-weight: 600;
            color: #475569;
            line-height: 1.35;
        }

        .driver-offer-detail-line:last-child {
            margin-bottom: 0;
        }

        .driver-offer-detail-origin,
        .driver-offer-detail-dest {
            font-weight: 900;
            margin-right: 0.2rem;
        }

        .driver-offer-detail-origin {
            color: #059669;
        }

        .driver-offer-detail-dest {
            color: #dc2626;
        }

        /* â€”â€” Panel de decisiÃ³n (precio + aceptar / rechazar) â€”â€” */
        .driver-offer-decision {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            margin-top: 0.15rem;
            padding: 0.7rem;
            border-radius: 1rem;
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            border: 1px solid #e2e8f0;
        }

        .driver-offer-decision--counter {
            background: linear-gradient(180deg, #ecfdf5 0%, #d1fae5 100%);
            border-color: #6ee7b7;
        }

        .driver-offer-decision--waiting {
            background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
            border-color: #93c5fd;
        }

        .driver-offer-decision--rejected {
            background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
            border-color: #fdba74;
        }

        .driver-offer-decision--low {
            background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
            border-color: #fcd34d;
        }

        .driver-offer-decision-pricebox {
            text-align: center;
            padding: 0.15rem 0.25rem 0;
        }

        .driver-offer-decision-kicker {
            margin: 0;
            font-size: 0.58rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #64748b;
        }

        .driver-offer-decision--counter .driver-offer-decision-kicker {
            color: #047857;
        }

        .driver-offer-decision-amount {
            margin: 0.1rem 0 0;
            font-size: 1.75rem;
            font-weight: 900;
            line-height: 1.05;
            letter-spacing: -0.02em;
            color: #0f172a;
        }

        .driver-offer-decision--counter .driver-offer-decision-amount {
            color: #047857;
        }

        .driver-offer-decision-sub {
            margin: 0.25rem 0 0;
            font-size: 0.62rem;
            font-weight: 700;
            line-height: 1.35;
            color: #64748b;
        }

        .driver-offer-decision-chips {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: 0.3rem;
            margin-top: 0.45rem;
        }

        .driver-offer-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            padding: 0.14rem 0.45rem;
            border-radius: 999px;
            font-size: 0.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .driver-offer-chip--fair {
            color: #047857;
            background: #ecfdf5;
            border: 1px solid #6ee7b7;
        }

        .driver-offer-chip--counter {
            color: #b45309;
            background: #fffbeb;
            border: 1px solid #fcd34d;
        }

        .driver-offer-decision-accept {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 100%;
            min-height: 58px;
            padding: 0.75rem 1rem;
            border: none;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
            color: #fff;
            box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
        }

        .driver-offer-decision-accept--go {
            min-height: 62px;
            background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
            box-shadow: 0 10px 24px rgba(5, 150, 105, 0.34);
        }

        .driver-offer-decision-accept-big {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font-size: 0.95rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            line-height: 1.2;
        }

        .driver-offer-decision-accept-big i {
            font-size: 1.05rem;
        }

        .driver-offer-quick {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
        }

        .driver-offer-quick-group {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
        }

        .driver-offer-quick-label {
            margin: 0;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
        }

        .driver-offer-quick-label--more {
            color: #b45309;
        }

        .driver-offer-quick-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.35rem;
        }

        .driver-offer-quick-btn {
            min-height: 52px;
            border-radius: 0.9rem;
            border: 2px solid transparent;
            font-size: 0.82rem;
            font-weight: 900;
            letter-spacing: 0.02em;
            padding: 0.5rem 0.35rem;
            touch-action: manipulation;
        }

        .driver-offer-quick-btn--more {
            background: #fffbeb;
            border-color: #fcd34d;
            color: #b45309;
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
        }

        .driver-offer-quick-btn:active {
            transform: scale(0.97);
        }

        .driver-offer-decision-skip {
            min-height: 44px;
            border-radius: 0.85rem;
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.02em;
            border: 1px solid #e2e8f0;
            background: #fff;
            color: #64748b;
        }

        .driver-offer-decision-skip--solo {
            width: 100%;
            margin-top: 0.1rem;
        }

        .driver-offer-kbd-toggle {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            width: 100%;
            min-height: 56px;
            padding: 0.65rem 0.85rem;
            border: 2px solid #c4b5fd;
            border-radius: 1rem;
            background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 55%, #e0e7ff 100%);
            color: #5b21b6;
            box-shadow: 0 6px 18px rgba(109, 40, 217, 0.16);
            text-align: left;
        }

        .driver-offer-kbd-toggle--open {
            border-color: #a78bfa;
            background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
            box-shadow: 0 4px 14px rgba(109, 40, 217, 0.12);
        }

        .driver-offer-kbd-toggle-icon {
            flex-shrink: 0;
            width: 2.35rem;
            height: 2.35rem;
            border-radius: 0.85rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
            color: #fff;
            font-size: 1rem;
            box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
        }

        .driver-offer-kbd-toggle--open .driver-offer-kbd-toggle-icon {
            background: linear-gradient(135deg, #64748b 0%, #475569 100%);
            box-shadow: none;
        }

        .driver-offer-kbd-toggle-copy {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.08rem;
        }

        .driver-offer-kbd-toggle-title {
            font-size: 0.78rem;
            font-weight: 900;
            letter-spacing: 0.02em;
            color: #4c1d95;
            line-height: 1.2;
        }

        .driver-offer-kbd-toggle-sub {
            font-size: 0.58rem;
            font-weight: 700;
            color: #7c3aed;
            opacity: 0.9;
        }

        .driver-offer-kbd-toggle-chevron {
            flex-shrink: 0;
            font-size: 0.72rem;
            color: #8b5cf6;
            opacity: 0.85;
        }

        .driver-offer-kbd-drawer {
            display: grid;
            grid-template-rows: 0fr;
            opacity: 0;
            transition: grid-template-rows 0.24s ease, opacity 0.2s ease, margin 0.24s ease;
            margin-top: 0;
            overflow: hidden;
        }

        .driver-offer-kbd-drawer--open {
            grid-template-rows: 1fr;
            opacity: 1;
            margin-top: 0.35rem;
        }

        .driver-offer-kbd-panel {
            min-height: 0;
            overflow: hidden;
            padding: 0.65rem;
            border-radius: 1rem;
            background: #fff;
            border: 2px solid #ddd6fe;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
        }

        .driver-offer-kbd-panel-label {
            margin: 0 0 0.4rem;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #7c3aed;
        }

        .driver-offer-kbd-inner {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 0.45rem;
            align-items: stretch;
        }

        .driver-offer-kbd-input {
            min-height: 52px;
            padding: 0.55rem 0.75rem;
            border: 2px solid #c4b5fd;
            border-radius: 0.9rem;
            background: #faf5ff;
            font-size: 1.1rem;
            font-weight: 900;
            color: #4c1d95;
            outline: none;
        }

        .driver-offer-kbd-input:focus {
            border-color: #8b5cf6;
            box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.22);
        }

        .driver-offer-kbd-send {
            min-width: 6rem;
            min-height: 52px;
            border: none;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #7c3aed 0%, #6366f1 100%);
            color: #fff;
            font-size: 0.72rem;
            font-weight: 900;
            box-shadow: 0 6px 16px rgba(99, 102, 241, 0.32);
        }

        .driver-offer-neg-drawer {
            display: grid;
            grid-template-rows: 0fr;
            opacity: 0;
            transition: grid-template-rows 0.22s ease, opacity 0.18s ease, margin 0.22s ease;
            margin-top: 0;
            overflow: hidden;
        }

        .driver-offer-neg-drawer--open {
            grid-template-rows: 1fr;
            opacity: 1;
            margin-top: 0.15rem;
        }

        .driver-offer-neg-drawer-inner {
            min-height: 0;
            overflow: hidden;
        }

        .driver-offer-neg-label {
            display: block;
            margin: 0 0 0.35rem;
            font-size: 0.58rem;
            font-weight: 800;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .driver-offer-actions {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            padding-top: 0.15rem;
            border-top: 1px solid #e2e8f0;
        }

        .driver-offer-neg-row {
            display: flex;
            gap: 0.4rem;
            align-items: stretch;
        }

        .driver-offer-neg-input {
            flex: 1;
            min-width: 0;
            min-height: 44px;
            padding: 0.45rem 0.65rem;
            border: 2px solid #fcd34d;
            border-radius: 0.85rem;
            background: #fffbeb;
            font-size: 0.85rem;
            font-weight: 800;
            color: #92400e;
            outline: none;
        }

        .driver-offer-neg-input:focus {
            border-color: #f59e0b;
            box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
        }

        .driver-offer-neg-btn {
            flex-shrink: 0;
            min-width: 5.5rem;
            min-height: 44px;
            padding: 0 0.75rem;
            border: none;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: #fff;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.04em;
        }

        .driver-offer-cta-row {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 0.4rem;
        }

        .driver-offer-accept-btn {
            min-height: 46px;
            border: none;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
        }

        .driver-offer-accept-btn--fair {
            min-height: 50px;
            font-size: 0.72rem;
            background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
            box-shadow: 0 8px 20px rgba(5, 150, 105, 0.32);
        }

        .driver-offer-fair-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            padding: 0.12rem 0.4rem;
            border-radius: 999px;
            background: #ecfdf5;
            border: 1px solid #6ee7b7;
            color: #047857;
            font-size: 0.52rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .driver-offer-fair-hint {
            margin: 0;
            font-size: 0.56rem;
            font-weight: 700;
            line-height: 1.35;
            color: #b45309;
            text-align: center;
        }

        .driver-offer-fair-hint--ok {
            color: #047857;
        }

        .driver-offer-decline-btn {
            min-width: 3.5rem;
            min-height: 46px;
            border: 1px solid #e2e8f0;
            border-radius: 0.9rem;
            background: #f8fafc;
            color: #64748b;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.04em;
        }

        .driver-radar-status--hidden {
            display: none !important;
        }

        body.driver-mode .driver-view-header {
            margin-bottom: 0.35rem;
        }

        body.driver-mode .driver-view-header h3 {
            font-size: 0.82rem;
        }

        html[data-theme="dark"] .driver-offer-card {
            background: rgba(30, 41, 59, 0.95);
            border-color: rgba(148, 163, 184, 0.25);
        }

        html[data-theme="dark"] .driver-offer-name {
            color: #f1f5f9;
        }

        html[data-theme="dark"] .driver-offer-route,
        html[data-theme="dark"] .driver-offer-details-body {
            background: rgba(15, 23, 42, 0.6);
            border-color: rgba(148, 163, 184, 0.2);
            color: #cbd5e1;
        }

        html[data-theme="dark"] .driver-offer-neg-input {
            background: rgba(69, 26, 3, 0.5);
            border-color: #b45309;
            color: #fde68a;
        }

        html[data-theme="dark"] .driver-offer-decline-btn {
            background: rgba(15, 23, 42, 0.5);
            border-color: rgba(148, 163, 184, 0.25);
            color: #94a3b8;
        }

        html[data-theme="dark"] .driver-offer-decision {
            background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.9) 100%);
            border-color: rgba(148, 163, 184, 0.25);
        }

        html[data-theme="dark"] .driver-offer-decision-amount {
            color: #f8fafc;
        }

        html[data-theme="dark"] .driver-offer-decision-sub,
        html[data-theme="dark"] .driver-offer-decision-kicker {
            color: #94a3b8;
        }

        html[data-theme="dark"] .driver-offer-decision-skip {
            background: rgba(15, 23, 42, 0.55);
            border-color: rgba(148, 163, 184, 0.25);
            color: #cbd5e1;
        }

        html[data-theme="dark"] .driver-offer-quick-btn--more {
            background: rgba(69, 26, 3, 0.45);
            border-color: #b45309;
            color: #fde68a;
        }

        html[data-theme="dark"] .driver-offer-kbd-toggle {
            background: linear-gradient(135deg, rgba(76, 29, 149, 0.45) 0%, rgba(49, 46, 129, 0.5) 100%);
            border-color: rgba(167, 139, 250, 0.45);
        }

        html[data-theme="dark"] .driver-offer-kbd-toggle-title {
            color: #e9d5ff;
        }

        html[data-theme="dark"] .driver-offer-kbd-panel {
            background: rgba(15, 23, 42, 0.65);
            border-color: rgba(167, 139, 250, 0.35);
        }

        html[data-theme="dark"] .driver-offer-kbd-input {
            background: rgba(30, 27, 75, 0.6);
            border-color: #7c3aed;
            color: #ede9fe;
        }

        .trip-pay-badge {
            display: inline-block;
            margin-top: 0.15rem;
            padding: 0.15rem 0.45rem;
            font-size: 8px;
            font-weight: 900;
            border-radius: 999px;
            text-transform: uppercase;
        }

        .trip-pay-cash { background: #d1fae5; color: #047857; }
        .trip-pay-saldo { background: #ede9fe; color: #6d28d9; }

        #service-radius-slider::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: #2563eb;
            border: 2px solid #fff;
            box-shadow: 0 1px 4px rgba(37, 99, 235, 0.4);
        }

        .radius-chip-active {
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
        }

        .collapsible-panel { transition: max-height 0.35s ease; }

        /* Hide nav HUD by default in active trips, but driver logic controls it */
        /* nav-hud-bottom visibility is controlled explicitly by driver-nav and its own minimize button */
        body.trip-active:not(.driver-nav-mode) #nav-hud-bottom { display: none; }

        /* Minimizado de verdad en Android/iOS: barra compacta, no media pantalla */
        body.trip-active #control-panel.panel-collapsed,
        body.trip-active.panel-minimized #control-panel {
            max-height: min(22dvh, 148px) !important;
            min-height: 0 !important;
            height: auto !important;
            overflow: hidden !important;
            -webkit-overflow-scrolling: auto;
            padding-bottom: max(0.35rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.trip-active #control-panel.panel-collapsed #trip-expanded-content,
        body.trip-active.panel-minimized #control-panel #trip-expanded-content {
            display: none !important;
        }

        body.trip-active #control-panel.panel-collapsed .panel-expanded-only,
        body.trip-active.panel-minimized #control-panel .panel-expanded-only {
            display: none !important;
        }

        body.trip-active #control-panel.panel-collapsed #trip-actions-sticky,
        body.trip-active.panel-minimized #control-panel #trip-actions-sticky,
        body.trip-active #control-panel.panel-collapsed #client-pin-panel,
        body.trip-active #control-panel.panel-collapsed #client-security-controls,
        body.trip-active #control-panel.panel-collapsed #passenger-alert-settings,
        body.trip-active #control-panel.panel-collapsed #active-trip-route-summary {
            display: none !important;
        }

        body.trip-active #control-panel.panel-collapsed .trip-drag-handle {
            display: flex !important;
            justify-content: center;
            padding: 0.45rem 0 0.15rem;
        }

        body.trip-active #control-panel.panel-collapsed #active-trip-panel {
            height: auto;
            flex: 0 0 auto;
            min-height: 0;
            overflow: hidden;
        }

        body.trip-active #control-panel.panel-collapsed #panel-content {
            flex: 0 0 auto;
            min-height: 0;
            overflow: hidden;
        }

        body.trip-active #control-panel.panel-collapsed::before {
            margin-bottom: 0.25rem;
            cursor: pointer;
        }

        body.trip-active #control-panel.panel-collapsed #trip-mini-bar {
            margin-bottom: 0;
            padding-top: 0.15rem;
            padding-bottom: 0.35rem;
        }

        body.trip-active #control-panel.panel-collapsed .trip-actions-sticky {
            display: none !important;
            padding-top: 0;
        }

        body.trip-active.panel-minimized #fab-center,
        body.trip-active.panel-minimized #fab-traffic {
            bottom: calc(min(22dvh, 156px) + 0.75rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.trip-active #control-panel {
            z-index: 300;
        }

        body.is-navigating #nav-hud-top {
            display: flex !important;
        }

        /*
         * Conductor con panel ABIERTO: nav vive en #driver-panel-nav (sheet).
         * HUD flotante oculto solo en ese caso.
         */
        body.driver-mode:not(.panel-minimized) #nav-hud-top,
        body.driver-mode:not(.panel-minimized) #nav-hud-bottom,
        body.driver-nav-mode:not(.panel-minimized) #nav-hud-top,
        body.driver-nav-mode:not(.panel-minimized) #nav-hud-bottom,
        body.trip-active.driver-mode:not(.panel-minimized) #nav-hud-top,
        body.trip-active.driver-mode:not(.panel-minimized) #nav-hud-bottom,
        body.is-navigating.driver-mode:not(.panel-minimized) #nav-hud-top,
        body.is-navigating.driver-mode:not(.panel-minimized) #nav-hud-bottom {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        /* Bottom chip ETA: siempre oculto en conductor (ETA en panel / mini-bar) */
        body.driver-mode #nav-hud-bottom,
        body.driver-nav-mode #nav-hud-bottom,
        body.trip-active.driver-mode #nav-hud-bottom {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        /*
         * Tras PIN / panel minimizado: el sheet no muestra #driver-panel-nav.
         * Mostrar HUD superior de giros (como Google) — el conductor NECESITA la nav.
         */
        body.driver-mode.panel-minimized.is-navigating #nav-hud-top,
        body.driver-mode.panel-minimized.driver-nav-mode #nav-hud-top,
        body.driver-mode.panel-minimized.driver-trip-dest-phase #nav-hud-top,
        body.trip-active.driver-mode.panel-minimized.is-navigating #nav-hud-top,
        body.trip-active.driver-mode.panel-minimized.driver-nav-mode #nav-hud-top,
        body.trip-active.driver-mode.panel-minimized.driver-trip-dest-phase #nav-hud-top,
        body.driver-mode.panel-collapsed.is-navigating #nav-hud-top,
        body.driver-mode.panel-collapsed.driver-nav-mode #nav-hud-top,
        body.driver-mode.panel-collapsed.driver-trip-dest-phase #nav-hud-top {
            display: flex !important;
            visibility: visible !important;
            pointer-events: auto !important;
            opacity: 1 !important;
            z-index: 2800 !important;
        }

        /* NavegaciÃ³n dentro del panel central del conductor */
        .driver-panel-nav {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
            padding: 0.55rem 0.6rem;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
            color: #fff;
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 4px 14px rgba(15, 118, 110, 0.22);
        }

        .driver-panel-nav.hidden {
            display: none !important;
        }

        body.trip-active.driver-mode.is-navigating #driver-panel-nav:not(.hidden),
        body.trip-active.driver-mode.driver-nav-mode #driver-panel-nav:not(.hidden) {
            display: flex !important;
        }

        /* Minimizado: ocultar bloque de nav (queda ETA en mini-bar) */
        body.trip-active.driver-mode.panel-minimized #driver-panel-nav,
        body.trip-active.driver-mode #control-panel.panel-collapsed #driver-panel-nav {
            display: none !important;
        }

        .driver-panel-nav-step {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            min-width: 0;
        }

        .driver-panel-nav-icon {
            width: 2rem;
            height: 2rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.16);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 0.85rem;
        }

        .driver-panel-nav-text {
            margin: 0;
            font-size: 0.82rem;
            font-weight: 800;
            line-height: 1.2;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .driver-panel-nav-dist {
            margin: 0.1rem 0 0;
            font-size: 0.65rem;
            font-weight: 600;
            opacity: 0.88;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .driver-panel-nav-voice {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            flex-shrink: 0;
        }

        .driver-panel-nav-voice-btn {
            width: 1.7rem;
            height: 1.7rem;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.14);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .driver-panel-nav-voice-btn[aria-pressed="false"] {
            opacity: 0.55;
        }

        .driver-panel-nav-eta-row {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            padding-top: 0.3rem;
            border-top: 1px solid rgba(255, 255, 255, 0.12);
            min-width: 0;
        }

        .driver-panel-nav-eta-time {
            font-size: 0.95rem;
            font-weight: 900;
            color: #bbf7d0;
            line-height: 1;
            flex-shrink: 0;
        }

        .driver-panel-nav-eta-meta {
            flex: 1;
            min-width: 0;
            font-size: 0.62rem;
            font-weight: 700;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            color: rgba(255, 255, 255, 0.78);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .driver-panel-nav-center-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            flex-shrink: 0;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.16);
            color: #fff;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 0.35rem 0.55rem;
            min-height: 1.7rem;
            cursor: pointer;
        }

        /* Vista conductor: (legacy) fajas flotantes ya ocultas arriba */
        body.driver-nav-mode #nav-hud-top:not(.is-drag-positioned) {
            /* no-op: oculto en driver */
        }

        body.driver-nav-mode #nav-hud-top:not(.is-drag-positioned) {
            width: min(320px, calc(100vw - 1.25rem));
            max-width: min(320px, calc(100vw - 1.25rem));
        }

        /* Chip ETA inferior — layout legacy; conductor lo oculta (ETA en panel / mini-bar) */
        body.driver-nav-mode #nav-hud-bottom {
            position: absolute;
            left: max(8px, var(--safe-left, env(safe-area-inset-left, 0px)));
            right: auto;
            top: auto;
            bottom: calc(5.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
            width: auto !important;
            min-width: 0;
            max-width: min(158px, 44vw) !important;
            background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
            color: white;
            border-radius: 0.75rem;
            border: 1px solid rgba(255, 255, 255, 0.12);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
            z-index: 1850;
            /* No forzar flex: en conductor el bottom se oculta (nav = HUD top + panel) */
            display: none !important;
            flex-direction: column;
            overflow: hidden;
            transition: opacity 0.2s ease, bottom 0.25s ease, max-width 0.25s ease;
            padding: 0;
            font-size: 0.72em;
            pointer-events: none;
            max-height: 4.75rem;
        }

        /* Sheet Uber expandido (~38% / 18rem) */
        body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden) #nav-hud-bottom {
            bottom: calc(min(46%, 22rem) + 0.45rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        /* Sheet minimizado: chip mÃ¡s abajo */
        body.driver-nav-mode.trip-active.panel-minimized #nav-hud-bottom {
            bottom: calc(5.75rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-nav-mode.panel-hidden #nav-hud-bottom {
            bottom: max(12px, var(--safe-bottom, env(safe-area-inset-bottom, 12px)));
        }

        body.driver-nav-mode #nav-hud-bottom #nav-total-time {
            font-size: 1.05rem !important;
            line-height: 1;
            color: #bbf7d0 !important;
        }

        body.driver-nav-mode #nav-hud-bottom #nav-total-dist,
        body.driver-nav-mode #nav-hud-bottom #nav-total-eta {
            color: rgba(255, 255, 255, 0.78);
        }

        body.driver-nav-mode #nav-hud-bottom .nav-hud-panel {
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        body.driver-nav-mode #nav-hud-bottom .nav-hud-panel-content {
            flex-direction: row;
            align-items: center;
            gap: 6px;
            padding: 4px 6px 6px !important;
        }

        .nav-voice-toggle-btn,
        .nav-voice-pick-btn {
            border-radius: 9999px;
            background: rgba(255, 255, 255, 0.14);
            color: #fff;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: 0;
            font-size: 0.7rem;
        }

        .nav-voice-toggle-btn {
            width: 1.55rem;
            height: 1.55rem;
        }

        .nav-voice-pick-btn {
            gap: 0.15rem;
            min-height: 1.55rem;
            padding: 0 0.4rem 0 0.35rem;
            max-width: 3.6rem;
        }

        .nav-voice-pick-label {
            font-size: 0.55rem;
            font-weight: 800;
            letter-spacing: 0.02em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 1.8rem;
        }

        .nav-voice-toggle-btn[aria-pressed="false"] {
            opacity: 0.65;
        }

        body.driver-nav-mode #nav-hud-bottom .nav-hud-panel-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            background: rgba(0, 0, 0, 0.14);
            font-size: 8px;
            padding: 2px 24px 2px 6px;
            border-radius: 0.75rem 0.75rem 0 0;
            min-height: 1.35rem;
        }

        body.driver-nav-mode #nav-hud-bottom .nav-hud-toggle-btn {
            position: absolute;
            top: 2px;
            right: 4px;
            z-index: 3;
            border: none;
            background: rgba(255, 255, 255, 0.14);
            color: white;
            font-size: 11px;
            font-weight: 800;
            line-height: 1;
            min-width: 22px;
            min-height: 22px;
            border-radius: 6px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0 4px;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        body.driver-nav-mode #nav-hud-bottom .nav-hud-toggle-collapsed {
            display: none;
            align-items: center;
            gap: 0.3rem;
            font-size: 9px;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
        }

        body.driver-nav-mode.nav-hud-minimized #nav-hud-bottom {
            width: auto !important;
            max-width: none !important;
            max-height: none;
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            overflow: visible;
            border-radius: 0;
            opacity: 1;
            transform: none;
        }

        body.driver-nav-mode.nav-hud-minimized #nav-hud-bottom .nav-hud-panel {
            display: none !important;
        }

        /* BotÃ³n flotante ETA cuando el chip estÃ¡ minimizado */
        body.driver-nav-mode.nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-btn {
            position: absolute;
            left: max(8px, var(--safe-left, env(safe-area-inset-left, 0px)));
            top: auto;
            right: auto;
            bottom: calc(5.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
            background: linear-gradient(135deg, #0f766e 0%, #115e59 100%);
            color: white;
            font-size: 9px;
            font-weight: 800;
            padding: 6px 10px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
            white-space: nowrap;
            min-width: 0;
            min-height: 2rem;
        }

        body.driver-nav-mode.nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-expanded {
            display: none;
        }

        body.driver-nav-mode.nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-collapsed {
            display: inline-flex;
        }

        body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden).nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-btn {
            bottom: calc(min(38%, 18rem) + 0.45rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-nav-mode.trip-active.panel-minimized.nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-btn {
            bottom: calc(5.75rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-nav-mode.panel-hidden.nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-btn {
            bottom: max(12px, var(--safe-bottom, env(safe-area-inset-bottom, 12px)));
        }

        body.driver-nav-mode .driver-nav-recenter-btn {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: 0;
            width: 1.85rem !important;
            height: 1.85rem !important;
            min-width: 1.85rem !important;
            padding: 0 !important;
            font-size: 0.7rem !important;
            border-radius: 999px !important;
            background: rgba(255, 255, 255, 0.16) !important;
            color: #fff !important;
            box-shadow: none !important;
            border: 0 !important;
        }

        /* Evitar que reglas viejas de 70dvh vuelvan a empujar el chip al centro */
        body.trip-active.driver-mode.driver-nav-mode #nav-hud-top,
        body.trip-active.driver-mode.is-navigating #nav-hud-top {
            max-height: 4.5rem !important;
        }

        body.trip-active.driver-mode.driver-nav-mode #nav-hud-bottom {
            max-height: 4.75rem !important;
            max-width: min(158px, 44vw) !important;
        }

        body.driver-nav-mode #control-panel {
            z-index: 1500;
        }

        body.driver-nav-mode #control-panel.panel-collapsed,
        body.driver-nav-mode.panel-minimized #control-panel {
            max-height: 3rem !important;
            transform: translateY(0) !important;
            visibility: visible !important;
            pointer-events: auto !important;
            border-radius: 1.25rem 1.25rem 0 0;
            opacity: 0.96;
            z-index: 2300; /* on top so toggle button is clickable even if hud overlaps slightly */
        }

        body.driver-nav-mode #control-panel.panel-collapsed #trip-expanded-content,
        body.driver-nav-mode #control-panel.panel-collapsed .panel-expanded-only,
        body.driver-nav-mode #control-panel.panel-collapsed .trip-drag-handle,
        body.driver-nav-mode.panel-minimized #control-panel #trip-expanded-content,
        body.driver-nav-mode.panel-minimized #control-panel .panel-expanded-only,
        body.driver-nav-mode.panel-minimized #control-panel .trip-drag-handle {
            display: none !important;
        }

        body.driver-nav-mode #control-panel #trip-mini-bar {
            margin-bottom: 0;
            padding-top: 0.35rem;
        }

        /* Mini-bar keeps its content; no auto-hiding. User controls via minimize button. */

        /* FAB centrar del mapa: oculto en conductor (usar panel verde) */
        body.driver-nav-mode #fab-center,
        body.driver-nav-mode.trip-active #fab-center,
        body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden) #fab-center,
        body.driver-nav-mode.panel-hidden #fab-center,
        body.driver-nav-mode.nav-hud-minimized #fab-center,
        body.driver-nav-mode.panel-hidden.nav-hud-minimized #fab-center {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        body.driver-nav-mode #fab-traffic {
            bottom: calc(7.25rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
            right: max(12px, var(--safe-right, env(safe-area-inset-right, 12px)));
        }

        body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden) #fab-traffic {
            bottom: calc(min(46%, 22rem) + 3.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-nav-mode.panel-hidden #fab-traffic {
            bottom: calc(5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-nav-mode.nav-hud-minimized #fab-traffic {
            bottom: calc(5.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
        }

        body.driver-nav-mode #map {
            height: 100% !important;
        }

        @media (min-width: 768px) {
            body.driver-nav-mode #nav-hud-bottom,
            body.driver-nav-mode.nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-btn {
                bottom: max(1.25rem, var(--safe-bottom, env(safe-area-inset-bottom, 1.25rem)));
                left: max(1.25rem, var(--safe-left, env(safe-area-inset-left, 1.25rem)));
            }

            body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden) #nav-hud-bottom,
            body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden).nav-hud-minimized #nav-hud-bottom .nav-hud-toggle-btn {
                bottom: max(1.25rem, var(--safe-bottom, env(safe-area-inset-bottom, 1.25rem)));
            }

            body.driver-nav-mode #fab-center,
            body.driver-nav-mode #fab-traffic,
            body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden) #fab-center,
            body.driver-nav-mode.trip-active:not(.panel-minimized):not(.panel-hidden) #fab-traffic {
                bottom: max(1.25rem, var(--safe-bottom, env(safe-area-inset-bottom, 1.25rem)));
            }

            body.driver-nav-mode #fab-traffic {
                right: calc(380px + 2.25rem);
            }
        }

        /* Vista pasajero estilo Uber â€” mapa grande + seguimiento del conductor.
           Minimizado: barra compacta (status + conductor), no full height. */
        body.passenger-track-mode.trip-active #control-panel.panel-collapsed,
        body.passenger-track-mode.trip-active.panel-minimized #control-panel {
            max-height: min(24dvh, 160px) !important;
            height: auto !important;
            min-height: 0 !important;
            overflow: hidden !important;
            -webkit-overflow-scrolling: auto;
        }

        body.passenger-track-mode.trip-active #control-panel.panel-collapsed #panel-content,
        body.passenger-track-mode.trip-active #control-panel.panel-collapsed #active-trip-panel {
            overflow: hidden;
            flex: 0 0 auto;
            min-height: 0;
        }

        body.passenger-track-mode.trip-active #control-panel.panel-collapsed #trip-expanded-content,
        body.passenger-track-mode.trip-active #control-panel.panel-collapsed #trip-actions-sticky,
        body.passenger-track-mode.trip-active #control-panel.panel-collapsed .panel-expanded-only {
            display: none !important;
        }

        body.passenger-track-mode.trip-active #control-panel.panel-collapsed .trip-drag-handle {
            display: flex !important;
            justify-content: center;
            padding: 0.4rem 0 0.1rem;
        }

        body.passenger-nav-mode #nav-hud-top {
            display: none !important;
        }

        /* Pasajero: un solo panel â€” barra ETA + tarjeta conductor fusionados */
        body.trip-active:not(.driver-mode) #trip-mini-bar {
            display: none !important;
        }

        body.trip-active:not(.driver-mode) #eta-indicator {
            display: none !important;
        }

        body.trip-active:not(.driver-mode) #trip-partner-info {
            margin-bottom: 0;
        }

        body.trip-active:not(.driver-mode) #trip-partner-info .driver-assigned-status {
            display: flex !important;
        }

        .driver-assigned-status-actions {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            flex-shrink: 0;
        }

        .tp-status-toggle-btn {
            border: 1px solid rgba(255, 255, 255, 0.38);
            background: rgba(255, 255, 255, 0.16);
            color: #fff;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            border-radius: 999px;
            padding: 0.35rem 0.55rem;
            min-height: 1.75rem;
            flex-shrink: 0;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #active-trip-route-summary,
        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #tp-role-label,
        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #tp-driver-extra {
            display: none !important;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #trip-partner-info .driver-assigned-body {
            padding: 0.55rem 0.75rem 0.65rem;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #tp-photo {
            width: 2.65rem !important;
            height: 2.65rem !important;
            max-width: 2.65rem !important;
            max-height: 2.65rem !important;
            min-width: 2.65rem !important;
            min-height: 2.65rem !important;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #tp-name {
            font-size: 0.82rem;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #trip-partner-info .driver-plate-badge {
            display: none;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #trip-partner-info .driver-vehicle-grid {
            display: none;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #trip-partner-info .driver-assigned-body > .flex {
            align-items: center;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #tp-plate {
            display: inline;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            color: #64748b;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #tp-name::after {
            content: ' Â· ' attr(data-plate);
            font-size: 0.62rem;
            font-weight: 800;
            color: #64748b;
            letter-spacing: 0.04em;
        }

        body.trip-active:not(.driver-mode) #control-panel:not(.panel-collapsed) #tp-name::after {
            content: none;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #driver-active-body {
            overflow: visible;
            max-height: none;
            -webkit-overflow-scrolling: auto;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed,
        body.trip-active:not(.driver-mode).panel-minimized #control-panel {
            max-height: min(24dvh, 160px) !important;
            height: auto !important;
            overflow: hidden !important;
            -webkit-overflow-scrolling: auto;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #panel-content {
            overflow: hidden;
            flex: 0 0 auto;
        }

        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #driver-active-body {
            max-height: none;
            overflow: hidden;
        }

        /* Pasajero minimizado: solo status + foto/nombre (sin share/SOS/alertas del panel) */
        body.trip-active:not(.driver-mode) #control-panel.panel-collapsed #trip-partner-info {
            margin-bottom: 0;
        }

        body.trip-active:not(.driver-mode) #control-panel:not(.panel-collapsed) #driver-active-body {
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
        }

        body.trip-active.driver-mode #tp-status-toggle {
            display: none !important;
        }

        body.passenger-track-mode #eta-indicator {
            top: max(10px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 6px));
            width: 94%;
            max-width: 440px;
            padding: 14px 18px;
            border-color: #c4b5fd;
            box-shadow: 0 12px 32px rgba(91, 33, 182, 0.18);
        }

        body.passenger-nav-mode #fab-center:not(.hidden) {
            bottom: max(1.25rem, var(--safe-bottom, env(safe-area-inset-bottom, 1.25rem)));
            left: max(12px, var(--safe-left, env(safe-area-inset-left, 12px)));
        }

        body.passenger-nav-mode #fab-traffic {
            display: none !important;
        }

        body.passenger-track-mode #eta-text {
            font-size: 0.95rem;
        }

        body.passenger-track-mode #fab-center:not(.hidden) {
            bottom: 6.5rem;
            left: 12px;
        }

        body.passenger-track-mode #trip-mini-bar {
            padding-top: 0.15rem;
            margin-bottom: 0;
        }

        body.passenger-track-mode #trip-mini-time {
            font-size: 1.35rem;
        }

        /* Banner Â«N conductores en tu ciudad / disponiblesÂ»: oculto (estorba al pasajero) */
        #nearby-drivers-indicator,
        #nearby-drivers-indicator:not(.hidden) {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        #nearby-drivers-indicator {
            top: max(12px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 8px));
        }

        body.trip-active #nearby-drivers-indicator {
            top: max(52px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 48px));
        }
        
        #chat-section { transition: max-height 0.4s ease, opacity 0.3s ease; overflow: hidden; }
        #chat-section.collapsed { max-height: 0; opacity: 0; padding: 0; }

        .pac-container { z-index: 100000 !important; border-radius: 1rem !important; border: none !important; }
        
        @keyframes pulse-blue {
            0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
            70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(37, 99, 235, 0); }
            100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7); }
        }
        .searching-pulse { animation: pulse-blue 2s infinite; }

        /* â€”â€” Pasajero: esperando conductor (panel simple) â€”â€” */
        .passenger-pending-wrap {
            text-align: center;
            padding: 0 0.25rem 0.5rem;
        }
        .passenger-pending-hero { margin-bottom: 0.85rem; }
        .passenger-pending-pulse {
            width: 3.5rem;
            height: 3.5rem;
            margin: 0 auto 0.75rem;
            border-radius: 9999px;
            background: #eff6ff;
            color: #2563eb;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
            animation: pulse-blue 2s infinite;
        }
        .passenger-pending-title {
            font-size: 0.9rem;
            font-weight: 900;
            color: #1e293b;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .passenger-pending-sub {
            margin-top: 0.25rem;
            font-size: 0.72rem;
            color: #64748b;
            line-height: 1.35;
        }
        /* Mensaje volando + fotos de conductores */
        .passenger-notify-fly-stage {
            position: relative;
            margin: 0.4rem auto 0.5rem;
            padding: 0.55rem 0.45rem 0.45rem;
            border-radius: 0.95rem;
            background: #fff;
            border: 1px solid #dbeafe;
            max-width: 18rem;
            min-height: 5.5rem;
            overflow: hidden;
        }
        .passenger-notify-fly-msg {
            position: absolute;
            top: 0;
            left: 0;
            z-index: 5;
            width: 1.75rem;
            height: 1.75rem;
            border-radius: 9999px;
            background: #2563eb;
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
            opacity: 0;
            pointer-events: none;
            will-change: transform, opacity;
        }
        .passenger-notify-fly-msg.is-flying {
            opacity: 1;
        }
        .passenger-notify-fly-msg.is-hit {
            background: #059669;
        }
        .passenger-notify-avatars {
            display: flex;
            flex-wrap: nowrap;
            gap: 0.45rem;
            overflow-x: auto;
            overflow-y: hidden;
            -webkit-overflow-scrolling: touch;
            scroll-snap-type: x proximity;
            padding: 0.35rem 0.25rem 0.15rem;
            justify-content: flex-start;
            scrollbar-width: none;
        }
        .passenger-notify-avatars::-webkit-scrollbar { display: none; }
        .passenger-notify-avatar {
            position: relative;
            flex: 0 0 auto;
            width: 2.65rem;
            scroll-snap-align: center;
            text-align: center;
            transition: transform 0.25s ease, filter 0.25s ease;
            filter: grayscale(0.35) opacity(0.75);
        }
        .passenger-notify-avatar img {
            width: 2.45rem;
            height: 2.45rem;
            border-radius: 9999px;
            object-fit: cover;
            border: 2px solid #e2e8f0;
            background: #eff6ff;
            display: block;
            margin: 0 auto;
        }
        .passenger-notify-avatar-label {
            display: block;
            margin-top: 0.15rem;
            font-size: 0.52rem;
            font-weight: 800;
            color: #64748b;
            max-width: 2.65rem;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .passenger-notify-avatar-check {
            position: absolute;
            top: -2px;
            right: 2px;
            width: 0.95rem;
            height: 0.95rem;
            border-radius: 9999px;
            background: #10b981;
            color: #fff;
            font-size: 0.48rem;
            display: none;
            align-items: center;
            justify-content: center;
            border: 1.5px solid #fff;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
        }
        .passenger-notify-avatar.is-target {
            filter: none;
            transform: scale(1.08);
            z-index: 2;
        }
        .passenger-notify-avatar.is-target img {
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
        }
        .passenger-notify-avatar.is-receiving img {
            animation: passenger-notify-pop 0.35s ease;
        }
        .passenger-notify-avatar.is-received {
            filter: none;
            opacity: 1;
        }
        .passenger-notify-avatar.is-received .passenger-notify-avatar-check {
            display: flex;
        }
        .passenger-notify-avatar.is-received img {
            border-color: #10b981;
        }
        @keyframes passenger-notify-pop {
            0% { transform: scale(1); }
            45% { transform: scale(1.12); }
            100% { transform: scale(1); }
        }
        .passenger-notify-name-line {
            margin: 0.35rem 0.25rem 0;
            font-size: 0.72rem;
            font-weight: 900;
            color: #1e3a8a;
            line-height: 1.3;
            letter-spacing: 0.01em;
            min-height: 1.7rem;
        }
        .passenger-notify-name-line .passenger-notify-ok {
            color: #059669;
            margin-right: 0.15rem;
        }
        .passenger-notify-name-progress {
            margin: 0.1rem 0 0;
            font-size: 0.55rem;
            font-weight: 800;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }
        .passenger-pending-countdown-hint {
            transition: opacity 0.35s ease;
        }
        html[data-theme="dark"] .passenger-notify-fly-stage {
            background: #0f172a;
            border-color: #1e3a8a;
        }
        html[data-theme="dark"] .passenger-notify-name-line {
            color: #93c5fd;
        }
        html[data-theme="dark"] .passenger-notify-name-progress {
            color: #94a3b8;
        }
        html[data-theme="dark"] .passenger-notify-avatar-label {
            color: #94a3b8;
        }
        html[data-theme="dark"] .passenger-notify-avatar img {
            border-color: #334155;
        }

        .passenger-pending-countdown {
            margin: 0.85rem auto 0;
            max-width: 17rem;
            padding: 0.75rem 0.9rem 0.85rem;
            border-radius: 1rem;
            background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
            border: 1px solid #bfdbfe;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
        }
        .passenger-pending-countdown-label {
            font-size: 0.72rem;
            font-weight: 800;
            color: #1e40af;
            line-height: 1.35;
            margin: 0 0 0.55rem;
        }
        .passenger-pending-countdown-ring {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 4.25rem;
            height: 4.25rem;
            margin: 0 auto;
            border-radius: 9999px;
            background: #fff;
            border: 3px solid #3b82f6;
            box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
            animation: pulse-blue 2s infinite;
        }
        .passenger-pending-countdown-time {
            font-size: 1.45rem;
            font-weight: 900;
            color: #1d4ed8;
            line-height: 1;
            font-variant-numeric: tabular-nums;
        }
        .passenger-pending-countdown-unit {
            font-size: 0.58rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #64748b;
            margin-top: 0.1rem;
        }
        .passenger-pending-countdown-hint {
            margin: 0.55rem 0 0;
            font-size: 0.65rem;
            font-weight: 700;
            color: #475569;
            line-height: 1.3;
        }
        .passenger-pending-route {
            margin: 0 0.25rem 0.75rem;
            padding: 0.75rem 0.85rem;
            border-radius: 1rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            text-align: left;
        }
        .passenger-pending-route-lines { font-size: 0.72rem; color: #334155; }
        .passenger-pending-listed-price {
            margin-top: 0.45rem;
            font-size: 0.78rem;
            color: #475569;
        }
        .passenger-pending-listed-price strong { color: #2563eb; font-weight: 900; }
        .passenger-offers-panel {
            margin: 0 0.25rem 0.65rem;
            text-align: left;
        }
        .passenger-offers-title {
            font-size: 0.68rem;
            font-weight: 900;
            color: #047857;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            margin-bottom: 0.55rem;
        }
        .passenger-offers-list {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }
        .passenger-viewer-card {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            background: #fff;
            border: 1px solid #a7f3d0;
            border-radius: 1rem;
            padding: 0.65rem 0.75rem;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1);
        }
        .passenger-viewer-photo {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 9999px;
            object-fit: cover;
            flex-shrink: 0;
            border: 2px solid #d1fae5;
        }
        .passenger-viewer-meta {
            flex: 1;
            min-width: 0;
        }
        .passenger-viewer-name {
            margin: 0;
            font-size: 0.82rem;
            font-weight: 900;
            color: #064e3b;
        }
        .passenger-viewer-sub {
            margin: 0.12rem 0 0;
            font-size: 0.65rem;
            font-weight: 700;
            color: #047857;
        }
        .passenger-viewer-badge {
            flex-shrink: 0;
            width: 2rem;
            height: 2rem;
            border-radius: 9999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #ecfdf5;
            color: #059669;
            font-size: 0.75rem;
        }
        .passenger-offer-card {
            background: #fff;
            border: 1px solid #d1fae5;
            border-radius: 1rem;
            padding: 0.7rem 0.75rem;
            box-shadow: 0 4px 14px rgba(16, 185, 129, 0.08);
        }
        .passenger-offer-card--top {
            border-color: #34d399;
            box-shadow: 0 6px 18px rgba(16, 185, 129, 0.16);
        }
        .passenger-offer-head {
            display: flex;
            align-items: center;
            gap: 0.6rem;
        }
        .passenger-offer-photo {
            width: 2.6rem;
            height: 2.6rem;
            border-radius: 9999px;
            object-fit: cover;
            flex-shrink: 0;
            border: 2px solid #ecfdf5;
        }
        .passenger-offer-meta { flex: 1; min-width: 0; }
        .passenger-offer-name {
            font-size: 0.82rem;
            font-weight: 900;
            color: #064e3b;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            flex-wrap: wrap;
        }
        .passenger-offer-tag {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #047857;
            background: #d1fae5;
            border-radius: 9999px;
            padding: 0.1rem 0.4rem;
        }
        .passenger-offer-sub {
            font-size: 0.68rem;
            color: #64748b;
            margin-top: 0.1rem;
        }
        .passenger-offer-price {
            font-size: 1rem;
            font-weight: 900;
            color: #059669;
            white-space: nowrap;
        }
        .passenger-offer-price-wrap {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            flex-shrink: 0;
        }
        .passenger-offer-counter-tag {
            font-size: 7.5px;
            font-weight: 900;
            background: #0e7490;
            color: #fff;
            padding: 0 3px;
            border-radius: 3px;
            vertical-align: middle;
            margin-left: 3px;
            letter-spacing: 0.5px;
        }

        .passenger-offer-your-counter {
            font-size: 0.58rem;
            font-weight: 800;
            color: #0e7490;
            background: #e0f2fe;
            padding: 1px 5px;
            border-radius: 4px;
            display: inline-block;
            margin-top: 2px;
            letter-spacing: 0.02em;
        }
        .passenger-offer-actions {
            display: flex;
            gap: 0.45rem;
            margin-top: 0.6rem;
        }
        .passenger-offer-accept,
        .passenger-offer-decline {
            flex: 1;
            min-height: 2.5rem;
            border-radius: 0.75rem;
            font-size: 0.72rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }
        .passenger-offer-accept {
            background: #059669;
            color: #fff;
            border: none;
        }
        .passenger-offer-accept:disabled,
        .passenger-offer-accept--waiting {
            background: #94a3b8 !important;
            color: #f8fafc !important;
            box-shadow: none !important;
            cursor: not-allowed;
            opacity: 0.95;
        }
        .passenger-offer-accept--hero {
            flex: none !important;
            width: 100%;
            min-height: 3.35rem;
            font-size: 0.92rem;
            letter-spacing: 0.05em;
            border-radius: 1rem;
            box-shadow: 0 8px 22px rgba(5, 150, 105, 0.28);
        }
        .passenger-offer-card--waiting-driver {
            border-color: #fcd34d;
            background: linear-gradient(180deg, #fffbeb 0%, #fff 55%);
        }
        .passenger-offer-driver-ask {
            margin: 0.15rem 0 0;
            font-size: 0.58rem;
            font-weight: 800;
            color: #64748b;
        }
        .passenger-offer-counter-sent {
            margin: 0.35rem 0 0;
            padding: 0.4rem 0.5rem;
            border-radius: 0.65rem;
            background: #fef3c7;
            border: 1px solid #fcd34d;
            color: #92400e;
            font-size: 0.62rem;
            font-weight: 800;
            line-height: 1.35;
        }
        .passenger-offer-listed-tag {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #047857;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
            border-radius: 9999px;
            padding: 0.12rem 0.45rem;
            margin-top: 0.25rem;
        }
        .passenger-offer-decline {
            background: #f8fafc;
            color: #64748b;
            border: 1px solid #e2e8f0;
        }
        .passenger-offer-decline--compact {
            flex: 0 0 auto;
            min-width: 4.5rem;
            padding: 0 0.65rem;
        }
        .passenger-offer-counter--optional {
            margin-top: 0.45rem;
        }
        .passenger-offer-counter-toggle {
            display: block;
            width: 100%;
            margin-top: 0.4rem;
            border: none;
            background: transparent;
            color: #2563eb;
            font-size: 0.66rem;
            font-weight: 800;
            text-decoration: underline;
            text-align: center;
        }
        .passenger-offer-counter {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            margin-top: 0.55rem;
        }
        .passenger-offer-counter-label {
            font-size: 0.62rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #047857;
        }
        .passenger-offer-counter-fields {
            display: flex;
            gap: 0.4rem;
            align-items: stretch;
        }
        .passenger-offer-counter-input {
            flex: 1;
            min-width: 0;
            border: 1px solid #a7f3d0;
            border-radius: 0.65rem;
            padding: 0.55rem 0.65rem;
            font-size: 1rem;
            font-weight: 700;
            color: #064e3b;
            background: #f0fdf4;
            min-height: 2.75rem;
        }
        .passenger-offer-counter-btn {
            flex-shrink: 0;
            border: none;
            border-radius: 0.65rem;
            padding: 0.55rem 0.85rem;
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            background: #2563eb;
            color: #fff;
            min-height: 2.75rem;
            min-width: 5.5rem;
        }
        @media (max-width: 400px) {
            .passenger-offer-head {
                flex-wrap: wrap;
            }
            .passenger-offer-price {
                width: 100%;
                text-align: right;
                margin-top: 0.15rem;
                font-size: 1.1rem;
            }
            .passenger-offer-actions {
                flex-direction: column;
            }
            .passenger-offer-decline--compact {
                width: 100%;
                min-height: 2.5rem;
            }
            .passenger-offer-counter-fields {
                flex-direction: column;
            }
            .passenger-offer-counter-btn {
                width: 100%;
                min-width: 0;
            }
            body.is-searching.passenger-search-single-offer .passenger-offer-accept--hero {
                font-size: 0.82rem;
                padding: 0 0.5rem;
            }
        }

        /* Extra tight for small phones like Samsung A16 (~360px width) */
        @media (max-width: 360px) {
            .passenger-offer-card {
                padding: 0.5rem 0.55rem;
                border-radius: 0.85rem;
            }
            .passenger-offer-photo {
                width: 2.1rem;
                height: 2.1rem;
            }
            .passenger-offer-name {
                font-size: 0.74rem;
            }
            .passenger-offer-sub {
                font-size: 0.6rem;
            }
            .passenger-offer-price {
                font-size: 0.95rem;
            }
            .passenger-offer-counter-tag {
                font-size: 6px;
                padding: 0 2px;
            }
            .passenger-offer-your-counter {
                font-size: 0.52rem;
                padding: 0 3px;
            }
            .passenger-offer-price-wrap {
                margin-top: 0.1rem;
            }
            .passenger-offer-head {
                gap: 0.35rem;
            }
            .passenger-offer-accept,
            .passenger-offer-decline {
                min-height: 2.2rem;
                font-size: 0.65rem;
            }
            .passenger-offer-accept--hero {
                min-height: 2.8rem;
                font-size: 0.78rem;
            }
            .passenger-offer-counter-input {
                font-size: 0.9rem;
                min-height: 2.4rem;
                padding: 0.4rem 0.5rem;
            }
            .passenger-offer-counter-btn {
                min-height: 2.4rem;
                font-size: 0.6rem;
            }
            .passenger-offer-counter-label {
                font-size: 0.55rem;
            }
        }
        .passenger-offer-counter-sent {
            margin: 0.45rem 0 0;
            font-size: 0.68rem;
            font-weight: 700;
            color: #1d4ed8;
        }
        .passenger-offer-counter-link {
            display: block;
            width: 100%;
            margin-top: 0.45rem;
            border: none;
            background: transparent;
            color: #2563eb;
            font-size: 0.68rem;
            font-weight: 800;
            text-decoration: underline;
        }
        .passenger-pending-foot {
            margin: 0.25rem 0.5rem 0;
            font-size: 0.65rem;
            font-weight: 700;
            color: #64748b;
        }
        .passenger-pending-cancel {
            margin-top: 0.85rem;
            font-size: 0.75rem;
            font-weight: 900;
            color: #ef4444;
            text-decoration: underline;
            display: block;
            margin-left: auto;
            margin-right: auto;
            min-height: 2.75rem;
            padding: 0 1rem;
            background: transparent;
            border: none;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .survey-option {
            display: flex;
            align-items: flex-start;
            gap: 0.5rem;
            padding: 0.75rem;
            border-radius: 0.75rem;
            border: 1px solid #f1f5f9;
            background: #f8fafc;
            cursor: pointer;
        }
        .survey-option:has(:checked) {
            border-color: #f59e0b;
            background: #fffbeb;
        }
        
        #app-interface, #rating-screen, #cancellation-survey-screen { display: none; }

        #setup-screen:not(.auth-screen-open) {
            display: none !important;
        }

        @media (min-width: 768px) {
            #control-panel {
                left: auto;
                right: 1rem;
                bottom: 1rem;
                width: 380px;
                max-height: calc(100% - 1.25rem);
                border-radius: 1.25rem;
                border: 1px solid #e2e8f0;
            }
            #control-panel::before { display: none; }
        }

        @media (max-width: 767px) {
            body.is-searching #map-container { opacity: 0.06; }
        }

        /*
         * Navegación / viaje / oferta conductor: SIN panel blanco del header
         * (saludo "Buenas tardes…", Honduras, Perfil, logo).
         */
        body.is-navigating #app-header,
        body.driver-nav-mode #app-header,
        body.trip-active.driver-mode #app-header,
        body.driver-offer-popup-open #app-header,
        body.driver-offer-map-peek #app-header,
        body.driver-mode.driver-offer-preview-active #app-header,
        body.is-navigating .hn-flag-stripe,
        body.driver-nav-mode .hn-flag-stripe,
        body.trip-active.driver-mode .hn-flag-stripe,
        body.driver-offer-popup-open .hn-flag-stripe,
        body.driver-offer-map-peek .hn-flag-stripe,
        body.is-navigating #header-more-menu,
        body.driver-nav-mode #header-more-menu,
        body.trip-active.driver-mode #header-more-menu,
        body.driver-offer-popup-open #header-more-menu {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            min-height: 0 !important;
            max-height: 0 !important;
            overflow: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
            border: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        /* Nunca mostrar saludo / Honduras en la barra (queda solo en menú Perfil) */
        #header-user-text,
        #user-greeting-display,
        #user-holiday-badge,
        #header-balance {
            display: none !important;
        }

        body.is-navigating #app-interface,
        body.driver-nav-mode #app-interface,
        body.trip-active.driver-mode #app-interface {
            /* Mapa a toda la pantalla de la app */
            padding-top: 0 !important;
        }

        body.is-navigating #map-container,
        body.driver-nav-mode #map-container,
        body.trip-active.driver-mode #map-container {
            top: 0 !important;
            bottom: 0 !important;
        }

        .chat-msg { max-width: 85%; padding: 8px 12px; border-radius: 14px; margin-bottom: 8px; font-size: 13px; display: flex; flex-direction: column; }
        .msg-mine { background: #2563eb; color: white; align-self: flex-end; border-bottom-right-radius: 2px; }
        .msg-theirs { background: #f1f5f9; color: #1e293b; align-self: flex-start; border-bottom-left-radius: 2px; }
        
        input { font-size: 16px !important; }

        /* ========== MODO DÃA / NOCHE ========== */
        html[data-theme="light"] {
            color-scheme: light;
        }

        html[data-theme="dark"] {
            color-scheme: dark;
            --dm-bg: #0b1220;
            --dm-surface: #111827;
            --dm-surface-2: #1e293b;
            --dm-surface-3: #334155;
            --dm-text: #f1f5f9;
            --dm-text-muted: #94a3b8;
            --dm-border: #334155;
            --dm-panel: rgba(17, 24, 39, 0.97);
        }

        html[data-theme="dark"] body {
            background-color: var(--dm-bg);
        }

        html[data-theme="dark"] #app-header {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] #app-header .text-gray-900,
        html[data-theme="dark"] #user-greeting-display {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #app-header .text-blue-700 {
            color: #60a5fa !important;
        }

        html[data-theme="dark"] #app-header button.bg-blue-50 {
            background: #1e3a5f !important;
            color: #93c5fd !important;
        }

        html[data-theme="dark"] #app-header button.bg-gray-100,
        html[data-theme="dark"] #app-header button.bg-slate-100,
        html[data-theme="dark"] #app-header button.bg-gray-50 {
            background: var(--dm-surface-2) !important;
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #app-header button.bg-purple-100 {
            background: #3b0764 !important;
            color: #d8b4fe !important;
        }

        html[data-theme="dark"] #app-header button.bg-emerald-100 {
            background: #064e3b !important;
            color: #6ee7b7 !important;
        }

        html[data-theme="dark"] #app-header button.bg-amber-100 {
            background: #78350f !important;
            color: #fcd34d !important;
        }

        html[data-theme="dark"] .header-more-menu {
            background: var(--dm-surface);
            border-color: var(--dm-border);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
        }

        html[data-theme="dark"] .header-more-item {
            color: var(--dm-text);
        }

        html[data-theme="dark"] .header-more-item:active {
            background: var(--dm-surface-2);
        }

        html[data-theme="dark"] .header-more-item-copa {
            border-color: rgba(251, 191, 36, 0.5);
            background:
                linear-gradient(145deg, #fef3c7 0%, #fbbf24 32%, #f59e0b 68%, #d97706 100%);
            color: #78350f !important;
            box-shadow:
                0 10px 24px rgba(0, 0, 0, 0.35),
                0 0 0 1px rgba(255, 255, 255, 0.2) inset,
                0 0 18px rgba(251, 191, 36, 0.25);
        }

        html[data-theme="dark"] .header-more-item-copa:active {
            background:
                linear-gradient(145deg, #fde68a 0%, #f59e0b 40%, #d97706 100%);
        }

        html[data-theme="dark"] .header-copa-title {
            color: #451a03;
        }

        html[data-theme="dark"] .header-copa-sub {
            color: #78350f;
        }

        html[data-theme="dark"] .panel-hide-btn {
            background: #334155;
            color: #cbd5e1;
        }

        html[data-theme="dark"] .control-panel-grab {
            background: #475569;
        }

        html[data-theme="dark"] #control-panel {
            background: var(--dm-panel) !important;
            border-top-color: var(--dm-border) !important;
            box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.45);
        }

        html[data-theme="dark"] #control-panel::before {
            background: var(--dm-surface-3);
        }

        html[data-theme="dark"] #client-view .text-gray-900,
        html[data-theme="dark"] #driver-view .text-gray-900,
        html[data-theme="dark"] #driver-list-title {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #client-view .text-gray-400,
        html[data-theme="dark"] #driver-view .text-gray-500,
        html[data-theme="dark"] #driver-view .text-gray-400 {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #client-view .text-blue-700,
        html[data-theme="dark"] #client-trip-subline,
        html[data-theme="dark"] .trip-flow-subtitle {
            color: #60a5fa !important;
        }

        html[data-theme="dark"] .trip-panel-setup {
            border-bottom-color: var(--dm-border);
        }

        html[data-theme="dark"] .trip-flow-title {
            color: var(--dm-text);
        }

        html[data-theme="dark"] .trip-step-card {
            background: var(--dm-surface);
            border-color: var(--dm-border);
            box-shadow: none;
        }

        html[data-theme="dark"] .trip-step-title,
        html[data-theme="dark"] .trip-advanced-toggle-left {
            color: var(--dm-text-muted);
        }

        html[data-theme="dark"] .trip-advanced-body {
            border-top-color: var(--dm-border);
        }

        html[data-theme="dark"] .trip-btn-secondary {
            background: var(--dm-surface-2);
            border-color: var(--dm-border);
            color: var(--dm-text-muted);
        }

        html[data-theme="dark"] .wallet-compact {
            background: linear-gradient(135deg, #064e3b 0%, #065f46 100%);
            border-color: #047857;
        }

        html[data-theme="dark"] .wallet-compact-amount {
            color: #6ee7b7;
        }

        html[data-theme="dark"] .wallet-compact-btn {
            background: var(--dm-surface);
            border-color: #047857;
            color: #6ee7b7;
        }

        html[data-theme="dark"] .wallet-compact-btn--primary {
            background: #059669;
            border-color: #059669;
            color: #fff;
        }

        html[data-theme="dark"] .service-type-btn:not(.active) {
            background: var(--dm-surface-2) !important;
            border-color: var(--dm-border) !important;
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #delivery-details-panel {
            background: #422006 !important;
            border-color: #92400e !important;
        }

        html[data-theme="dark"] #delivery-details-panel input,
        html[data-theme="dark"] #delivery-details-panel textarea {
            background: var(--dm-surface) !important;
            border-color: #92400e !important;
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #service-zone-picker {
            background: var(--dm-surface-2) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] #service-zone-picker label,
        html[data-theme="dark"] #service-zone-picker p {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #service-zone-picker input,
        html[data-theme="dark"] #service-zone-picker select {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #service-radius-slider {
            background: var(--dm-surface-3) !important;
        }

        html[data-theme="dark"] .service-zone-collapse-title {
            color: var(--dm-text-muted);
        }

        html[data-theme="dark"] .service-zone-summary {
            color: #93c5fd;
        }

        html[data-theme="dark"] .service-zone-map-chip {
            background: var(--dm-surface);
            border-color: var(--dm-border);
            color: var(--dm-text);
        }

        html[data-theme="dark"] .trip-request-card {
            background: var(--dm-surface-2);
            border-color: var(--dm-border);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
        }

        html[data-theme="dark"] .trip-request-card .text-gray-900 {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] .trip-request-card .text-gray-600 {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] .trip-request-card .bg-gray-100 {
            background: var(--dm-surface) !important;
            color: var(--dm-text-muted) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] #nearby-drivers-indicator,
        html[data-theme="dark"] #eta-indicator {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] #eta-text {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #searching-state .text-gray-800,
        html[data-theme="dark"] #searching-state .text-gray-500 {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #searching-trip-summary,
        html[data-theme="dark"] #trip-viewers-panel,
        html[data-theme="dark"] #client-driver-busy-notice {
            filter: brightness(0.92);
        }

        html[data-theme="dark"] #active-trip-panel .bg-white,
        html[data-theme="dark"] #active-trip-panel .bg-gray-50,
        html[data-theme="dark"] #trip-partner-info,
        html[data-theme="dark"] .driver-assigned-card {
            background: var(--dm-surface-2) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] .driver-plate-badge {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] .driver-plate-value,
        html[data-theme="dark"] .driver-vehicle-val,
        html[data-theme="dark"] #trip-partner-info #tp-name {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] .driver-vehicle-grid {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] .driver-vehicle-photo-card {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
        }

        html[data-theme="dark"] .driver-vehicle-photo-card span {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #active-trip-panel .text-gray-900,
        html[data-theme="dark"] #active-trip-panel .text-gray-600,
        html[data-theme="dark"] #active-trip-panel .text-gray-500,
        html[data-theme="dark"] #active-trip-panel .text-gray-400 {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #active-trip-panel .bg-blue-50 {
            background: #1e3a5f !important;
            border-color: #1d4ed8 !important;
        }

        html[data-theme="dark"] .nav-fab {
            background: var(--dm-surface-2);
            color: var(--dm-text);
            border-color: var(--dm-border);
        }

        html[data-theme="dark"] #nav-hud-bottom {
            background: var(--dm-surface);
            color: var(--dm-text);
        }

        html[data-theme="dark"] body.driver-nav-mode #nav-hud-bottom {
            background: linear-gradient(135deg, #0d5c4d 0%, #004d40 100%);
            color: white;
            border-color: rgba(255, 255, 255, 0.12);
        }

        html[data-theme="dark"] #profile-manage-panel > div {
            background: var(--dm-surface) !important;
            color: var(--dm-text);
        }

        html[data-theme="dark"] #profile-manage-panel .text-gray-900 {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #profile-manage-panel .text-gray-500,
        html[data-theme="dark"] #profile-manage-panel .text-gray-400 {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] #profile-manage-panel input,
        html[data-theme="dark"] #profile-manage-panel select,
        html[data-theme="dark"] #profile-manage-panel textarea {
            background: var(--dm-surface-2) !important;
            border-color: var(--dm-border) !important;
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #profile-manage-panel .bg-gray-50,
        html[data-theme="dark"] #profile-manage-panel .bg-emerald-50,
        html[data-theme="dark"] #profile-manage-panel .bg-purple-50,
        html[data-theme="dark"] #profile-manage-panel .bg-blue-50,
        html[data-theme="dark"] #profile-manage-panel .bg-amber-50,
        html[data-theme="dark"] #profile-manage-panel .bg-slate-50 {
            filter: brightness(0.85);
        }

        html[data-theme="dark"] #profile-manage-panel button.border-gray-200,
        html[data-theme="dark"] #profile-manage-panel button.border-slate-200 {
            border-color: var(--dm-border) !important;
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] .login-card {
            background: var(--dm-surface) !important;
            color: var(--dm-text);
        }

        html[data-theme="dark"] .login-card .bg-gray-100 {
            background: var(--dm-surface-2) !important;
        }

        html[data-theme="dark"] .login-card .text-gray-400,
        html[data-theme="dark"] .login-card .text-gray-500 {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] .login-card input {
            background: var(--dm-surface-2) !important;
            border-color: var(--dm-border) !important;
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] .setup-step {
            background: var(--dm-surface) !important;
            border-color: var(--dm-border) !important;
            color: var(--dm-text);
        }

        html[data-theme="dark"] .setup-input,
        html[data-theme="dark"] #setup-screen input,
        html[data-theme="dark"] #setup-screen select {
            background: var(--dm-surface-2) !important;
            border-color: var(--dm-border) !important;
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #setup-screen .text-gray-900 {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] #theme-toggle-btn[data-theme-toggle] {
            background: var(--dm-surface-2) !important;
            color: #fbbf24 !important;
        }

        html[data-theme="dark"] .msg-theirs {
            background: var(--dm-surface-2);
            color: var(--dm-text);
        }

        html[data-theme="dark"] .survey-option {
            background: var(--dm-surface-2);
            border-color: var(--dm-border);
            color: var(--dm-text);
        }

        @media (min-width: 768px) {
            html[data-theme="dark"] #control-panel {
                border-color: var(--dm-border) !important;
            }
        }

        /* â€” Empresa SOZIN: aviso de derechos reservados â€” */
        .sozin-copyright {
            text-align: center;
            line-height: 1.35;
            user-select: none;
        }

        .sozin-copyright__owner {
            font-size: 0.65rem;
            font-weight: 900;
            letter-spacing: 0.14em;
            text-transform: uppercase;
        }

        .sozin-copyright__text {
            margin-top: 0.2rem;
            font-size: 0.58rem;
            font-weight: 600;
        }

        .sozin-copyright__app {
            margin-top: 0.15rem;
            font-size: 0.52rem;
            font-weight: 600;
        }

        .sozin-copyright--compact .sozin-copyright__line {
            font-size: 0.52rem;
            font-weight: 600;
            line-height: 1.4;
        }

        .sozin-copyright--compact .sozin-copyright__owner {
            font-size: inherit;
            letter-spacing: 0.08em;
        }

        html[data-theme="dark"] .sozin-copyright__owner {
            color: var(--dm-text) !important;
        }

        html[data-theme="dark"] .sozin-copyright__text,
        html[data-theme="dark"] .sozin-copyright--compact .sozin-copyright__line {
            color: var(--dm-text-muted) !important;
        }

        html[data-theme="dark"] .sozin-copyright__app {
            color: var(--dm-text-muted) !important;
            opacity: 0.85;
        }

        /* — Celulares: panel CORTO; el resto se ve con scroll — */
        @media (max-width: 639px) {
            #login-screen > [data-sozin-copyright="on-gradient"] {
                display: none;
            }

            #control-panel {
                padding: 0.2rem 0 0;
                padding-bottom: max(0.5rem, calc(0.3rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))));
                max-height: min(44dvh, 20rem);
            }

            body.driver-mode:not(.trip-active):not(.panel-minimized):not(.panel-collapsed) #control-panel {
                top: auto !important;
                bottom: 0 !important;
                height: auto !important;
                max-height: min(52dvh, 24rem) !important;
            }

            /* Viaje activo: faja bien baja */
            body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
            body.trip-active.driver-mode.is-navigating:not(.panel-minimized):not(.panel-collapsed) #control-panel {
                height: auto !important;
                max-height: min(36dvh, 15.5rem) !important;
                top: auto !important;
                bottom: 0 !important;
                overflow: hidden !important;
            }

            body.client-mode.is-searching:not(.panel-minimized):not(.panel-collapsed) #control-panel,
            body.client-mode.trip-active:not(.panel-minimized):not(.panel-collapsed) #control-panel {
                max-height: min(48dvh, 22rem) !important;
            }

            body.trip-active.driver-mode.panel-minimized #control-panel,
            body.trip-active.driver-mode #control-panel.panel-collapsed {
                height: auto !important;
                max-height: 5.25rem !important;
                top: auto !important;
                display: flex !important;
            }

            body.trip-active:not(.driver-mode) #control-panel {
                max-height: min(68%, 64dvh);
            }

            #panel-content {
                padding-bottom: 0.25rem;
            }

            #service-zone-picker {
                margin-bottom: 0.65rem !important;
            }

            #service-zone-picker .service-zone-body {
                padding-left: 0.75rem !important;
                padding-right: 0.75rem !important;
            }

            .favorite-chip {
                font-size: 0.62rem;
                padding: 0.35rem 0.55rem;
            }

            .service-type-btn,
            .trip-service-chip {
                min-height: 2.65rem;
                padding-top: 0.35rem;
                padding-bottom: 0.35rem;
                font-size: 0.55rem;
            }

            .service-type-btn i,
            .trip-service-chip i {
                font-size: 0.9rem;
            }

            .trip-context-grid:has(.wallet-compact:not(.hidden)) {
                grid-template-columns: 1fr;
            }

            .trip-advanced-toggle-hint {
                display: none;
            }

            #panel-content.trip-panel-scroll {
                padding-left: 0.85rem;
                padding-right: 0.85rem;
            }

            #fare-card {
                padding: 1rem !important;
            }

            .fare-price-hero {
                font-size: 2rem;
            }

            #fab-center,
            #fab-traffic {
                bottom: min(46dvh, 280px);
            }

            body.trip-active.panel-minimized #fab-center,
            body.trip-active.panel-minimized #fab-traffic {
                bottom: min(52dvh, 320px);
            }
        }

        @media (max-width: 400px) {
            .header-map-logo {
                max-height: 1.9rem;
                max-width: 4.75rem;
            }

            .header-brand-fallback {
                font-size: 0.85rem;
            }

            .login-brand-tagline {
                display: none;
            }

            .login-role-hint,
            #login-role-hint {
                font-size: 0.58rem;
                margin-bottom: 0.65rem;
            }

            .role-btn {
                padding-top: 0.55rem;
                padding-bottom: 0.55rem;
                font-size: 0.62rem;
            }

            #my-referral-code {
                font-size: 1.65rem;
            }
        }

        @media (max-width: 360px) {
            .login-logo-wrap {
                width: 4.25rem;
                height: 4.25rem;
                margin-bottom: 0.4rem;
            }

            .login-brand-title {
                font-size: 1.35rem;
            }

            .login-card {
                padding-top: 1rem !important;
                padding-left: 1rem !important;
                padding-right: 1rem !important;
            }

            #client-trip-headline {
                font-size: 0.95rem;
            }

            #trip-options-panel label span {
                font-size: 0.58rem;
                line-height: 1.25;
            }

            #control-panel {
                max-height: min(50%, 48dvh);
            }
        }

        @media (max-width: 380px) and (max-height: 700px) {
            .login-hero {
                padding-top: 0.55rem;
                padding-bottom: 0.35rem;
            }

            .login-card {
                padding-top: 0.85rem !important;
            }
        }

        /* Ride options (Moto/Auto/EnvÃ­o) - Uber style after locations */
        #ride-options {
            margin-top: 0.75rem;
        }

        .ride-card {
            min-height: 58px;
            transition: all 0.1s ease;
        }

        .ride-card .price-value {
            font-weight: 900;
            letter-spacing: -0.01em;
        }

        /* Light mode defaults (already mostly covered by bg-white etc) */

        /* Dark mode improvements for visibility */
        html[data-theme="dark"] .ride-card {
            background-color: #1e2937 !important;
            border-color: #334155 !important;
            color: #f1f5f9;
        }

        html[data-theme="dark"] .ride-card:hover {
            border-color: #475569 !important;
            background-color: #334155 !important;
        }

        html[data-theme="dark"] .ride-card.border-blue-600,
        html[data-theme="dark"] .ride-card.border-violet-600 {
            background-color: #1e3a5f !important;
            border-color: #3b82f6 !important;
        }

        html[data-theme="dark"] .ride-card .price-value {
            color: #f8fafc !important;
        }

        html[data-theme="dark"] .ride-card .text-gray-500,
        html[data-theme="dark"] .ride-card .text-gray-400 {
            color: #94a3b8 !important;
        }

        html[data-theme="dark"] .ride-card .bg-violet-100,
        html[data-theme="dark"] .ride-card .bg-blue-100,
        html[data-theme="dark"] .ride-card .bg-amber-100 {
            filter: brightness(0.85);
        }

        /* Better mobile touch and spacing */
        @media (max-width: 420px) {
            .ride-card {
                padding: 0.6rem 0.75rem;
                min-height: 54px;
                gap: 0.6rem;
            }

            .ride-card .w-10 {
                width: 2.25rem;
                height: 2.25rem;
            }

            .ride-card .text-sm {
                font-size: 0.8rem;
            }

            .ride-card .text-\[10px\] {
                font-size: 0.65rem;
            }
        }

        /* Ensure prices visible in all contexts */
        .ride-card .price-value {
            white-space: nowrap;
        }

        /* Fix disappearing text in dark mode - general text colors */
        html[data-theme="dark"] .text-gray-900,
        html[data-theme="dark"] .text-gray-800,
        html[data-theme="dark"] .text-gray-700,
        html[data-theme="dark"] .text-gray-600,
        html[data-theme="dark"] .text-gray-500 {
            color: var(--dm-text) !important;
        }
        html[data-theme="dark"] .text-gray-400,
        html[data-theme="dark"] .text-gray-300 {
            color: var(--dm-text-muted) !important;
        }
        html[data-theme="dark"] .text-white {
            color: #fff !important;
        }

        /* Additional fixes for disappearing text in specific components */
        html[data-theme="dark"] .text-gray-500,
        html[data-theme="dark"] .text-gray-400,
        html[data-theme="dark"] .text-slate-400,
        html[data-theme="dark"] .text-blue-700,
        html[data-theme="dark"] .text-emerald-600 {
            color: #cbd5e1 !important;
        }
        html[data-theme="dark"] input,
        html[data-theme="dark"] select,
        html[data-theme="dark"] textarea {
            color: #f1f5f9 !important;
            background-color: #1e293b !important;
            border-color: #475569 !important;
        }

        /* â€”â€” Modal actualizaciÃ³n de app â€”â€” */
        .app-update-modal-overlay {
            position: fixed;
            inset: 0;
            z-index: 35000;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
            background: rgba(15, 23, 42, 0.72);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            animation: cityModalFadeIn 0.2s ease-out;
        }

        .app-update-modal-sheet {
            width: 100%;
            max-width: 22rem;
            padding: 1.5rem 1.35rem 1.35rem;
            border-radius: 1.5rem;
            background: #fff;
            box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
            text-align: center;
            animation: cityModalSlideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
        }

        .app-update-modal-icon {
            width: 3.25rem;
            height: 3.25rem;
            margin: 0 auto 0.85rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
        }

        .app-update-modal-title {
            font-size: 1.05rem;
            font-weight: 900;
            color: #0f172a;
            letter-spacing: -0.02em;
            margin-bottom: 0.45rem;
        }

        .app-update-modal-text {
            font-size: 0.78rem;
            font-weight: 600;
            color: #475569;
            line-height: 1.45;
            margin-bottom: 0.55rem;
        }

        .app-update-modal-meta {
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
            margin-bottom: 1rem;
        }

        .app-update-modal-btn {
            width: 100%;
            min-height: 3rem;
            border: none;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            font-size: 0.72rem;
            font-weight: 900;
            letter-spacing: 0.07em;
            text-transform: uppercase;
            cursor: pointer;
            touch-action: manipulation;
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
        }

        .app-update-modal-btn:disabled {
            opacity: 0.85;
            cursor: wait;
        }

        html[data-theme="dark"] .app-update-modal-sheet {
            background: var(--dm-surface);
            border: 1px solid var(--dm-border);
        }

        html[data-theme="dark"] .app-update-modal-title {
            color: var(--dm-text);
        }

        .app-update-ios-help {
            margin: 0.75rem 0 0.85rem;
            padding: 0.75rem 0.85rem;
            border-radius: 0.9rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            text-align: left;
        }

        .app-update-ios-help-title {
            margin: 0 0 0.45rem;
            font-size: 0.72rem;
            font-weight: 900;
            color: #334155;
        }

        .app-update-ios-help-list {
            margin: 0;
            padding-left: 1.1rem;
            font-size: 0.68rem;
            line-height: 1.45;
            color: #475569;
        }

        html[data-theme="dark"] .app-update-ios-help {
            background: #1e293b;
            border-color: #334155;
        }

        html[data-theme="dark"] .app-update-ios-help-title {
            color: #e2e8f0;
        }

        html[data-theme="dark"] .app-update-ios-help-list {
            color: #cbd5e1;
        }

        html[data-theme="dark"] .app-update-modal-text {
            color: var(--dm-text-muted);
        }

        /* â€”â€” Modal parada extra (origen + destino listos) â€”â€” */
        .extra-stop-prompt-overlay {
            position: fixed;
            inset: 0;
            z-index: 45000;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding: 0;
            animation: cityModalFadeIn 0.2s ease-out;
        }

        @media (min-width: 640px) {
            .extra-stop-prompt-overlay {
                align-items: center;
                padding: 1.25rem;
            }
        }

        .extra-stop-prompt-overlay--closing {
            animation: cityModalFadeIn 0.18s ease-in reverse;
        }

        .extra-stop-prompt-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(15, 23, 42, 0.68);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
        }

        .extra-stop-prompt-sheet {
            position: relative;
            width: 100%;
            max-width: 24rem;
            padding: 0.65rem 1.25rem 1.35rem;
            border-radius: 1.5rem 1.5rem 0 0;
            background: #fff;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18), 0 24px 48px rgba(15, 23, 42, 0.22);
            animation: cityModalSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @media (min-width: 640px) {
            .extra-stop-prompt-sheet {
                border-radius: 1.5rem;
                padding: 1.35rem 1.35rem 1.25rem;
            }
        }

        .extra-stop-prompt-handle {
            width: 2.5rem;
            height: 0.28rem;
            margin: 0.35rem auto 0.85rem;
            border-radius: 999px;
            background: #e2e8f0;
        }

        @media (min-width: 640px) {
            .extra-stop-prompt-handle {
                display: none;
            }
        }

        .extra-stop-prompt-icon {
            width: 3rem;
            height: 3rem;
            margin: 0 auto 0.75rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.15rem;
            box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
        }

        .extra-stop-prompt-title {
            font-size: 1.1rem;
            font-weight: 900;
            color: #0f172a;
            text-align: center;
            letter-spacing: -0.02em;
            margin: 0 0 0.35rem;
        }

        .extra-stop-prompt-subtitle {
            font-size: 0.76rem;
            font-weight: 600;
            color: #64748b;
            text-align: center;
            line-height: 1.45;
            margin: 0 0 1rem;
            padding: 0 0.25rem;
        }

        .extra-stop-prompt-route {
            display: flex;
            flex-direction: column;
            gap: 0;
            padding: 0.85rem 0.9rem;
            margin-bottom: 1rem;
            border-radius: 1rem;
            background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
            border: 1px solid #e2e8f0;
        }

        .extra-stop-prompt-route-point {
            display: flex;
            align-items: flex-start;
            gap: 0.65rem;
            min-width: 0;
        }

        .extra-stop-prompt-route-dot {
            flex-shrink: 0;
            width: 0.65rem;
            height: 0.65rem;
            margin-top: 0.28rem;
            border-radius: 999px;
            box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9);
        }

        .extra-stop-prompt-route-dot--origin {
            background: #10b981;
        }

        .extra-stop-prompt-route-dot--dest {
            background: #ef4444;
        }

        .extra-stop-prompt-route-line {
            width: 2px;
            height: 0.85rem;
            margin: 0.15rem 0 0.15rem 0.31rem;
            border-radius: 1px;
            background: linear-gradient(180deg, #10b981, #94a3b8 50%, #ef4444);
            opacity: 0.55;
        }

        .extra-stop-prompt-route-label {
            font-size: 0.72rem;
            font-weight: 700;
            color: #334155;
            line-height: 1.35;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .extra-stop-prompt-actions {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }

        .extra-stop-prompt-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            width: 100%;
            min-height: 3rem;
            padding: 0.75rem 1rem;
            border: none;
            border-radius: 1rem;
            font-size: 0.78rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            cursor: pointer;
            touch-action: manipulation;
            transition: transform 0.12s ease, box-shadow 0.12s ease;
        }

        .extra-stop-prompt-btn:active {
            transform: scale(0.98);
        }

        .extra-stop-prompt-btn--primary {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            color: #fff;
            box-shadow: 0 8px 20px rgba(5, 150, 105, 0.28);
        }

        .extra-stop-prompt-btn--secondary {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
        }

        .extra-stop-prompt-badge {
            font-size: 0.58rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            padding: 0.15rem 0.45rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.22);
            margin-left: 0.15rem;
        }

        body.extra-stop-prompt-open {
            overflow: hidden;
        }

        html[data-theme="dark"] .extra-stop-prompt-sheet {
            background: var(--dm-surface);
            border: 1px solid var(--dm-border);
        }

        html[data-theme="dark"] .extra-stop-prompt-title {
            color: var(--dm-text);
        }

        html[data-theme="dark"] .extra-stop-prompt-subtitle {
            color: var(--dm-text-muted);
        }

        html[data-theme="dark"] .extra-stop-prompt-route {
            background: #0f172a;
            border-color: #334155;
        }

        html[data-theme="dark"] .extra-stop-prompt-route-label {
            color: #cbd5e1;
        }

        html[data-theme="dark"] .extra-stop-prompt-btn--secondary {
            background: #1e293b;
            color: #cbd5e1;
            border-color: #334155;
        }

        html[data-theme="dark"] .extra-stop-prompt-handle {
            background: #475569;
        }

        /* â€”â€” Paneles Admin / SupervisiÃ³n (ops dashboard) â€”â€” */
        .ops-panel {
            display: flex;
            /* Cadena flex: sin min-height:0 el contenido crece y se recorta (body overflow:hidden) */
            min-height: 0;
            max-height: 100dvh;
            overflow: hidden;
            background: #0b1220;
            color: #e2e8f0;
            /* Fallback web: notch iOS / Android browser */
            padding-top: var(--safe-top, env(safe-area-inset-top, 0px));
            padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
            box-sizing: border-box;
        }

        .ops-panel.hidden {
            display: none !important;
        }

        body.capacitor-native .ops-sidebar-brand,
        body.capacitor-android .ops-sidebar-brand {
            padding-top: 0.85rem;
        }

        body.capacitor-native .ops-icon-btn,
        body.capacitor-android .ops-icon-btn {
            min-width: 2.5rem;
            min-height: 2.5rem;
        }

        .ops-backdrop {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(2, 6, 23, 0.55);
            /* Por encima del contenido sticky (buscador z-index 5â€“8); si no, en WebView el input â€œtapaâ€ el menÃº */
            z-index: 40;
            pointer-events: auto;
        }

        .ops-sidebar {
            width: 15.5rem;
            flex-shrink: 0;
            display: flex;
            flex-direction: column;
            background: linear-gradient(180deg, #111827 0%, #0f172a 55%, #0b1220 100%);
            border-right: 1px solid rgba(51, 65, 85, 0.65);
            z-index: 50;
        }

        .ops-sidebar--emerald .ops-nav-item--active {
            background: linear-gradient(135deg, rgba(5, 150, 105, 0.22), rgba(16, 185, 129, 0.12));
            border-color: rgba(52, 211, 153, 0.35);
            color: #6ee7b7;
        }

        .ops-sidebar-brand {
            display: flex;
            align-items: center;
            gap: 0.7rem;
            padding: 1.15rem 1rem 1rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.5);
        }

        .ops-brand-icon {
            width: 2.5rem;
            height: 2.5rem;
            border-radius: 0.85rem;
            background: linear-gradient(135deg, #7c3aed, #2563eb);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
        }

        .ops-brand-icon--emerald {
            background: linear-gradient(135deg, #059669, #10b981);
            box-shadow: 0 8px 20px rgba(16, 185, 129, 0.28);
        }

        .ops-brand-title {
            display: block;
            font-size: 0.92rem;
            font-weight: 900;
            letter-spacing: -0.02em;
            color: #f8fafc;
            line-height: 1.15;
        }

        .ops-brand-sub {
            display: block;
            font-size: 0.58rem;
            font-weight: 800;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #64748b;
            margin-top: 0.1rem;
        }

        .ops-nav {
            flex: 1;
            overflow-y: auto;
            padding: 0.65rem 0.55rem 0.5rem;
            -webkit-overflow-scrolling: touch;
        }

        .ops-nav-section {
            margin-bottom: 0.65rem;
        }

        .ops-nav-label {
            display: block;
            padding: 0.35rem 0.55rem 0.3rem;
            font-size: 0.52rem;
            font-weight: 900;
            letter-spacing: 0.12em;
            text-transform: uppercase;
            color: #475569;
        }

        .ops-nav-item {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            width: 100%;
            padding: 0.58rem 0.65rem;
            margin-bottom: 0.2rem;
            border: 1px solid transparent;
            border-radius: 0.75rem;
            background: transparent;
            color: #94a3b8;
            font-size: 0.72rem;
            font-weight: 700;
            text-align: left;
            cursor: pointer;
            touch-action: manipulation;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
        }

        .ops-nav-item i {
            width: 1.1rem;
            text-align: center;
            font-size: 0.78rem;
            opacity: 0.9;
        }

        .ops-nav-item:hover {
            background: rgba(30, 41, 59, 0.65);
            color: #e2e8f0;
        }

        .ops-nav-item--active {
            background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(124, 58, 237, 0.12));
            border-color: rgba(96, 165, 250, 0.28);
            color: #bfdbfe;
            box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
        }

        .ops-nav-item--alert.ops-nav-item--active {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.18), rgba(127, 29, 29, 0.12));
            border-color: rgba(248, 113, 113, 0.3);
            color: #fecaca;
        }

        .ops-nav-item--quick {
            font-size: 0.68rem;
        }

        .ops-sidebar-foot {
            padding: 0.65rem 0.75rem 0.85rem;
            border-top: 1px solid rgba(51, 65, 85, 0.5);
            font-size: 0.58rem;
            font-weight: 700;
            color: #64748b;
            letter-spacing: 0.04em;
        }

        .ops-sidebar-tool {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.7rem;
            border: 1px solid rgba(52, 211, 153, 0.25);
            background: rgba(6, 78, 59, 0.25);
            color: #6ee7b7;
            font-size: 0.62rem;
            font-weight: 800;
            cursor: pointer;
        }

        .ops-main {
            flex: 1;
            min-width: 0;
            min-height: 0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            background: radial-gradient(ellipse at top right, rgba(30, 58, 138, 0.12), transparent 45%), #0b1220;
        }

        .ops-panel--supervisor .ops-main {
            background: radial-gradient(ellipse at top right, rgba(6, 95, 70, 0.14), transparent 45%), #0b1220;
        }

        .ops-topbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.65rem;
            padding: 0.75rem 1rem;
            min-height: 3.25rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.55);
            background: rgba(15, 23, 42, 0.82);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            flex-shrink: 0;
        }

        body.capacitor-native .ops-topbar,
        body.capacitor-android .ops-topbar {
            padding-top: 0.55rem;
            padding-bottom: 0.55rem;
        }

        .ops-topbar--emerald {
            border-bottom-color: rgba(6, 95, 70, 0.35);
        }

        .ops-topbar-left {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            min-width: 0;
        }

        .ops-topbar-titles {
            min-width: 0;
        }

        .ops-crumb {
            font-size: 0.58rem;
            font-weight: 700;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #64748b;
            margin-bottom: 0.1rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ops-page-title {
            font-size: 1.05rem;
            font-weight: 900;
            color: #f8fafc;
            letter-spacing: -0.02em;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ops-topbar-actions {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            flex-shrink: 0;
        }

        .ops-icon-btn {
            width: 2.25rem;
            height: 2.25rem;
            border-radius: 0.7rem;
            border: 1px solid rgba(51, 65, 85, 0.8);
            background: rgba(30, 41, 59, 0.75);
            color: #cbd5e1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            touch-action: manipulation;
        }

        .ops-icon-btn--danger {
            color: #fca5a5;
            border-color: rgba(127, 29, 29, 0.45);
            background: rgba(69, 10, 10, 0.35);
        }

        .ops-pill-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.7rem;
            border-radius: 999px;
            border: 1px solid rgba(59, 130, 246, 0.35);
            background: rgba(30, 58, 138, 0.25);
            color: #93c5fd;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            cursor: pointer;
        }

        .ops-trust-banner {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            font-size: 0.65rem;
            font-weight: 600;
            color: #a7f3d0;
            background: linear-gradient(90deg, rgba(6, 78, 59, 0.45), rgba(6, 95, 70, 0.15));
            border-bottom: 1px solid rgba(6, 95, 70, 0.35);
            flex-shrink: 0;
        }

        .ops-content {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            overflow-x: hidden;
            padding: 1rem;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            /* pan-y: permite scroll tÃ¡ctil aunque html/body usen touch-action: manipulation */
            touch-action: pan-y;
        }

        .ops-footer {
            flex-shrink: 0;
            border-top: 1px solid rgba(51, 65, 85, 0.55);
            padding: 0.55rem 1rem;
            background: rgba(15, 23, 42, 0.9);
        }

        .ops-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 12rem;
            opacity: 0.85;
        }

        .ops-loading-ring {
            width: 3rem;
            height: 3rem;
            border-radius: 999px;
            background: rgba(37, 99, 235, 0.12);
            color: #60a5fa;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            margin-bottom: 0.65rem;
        }

        .ops-panel--supervisor .ops-loading-ring {
            background: rgba(16, 185, 129, 0.12);
            color: #34d399;
        }

        .ops-loading-text {
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
        }

        /* Tarjetas generadas por JS dentro del panel */
        .ops-content > .bg-gray-800,
        .ops-content .bg-gray-800.p-4,
        .ops-content .bg-gray-800.rounded-2xl {
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98)) !important;
            border: 1px solid rgba(51, 65, 85, 0.75) !important;
            border-radius: 1rem !important;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
        }

        .ops-content .bg-white {
            background: rgba(248, 250, 252, 0.98) !important;
            border-radius: 1rem !important;
        }

        .ops-content .sticky.top-0 {
            background: rgba(11, 18, 32, 0.92) !important;
            backdrop-filter: blur(8px);
            border-radius: 0.75rem;
            padding-left: 0.25rem !important;
            padding-right: 0.25rem !important;
        }

        .ops-content .rounded-full.bg-purple-600,
        .ops-content .rounded-full.bg-gray-700,
        .ops-content .rounded-full.bg-amber-600 {
            border: 1px solid rgba(255, 255, 255, 0.08);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
        }

        .ops-content .bg-gray-800.rounded-3xl,
        .ops-content .bg-\[\#1e293b\] {
            border-radius: 1.1rem !important;
            border: 1px solid rgba(51, 65, 85, 0.8) !important;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
        }

        .ops-menu-btn {
            display: none;
        }

        @media (max-width: 900px) {
            .ops-sidebar {
                position: fixed;
                top: 0;
                left: 0;
                bottom: 0;
                transform: translateX(-104%);
                transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
                box-shadow: 12px 0 40px rgba(0, 0, 0, 0.45);
                /* Evita que un input sticky del contenido se pinte encima del menÃº en Android WebView */
                z-index: 50;
            }

            .ops-panel.ops-drawer-open .ops-sidebar {
                transform: translateX(0);
            }

            .ops-panel.ops-drawer-open .ops-backdrop {
                display: block;
                z-index: 40;
            }

            /*
             * Con drawer abierto: el listado/buscador no debe capturar toques
             * (si no, el sticky search se siente â€œtrabadoâ€ sobre el menÃº).
             * El topbar sigue activo para poder cerrar con la hamburguesa.
             */
            .ops-panel.ops-drawer-open .ops-content {
                pointer-events: none;
                overflow: hidden;
            }

            .ops-panel.ops-drawer-open .ops-toolbar--sticky,
            .ops-panel.ops-drawer-open .ops-toolbar {
                position: relative;
                z-index: 0;
                backdrop-filter: none;
                -webkit-backdrop-filter: none;
            }

            .ops-menu-btn {
                display: inline-flex;
                position: relative;
                z-index: 55;
            }

            .ops-pill-btn span {
                display: none;
            }

            .ops-content {
                padding: 0.75rem;
            }

            /* Sticky en mÃ³vil con teclado + drawer suele â€œcongelarâ€ el scroll; priorizar estabilidad */
            .ops-toolbar--sticky {
                top: 0;
                z-index: 4;
            }
        }

        /* â€”â€” PÃ¡ginas internas Admin / SupervisiÃ³n â€”â€” */
        .ops-page {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            max-width: 72rem;
            margin: 0 auto;
            width: 100%;
        }

        .ops-page-hero {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 1rem 1.1rem;
            border-radius: 1.1rem;
            background: linear-gradient(135deg, rgba(30, 58, 138, 0.22), rgba(15, 23, 42, 0.6));
            border: 1px solid rgba(59, 130, 246, 0.2);
        }

        .ops-panel--supervisor .ops-page-hero {
            background: linear-gradient(135deg, rgba(6, 95, 70, 0.22), rgba(15, 23, 42, 0.6));
            border-color: rgba(52, 211, 153, 0.2);
        }

        .ops-page-hero-title {
            font-size: 1.15rem;
            font-weight: 900;
            color: #f8fafc;
            letter-spacing: -0.02em;
            line-height: 1.2;
        }

        .ops-page-hero-sub {
            margin-top: 0.25rem;
            font-size: 0.68rem;
            font-weight: 600;
            color: #94a3b8;
            line-height: 1.4;
        }

        .ops-kpi-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(4.5rem, 1fr));
            gap: 0.45rem;
            width: 100%;
            max-width: 22rem;
        }

        .ops-kpi {
            padding: 0.55rem 0.5rem;
            border-radius: 0.75rem;
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid rgba(51, 65, 85, 0.7);
            text-align: center;
        }

        .ops-kpi--clickable {
            cursor: pointer;
            appearance: none;
            -webkit-appearance: none;
            font: inherit;
            color: inherit;
            width: 100%;
            transition: transform 0.12s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
            -webkit-tap-highlight-color: transparent;
        }

        .ops-kpi--clickable:hover {
            border-color: rgba(148, 163, 184, 0.85);
            background: rgba(30, 41, 59, 0.9);
        }

        .ops-kpi--clickable:active {
            transform: scale(0.97);
        }

        .ops-kpi--active {
            border-color: rgba(167, 139, 250, 0.95) !important;
            box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.45), 0 8px 20px rgba(88, 28, 135, 0.35);
            background: rgba(88, 28, 135, 0.45) !important;
        }

        .ops-kpi--active .ops-kpi-label {
            color: #e9d5ff;
        }

        .ops-kpi-value {
            display: block;
            font-size: 1.1rem;
            font-weight: 900;
            color: #f1f5f9;
            line-height: 1.1;
        }

        .ops-kpi-label {
            display: block;
            margin-top: 0.15rem;
            font-size: 0.5rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #64748b;
        }

        .ops-kpi--red .ops-kpi-value { color: #fca5a5; }
        .ops-kpi--amber .ops-kpi-value { color: #fcd34d; }
        .ops-kpi--emerald .ops-kpi-value { color: #6ee7b7; }
        .ops-kpi--cyan .ops-kpi-value { color: #67e8f9; }
        .ops-kpi--violet .ops-kpi-value { color: #c4b5fd; }
        .ops-kpi--purple .ops-kpi-value { color: #d8b4fe; }

        /* Secciones ocultas al filtrar por KPI */
        .ops-trips-section--hidden,
        [data-staff-trips-section].ops-trips-section--hidden {
            display: none !important;
        }

        .ops-trips-filter-hint {
            margin: 0.55rem 0 0;
            font-size: 0.65rem;
            font-weight: 700;
            color: #94a3b8;
            letter-spacing: 0.02em;
        }

        .ops-trips-filter-hint b {
            color: #e2e8f0;
        }

        .ops-trip-card--filtered-out {
            display: none !important;
        }

        .ops-trips-col--hidden {
            display: none !important;
        }

        .ops-section {
            border-radius: 1.1rem;
            border: 1px solid rgba(51, 65, 85, 0.75);
            background: rgba(15, 23, 42, 0.55);
            overflow: hidden;
        }

        .ops-section-head,
        .ops-section-summary {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            padding: 0.75rem 0.9rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.5);
        }

        .ops-section-summary {
            cursor: pointer;
            list-style: none;
        }

        .ops-section-summary::-webkit-details-marker { display: none; }

        .ops-section-title-wrap {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            min-width: 0;
        }

        .ops-section-icon {
            width: 1.85rem;
            height: 1.85rem;
            border-radius: 0.55rem;
            background: rgba(37, 99, 235, 0.15);
            color: #60a5fa;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            flex-shrink: 0;
        }

        .ops-section--red .ops-section-icon { background: rgba(220, 38, 38, 0.15); color: #f87171; }
        .ops-section--amber .ops-section-icon { background: rgba(217, 119, 6, 0.15); color: #fbbf24; }
        .ops-section--violet .ops-section-icon { background: rgba(124, 58, 237, 0.15); color: #a78bfa; }
        .ops-section--cyan .ops-section-icon { background: rgba(8, 145, 178, 0.15); color: #22d3ee; }
        .ops-section--emerald .ops-section-icon { background: rgba(5, 150, 105, 0.15); color: #34d399; }

        .ops-section-title {
            font-size: 0.78rem;
            font-weight: 900;
            color: #e2e8f0;
            letter-spacing: 0.02em;
        }

        .ops-section-sub {
            font-size: 0.58rem;
            color: #64748b;
            margin-top: 0.1rem;
        }

        .ops-section-body {
            padding: 0.75rem 0.9rem 0.9rem;
        }

        .ops-badge {
            flex-shrink: 0;
            padding: 0.2rem 0.5rem;
            border-radius: 999px;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.04em;
        }

        .ops-badge--default { background: rgba(51, 65, 85, 0.8); color: #cbd5e1; }
        .ops-badge--red { background: rgba(127, 29, 29, 0.5); color: #fecaca; }
        .ops-badge--amber { background: rgba(120, 53, 15, 0.5); color: #fde68a; }
        .ops-badge--cyan { background: rgba(22, 78, 99, 0.5); color: #a5f3fc; }
        .ops-badge--violet { background: rgba(76, 29, 149, 0.5); color: #ddd6fe; }
        .ops-badge--emerald { background: rgba(6, 78, 59, 0.5); color: #a7f3d0; }

        .ops-toolbar {
            padding: 0.75rem;
            border-radius: 1rem;
            background: rgba(15, 23, 42, 0.7);
            border: 1px solid rgba(51, 65, 85, 0.65);
        }

        .ops-toolbar--sticky {
            position: sticky;
            top: 0;
            /* Bajo el drawer (40/50). z-index alto hacÃ­a que el buscador flotara encima de la hamburguesa en mÃ³vil */
            z-index: 5;
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
        }

        .ops-user-group {
            overflow: hidden;
        }

        .ops-city-chipbar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            margin-bottom: 0.7rem;
            align-items: center;
        }

        .ops-city-chip {
            appearance: none;
            border: 1px solid rgba(51, 65, 85, 0.7);
            background: rgba(15, 23, 42, 0.75);
            color: #e2e8f0;
            border-radius: 999px;
            padding: 0.28rem 0.55rem;
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            font-size: 0.68rem;
            font-weight: 800;
            letter-spacing: 0.01em;
            line-height: 1;
            cursor: pointer;
            transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
            max-width: 100%;
        }

        .ops-city-chip:hover {
            border-color: rgba(16, 185, 129, 0.75);
            background: rgba(6, 78, 59, 0.3);
            transform: translateY(-1px);
        }

        .ops-city-chip:focus-visible {
            outline: 2px solid rgba(16, 185, 129, 0.75);
            outline-offset: 2px;
        }

        .ops-city-chip__name {
            max-width: min(44vw, 160px);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .ops-city-chip__count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.15rem;
            height: 1.15rem;
            padding: 0 0.3rem;
            border-radius: 999px;
            background: rgba(30, 41, 59, 0.9);
            color: #cbd5e1;
            font-size: 0.62rem;
            font-weight: 900;
        }

        .ops-user-group-header {
            list-style: none;
        }

        .ops-user-group summary {
            list-style: none;
        }

        .ops-user-group summary::-webkit-details-marker {
            display: none;
        }

        .ops-user-group-header {
            cursor: pointer;
        }

        .ops-user-group-body {
            padding-top: 0.75rem;
        }

        /* Al scrollear: compactar hint/chips, NUNCA ocultar el input de bÃºsqueda */
        #admin-users-list.admin-search-scrolled .ops-toolbar-hint,
        #supervisor-pending-list.admin-search-scrolled .ops-toolbar-hint {
            display: none;
        }
        #admin-users-list.admin-search-scrolled .ops-toolbar,
        #supervisor-pending-list.admin-search-scrolled .ops-toolbar {
            padding-top: 0.45rem;
            padding-bottom: 0.45rem;
        }

        .ops-toolbar-search .ops-input,
        .ops-input {
            width: 100%;
            padding: 0.7rem 0.85rem;
            border-radius: 0.85rem;
            border: 1px solid rgba(51, 65, 85, 0.9);
            background: rgba(15, 23, 42, 0.9);
            color: #f1f5f9;
            font-size: 0.78rem;
            outline: none;
            font-family: 'Inter', system-ui, 'Segoe UI', Roboto, Arial,
                'Noto Color Emoji', 'Apple Color Emoji', 'Segoe UI Emoji', sans-serif;
            font-variant-emoji: emoji;
        }

        .ops-input:focus {
            border-color: rgba(59, 130, 246, 0.55);
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
        }

        .ops-toolbar-hint {
            margin-top: 0.45rem;
            font-size: 0.58rem;
            color: #64748b;
            line-height: 1.35;
        }

        .ops-chipbar,
        .ops-trip-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            margin-top: 0.5rem;
        }

        .ops-trip-toolbar { margin-top: 0; }

        .ops-chip {
            padding: 0.4rem 0.75rem;
            border-radius: 999px;
            border: 1px solid rgba(51, 65, 85, 0.9);
            background: rgba(30, 41, 59, 0.8);
            color: #94a3b8;
            font-size: 0.62rem;
            font-weight: 800;
            letter-spacing: 0.03em;
            cursor: pointer;
            touch-action: manipulation;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
        }

        .ops-chip--active,
        .ops-chip.ops-chip--active {
            color: #fff;
            border-color: transparent;
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
        }

        .ops-chip--purple.ops-chip--active { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
        .ops-chip--emerald {
            background: linear-gradient(135deg, #059669, #10b981);
            color: #fff;
            border-color: transparent;
        }
        .ops-chip--emerald.ops-chip--active { background: linear-gradient(135deg, #059669, #10b981); }
        .ops-chip--amber.ops-chip--active { background: linear-gradient(135deg, #d97706, #f59e0b); }
        .ops-chip--muted.ops-chip--active,
        .ops-chip--muted { background: rgba(51, 65, 85, 0.65); }
        .ops-chip--muted.ops-chip--active { background: rgba(71, 85, 105, 0.9); color: #e2e8f0; }

        .ops-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 2.5rem 1.25rem;
            border-radius: 1.1rem;
            border: 1px dashed rgba(51, 65, 85, 0.8);
            background: rgba(15, 23, 42, 0.35);
        }

        .ops-empty-icon {
            width: 3.25rem;
            height: 3.25rem;
            border-radius: 999px;
            background: rgba(51, 65, 85, 0.35);
            color: #64748b;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.35rem;
            margin-bottom: 0.65rem;
        }

        .ops-empty-title {
            font-size: 0.82rem;
            font-weight: 900;
            color: #e2e8f0;
            text-transform: uppercase;
            letter-spacing: 0.06em;
        }

        .ops-empty-sub {
            margin-top: 0.35rem;
            font-size: 0.65rem;
            color: #64748b;
            max-width: 16rem;
            line-height: 1.4;
        }

        .ops-user-list {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }

        .ops-user-card,
        .ops-content .driver-card {
            padding: 0.9rem !important;
            border-radius: 1rem !important;
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98)) !important;
            border: 1px solid rgba(51, 65, 85, 0.8) !important;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
        }

        .ops-form-panel {
            border-radius: 1.1rem;
            border: 1px solid rgba(51, 65, 85, 0.75);
            background: rgba(15, 23, 42, 0.6);
            overflow: hidden;
        }

        .ops-form-panel-head {
            padding: 0.9rem 1rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.5);
        }

        .ops-form-panel-title {
            font-size: 0.95rem;
            font-weight: 900;
            color: #f8fafc;
        }

        .ops-form-panel-sub {
            margin-top: 0.2rem;
            font-size: 0.65rem;
            color: #94a3b8;
            line-height: 1.4;
        }

        .ops-form-panel-body {
            padding: 1rem;
        }

        .ops-field-label {
            display: block;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
            margin-bottom: 0.35rem;
        }

        .ops-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.7rem 1rem;
            border: none;
            border-radius: 0.85rem;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            text-transform: uppercase;
            cursor: pointer;
            touch-action: manipulation;
        }

        .ops-btn--full { width: 100%; }

        .ops-btn--primary {
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.28);
        }

        .ops-btn--emerald {
            background: linear-gradient(135deg, #059669, #10b981);
            color: #fff;
        }

        .ops-btn--ghost {
            background: rgba(30, 41, 59, 0.8);
            border: 1px solid rgba(51, 65, 85, 0.8);
            color: #cbd5e1;
        }

        .ops-stack {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
        }

        .ops-report-card {
            padding: 0.85rem;
            border-radius: 0.95rem;
            border: 1px solid rgba(127, 29, 29, 0.45);
            background: linear-gradient(145deg, rgba(69, 10, 10, 0.45), rgba(15, 23, 42, 0.9));
            margin-bottom: 0.5rem;
        }

        .ops-ticket-card {
            padding: 0.9rem;
            border-radius: 1rem;
            border: 1px solid rgba(51, 65, 85, 0.8);
            background: rgba(30, 41, 59, 0.65);
            margin-bottom: 0.55rem;
        }

        .ops-card {
            padding: 0.9rem;
            border-radius: 1rem;
            border: 1px solid rgba(51, 65, 85, 0.8);
            background: linear-gradient(145deg, rgba(30, 41, 59, 0.92), rgba(15, 23, 42, 0.98));
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        }

        .ops-card--trip { border-color: rgba(124, 58, 237, 0.25); }
        .ops-card--driver { border-color: rgba(5, 150, 105, 0.25); }

        .ops-trip-card-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.5rem;
            padding-bottom: 0.5rem;
            margin-bottom: 0.5rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.6);
        }

        .ops-trip-card-head-left {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.35rem;
            min-width: 0;
        }

        /* â€”â€” Dashboard de viajes activos (admin / supervisor) â€”â€” */
        .ops-trips-page-hero {
            display: flex;
            flex-direction: column;
            gap: 0.85rem;
            padding: 1.1rem 1.15rem;
            border-radius: 1.25rem;
            background:
                radial-gradient(120% 90% at 100% 0%, rgba(124, 58, 237, 0.28), transparent 55%),
                radial-gradient(90% 80% at 0% 100%, rgba(14, 165, 233, 0.18), transparent 50%),
                linear-gradient(145deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
            border: 1px solid rgba(148, 163, 184, 0.18);
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
        }

        .ops-trips-page-hero--supervisor {
            background:
                radial-gradient(120% 90% at 100% 0%, rgba(16, 185, 129, 0.22), transparent 55%),
                radial-gradient(90% 80% at 0% 100%, rgba(59, 130, 246, 0.16), transparent 50%),
                linear-gradient(145deg, rgba(6, 78, 59, 0.35), rgba(15, 23, 42, 0.98));
            border-color: rgba(52, 211, 153, 0.2);
        }

        .ops-trips-page-kicker {
            margin: 0 0 0.25rem;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #a5b4fc;
        }

        .ops-trips-page-title {
            margin: 0;
            font-size: 1.35rem;
            font-weight: 900;
            color: #f8fafc;
            letter-spacing: -0.03em;
            line-height: 1.15;
        }

        .ops-trips-page-sub {
            margin: 0.3rem 0 0;
            font-size: 0.72rem;
            font-weight: 600;
            color: #94a3b8;
            line-height: 1.4;
        }

        .ops-trips-page-kpis {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(5.2rem, 1fr));
            gap: 0.45rem;
            width: 100%;
            max-width: none;
        }

        .ops-trips-page-kpis .ops-kpi {
            background: rgba(15, 23, 42, 0.55);
            border-color: rgba(71, 85, 105, 0.55);
            backdrop-filter: blur(8px);
        }

        .ops-trips-dash {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin-top: 0.15rem;
        }

        .ops-trips-dash-hero {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.75rem;
            padding: 0.9rem 1rem;
            border-radius: 1.1rem;
            background: linear-gradient(135deg, rgba(88, 28, 135, 0.35), rgba(15, 23, 42, 0.9));
            border: 1px solid rgba(167, 139, 250, 0.25);
        }

        .ops-trips-dash-kicker {
            margin: 0;
            font-size: 0.55rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #c4b5fd;
        }

        .ops-trips-dash-title {
            margin: 0.15rem 0 0;
            font-size: 1.05rem;
            font-weight: 900;
            color: #f8fafc;
        }

        .ops-trips-dash-sub {
            margin: 0.2rem 0 0;
            font-size: 0.65rem;
            color: #a5b4fc;
            font-weight: 600;
        }

        .ops-trips-dash-live {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.4rem 0.7rem;
            border-radius: 999px;
            background: rgba(16, 185, 129, 0.12);
            border: 1px solid rgba(52, 211, 153, 0.35);
            color: #6ee7b7;
            font-size: 0.62rem;
            font-weight: 900;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .ops-trips-live-dot {
            width: 0.45rem;
            height: 0.45rem;
            border-radius: 999px;
            background: #34d399;
            box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6);
            animation: ops-live-pulse 1.6s ease-out infinite;
        }

        @keyframes ops-live-pulse {
            0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); }
            70% { box-shadow: 0 0 0 0.45rem rgba(52, 211, 153, 0); }
            100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
        }

        .ops-trips-mini-kpi-row {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.4rem;
        }

        @media (max-width: 720px) {
            .ops-trips-mini-kpi-row {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        .ops-trips-mini-kpi {
            padding: 0.55rem 0.5rem;
            border-radius: 0.85rem;
            background: rgba(15, 23, 42, 0.72);
            border: 1px solid rgba(51, 65, 85, 0.75);
            text-align: center;
        }

        .ops-trips-mini-kpi-val {
            display: block;
            font-size: 1.15rem;
            font-weight: 900;
            line-height: 1.1;
            color: #f1f5f9;
        }

        .ops-trips-mini-kpi-lab {
            display: block;
            margin-top: 0.2rem;
            font-size: 0.52rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: #94a3b8;
            line-height: 1.25;
        }

        .ops-trips-mini-kpi--amber .ops-trips-mini-kpi-val { color: #fcd34d; }
        .ops-trips-mini-kpi--emerald .ops-trips-mini-kpi-val { color: #6ee7b7; }
        .ops-trips-mini-kpi--violet .ops-trips-mini-kpi-val { color: #c4b5fd; }
        .ops-trips-mini-kpi--cyan .ops-trips-mini-kpi-val { color: #67e8f9; }

        .ops-trips-filter-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
        }

        .ops-trips-board {
            display: grid;
            grid-template-columns: repeat(4, minmax(0, 1fr));
            gap: 0.65rem;
            align-items: start;
        }

        @media (max-width: 1100px) {
            .ops-trips-board {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        @media (max-width: 640px) {
            .ops-trips-board {
                grid-template-columns: 1fr;
            }
        }

        .ops-trips-col {
            border-radius: 1rem;
            border: 1px solid rgba(51, 65, 85, 0.75);
            background: rgba(15, 23, 42, 0.45);
            min-height: 8rem;
            overflow: hidden;
        }

        .ops-trips-col--hidden { display: none !important; }

        .ops-trips-col-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.4rem;
            padding: 0.7rem 0.75rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.55);
            background: rgba(2, 6, 23, 0.35);
        }

        .ops-trips-col-title-wrap {
            display: flex;
            align-items: flex-start;
            gap: 0.45rem;
            min-width: 0;
        }

        .ops-trips-col-icon {
            width: 1.7rem;
            height: 1.7rem;
            border-radius: 0.55rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.72rem;
            flex-shrink: 0;
            background: rgba(51, 65, 85, 0.5);
            color: #cbd5e1;
        }

        .ops-trips-col--amber .ops-trips-col-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
        .ops-trips-col--emerald .ops-trips-col-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
        .ops-trips-col--violet .ops-trips-col-icon { background: rgba(139, 92, 246, 0.15); color: #a78bfa; }
        .ops-trips-col--cyan .ops-trips-col-icon { background: rgba(6, 182, 212, 0.15); color: #22d3ee; }

        .ops-trips-col--amber { border-color: rgba(245, 158, 11, 0.28); }
        .ops-trips-col--emerald { border-color: rgba(16, 185, 129, 0.28); }
        .ops-trips-col--violet { border-color: rgba(139, 92, 246, 0.28); }
        .ops-trips-col--cyan { border-color: rgba(6, 182, 212, 0.28); }

        .ops-trips-col-title {
            margin: 0;
            font-size: 0.72rem;
            font-weight: 900;
            color: #f1f5f9;
            line-height: 1.2;
        }

        .ops-trips-col-sub {
            margin: 0.12rem 0 0;
            font-size: 0.55rem;
            font-weight: 600;
            color: #64748b;
            line-height: 1.3;
        }

        .ops-trips-col-count {
            min-width: 1.5rem;
            height: 1.5rem;
            padding: 0 0.4rem;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.68rem;
            font-weight: 900;
            background: rgba(30, 41, 59, 0.9);
            color: #e2e8f0;
            border: 1px solid rgba(71, 85, 105, 0.7);
            flex-shrink: 0;
        }

        .ops-trips-col-body {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            padding: 0.65rem;
            /* Sin max-height en mÃ³vil: el scroll Ãºnico es .ops-content (evita scroll anidado roto al expandir cartas) */
            max-height: none;
            overflow: visible;
        }

        .ops-trips-col-empty {
            padding: 1.1rem 0.6rem;
            text-align: center;
            font-size: 0.62rem;
            font-weight: 700;
            color: #64748b;
        }

        .ops-card.ops-trip-card {
            position: relative;
            padding-left: 0.95rem;
            transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
        }

        .ops-card.ops-trip-card::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0.55rem;
            bottom: 0.55rem;
            width: 3px;
            border-radius: 999px;
            background: #64748b;
        }

        .ops-trip-card--phase-amber::before { background: linear-gradient(180deg, #fbbf24, #d97706); }
        .ops-trip-card--phase-emerald::before { background: linear-gradient(180deg, #34d399, #059669); }
        .ops-trip-card--phase-violet::before { background: linear-gradient(180deg, #a78bfa, #7c3aed); }
        .ops-trip-card--phase-cyan::before { background: linear-gradient(180deg, #22d3ee, #0891b2); }

        .ops-trip-card--filtered-out { display: none !important; }

        .ops-trip-phase-chip,
        .ops-trip-svc-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.18rem 0.45rem;
            border-radius: 999px;
            font-size: 0.52rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            border: 1px solid transparent;
        }

        .ops-trip-phase-chip--amber { color: #fde68a; background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.28); }
        .ops-trip-phase-chip--emerald { color: #a7f3d0; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.28); }
        .ops-trip-phase-chip--violet { color: #ddd6fe; background: rgba(139, 92, 246, 0.12); border-color: rgba(139, 92, 246, 0.28); }
        .ops-trip-phase-chip--cyan { color: #a5f3fc; background: rgba(6, 182, 212, 0.12); border-color: rgba(6, 182, 212, 0.28); }

        .ops-trip-svc-chip {
            color: #cbd5e1;
            background: rgba(51, 65, 85, 0.45);
            border-color: rgba(71, 85, 105, 0.55);
        }

        .ops-trips-view-toggle {
            display: inline-flex;
            gap: 0.3rem;
            margin-left: auto;
        }

        .ops-trips-list {
            display: flex;
            flex-direction: column;
            gap: 0.65rem;
        }

        .ops-trips-list-section {
            border-radius: 1rem;
            border: 1px solid rgba(51, 65, 85, 0.75);
            background: rgba(15, 23, 42, 0.45);
            overflow: hidden;
        }

        .ops-trips-list-section--amber { border-color: rgba(245, 158, 11, 0.3); }
        .ops-trips-list-section--emerald { border-color: rgba(16, 185, 129, 0.3); }
        .ops-trips-list-section--violet { border-color: rgba(139, 92, 246, 0.3); }
        .ops-trips-list-section--cyan { border-color: rgba(6, 182, 212, 0.3); }

        .ops-trips-list-head {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.65rem 0.8rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.55);
            background: rgba(2, 6, 23, 0.35);
        }

        .ops-trips-list-head .ops-trips-col-count { margin-left: auto; }

        .ops-trips-list-body {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
            padding: 0.55rem;
            max-height: none;
            overflow: visible;
        }

        /* Desktop: columnas del tablero pueden scroll interno si hay muchas cartas */
        @media (min-width: 901px) {
            .ops-trips-col-body {
                max-height: min(70vh, 36rem);
                overflow: auto;
                -webkit-overflow-scrolling: touch;
                overscroll-behavior: contain;
                touch-action: pan-y;
            }
        }

        .ops-trip-compact {
            border-radius: 0.85rem;
            border: 1px solid rgba(51, 65, 85, 0.7);
            background: rgba(30, 41, 59, 0.75);
            overflow: hidden;
        }

        .ops-trip-compact--open {
            border-color: rgba(129, 140, 248, 0.45);
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
        }

        .ops-trip-compact-main {
            width: 100%;
            display: grid;
            grid-template-columns: auto 1fr auto auto;
            gap: 0.45rem;
            align-items: center;
            padding: 0.55rem 0.6rem;
            background: transparent;
            border: 0;
            color: inherit;
            text-align: left;
            cursor: pointer;
        }

        .ops-trip-compact-phase {
            width: 1.85rem;
            height: 1.85rem;
            border-radius: 0.55rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            background: rgba(51, 65, 85, 0.6);
            color: #cbd5e1;
        }

        .ops-trip-compact--amber .ops-trip-compact-phase { color: #fbbf24; background: rgba(245, 158, 11, 0.12); }
        .ops-trip-compact--emerald .ops-trip-compact-phase { color: #34d399; background: rgba(16, 185, 129, 0.12); }
        .ops-trip-compact--violet .ops-trip-compact-phase { color: #a78bfa; background: rgba(139, 92, 246, 0.12); }
        .ops-trip-compact--cyan .ops-trip-compact-phase { color: #22d3ee; background: rgba(6, 182, 212, 0.12); }

        .ops-trip-compact-body {
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }

        .ops-trip-compact-people {
            font-size: 0.68rem;
            color: #e2e8f0;
            font-weight: 700;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ops-trip-compact-route {
            font-size: 0.55rem;
            color: #64748b;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .ops-trip-compact-price {
            font-size: 0.72rem;
            font-weight: 900;
            color: #c4b5fd;
            white-space: nowrap;
        }

        .ops-trip-compact-chevron {
            font-size: 0.65rem;
            color: #64748b;
            transition: transform 0.15s ease;
        }

        .ops-trip-compact--open .ops-trip-compact-chevron {
            transform: rotate(180deg);
        }

        .ops-trip-compact-quick {
            display: flex;
            gap: 0.3rem;
            padding: 0 0.55rem 0.45rem 2.5rem;
        }

        .ops-trip-quick-btn {
            width: 1.85rem;
            height: 1.85rem;
            border-radius: 0.5rem;
            border: 1px solid rgba(71, 85, 105, 0.7);
            background: rgba(15, 23, 42, 0.7);
            color: #93c5fd;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            cursor: pointer;
            text-decoration: none;
        }

        .ops-trip-quick-btn--wa { color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }

        .ops-trip-compact-expand {
            border-top: 1px solid rgba(51, 65, 85, 0.6);
            padding: 0.55rem;
            background: rgba(2, 6, 23, 0.35);
        }

        .ops-trip-compact-expand .ops-card {
            margin: 0;
        }

        .ops-trips-col-more {
            width: 100%;
            padding: 0.55rem;
            border-radius: 0.7rem;
            border: 1px dashed rgba(148, 163, 184, 0.35);
            background: transparent;
            color: #94a3b8;
            font-size: 0.62rem;
            font-weight: 800;
            cursor: pointer;
        }

        /* Vista previa â€œpantalla del conductorâ€ (staff revisa mapa/GPS) */
        .staff-driver-screen-preview .staff-driver-screen-kicker {
            color: #0d9488;
        }
        .staff-driver-screen-preview-inner {
            border-color: #99f6e4 !important;
            box-shadow: 0 20px 50px rgba(13, 148, 136, 0.22) !important;
        }
        .staff-driver-screen-sub {
            margin: 0.2rem 0 0;
            font-size: 0.7rem;
            font-weight: 700;
            color: #64748b;
            line-height: 1.35;
        }
        .staff-driver-screen-fakephone {
            margin-top: 0.45rem;
            border-radius: 0.9rem;
            border: 1px dashed #5eead4;
            background: linear-gradient(180deg, #f0fdfa 0%, #ecfeff 100%);
            padding: 0.55rem 0.65rem;
        }
        .staff-driver-screen-fakephone-bar {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #0f766e;
        }
        .staff-driver-screen-fakephone-hint {
            margin: 0.35rem 0 0;
            font-size: 0.68rem;
            font-weight: 700;
            color: #475569;
            line-height: 1.35;
        }
        body.staff-driver-screen-preview-active #admin-panel,
        body.staff-driver-screen-preview-active #supervisor-panel {
            /* dejar el mapa visible detrÃ¡s */
        }

        /* Panel flotante viaje en vivo desde mapa de flota */
        .staff-live-trip-sheet {
            position: fixed;
            left: 0.65rem;
            right: 0.65rem;
            bottom: calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 0.65rem);
            z-index: 45550;
            max-width: 26rem;
            margin: 0 auto;
            pointer-events: auto;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        /* Aparcar ficha cuando se abre trazo o editor (sin apilar tarjetas) */
        .staff-live-trip-sheet.staff-live-trip-sheet--parked {
            opacity: 0;
            pointer-events: none;
            transform: translateY(0.75rem);
            visibility: hidden;
        }

        .staff-live-trip-sheet-inner {
            background: #fff;
            border-radius: 1.2rem;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.32);
            border: 1px solid #e2e8f0;
            padding: 0.85rem 0.95rem;
            max-height: min(72dvh, 34rem);
            overflow: auto;
        }

        .staff-live-trip-sheet--pickup .staff-live-trip-sheet-inner {
            border-color: #a7f3d0;
            box-shadow: 0 20px 50px rgba(16, 185, 129, 0.18);
        }

        .staff-live-trip-sheet--wait .staff-live-trip-sheet-inner {
            border-color: #ddd6fe;
            box-shadow: 0 20px 50px rgba(139, 92, 246, 0.18);
        }

        .staff-live-trip-sheet--dest .staff-live-trip-sheet-inner {
            border-color: #fecaca;
            box-shadow: 0 20px 50px rgba(220, 38, 38, 0.18);
        }

        .staff-live-trip-sheet-head {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            align-items: flex-start;
            margin-bottom: 0.65rem;
        }

        .staff-live-trip-kicker {
            margin: 0;
            font-size: 0.55rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #dc2626;
        }

        .staff-live-trip-sheet--pickup .staff-live-trip-kicker,
        .staff-live-trip-sheet--pickup .staff-live-trip-dot { color: #059669; }

        .staff-live-trip-sheet--wait .staff-live-trip-kicker,
        .staff-live-trip-sheet--wait .staff-live-trip-dot { color: #7c3aed; }

        .staff-live-trip-sheet--dest .staff-live-trip-kicker,
        .staff-live-trip-sheet--dest .staff-live-trip-dot { color: #dc2626; }

        .staff-live-trip-dot {
            font-size: 0.45rem;
            vertical-align: middle;
            color: #ef4444;
            animation: ops-live-pulse 1.4s ease-out infinite;
        }

        .staff-live-trip-title {
            margin: 0.15rem 0 0;
            font-size: 1rem;
            font-weight: 900;
            color: #0f172a;
        }

        .staff-live-trip-price {
            margin: 0.15rem 0 0;
            font-size: 1.15rem;
            font-weight: 900;
            color: #7c3aed;
        }

        .staff-live-trip-close {
            border: 0;
            background: transparent;
            color: #94a3b8;
            font-size: 1.5rem;
            line-height: 1;
            cursor: pointer;
        }

        .staff-live-trip-people {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.45rem;
            margin-bottom: 0.55rem;
        }

        .staff-live-trip-person {
            padding: 0.55rem;
            border-radius: 0.85rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .staff-live-trip-role {
            margin: 0;
            font-size: 0.55rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #64748b;
        }

        .staff-live-trip-name {
            margin: 0.2rem 0 0.3rem;
            font-size: 0.78rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.2;
        }

        .staff-live-trip-wa {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.65rem;
            font-weight: 800;
            color: #047857;
            text-decoration: none;
        }

        .staff-live-trip-wa-miss {
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .staff-live-trip-route {
            padding: 0.55rem 0.65rem;
            border-radius: 0.85rem;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            margin-bottom: 0.55rem;
            font-size: 0.68rem;
            font-weight: 700;
            color: #334155;
            line-height: 1.35;
        }

        .staff-live-trip-route p { margin: 0.15rem 0; }

        .staff-live-trip-route-arrow {
            color: #64748b !important;
            font-size: 0.58rem !important;
            font-weight: 800 !important;
            padding-left: 0.15rem;
        }

        .staff-live-pin-box {
            margin: 0.15rem 0 0.55rem;
            padding: 0.65rem 0.7rem;
            border-radius: 0.9rem;
            border: 1px solid #fde68a;
            background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
        }

        .staff-live-pin-head {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            justify-content: space-between;
            gap: 0.35rem;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #92400e;
            margin-bottom: 0.45rem;
        }

        .staff-live-pin-state {
            font-size: 0.55rem;
            font-weight: 800;
            text-transform: none;
            letter-spacing: 0;
            color: #64748b;
            background: #fff;
            border-radius: 999px;
            padding: 0.15rem 0.45rem;
            border: 1px solid #e2e8f0;
        }

        .staff-live-pin-state--wait { color: #6d28d9; border-color: #ddd6fe; background: #f5f3ff; }
        .staff-live-pin-state--ok { color: #047857; border-color: #a7f3d0; background: #ecfdf5; }
        .staff-live-pin-state--warn { color: #b45309; border-color: #fcd34d; background: #fffbeb; }

        .staff-live-pin-code-row {
            display: flex;
            align-items: center;
            gap: 0.45rem;
            flex-wrap: wrap;
            margin-bottom: 0.45rem;
        }

        .staff-live-pin-code {
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            font-size: 1.35rem;
            font-weight: 900;
            letter-spacing: 0.2em;
            color: #0f172a;
            background: #fff;
            border: 1px solid #fbbf24;
            border-radius: 0.65rem;
            padding: 0.35rem 0.75rem;
            min-width: 4.5rem;
            text-align: center;
        }

        .staff-live-pin-miss {
            font-size: 0.7rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .staff-live-pin-actions {
            display: grid;
            grid-template-columns: 1fr;
            gap: 0.35rem;
        }

        .staff-live-pin-actions .staff-live-trip-btn {
            grid-column: 1 / -1;
        }

        .staff-live-trip-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.4rem;
        }

        .staff-live-trip-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            min-height: 2.45rem;
            padding: 0.45rem 0.5rem;
            border-radius: 0.75rem;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #0f172a;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            cursor: pointer;
        }

        .staff-live-trip-btn--primary {
            grid-column: 1 / -1;
            background: #0f172a;
            color: #fff;
            border-color: #0f172a;
        }

        .staff-live-trip-btn--warn {
            grid-column: 1 / -1;
            background: #d97706;
            color: #fff;
            border-color: #d97706;
        }

        .staff-live-trip-btn--emerald {
            grid-column: 1 / -1;
            background: #059669;
            color: #fff;
            border-color: #059669;
        }

        .staff-live-trip-btn--danger {
            grid-column: 1 / -1;
            background: #be123c;
            color: #fff;
            border-color: #be123c;
        }

        .staff-live-pin-copy {
            grid-column: auto !important;
            min-height: 2.2rem;
            flex: 0 0 auto;
        }

        .staff-live-trip-hint {
            margin: 0.55rem 0 0;
            font-size: 0.58rem;
            font-weight: 700;
            color: #64748b;
            line-height: 1.35;
            text-align: center;
        }

        .staff-live-trip-chat {
            margin: 0 0 0.55rem;
            border-radius: 0.85rem;
            border: 1px solid #e2e8f0;
            background: #0f172a;
            overflow: hidden;
        }

        .staff-live-trip-chat-toggle {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            padding: 0.55rem 0.7rem;
            border: 0;
            background: transparent;
            color: #e2e8f0;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            cursor: pointer;
        }

        .staff-live-trip-chat-toggle i.fa-comments {
            color: #a78bfa;
            margin-right: 0.25rem;
        }

        .staff-live-trip-chat-chevron {
            color: #94a3b8;
            transition: transform 0.18s ease;
        }

        .staff-live-trip-chat-toggle.is-collapsed .staff-live-trip-chat-chevron {
            transform: rotate(180deg);
        }

        .staff-live-trip-chat-body {
            max-height: 8.5rem;
            overflow-y: auto;
            padding: 0 0.7rem 0.55rem;
            border-top: 1px solid rgba(51, 65, 85, 0.55);
        }

        .staff-live-trip-chat-body.is-collapsed {
            display: none;
        }

        .staff-live-trip-chat-body .ops-trip-chat-empty,
        .staff-live-trip-chat-body .ops-trip-chat-line {
            margin: 0.2rem 0;
        }

        .staff-live-trip-chat-body .ops-trip-chat-empty {
            color: #64748b;
            font-size: 0.62rem;
            font-style: italic;
        }

        .staff-live-trip-chat-body .ops-trip-chat-text {
            color: #e2e8f0;
            font-size: 0.65rem;
        }

        .staff-live-trip-chat-body .ops-trip-chat-sender {
            font-size: 0.55rem;
            font-weight: 900;
            margin-right: 0.25rem;
        }

        .staff-live-trip-chat-body .ops-trip-chat-sender--client { color: #60a5fa; }
        .staff-live-trip-chat-body .ops-trip-chat-sender--driver { color: #34d399; }

        /* Dropzone tonos (PersonalizaciÃ³n admin) */
        .admin-tone-dropzone--active {
            border-color: #10b981 !important;
            background: rgba(16, 185, 129, 0.12) !important;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
        }

        /* Ficha finanzas conductor libre (mapa flota admin/sup) */
        .staff-driver-finance-sheet .staff-live-trip-sheet-inner {
            border-color: #c7d2fe;
            box-shadow: 0 20px 50px rgba(79, 70, 229, 0.16);
        }

        .staff-driver-finance-kicker {
            color: #4f46e5 !important;
        }

        .staff-driver-finance-sub {
            margin: 0.15rem 0 0;
            font-size: 0.68rem;
            font-weight: 700;
            color: #64748b;
        }

        .staff-driver-finance-loading,
        .staff-driver-finance-error {
            text-align: center;
            padding: 1.25rem 0.5rem;
            font-size: 0.75rem;
            font-weight: 800;
            color: #64748b;
        }

        .staff-driver-finance-error { color: #dc2626; }

        .staff-driver-finance-status {
            display: flex;
            flex-wrap: wrap;
            gap: 0.35rem;
            margin-bottom: 0.55rem;
        }

        .staff-driver-finance-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            padding: 0.28rem 0.5rem;
            border-radius: 999px;
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
        }

        .staff-driver-finance-chip i { font-size: 0.42rem; }
        .staff-driver-finance-chip.is-online { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
        .staff-driver-finance-chip.is-online i { color: #10b981; }
        .staff-driver-finance-chip.is-idle { background: #f8fafc; color: #64748b; }
        .staff-driver-finance-chip.is-grace { background: #e0f2fe; color: #0369a1; border-color: #bae6fd; }
        .staff-driver-finance-chip.is-debt { background: #fff1f2; color: #be123c; border-color: #fecdd3; }

        .staff-driver-finance-kpis {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.45rem;
            margin-bottom: 0.55rem;
        }

        .staff-driver-finance-kpi {
            padding: 0.65rem 0.55rem;
            border-radius: 0.9rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            text-align: center;
        }

        .staff-driver-finance-kpi-label {
            margin: 0;
            font-size: 0.55rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #64748b;
        }

        .staff-driver-finance-kpi-value {
            margin: 0.2rem 0 0;
            font-size: 1.15rem;
            font-weight: 900;
            color: #0f172a;
        }

        .staff-driver-finance-kpi-meta {
            margin: 0.1rem 0 0;
            font-size: 0.55rem;
            font-weight: 800;
            color: #94a3b8;
        }

        .staff-driver-finance-debt--ok {
            background: #ecfdf5;
            border-color: #a7f3d0;
        }
        .staff-driver-finance-debt--ok .staff-driver-finance-kpi-value { color: #047857; }

        .staff-driver-finance-debt--due {
            background: #fff1f2;
            border-color: #fecdd3;
        }
        .staff-driver-finance-debt--due .staff-driver-finance-kpi-value { color: #be123c; }

        .staff-driver-finance-debt--grace {
            background: #e0f2fe;
            border-color: #bae6fd;
        }
        .staff-driver-finance-debt--grace .staff-driver-finance-kpi-value { color: #0369a1; }

        .staff-driver-finance-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.35rem;
            margin-bottom: 0.55rem;
        }

        .staff-driver-finance-grid > div {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            padding: 0.45rem 0.5rem;
            border-radius: 0.7rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            min-width: 0;
        }

        .staff-driver-finance-grid span {
            font-size: 0.52rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.03em;
            color: #94a3b8;
        }

        .staff-driver-finance-grid b {
            font-size: 0.78rem;
            font-weight: 900;
            color: #0f172a;
        }

        .staff-driver-finance-grid b.text-rose { color: #e11d48; }

        .staff-driver-finance-contact {
            margin-bottom: 0.55rem;
        }

        .ops-trip-price {
            font-size: 0.75rem;
            font-weight: 900;
            color: #c4b5fd;
            flex-shrink: 0;
        }

        .ops-trip-head-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            gap: 0.15rem;
            flex-shrink: 0;
        }

        .ops-trip-wait-hint {
            font-size: 0.58rem;
            font-weight: 800;
            color: #fbbf24;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .ops-trip-parties {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            font-size: 0.68rem;
            color: #cbd5e1;
        }

        .ops-trip-parties--stack {
            flex-direction: column;
            align-items: flex-start;
        }

        .ops-trip-parties b { color: #f8fafc; }

        .ops-trip-route {
            font-size: 0.62rem;
            color: #64748b;
            margin-top: 0.15rem;
        }

        .ops-trip-route-wrap { margin-top: 0.2rem; }

        .ops-trip-route-km-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem;
            margin-top: 0.35rem;
        }

        .ops-trip-route-km-item,
        .ops-trip-route-km-total {
            font-size: 0.55rem;
            font-weight: 800;
            padding: 0.18rem 0.4rem;
            border-radius: 999px;
            background: rgba(14, 165, 233, 0.18);
            color: #7dd3fc;
            border: 1px solid rgba(56, 189, 248, 0.28);
        }

        .ops-trip-route-km-total {
            background: rgba(16, 185, 129, 0.18);
            color: #6ee7b7;
            border-color: rgba(52, 211, 153, 0.3);
        }

        .ops-staff-km-panel {
            margin-top: 0.35rem;
            padding: 0.5rem 0.55rem;
            border-radius: 0.75rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .ops-staff-km-panel--compact { padding: 0.4rem 0.45rem; }

        .ops-staff-km-head {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            font-size: 0.62rem;
            font-weight: 900;
            color: #0f172a;
            margin-bottom: 0.35rem;
        }

        .ops-staff-km-row {
            display: grid;
            grid-template-columns: auto 1fr auto;
            gap: 0.35rem;
            align-items: center;
            font-size: 0.58rem;
            padding: 0.22rem 0;
            border-top: 1px solid #e2e8f0;
        }

        .ops-staff-km-leg { color: #0369a1; font-weight: 900; white-space: nowrap; }
        .ops-staff-km-addr {
            color: #475569;
            font-weight: 700;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }
        .ops-staff-km-val { color: #0f172a; font-weight: 900; white-space: nowrap; }

        .staff-route-map-panel {
            position: fixed;
            left: 0.75rem;
            right: 0.75rem;
            bottom: calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 0.75rem);
            z-index: 45560;
            max-width: 28rem;
            margin: 0 auto;
            background: #fff;
            border-radius: 1.1rem;
            box-shadow: 0 18px 50px rgba(15, 23, 42, 0.28);
            border: 1px solid #e2e8f0;
            padding: 0.75rem 0.85rem;
            max-height: 42dvh;
            overflow: auto;
            transition: opacity 0.18s ease, transform 0.18s ease;
        }

        /* Ocultar panel de trazo al abrir ficha completa (sin apilar) */
        .staff-route-map-panel.staff-route-map-panel--parked {
            opacity: 0;
            pointer-events: none;
            transform: translateY(0.75rem);
            visibility: hidden;
        }

        .staff-route-map-actions {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.4rem;
            margin-top: 0.45rem;
        }

        .staff-route-map-back,
        .staff-route-map-clear {
            min-height: 2.4rem;
            border-radius: 0.75rem;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            cursor: pointer;
            border: 1px solid #e2e8f0;
        }

        .staff-route-map-back {
            background: #0f172a;
            color: #fff;
            border-color: #0f172a;
        }

        .staff-route-map-clear {
            background: #f8fafc;
            color: #334155;
        }

        .staff-route-map-panel-head {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            align-items: flex-start;
            margin-bottom: 0.35rem;
        }

        .staff-route-map-kicker {
            font-size: 0.55rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #0284c7;
            margin: 0;
        }

        .staff-route-map-title {
            font-size: 0.85rem;
            font-weight: 900;
            color: #0f172a;
            margin: 0.1rem 0 0;
        }

        .staff-route-map-close {
            border: 0;
            background: transparent;
            color: #94a3b8;
            font-size: 1.4rem;
            line-height: 1;
            cursor: pointer;
        }

        .staff-route-map-hint {
            margin: 0.45rem 0 0.35rem;
            font-size: 0.62rem;
            font-weight: 800;
            color: #334155;
        }

        .ops-trip-client-block {
            margin: 0.35rem 0 0.45rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.65rem;
            background: rgba(30, 41, 59, 0.65);
            border: 1px solid rgba(148, 163, 184, 0.25);
        }

        .ops-trip-client-main {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.35rem 0.55rem;
            margin-bottom: 0.3rem;
        }

        .ops-trip-client-name {
            font-size: 0.78rem;
            font-weight: 900;
            color: #f8fafc;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
        }

        .ops-trip-client-name i { color: #94a3b8; font-size: 0.7rem; }

        .ops-trip-client-svc {
            font-size: 0.55rem;
            font-weight: 900;
            letter-spacing: 0.05em;
            padding: 0.12rem 0.4rem;
            border-radius: 999px;
            background: rgba(99, 102, 241, 0.25);
            color: #c7d2fe;
        }

        .ops-trip-client-zone {
            font-size: 0.58rem;
            font-weight: 700;
            color: #94a3b8;
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }

        .ops-trip-client-contact {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.4rem 0.55rem;
            font-size: 0.72rem;
            color: #cbd5e1;
        }

        .ops-trip-client-contact > i.fa-whatsapp,
        .ops-trip-client-contact > i.fab {
            color: #34d399;
        }

        .ops-trip-client-phone {
            font-weight: 800;
            color: #e2e8f0;
            letter-spacing: 0.02em;
        }

        .ops-trip-client-phone--wa {
            color: #6ee7b7;
            text-decoration: none;
        }

        .ops-trip-client-phone--wa:hover { text-decoration: underline; }

        .ops-trip-client-phone--missing {
            color: #94a3b8;
            font-style: italic;
            font-weight: 600;
        }

        .ops-trip-client-wa-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.2rem 0.5rem;
            border-radius: 0.45rem;
            background: rgba(16, 185, 129, 0.2);
            border: 1px solid rgba(52, 211, 153, 0.35);
            color: #6ee7b7;
            font-size: 0.58rem;
            font-weight: 900;
            text-decoration: none;
            letter-spacing: 0.04em;
        }

        .ops-trip-client-wa-btn:hover {
            background: rgba(16, 185, 129, 0.35);
        }

        .ops-trip-attn-banner {
            margin: 0.15rem 0 0.45rem;
            padding: 0.5rem 0.6rem;
            border-radius: 0.65rem;
            background: rgba(120, 53, 15, 0.4);
            border: 1px solid rgba(251, 191, 36, 0.4);
        }

        .ops-trip-attn-banner--critical {
            background: rgba(127, 29, 29, 0.45);
            border-color: rgba(248, 113, 113, 0.45);
        }

        .ops-trip-attn-title {
            font-size: 0.62rem;
            font-weight: 900;
            color: #fde68a;
            margin: 0 0 0.35rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
            line-height: 1.3;
        }

        .ops-trip-attn-banner--critical .ops-trip-attn-title {
            color: #fecaca;
        }

        .ops-trip-attn-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.3rem;
        }

        .ops-trip-attn-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            font-size: 0.55rem;
            font-weight: 800;
            padding: 0.18rem 0.45rem;
            border-radius: 999px;
            background: rgba(51, 65, 85, 0.7);
            color: #e2e8f0;
        }

        .ops-trip-attn-chip--danger {
            background: rgba(185, 28, 28, 0.45);
            color: #fecaca;
        }

        .ops-trip-attn-chip--warn {
            background: rgba(180, 83, 9, 0.4);
            color: #fde68a;
        }

        .ops-trip-attn-chip--ok {
            background: rgba(4, 120, 87, 0.4);
            color: #a7f3d0;
        }

        .ops-trip-unanswered-summary {
            font-size: 0.68rem;
            color: #fde68a;
            font-weight: 700;
            margin: 0 0 0.65rem;
            line-height: 1.4;
        }

        .ops-trip-unanswered-summary b { color: #fff; }

        .ops-trip-unanswered-summary--hist {
            color: #fecaca;
        }

        .ops-trip-unanswered-note {
            display: block;
            margin-top: 0.35rem;
            font-size: 0.58rem;
            font-weight: 600;
            color: #94a3b8;
            line-height: 1.35;
        }

        .ops-trip-attn-banner--hist {
            background: rgba(69, 10, 10, 0.45);
            border-color: rgba(248, 113, 113, 0.35);
        }

        .ops-trip-hist-meta {
            font-size: 0.62rem;
            font-weight: 700;
            color: #fca5a5;
            margin: 0 0 0.45rem;
            line-height: 1.4;
        }

        .ops-trip-hist-meta b { color: #fff; }

        .ops-trip-pin-panel {
            margin-top: 0.5rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.65rem;
            background: rgba(120, 53, 15, 0.35);
            border: 1px solid rgba(251, 191, 36, 0.35);
        }

        .ops-trip-pin-label {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #fcd34d;
            margin-bottom: 0.25rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .ops-trip-pin-row {
            display: flex;
            align-items: center;
            gap: 0.45rem;
        }

        .ops-trip-pin-code {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            font-size: 1.35rem;
            font-weight: 900;
            letter-spacing: 0.22em;
            color: #fef3c7;
        }

        .ops-trip-pin-copy {
            border: 0;
            background: rgba(251, 191, 36, 0.2);
            color: #fde68a;
            width: 1.75rem;
            height: 1.75rem;
            border-radius: 0.45rem;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        .ops-trip-pin-missing {
            font-size: 0.65rem;
            color: #94a3b8;
            font-weight: 700;
        }

        .ops-trip-pin-state {
            display: block;
            margin-top: 0.3rem;
            font-size: 0.58rem;
            font-weight: 800;
            color: #94a3b8;
        }

        .ops-trip-pin-state--ok { color: #86efac; }
        .ops-trip-pin-state--warn { color: #fdba74; }

        .ops-trip-pin-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            margin-bottom: 0.45rem;
        }

        .ops-trip-viewers-panel {
            margin-top: 0.5rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.65rem;
            background: rgba(30, 58, 138, 0.28);
            border: 1px solid rgba(96, 165, 250, 0.35);
        }

        .ops-trip-viewers-label {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #93c5fd;
            margin-bottom: 0.35rem;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.35rem;
        }

        .ops-trip-viewers-count {
            font-size: 0.52rem;
            color: #bfdbfe;
            font-weight: 800;
            text-transform: none;
            letter-spacing: 0;
        }

        .ops-trip-viewers-offer {
            font-size: 0.58rem;
            color: #fde68a;
            font-weight: 800;
            margin-bottom: 0.35rem;
            line-height: 1.35;
        }

        .ops-trip-viewers-offer b { color: #fef3c7; }

        .ops-trip-viewers-list {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
            max-height: 7.5rem;
            overflow-y: auto;
        }

        .ops-trip-viewer-row {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: space-between;
            gap: 0.4rem;
            padding: 0.35rem 0.45rem;
            border-radius: 0.45rem;
            background: rgba(15, 23, 42, 0.45);
            border: 1px solid rgba(51, 65, 85, 0.55);
        }

        .ops-trip-viewer-info {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            min-width: 0;
            flex: 1;
        }

        .ops-trip-viewer-actions {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            flex-shrink: 0;
        }

        .ops-trip-viewer-assign-btn,
        .ops-trip-viewer-offer-btn {
            border: 0;
            border-radius: 0.4rem;
            font-size: 0.48rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            padding: 0.28rem 0.45rem;
            cursor: pointer;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .ops-trip-viewer-assign-btn {
            background: linear-gradient(135deg, #059669 0%, #10b981 100%);
            color: #fff;
        }

        .ops-trip-viewer-offer-btn {
            background: rgba(30, 58, 138, 0.55);
            color: #bfdbfe;
            border: 1px solid rgba(96, 165, 250, 0.45);
        }

        .ops-trip-viewer-row--offered {
            border-color: rgba(251, 191, 36, 0.55);
            background: rgba(120, 53, 15, 0.28);
        }

        .ops-trip-viewer-name {
            font-size: 0.68rem;
            font-weight: 900;
            color: #f8fafc;
            line-height: 1.2;
        }

        .ops-trip-viewer-meta {
            font-size: 0.56rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .ops-trip-viewer-tag {
            color: #fcd34d;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .ops-trip-viewers-empty {
            font-size: 0.58rem;
            color: #64748b;
            font-weight: 700;
            margin: 0;
        }

        .ops-trip-assign-any-btn {
            margin-top: 0.45rem;
            width: 100%;
            border: 1px solid rgba(52, 211, 153, 0.45);
            border-radius: 0.5rem;
            background: linear-gradient(135deg, rgba(6, 78, 59, 0.65) 0%, rgba(16, 185, 129, 0.35) 100%);
            color: #d1fae5;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            padding: 0.45rem 0.55rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
        }

        .ops-trip-assign-any-btn:hover {
            background: linear-gradient(135deg, rgba(6, 95, 70, 0.85) 0%, rgba(16, 185, 129, 0.5) 100%);
            color: #ecfdf5;
        }

        .ops-assign-any-modal-card {
            background: #0f172a;
            border: 1px solid rgba(96, 165, 250, 0.35);
            border-radius: 1rem;
            width: 100%;
            max-width: 28rem;
            max-height: min(88vh, 40rem);
            display: flex;
            flex-direction: column;
            padding: 0.9rem 0.95rem 0.75rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
        }

        .ops-assign-any-modal-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.45rem;
        }

        .ops-assign-any-modal-title {
            font-size: 0.95rem;
            font-weight: 900;
            color: #f8fafc;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .ops-assign-any-modal-title i { color: #34d399; }

        .ops-assign-any-modal-sub {
            font-size: 0.68rem;
            font-weight: 800;
            color: #93c5fd;
            margin: 0.2rem 0 0;
        }

        .ops-assign-any-modal-route {
            font-size: 0.6rem;
            font-weight: 700;
            color: #94a3b8;
            margin: 0.15rem 0 0;
            line-height: 1.35;
        }

        .ops-assign-any-close {
            border: 0;
            background: transparent;
            color: #94a3b8;
            font-size: 1.6rem;
            line-height: 1;
            cursor: pointer;
            padding: 0 0.15rem;
        }

        .ops-assign-any-close:hover { color: #f87171; }

        .ops-assign-any-hint {
            font-size: 0.58rem;
            color: #a7f3d0;
            font-weight: 700;
            margin: 0 0 0.45rem;
            line-height: 1.35;
        }

        .ops-assign-any-hint b { color: #ecfdf5; }

        .ops-assign-any-search {
            margin-bottom: 0.45rem;
            font-size: 0.75rem !important;
        }

        .ops-assign-any-list {
            flex: 1;
            min-height: 8rem;
            max-height: 22rem;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            padding-right: 0.1rem;
        }

        .ops-assign-any-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.45rem;
            padding: 0.4rem 0.5rem;
            border-radius: 0.5rem;
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid rgba(51, 65, 85, 0.7);
        }

        .ops-assign-any-info {
            min-width: 0;
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
        }

        .ops-assign-any-name {
            font-size: 0.72rem;
            font-weight: 900;
            color: #f8fafc;
            line-height: 1.2;
        }

        .ops-assign-any-meta {
            font-size: 0.56rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .ops-assign-any-actions {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            flex-shrink: 0;
        }

        .ops-assign-any-count {
            font-size: 0.55rem;
            font-weight: 800;
            color: #64748b;
            margin: 0.4rem 0 0;
            text-align: right;
        }

        .ops-staff-rate-card {
            background: #0f172a;
            border: 1px solid rgba(251, 191, 36, 0.4);
            border-radius: 1rem;
            width: 100%;
            max-width: 26rem;
            max-height: min(90vh, 38rem);
            overflow-y: auto;
            padding: 0.95rem 1rem 1rem;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55);
        }

        .ops-staff-rate-head {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.4rem;
        }

        .ops-staff-rate-title {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 900;
            color: #fef3c7;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .ops-staff-rate-title i { color: #fbbf24; }

        .ops-staff-rate-sub {
            margin: 0.2rem 0 0;
            font-size: 0.65rem;
            font-weight: 800;
            color: #93c5fd;
        }

        .ops-staff-rate-note,
        .ops-staff-rate-hint {
            font-size: 0.58rem;
            font-weight: 700;
            color: #fde68a;
            line-height: 1.35;
            margin: 0 0 0.5rem;
        }

        .ops-staff-rate-hint b { color: #fffbeb; }

        .ops-staff-rate-block {
            background: rgba(15, 23, 42, 0.7);
            border: 1px solid rgba(71, 85, 105, 0.7);
            border-radius: 0.65rem;
            padding: 0.55rem 0.6rem;
            margin-bottom: 0.45rem;
        }

        .ops-staff-rate-label {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.35rem;
            font-size: 0.65rem;
            font-weight: 800;
            color: #e2e8f0;
            margin-bottom: 0.35rem;
            cursor: pointer;
        }

        .ops-staff-rate-label--note {
            margin-top: 0.25rem;
            margin-bottom: 0.25rem;
            cursor: default;
        }

        .ops-staff-rate-badge {
            font-size: 0.5rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #86efac;
            background: rgba(22, 101, 52, 0.45);
            border-radius: 999px;
            padding: 0.12rem 0.4rem;
        }

        .ops-staff-rate-stars {
            display: flex;
            gap: 0.25rem;
            justify-content: center;
        }

        .ops-staff-star-btn {
            border: 0;
            background: transparent;
            font-size: 1.35rem;
            padding: 0.1rem 0.2rem;
            cursor: pointer;
            line-height: 1;
        }

        .ops-staff-rate-textarea {
            font-size: 0.72rem !important;
            min-height: 3rem;
            margin-bottom: 0.55rem;
            resize: vertical;
        }

        .ops-staff-rate-save {
            width: 100%;
            border: 0;
            border-radius: 0.65rem;
            background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
            color: #111827;
            font-size: 0.72rem;
            font-weight: 900;
            letter-spacing: 0.03em;
            text-transform: uppercase;
            padding: 0.7rem 0.75rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
        }

        .ops-staff-rate-save:disabled {
            opacity: 0.65;
            cursor: wait;
        }

        .ops-trip-neg-panel {
            margin-top: 0.5rem;
            padding: 0.55rem 0.65rem;
            border-radius: 0.65rem;
            background: rgba(88, 28, 135, 0.28);
            border: 1px solid rgba(192, 132, 252, 0.35);
        }

        .ops-trip-neg-label {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #d8b4fe;
            margin-bottom: 0.35rem;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 0.35rem;
        }

        .ops-trip-neg-count {
            font-size: 0.52rem;
            color: #e9d5ff;
            font-weight: 800;
            text-transform: none;
            letter-spacing: 0;
        }

        .ops-trip-neg-base {
            font-size: 0.58rem;
            color: #c4b5fd;
            font-weight: 700;
            margin: 0 0 0.35rem;
        }

        .ops-trip-neg-base b { color: #ede9fe; }

        .ops-trip-neg-pending {
            font-size: 0.58rem;
            color: #fde68a;
            font-weight: 800;
            margin: 0 0 0.35rem;
            line-height: 1.35;
            padding: 0.35rem 0.45rem;
            border-radius: 0.45rem;
            background: rgba(120, 53, 15, 0.35);
            border: 1px solid rgba(251, 191, 36, 0.35);
        }

        .ops-trip-neg-pending b { color: #fef3c7; }

        .ops-trip-neg-list {
            display: flex;
            flex-direction: column;
            gap: 0.3rem;
            max-height: 8rem;
            overflow-y: auto;
        }

        .ops-trip-neg-row {
            display: flex;
            flex-direction: column;
            gap: 0.12rem;
            padding: 0.35rem 0.45rem;
            border-radius: 0.45rem;
            background: rgba(15, 23, 42, 0.45);
            border: 1px solid rgba(51, 65, 85, 0.55);
        }

        .ops-trip-neg-row--driver {
            border-color: rgba(52, 211, 153, 0.45);
            background: rgba(6, 78, 59, 0.28);
        }

        .ops-trip-neg-row--passenger {
            border-color: rgba(96, 165, 250, 0.45);
            background: rgba(30, 58, 138, 0.28);
        }

        .ops-trip-neg-row-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.35rem;
        }

        .ops-trip-neg-actor {
            font-size: 0.68rem;
            font-weight: 900;
            color: #f8fafc;
            line-height: 1.2;
        }

        .ops-trip-neg-tag {
            font-size: 0.48rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            color: #fcd34d;
            background: rgba(120, 53, 15, 0.45);
            padding: 0.12rem 0.35rem;
            border-radius: 999px;
            flex-shrink: 0;
        }

        .ops-trip-neg-row--passenger .ops-trip-neg-tag {
            color: #93c5fd;
            background: rgba(30, 58, 138, 0.45);
        }

        .ops-trip-neg-price {
            font-size: 0.62rem;
            font-weight: 800;
            color: #e9d5ff;
        }

        .ops-trip-neg-empty {
            font-size: 0.58rem;
            color: #64748b;
            font-weight: 700;
            margin: 0;
        }

        .ops-btn--warn {
            background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
            color: #fff;
            border: 0;
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            padding: 0.45rem 0.65rem;
            border-radius: 0.55rem;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            cursor: pointer;
        }

        .ops-trip-chat {
            margin-top: 0.55rem;
            padding: 0.65rem;
            border-radius: 0.75rem;
            background: rgba(15, 23, 42, 0.85);
            border: 1px solid rgba(51, 65, 85, 0.5);
            overflow-y: auto;
        }

        .ops-trip-chat-title {
            font-size: 0.62rem;
            font-weight: 900;
            color: #e2e8f0;
            margin-bottom: 0.35rem;
            display: flex;
            align-items: center;
            gap: 0.35rem;
        }

        .ops-trip-chat-title i { color: #a78bfa; }

        .ops-trip-chat-empty {
            font-size: 0.62rem;
            color: #64748b;
            font-style: italic;
        }

        .ops-trip-chat-line {
            margin-bottom: 0.25rem;
            font-size: 0.65rem;
        }

        .ops-trip-chat-sender {
            font-size: 0.55rem;
            font-weight: 900;
            text-transform: uppercase;
            margin-right: 0.25rem;
        }

        .ops-trip-chat-sender--client { color: #60a5fa; }
        .ops-trip-chat-sender--driver { color: #34d399; }
        .ops-trip-chat-text { color: #e2e8f0; }

        .ops-trip-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            margin-top: 0.6rem;
        }

        .ops-trip-actions--grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(7rem, 1fr));
        }

        .ops-ticket-subject {
            font-size: 0.82rem;
            font-weight: 900;
            color: #f8fafc;
            min-width: 0;
        }

        .ops-ticket-message {
            font-size: 0.72rem;
            color: #cbd5e1;
            margin-top: 0.4rem;
            line-height: 1.4;
        }

        .ops-ticket-meta {
            font-size: 0.58rem;
            color: #64748b;
            margin-top: 0.35rem;
        }

        .ops-hint-box {
            padding: 0.75rem;
            border-radius: 0.85rem;
            background: rgba(15, 23, 42, 0.75);
            border: 1px solid rgba(51, 65, 85, 0.7);
            font-size: 0.62rem;
            color: #94a3b8;
            line-height: 1.45;
        }

        .ops-hint-box-title {
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #cbd5e1;
            margin-bottom: 0.25rem;
        }

        .ops-alert {
            padding: 0.65rem 0.85rem;
            border-radius: 0.85rem;
            font-size: 0.68rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.45rem;
        }

        .ops-alert--danger {
            background: rgba(127, 29, 29, 0.35);
            border: 1px solid rgba(185, 28, 28, 0.45);
            color: #fecaca;
        }

        .ops-active-driver-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .ops-active-driver-name {
            font-size: 1rem;
            font-weight: 900;
            color: #f8fafc;
        }

        .ops-active-driver-badges {
            display: flex;
            flex-wrap: wrap;
            gap: 0.25rem;
            margin: 0.25rem 0;
        }

        .ops-active-driver-vehicle {
            font-size: 0.62rem;
            font-weight: 800;
            color: #94a3b8;
            margin-top: 0.15rem;
        }

        .ops-active-driver-expiry {
            text-align: right;
            flex-shrink: 0;
        }

        .ops-active-driver-expiry-label {
            display: block;
            font-size: 0.55rem;
            color: #64748b;
        }

        .ops-active-driver-expiry-date {
            display: block;
            font-size: 0.75rem;
            font-weight: 900;
        }

        .ops-active-driver-expiry-days {
            display: block;
            font-size: 0.62rem;
            font-weight: 800;
        }

        .ops-active-driver-expiry--emerald .ops-active-driver-expiry-date,
        .ops-active-driver-expiry--emerald .ops-active-driver-expiry-days { color: #6ee7b7; }
        .ops-active-driver-expiry--amber .ops-active-driver-expiry-date,
        .ops-active-driver-expiry--amber .ops-active-driver-expiry-days { color: #fcd34d; }
        .ops-active-driver-expiry--red .ops-active-driver-expiry-date,
        .ops-active-driver-expiry--red .ops-active-driver-expiry-days { color: #fca5a5; }

        .ops-progress-bar {
            margin-top: 0.65rem;
            width: 100%;
            height: 0.35rem;
            border-radius: 999px;
            background: rgba(51, 65, 85, 0.8);
            overflow: hidden;
        }

        .ops-progress-bar-fill {
            height: 100%;
            border-radius: 999px;
            transition: width 0.2s ease;
        }

        .ops-progress-bar-fill--emerald { background: #10b981; }
        .ops-progress-bar-fill--amber { background: #f59e0b; }
        .ops-progress-bar-fill--red { background: #ef4444; }

        .ops-objective-selected-count {
            font-size: 0.72rem;
            font-weight: 800;
            color: #6ee7b7;
            margin: 0.5rem 0 0.35rem;
        }

        .ops-objective-driver-list {
            max-height: 280px;
            overflow-y: auto;
            border: 1px solid rgba(51, 65, 85, 0.8);
            border-radius: 0.85rem;
            background: rgba(15, 23, 42, 0.45);
            margin-top: 0.5rem;
        }

        .ops-objective-driver-row {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.55rem 0.75rem;
            border-bottom: 1px solid rgba(51, 65, 85, 0.5);
            cursor: pointer;
        }

        .ops-objective-driver-row:last-child { border-bottom: none; }

        .ops-objective-check {
            width: 1.1rem;
            height: 1.1rem;
            accent-color: #10b981;
            flex-shrink: 0;
        }

        .ops-objective-driver-info {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .ops-objective-driver-name {
            font-size: 0.82rem;
            font-weight: 900;
            color: #f1f5f9;
        }

        .ops-objective-driver-meta {
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .ops-objective-card-head {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 0.75rem;
        }

        .ops-objective-title {
            font-size: 0.95rem;
            font-weight: 900;
            color: #f8fafc;
            margin-bottom: 0.35rem;
        }

        .ops-objective-reward {
            font-size: 0.78rem;
            color: #fcd34d;
            font-weight: 700;
            margin-bottom: 0.25rem;
        }

        .ops-objective-meta,
        .ops-objective-drivers {
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .ops-form-actions {
            margin-top: 1rem;
        }

        .driver-obj-pending-card {
            padding: 0.85rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
            border: 2px solid #f59e0b;
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
        }

        .driver-obj-pending-label {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #d97706;
            margin-bottom: 0.25rem;
        }

        .driver-obj-pending-title {
            font-size: 0.92rem;
            font-weight: 900;
            color: #78350f;
        }

        .driver-obj-pending-reward,
        .driver-obj-pending-meta {
            font-size: 0.72rem;
            font-weight: 800;
            color: #b45309;
            margin-top: 0.2rem;
        }

        .driver-obj-pending-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }

        .driver-obj-btn {
            flex: 1;
            padding: 0.65rem 0.5rem;
            border-radius: 0.85rem;
            font-size: 0.78rem;
            font-weight: 900;
            border: none;
        }

        .driver-obj-btn--reject {
            background: #f3f4f6;
            color: #6b7280;
        }

        .driver-obj-btn--accept {
            background: #059669;
            color: #fff;
        }

        #driver-objectives-active,
        #driver-earnings-float,
        #driver-radar-float,
        #trip-floats-layer {
            position: fixed;
            inset: 0;
            z-index: 28000;
            pointer-events: none;
        }

        #trip-floats-layer {
            z-index: 28100;
        }

        #driver-earnings-float {
            z-index: 27950;
        }

        #driver-radar-float {
            z-index: 27940;
        }

        .driver-radar-float {
            position: fixed;
            pointer-events: auto;
            max-width: min(280px, calc(100vw - 1.3rem));
            cursor: grab;
            touch-action: pan-y;
            user-select: none;
            -webkit-user-select: none;
        }

        .driver-radar-float--min {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .driver-radar-float.is-dragging {
            z-index: 29000 !important;
            transition: none !important;
            cursor: grabbing;
            touch-action: none !important;
        }

        .driver-radar-min-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.8rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            font-size: 0.66rem;
            font-weight: 900;
            border: none;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
            max-width: min(280px, calc(100vw - 1.3rem));
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }

        .driver-radar-min-pill:active {
            transform: scale(0.97);
        }

        .driver-radar-min-pill span {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .driver-radar-min-count {
            min-width: 1.15rem;
            height: 1.15rem;
            padding: 0 0.28rem;
            border-radius: 999px;
            background: #fbbf24;
            color: #78350f;
            font-size: 0.58rem;
            font-weight: 900;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }

        /* Viaje activo: mismo estilo de pastilla tÃ¡ctil que el chat */
        /* Viaje / nav: sin pill flotante Â«Viaje activoÂ» */
        body.trip-active.driver-mode #driver-radar-float,
        body.driver-nav-mode #driver-radar-float,
        body.is-navigating.driver-mode #driver-radar-float,
        body.trip-active.driver-mode #driver-radar-float:not(.hidden) {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        /* Ciudad en el mapa: oculta en viaje / navegaciÃ³n */
        body.trip-active #service-zone-map-chip,
        body.driver-nav-mode #service-zone-map-chip,
        body.is-navigating #service-zone-map-chip,
        body.trip-active.driver-mode #service-zone-map-chip {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        body.trip-active.driver-mode .driver-radar-min-pill {
            background: linear-gradient(135deg, #059669, #047857);
            box-shadow: 0 4px 14px rgba(5, 150, 105, 0.4);
        }

        .driver-radar-min-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 1.25rem;
            height: 1.25rem;
            padding: 0 0.3rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.22);
            font-size: 0.58rem;
            font-weight: 900;
            flex-shrink: 0;
        }

        .driver-earnings-float {
            position: fixed;
            pointer-events: auto;
            max-width: min(300px, calc(100vw - 1.3rem));
            padding: 0.7rem 0.8rem;
            border-radius: 1rem;
            background: rgba(236, 253, 245, 0.97);
            border: 1px solid #6ee7b7;
            box-shadow: 0 6px 20px rgba(5, 150, 105, 0.18);
            backdrop-filter: blur(8px);
            cursor: grab;
            touch-action: pan-y;
            user-select: none;
            -webkit-user-select: none;
        }

        .driver-earnings-float--min {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .driver-earnings-float.is-dragging {
            z-index: 29000 !important;
            transition: none !important;
            box-shadow: 0 14px 36px rgba(5, 150, 105, 0.28);
            cursor: grabbing;
            touch-action: none !important;
        }

        .driver-earnings-float-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.35rem;
            cursor: grab;
            touch-action: none;
            user-select: none;
        }

        .driver-earnings-float-title {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #047857;
        }

        .driver-earnings-min-btn {
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 999px;
            border: 1px solid #6ee7b7;
            background: #fff;
            color: #047857;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .driver-earnings-min-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #10b981, #059669);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            border: none;
            box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
        }

        .driver-earnings-link {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            color: #6d28d9;
            text-decoration: underline;
            background: none;
            border: none;
            padding: 0;
        }

        .driver-earnings-link--blue {
            color: #1d4ed8;
        }

        .driver-earnings-total-label,
        .driver-earnings-stat-label,
        .driver-earnings-comm-label {
            font-size: 0.58rem;
            font-weight: 800;
            text-transform: uppercase;
            color: #64748b;
        }

        .driver-earnings-total-value {
            font-size: 1.15rem;
            font-weight: 900;
            color: #047857;
            line-height: 1.1;
        }

        .driver-earnings-total-meta {
            font-size: 0.58rem;
            color: #94a3b8;
            font-weight: 700;
            margin-top: 0.15rem;
        }

        .driver-earnings-split {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
            text-align: center;
            border-top: 1px solid #d1fae5;
            padding-top: 0.5rem;
            margin-bottom: 0.5rem;
        }

        .driver-earnings-stat-value {
            font-size: 0.82rem;
            font-weight: 900;
        }

        .driver-earnings-stat-value--blue { color: #1d4ed8; }
        .driver-earnings-stat-value--violet { color: #6d28d9; }

        .driver-earnings-commission {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.35rem;
            text-align: center;
            background: rgba(255, 255, 255, 0.65);
            border-radius: 0.75rem;
            padding: 0.45rem 0.35rem;
        }

        .driver-earnings-comm-value {
            font-size: 0.68rem;
            font-weight: 900;
            color: #b45309;
        }

        .driver-earnings-comm-value--ok { color: #047857; }
        .driver-earnings-comm-value--debt { color: #b91c1c; }
        .driver-earnings-comm-label--debt { color: #dc2626; }

        .driver-earnings-owed {
            margin-top: 0.35rem;
            text-align: center;
            font-size: 0.62rem;
            font-weight: 900;
            color: #dc2626;
        }

        .driver-earnings-pending {
            margin-top: 0.35rem;
            text-align: center;
            font-size: 0.58rem;
            font-weight: 800;
            color: #b45309;
        }

        html[data-theme="dark"] .driver-earnings-float {
            background: rgba(6, 78, 59, 0.94);
            border-color: #34d399;
        }

        html[data-theme="dark"] .driver-earnings-float-title,
        html[data-theme="dark"] .driver-earnings-total-value {
            color: #6ee7b7;
        }

        .driver-obj-float {
            position: fixed;
            pointer-events: auto;
            max-width: min(300px, calc(100vw - 1.3rem));
            padding: 0.7rem 0.8rem;
            border-radius: 1rem;
            background: rgba(255, 251, 235, 0.97);
            border: 1px solid #fcd34d;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(8px);
            cursor: grab;
            touch-action: pan-y;
            user-select: none;
            -webkit-user-select: none;
        }

        .driver-obj-float--min {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .driver-obj-float.is-dragging {
            z-index: 29000 !important;
            transition: none !important;
            box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
            cursor: grabbing;
            touch-action: none !important;
        }

        .driver-obj-float-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            margin-bottom: 0.35rem;
            cursor: grab;
            touch-action: none;
            user-select: none;
        }

        .driver-obj-float-head:active {
            cursor: grabbing;
        }

        .driver-obj-float--min {
            cursor: grab;
            touch-action: none;
        }

        .driver-obj-float-title {
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #d97706;
        }

        .driver-obj-min-btn {
            width: 1.6rem;
            height: 1.6rem;
            border-radius: 999px;
            border: 1px solid #fcd34d;
            background: #fff;
            color: #b45309;
            font-size: 0.7rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .driver-obj-min-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            border: none;
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
        }

        .driver-obj-float-desc {
            font-size: 0.8rem;
            font-weight: 900;
            color: #78350f;
            line-height: 1.25;
        }

        .driver-obj-float-reward {
            font-size: 0.68rem;
            font-weight: 800;
            color: #b45309;
            margin-top: 0.2rem;
        }

        .driver-obj-time-left {
            font-size: 0.62rem;
            font-weight: 900;
            color: #b45309;
            margin-top: 0.25rem;
        }

        /* Flotantes de viaje activo (PIN + chat) â€” z-index alto para que el botÃ³n minimizar reciba clicks en web */
        #driver-pin-float.trip-float--fixed {
            z-index: 28600;
            cursor: default;
            touch-action: auto;
            user-select: auto;
            -webkit-user-select: auto;
            pointer-events: auto;
        }

        #driver-pin-float.trip-float--fixed .trip-float-head,
        #driver-pin-float.trip-float--fixed .trip-float-min-view {
            cursor: default;
            touch-action: auto;
            pointer-events: auto;
        }

        #driver-pin-float.trip-float--fixed .trip-float-head--fixed {
            justify-content: space-between;
            position: relative;
            z-index: 2;
        }

        #driver-pin-float.trip-float--fixed .trip-float-grip {
            display: none;
        }

        /* Minimizado: forzar pill compacta (no reabrir con sync/CSS del panel completo) */
        #driver-pin-float.trip-float--min,
        #client-trip-float.trip-float--min {
            padding: 0 !important;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            max-width: none !important;
            width: auto !important;
        }

        #driver-pin-float.trip-float--min .trip-float-full-view,
        #client-trip-float.trip-float--min .trip-float-full-view {
            display: none !important;
        }

        #driver-pin-float.trip-float--min .trip-float-min-view,
        #client-trip-float.trip-float--min .trip-float-min-view {
            display: block !important;
        }

        #driver-pin-float .trip-float-min-btn,
        #client-trip-float .trip-float-min-btn {
            pointer-events: auto !important;
            z-index: 5;
            width: 2.15rem;
            height: 2.15rem;
            min-width: 2.15rem;
            min-height: 2.15rem;
        }

        .driver-pin-chat-btn {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.45rem;
            min-height: 2.65rem;
            padding: 0.55rem 0.75rem;
            border-radius: 0.9rem;
            border: 1px solid #bfdbfe;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 0.68rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.04em;
        }

        .driver-pin-chat-btn i {
            font-size: 0.95rem;
        }

        body.driver-mode #trip-chat-float-pill.trip-chat-pill--driver:not(.is-drag-positioned) {
            right: 0.65rem;
            left: auto;
        }

        #driver-pin-float.trip-float--fixed .trip-pin-min-pill {
            cursor: pointer;
            touch-action: manipulation;
        }

        .trip-float {
            position: fixed;
            pointer-events: auto;
            max-width: min(320px, calc(100vw - 1.3rem));
            padding: 0.7rem 0.8rem;
            border-radius: 1rem;
            background: rgba(255, 255, 255, 0.97);
            border: 1px solid #e2e8f0;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
            backdrop-filter: blur(8px);
            cursor: grab;
            touch-action: pan-y;
            user-select: none;
            -webkit-user-select: none;
        }

        /* â€”â€” Flotante unificado pasajero: conductor + PIN (1 sola tarjeta) â€”â€” */
        #client-trip-float.trip-float {
            max-width: min(320px, calc(100vw - 1.3rem));
            padding: 0.55rem 0.6rem 0.65rem;
            border-radius: 1rem;
            border: 1px solid #bfdbfe;
            background: rgba(255, 255, 255, 0.98);
            box-shadow: 0 10px 28px rgba(37, 99, 235, 0.18);
            z-index: 28200;
        }

        #client-trip-float.trip-float--min {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            max-width: none;
        }

        #client-trip-float .trip-float-title {
            color: #1d4ed8;
            font-size: 0.58rem;
        }

        #client-trip-float .trip-float-min-btn {
            border-color: #bfdbfe;
            color: #1d4ed8;
        }

        .client-trip-float-body {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }

        .client-trip-status {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            padding: 0.45rem 0.6rem;
            border-radius: 0.75rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
        }

        .client-trip-status.tone-arrived {
            background: linear-gradient(135deg, #059669, #047857);
        }

        .client-trip-status.tone-reserved {
            background: linear-gradient(135deg, #d97706, #b45309);
        }

        .client-trip-status-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
            gap: 0.1rem;
        }

        .client-trip-status-badge {
            font-size: 0.72rem;
            font-weight: 900;
            letter-spacing: 0.02em;
        }

        .client-trip-status-sub {
            font-size: 0.58rem;
            font-weight: 600;
            opacity: 0.92;
        }

        .client-trip-status-eta {
            flex-shrink: 0;
            font-size: 0.78rem;
            font-weight: 900;
            background: rgba(255, 255, 255, 0.2);
            padding: 0.25rem 0.45rem;
            border-radius: 999px;
        }

        .client-trip-driver-row {
            display: flex;
            align-items: center;
            gap: 0.65rem;
        }

        .client-trip-wa-contact {
            margin-top: 0.55rem;
            padding: 0.55rem 0.6rem;
            border-radius: 0.9rem;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
        }

        .client-trip-wa-btn {
            display: flex;
            align-items: center;
            gap: 0.55rem;
            text-decoration: none;
            color: #047857;
            font-weight: 800;
        }

        .client-trip-wa-btn i {
            font-size: 1.35rem;
            color: #25d366;
        }

        .client-trip-wa-copy {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1.2;
        }

        .client-trip-wa-copy strong {
            font-size: 0.72rem;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .client-trip-wa-copy small {
            font-size: 0.68rem;
            font-weight: 700;
            color: #065f46;
        }

        .client-trip-wa-hint {
            margin: 0.4rem 0 0;
            font-size: 0.58rem;
            font-weight: 700;
            color: #047857;
            line-height: 1.3;
            opacity: 0.9;
        }

        .client-trip-contact-row {
            margin-top: 0.45rem;
        }

        .client-trip-chat-btn {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            min-height: 2.4rem;
            border-radius: 0.85rem;
            border: 1px solid #bfdbfe;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 0.65rem;
            font-weight: 900;
            text-transform: uppercase;
        }

        .client-trip-photo {
            width: 3.1rem;
            height: 3.1rem;
            border-radius: 999px;
            object-fit: cover;
            background: #e2e8f0;
            border: 2px solid #fff;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
            flex-shrink: 0;
        }

        .client-trip-name {
            margin: 0;
            font-size: 0.92rem;
            font-weight: 900;
            color: #0f172a;
            text-transform: uppercase;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .client-trip-rating {
            margin: 0.15rem 0 0;
            font-size: 0.72rem;
            font-weight: 800;
            color: #f59e0b;
        }

        .client-trip-plate {
            margin-left: 0.35rem;
            color: #64748b;
            font-weight: 800;
            letter-spacing: 0.04em;
        }

        .client-trip-vehicle {
            margin: 0.1rem 0 0;
            font-size: 0.62rem;
            font-weight: 700;
            color: #64748b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .client-pin-hero--in-float {
            margin: 0;
            padding: 0.5rem 0.55rem;
            border-radius: 0.8rem;
            border-width: 1px;
            box-shadow: none;
        }

        .client-pin-hero--in-float .client-pin-hero-kicker {
            margin: 0 0 0.3rem;
            font-size: 0.55rem;
        }

        .client-pin-hero--in-float .client-pin-hero-btn {
            padding: 0.55rem 0.6rem;
            border-radius: 0.7rem;
        }

        .client-pin-hero--in-float .client-pin-hero-code {
            font-size: clamp(1.15rem, 5vw, 1.55rem);
            letter-spacing: 0.2em;
        }

        .client-pin-hero--in-float .client-pin-hero-hint {
            margin: 0.3rem 0 0;
            font-size: 0.58rem;
        }

        .client-trip-min-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.45rem;
            padding: 0.4rem 0.55rem 0.4rem 0.4rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
            max-width: min(320px, calc(100vw - 1.3rem));
            cursor: grab;
            touch-action: none;
        }

        .client-trip-min-photo {
            width: 2.1rem;
            height: 2.1rem;
            border-radius: 999px;
            object-fit: cover;
            border: 2px solid rgba(255, 255, 255, 0.85);
            flex-shrink: 0;
            background: #93c5fd;
        }

        .client-trip-min-text {
            display: flex;
            flex-direction: column;
            min-width: 0;
            line-height: 1.15;
        }

        .client-trip-min-name {
            font-size: 0.72rem;
            font-weight: 900;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 8.5rem;
        }

        .client-trip-min-meta {
            font-size: 0.55rem;
            font-weight: 700;
            opacity: 0.9;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 8.5rem;
        }

        .client-trip-min-eta,
        .client-trip-min-pin {
            flex-shrink: 0;
            font-size: 0.62rem;
            font-weight: 900;
            padding: 0.2rem 0.4rem;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.2);
        }

        .client-trip-min-pin {
            background: rgba(251, 191, 36, 0.95);
            color: #78350f;
        }

        .client-trip-vehicle-photos {
            margin: 0;
            padding: 0.35rem 0 0;
        }

        .client-trip-vehicle-photos-label {
            margin: 0 0 0.35rem;
            font-size: 0.55rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: #64748b;
        }

        .client-trip-vehicle-photos-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.4rem;
        }

        .client-trip-vehicle-photo-card {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            border-radius: 0.65rem;
            overflow: hidden;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            text-decoration: none;
            color: inherit;
            min-width: 0;
        }

        .client-trip-vehicle-photo-card:active {
            transform: scale(0.98);
        }

        .client-trip-vehicle-photo-card img {
            width: 100%;
            height: 4.25rem;
            object-fit: cover;
            background: #e2e8f0;
            display: block;
        }

        .client-trip-vehicle-photo-card span {
            font-size: 0.52rem;
            font-weight: 800;
            text-align: center;
            padding: 0.2rem 0.25rem 0.3rem;
            color: #475569;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        html[data-theme="dark"] .client-trip-vehicle-photo-card {
            background: #1e293b;
            border-color: #334155;
        }

        html[data-theme="dark"] .client-trip-vehicle-photo-card span {
            color: #cbd5e1;
        }

        html[data-theme="dark"] .client-trip-vehicle-photos-label {
            color: #94a3b8;
        }

        /* Pasajero en viaje: NO duplicar conductor/PIN en el panel inferior */
        body.client-mode.trip-active #trip-partner-info,
        body.client-mode.trip-active #client-pin-panel,
        body.client-mode.trip-active #active-trip-route-summary,
        body.passenger-trip-float-active #trip-partner-info,
        body.passenger-trip-float-active #client-pin-panel,
        body.passenger-trip-float-active #active-trip-route-summary {
            display: none !important;
        }

        /* ::before del panel pasajero: no (el asa es #driver-panel-min-btn) */
        body.client-mode.trip-active #control-panel::before,
        body.passenger-trip-float-active #control-panel::before,
        body.trip-active:not(.driver-mode) #control-panel::before {
            display: none !important;
            height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            min-height: 0 !important;
            overflow: hidden !important;
            border: none !important;
        }

        /*
         * Pasajero: UN solo “Minimizar” = #passenger-panel-min-btn.
         * Ocultar #driver-panel-min-btn (estaba duplicado en el panel central).
         */
        body.client-mode #driver-panel-min-btn,
        body.client-mode .trip-sheet-min-bar#driver-panel-min-btn,
        body.passenger-trip-float-active #driver-panel-min-btn,
        body.trip-active:not(.driver-mode) #driver-panel-min-btn {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            height: 0 !important;
            min-height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
        }

        body.client-mode.trip-active #control-panel:not(.panel-collapsed) .driver-panel-min-hint,
        body.trip-active:not(.driver-mode) #control-panel:not(.panel-collapsed) .driver-panel-min-hint {
            display: none !important;
        }

        /* Panel inferior del pasajero: solo acciones (compartir / SOS / cancelar) */
        body.passenger-trip-float-active.client-mode #control-panel:not(.panel-collapsed) {
            max-height: min(38dvh, 280px) !important;
        }

        body.passenger-trip-float-active.client-mode #control-panel.panel-collapsed,
        body.passenger-trip-float-active.client-mode.panel-minimized #control-panel,
        body.capacitor-android.client-mode.trip-active.panel-minimized #control-panel,
        body.capacitor-android.client-mode.trip-active #control-panel.panel-collapsed,
        body.capacitor-native.client-mode.trip-active.panel-minimized #control-panel,
        body.capacitor-native.client-mode.trip-active #control-panel.panel-collapsed {
            max-height: min(18dvh, 130px) !important;
            height: auto !important;
            top: auto !important;
            bottom: 0 !important;
            overflow: hidden !important;
        }

        body.passenger-trip-float-active #driver-active-body {
            display: none !important;
        }

        /* Al minimizar en viaje: mantener acciones compactas (Compartir/SOS) */
        body.client-mode.trip-active #control-panel.panel-collapsed #trip-actions-sticky,
        body.client-mode.trip-active.panel-minimized #control-panel #trip-actions-sticky {
            display: block !important;
            padding-top: 0.15rem !important;
        }

        body.client-mode.trip-active #control-panel.panel-collapsed #passenger-alert-settings,
        body.client-mode.trip-active.panel-minimized #control-panel #passenger-alert-settings {
            display: none !important;
        }

        html[data-theme="dark"] #client-trip-float.trip-float {
            background: rgba(15, 23, 42, 0.97);
            border-color: #334155;
        }

        html[data-theme="dark"] .client-trip-name {
            color: #f8fafc;
        }



        .trip-float--pill {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            cursor: grab;
            touch-action: none;
        }

        .trip-float--min {
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            cursor: grab;
            touch-action: none;
        }

        .trip-float-min-view {
            cursor: grab;
            touch-action: none;
        }

        .trip-float.is-dragging,
        .trip-chat-pill.is-dragging .trip-pill-face,
        .trip-float--pill.is-dragging .trip-arrived-pill-btn {
            z-index: 29000 !important;
            transition: none !important;
            box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
            cursor: grabbing;
            touch-action: none !important;
        }

        .trip-chat-pill.is-dragging,
        .trip-float--pill.is-dragging {
            z-index: 29000 !important;
        }

        .trip-float-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.35rem;
            margin-bottom: 0.35rem;
            cursor: grab;
            touch-action: none;
            user-select: none;
            padding: 0.15rem 0;
        }

        .trip-float-grip {
            flex-shrink: 0;
            font-size: 0.72rem;
            opacity: 0.45;
            color: inherit;
            line-height: 1;
            pointer-events: none;
        }

        .trip-pill-face {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            border: none;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
            cursor: grab;
            touch-action: none;
            user-select: none;
        }

        .trip-pill-face .trip-float-grip {
            color: rgba(255, 255, 255, 0.75);
            opacity: 1;
        }

        .trip-float-title {
            margin: 0;
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #2563eb;
        }

        .trip-float-min-btn {
            width: 1.85rem;
            height: 1.85rem;
            min-width: 1.85rem;
            min-height: 1.85rem;
            border-radius: 999px;
            border: 1px solid #bfdbfe;
            background: #fff;
            color: #1d4ed8;
            font-size: 0.72rem;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            cursor: pointer;
            z-index: 2;
            position: relative;
        }

        .trip-float-body {
            margin: 0;
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
        }

        .trip-float-body.client-pin-hero,
        .trip-float-body.driver-pin-hero {
            margin: 0;
            padding: 0;
        }

        .trip-pin-min-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.45rem 0.75rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            border: none;
            box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
        }

        .trip-arrived-pill-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            padding: 0.55rem 0.9rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            border: none;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
            min-height: 2.5rem;
            cursor: grab;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
        }

        .trip-arrived-pill-btn.is-disabled {
            opacity: 0.42;
            filter: grayscale(0.25);
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.18);
        }

        .trip-arrived-pill-btn .trip-float-grip {
            color: rgba(255, 255, 255, 0.75);
            opacity: 1;
        }

        /* Llegada a destino: pastilla verde flotante (como HE LLEGADO) */
        .trip-arrived-pill-btn--dest {
            background: linear-gradient(135deg, #16a34a, #15803d);
            box-shadow: 0 4px 16px rgba(22, 163, 74, 0.42);
            letter-spacing: 0.03em;
            max-width: min(92vw, 280px);
            white-space: nowrap;
        }

        .trip-arrived-pill-btn--dest.is-disabled,
        .trip-arrived-pill-btn--dest.is-arrival-blocked {
            opacity: 0.48;
            filter: grayscale(0.2);
            box-shadow: 0 2px 8px rgba(22, 163, 74, 0.2);
        }

        #driver-arrived-dest-float:not(.hidden),
        #trip-floats-layer #driver-arrived-dest-float:not(.hidden) {
            display: block !important;
            pointer-events: auto !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 28550 !important;
        }

        body.trip-active.driver-mode #driver-arrived-dest-float:not(.hidden),
        body.trip-active.driver-mode #trip-floats-layer #driver-arrived-dest-float:not(.hidden) {
            display: block !important;
            pointer-events: auto !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 28550 !important;
        }

        #driver-arrived-dest-float.hidden {
            display: none !important;
        }

        .trip-chat-pill {
            position: fixed;
            pointer-events: auto;
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            cursor: grab;
            touch-action: none;
            user-select: none;
            -webkit-user-select: none;
        }

        .trip-chat-pill.is-dragging {
            z-index: 29000 !important;
            cursor: grabbing;
            touch-action: none !important;
        }

        .trip-chat-pill-badge {
            position: absolute;
            top: -0.35rem;
            right: -0.35rem;
            min-width: 1.1rem;
            height: 1.1rem;
            padding: 0 0.2rem;
            border-radius: 999px;
            background: #dc2626;
            color: #fff;
            font-size: 0.58rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #fff;
        }

        body.driver-mode .trip-chat-pill #chat-badge {
            display: none !important;
        }

        body:not(.driver-mode) .trip-chat-pill #chat-badge-driver {
            display: none !important;
        }

        #chat-float.trip-float--chat {
            touch-action: auto;
            cursor: default;
            user-select: text;
            -webkit-user-select: text;
            pointer-events: auto;
        }

        #chat-float .trip-float-head {
            touch-action: none;
            cursor: grab;
        }

        #chat-float .trip-chat-body,
        #chat-float .trip-chat-compose,
        #chat-float .trip-chat-messages,
        #chat-float .trip-chat-input {
            user-select: text;
            -webkit-user-select: text;
            touch-action: manipulation;
            cursor: auto;
        }

        #chat-float .trip-chat-input {
            font-size: 16px;
            -webkit-appearance: none;
            appearance: none;
        }

        #chat-float .trip-chat-send {
            touch-action: manipulation;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        #chat-float .trip-chat-body {
            max-height: none;
            opacity: 1;
            overflow: visible;
            padding: 0;
        }

        #chat-float .trip-chat-messages {
            height: 10rem;
            max-height: 28dvh;
            -webkit-overflow-scrolling: touch;
            touch-action: pan-y;
        }

        @media (max-width: 480px) {
            #chat-float.trip-float {
                left: 0.65rem !important;
                right: 0.65rem !important;
                max-width: none !important;
                width: auto !important;
            }
        }

        #client-pin-float .client-pin-hero-kicker {
            margin-top: 0;
        }

        #driver-pin-float .driver-pin-hero-kicker {
            margin-top: 0;
        }

        .driver-pin-input-group {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            width: 100%;
            min-width: 0;
        }

        .driver-pin-input-group:not(.hidden) {
            display: flex !important;
        }

        .driver-pin-input {
            box-sizing: border-box;
            max-width: 100%;
        }

        .driver-pin-submit {
            flex-shrink: 0;
        }

        @media (max-width: 480px) {
            #driver-pin-float.trip-float--fixed:not(.trip-float--min) {
                left: 0.65rem !important;
                right: 0.65rem !important;
                max-width: none !important;
                width: auto !important;
            }

            #driver-pin-float.trip-float--fixed.trip-float--min {
                left: auto !important;
                right: 0.65rem !important;
                max-width: none !important;
                width: auto !important;
            }

            #client-trip-float.trip-float:not(.trip-float--min) {
                left: 0.65rem !important;
                right: auto !important;
                max-width: min(300px, calc(100vw - 1.3rem)) !important;
                width: auto !important;
            }

            #client-trip-float.trip-float--min {
                left: 0.65rem !important;
                right: auto !important;
                max-width: none !important;
                width: auto !important;
            }

            #driver-pin-float .driver-pin-input {
                font-size: 1.65rem;
                padding: 0.75rem 0.5rem;
            }
        }

        .client-pin-panel {
            padding: 0.85rem 1rem;
            border-radius: 1.15rem;
            background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
            border: 2px solid #f59e0b;
            box-shadow: 0 8px 22px rgba(245, 158, 11, 0.18);
            text-align: center;
        }

        .client-pin-panel-kicker {
            margin: 0 0 0.5rem;
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: #b45309;
        }

        .client-pin-panel-code-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.65rem;
            padding: 0.75rem 1rem;
            border-radius: 1rem;
            background: #f59e0b;
            color: #fff;
            border: none;
            box-shadow: 0 6px 16px rgba(245, 158, 11, 0.35);
        }

        .client-pin-panel-code {
            font-size: 2rem;
            font-weight: 900;
            letter-spacing: 0.35em;
            line-height: 1;
        }

        .client-pin-panel-copy {
            font-size: 0.62rem;
            font-weight: 900;
            text-transform: uppercase;
            opacity: 0.92;
        }

        .client-pin-panel-hint {
            margin: 0.5rem 0 0;
            font-size: 0.68rem;
            font-weight: 700;
            line-height: 1.35;
            color: #92400e;
        }

        html[data-theme="dark"] .client-pin-panel {
            background: linear-gradient(180deg, #422006 0%, #78350f 100%);
            border-color: #f59e0b;
        }

        html[data-theme="dark"] .client-pin-panel-kicker,
        html[data-theme="dark"] .client-pin-panel-hint {
            color: #fde68a;
        }

        html[data-theme="dark"] .trip-float {
            background: rgba(15, 23, 42, 0.94);
            border-color: #334155;
        }

        html[data-theme="dark"] .trip-float-title {
            color: #93c5fd;
        }

        .driver-obj-progress {
            margin-top: 0.55rem;
        }

        .driver-obj-progress-head {
            display: flex;
            justify-content: space-between;
            font-size: 0.58rem;
            font-weight: 800;
            color: #92400e;
            margin-bottom: 0.2rem;
        }

        .driver-obj-progress-track {
            height: 0.4rem;
            border-radius: 999px;
            background: rgba(245, 158, 11, 0.2);
            overflow: hidden;
        }

        .driver-obj-progress-fill {
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, #f59e0b, #059669);
            transition: width 0.2s ease;
        }

        .driver-obj-progress-actions {
            display: flex;
            gap: 0.4rem;
            margin-top: 0.45rem;
        }

        .driver-obj-step-btn {
            flex: 1;
            padding: 0.4rem;
            border-radius: 0.65rem;
            border: 1px solid #fcd34d;
            background: #fff;
            font-weight: 900;
            color: #b45309;
            font-size: 1rem;
        }

        .driver-obj-step-btn:disabled { opacity: 0.4; }

        .driver-obj-complete-btn {
            width: 100%;
            margin-top: 0.45rem;
            padding: 0.55rem;
            border-radius: 0.75rem;
            border: none;
            background: #059669;
            color: #fff;
            font-size: 0.72rem;
            font-weight: 900;
        }

        .driver-obj-complete-btn:disabled {
            background: #d1d5db;
            color: #9ca3af;
        }

        .driver-obj-auto-hint {
            margin-top: 0.4rem;
            font-size: 0.62rem;
            font-weight: 800;
            color: #92400e;
        }

        .driver-obj-status {
            margin-top: 0.5rem;
            font-size: 0.68rem;
            font-weight: 800;
            padding: 0.45rem 0.55rem;
            border-radius: 0.65rem;
        }

        .driver-obj-status--wait {
            background: #fef3c7;
            color: #92400e;
        }

        .driver-obj-status--paid {
            background: #d1fae5;
            color: #065f46;
        }

        .ops-objective-responses {
            margin-top: 0.65rem;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }

        .ops-objective-response-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.45rem 0.55rem;
            border-radius: 0.65rem;
            background: rgba(15, 23, 42, 0.35);
        }

        .ops-objective-response-name {
            font-size: 0.78rem;
            font-weight: 900;
            color: #f1f5f9;
        }

        .ops-objective-response-progress {
            font-size: 0.62rem;
            font-weight: 700;
            color: #94a3b8;
        }

        .ops-content textarea.ops-input,
        .ops-content select.ops-input {
            resize: vertical;
            min-height: 2.75rem;
        }

        .ops-content .ops-section .bg-red-900\/40,
        .ops-content .ops-section [class*="bg-red-9"],
        .ops-content .ops-section-body > div {
            border-radius: 0.9rem;
        }

        .ops-notif-thread {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }

        .ops-notif-thread-messages {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            max-height: 220px;
            overflow-y: auto;
            padding-right: 0.15rem;
        }

        .ops-notif-bubble {
            max-width: 92%;
            padding: 0.55rem 0.7rem;
            border-radius: 0.85rem;
            font-size: 0.78rem;
            line-height: 1.35;
        }

        .ops-notif-bubble--theirs {
            align-self: flex-start;
            background: #f1f5f9;
            color: #1e293b;
            border-bottom-left-radius: 0.2rem;
        }

        .ops-notif-bubble--mine {
            align-self: flex-end;
            background: #059669;
            color: #ecfdf5;
            border-bottom-right-radius: 0.2rem;
        }

        .ops-notif-thread--dark .ops-notif-bubble--theirs {
            background: rgba(30, 41, 59, 0.9);
            color: #e2e8f0;
        }

        .ops-notif-thread--dark .ops-notif-bubble--mine {
            background: rgba(5, 150, 105, 0.85);
            color: #ecfdf5;
        }

        .ops-notif-bubble-meta {
            display: flex;
            justify-content: space-between;
            gap: 0.5rem;
            font-size: 0.58rem;
            opacity: 0.85;
            margin-bottom: 0.2rem;
        }

        .ops-notif-bubble-name {
            font-weight: 800;
        }

        .ops-notif-bubble-text {
            margin: 0;
            white-space: pre-wrap;
            word-break: break-word;
        }

        .ops-notif-reply-form {
            margin-top: 0.65rem;
            padding-top: 0.65rem;
            border-top: 1px solid rgba(148, 163, 184, 0.35);
        }

        .ops-notif-reply-label {
            font-size: 0.62rem;
            color: #64748b;
            margin: 0 0 0.35rem;
            font-weight: 700;
        }

        .ops-notif-reply-input {
            width: 100%;
            border: 1px solid #e2e8f0;
            border-radius: 0.75rem;
            padding: 0.65rem 0.75rem;
            font-size: 0.8rem;
            resize: none;
            background: #fff;
            color: #0f172a;
        }

        .ops-notif-thread--dark .ops-notif-reply-input {
            background: rgba(15, 23, 42, 0.6);
            border-color: rgba(71, 85, 105, 0.8);
            color: #f8fafc;
        }

        .ops-notif-reply-btn {
            margin-top: 0.45rem;
            width: 100%;
            padding: 0.55rem 0.75rem;
            border-radius: 0.75rem;
            background: #059669;
            color: #fff;
            font-size: 0.78rem;
            font-weight: 900;
            border: none;
            cursor: pointer;
        }

        .ops-notif-reply-btn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        .live-trip-gps-pill {
            position: fixed;
            top: calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 56px);
            left: 50%;
            transform: translateX(-50%);
            z-index: 12000;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            max-width: min(92vw, 360px);
            padding: 0.5rem 0.85rem;
            border-radius: 9999px;
            font-size: 0.7rem;
            font-weight: 800;
            line-height: 1.25;
            text-align: center;
            box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
            pointer-events: auto;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        /* Ya no se usa el verde de â€œtodo bienâ€ (se oculta si GPS OK) */
        .live-trip-gps-pill--ok {
            display: none !important;
        }

        .live-trip-gps-pill--warn {
            background: rgba(245, 158, 11, 0.96);
            color: #fffbeb;
        }

        .live-trip-gps-pill--err {
            background: rgba(220, 38, 38, 0.96);
            color: #fff;
            border: 1px solid rgba(254, 202, 202, 0.45);
            animation: live-trip-gps-pulse 1.6s ease-in-out infinite;
        }

        .live-trip-gps-pill--err:active {
            transform: translateX(-50%) scale(0.98);
        }

        @keyframes live-trip-gps-pulse {
            0%, 100% { box-shadow: 0 8px 20px rgba(220, 38, 38, 0.28); }
            50% { box-shadow: 0 8px 26px rgba(220, 38, 38, 0.5); }
        }

        .live-trip-gps-pill.hidden {
            display: none !important;
            animation: none;
        }

        body.trip-active.driver-mode .live-trip-gps-pill:not(.hidden) {
            /* Encima del mapa, bajo el HUD de giros si hay */
            z-index: 2600;
        }

        /*
         * Conductor Â· viaje activo â€” estilo UBER:
         * - Mapa casi a pantalla completa (gesto libre)
         * - Faja inferior mÃ­nima: pasajero + IR AHORA + Maps/Chat
         * Importante: ganar a body.driver-mode:not(.panel-minimized)â€¦ (pantalla completa)
         * y a body.driver-mode.panel-minimized { display:none }.
         */
        body.trip-active.driver-mode #fab-traffic,
        body.trip-active.driver-mode .control-panel-drag-hint,
        body.trip-active.driver-mode .control-panel-grab {
            display: none !important;
        }

        /* FAB centrar del mapa: siempre oculto en viaje conductor (usar panel verde) */
        body.trip-active.driver-mode #fab-center {
            display: none !important;
        }

        /* HUD de giros: solo si navegando (no forzar siempre) */
        body.trip-active.driver-mode.driver-nav-mode #nav-hud-top,
        body.trip-active.driver-mode.is-navigating #nav-hud-top {
            z-index: 2100;
            pointer-events: auto;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .driver-active-eta {
            display: none !important;
        }

        /*
         * Conductor: asa Â«MinimizarÂ» SOLO con el panel maximizado.
         * Minimizado â†’ mini-barra con Â«AbrirÂ» (sin asa).
         */
        body.trip-active.driver-mode #control-panel.panel-collapsed .trip-drag-handle,
        body.trip-active.driver-mode.panel-minimized #control-panel .trip-drag-handle {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            min-height: 0 !important;
            max-height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            overflow: hidden !important;
            pointer-events: none !important;
        }

        /* Asa del sheet: pastilla fina (estilo Uber / bottom sheet) */
        .trip-drag-handle {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0;
            padding: 0.35rem 0 0.15rem;
            min-height: 1.5rem;
            margin: 0;
            border: none;
            background: transparent;
            border-radius: 0;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }

        .trip-sheet-grabber {
            display: block;
            width: 2.25rem;
            height: 0.28rem;
            border-radius: 999px;
            background: #cbd5e1;
            box-shadow: none;
            pointer-events: none;
            transition: background 0.15s ease, transform 0.15s ease, width 0.15s ease;
        }

        .trip-drag-handle:hover .trip-sheet-grabber,
        .trip-drag-handle:focus-visible .trip-sheet-grabber {
            background: #94a3b8;
            width: 2.6rem;
        }

        .trip-drag-handle:active .trip-sheet-grabber {
            background: #64748b;
            transform: scaleX(0.92);
        }

        /*
         * Asa Â«MinimizarÂ» integrada al sheet (no pastilla flotante).
         * Ancho completo, suave, como el handle de Uber.
         */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-drag-handle,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-drag-handle--passenger,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #driver-panel-min-btn,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-sheet-min-bar {
            display: flex !important;
            flex-direction: column !important;
            visibility: visible !important;
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;
            width: 100% !important;
            max-width: none !important;
            margin: 0 0 0.15rem !important;
            padding: 0.2rem 0.5rem 0.4rem !important;
            overflow: visible !important;
            pointer-events: auto !important;
            align-items: center;
            justify-content: center;
            gap: 0.28rem;
            cursor: pointer !important;
            touch-action: manipulation !important;
            -webkit-tap-highlight-color: transparent;
            z-index: 6;
            position: relative;
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            -webkit-user-drag: none;
            user-select: none;
            opacity: 1 !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-drag-handle:active,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #driver-panel-min-btn:active,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-sheet-min-bar:active {
            transform: none;
            background: transparent !important;
            opacity: 0.72;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-drag-handle:hover .driver-panel-min-hint,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #driver-panel-min-btn:hover .driver-panel-min-hint {
            color: #334155 !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-drag-handle:hover .trip-sheet-grabber,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #driver-panel-min-btn:hover .trip-sheet-grabber {
            background: #94a3b8 !important;
            width: 2.65rem !important;
        }

        /* Texto suave, alineado al panel */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .driver-panel-min-hint {
            display: block !important;
            position: static !important;
            width: auto !important;
            height: auto !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: visible !important;
            clip: auto !important;
            white-space: nowrap !important;
            border: 0 !important;
            visibility: visible !important;
            color: #94a3b8 !important;
            font-size: 0.58rem !important;
            font-weight: 800 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.12em !important;
            line-height: 1 !important;
            pointer-events: none !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-sheet-grabber {
            width: 2.35rem !important;
            height: 0.22rem !important;
            border-radius: 999px !important;
            background: #d1d5db !important;
            flex-shrink: 0;
            margin: 0 auto;
            box-shadow: none !important;
        }

        /* En viaje expandido: header vacÃ­o no ocupa espacio (el asa hace de top) */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .control-panel-header {
            min-height: 0 !important;
            height: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
            opacity: 0 !important;
        }

        /* Chevron de esquina: mÃ¡s discreto en viaje (el asa es el control principal) */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) > #panel-hide-btn {
            width: 1.75rem !important;
            height: 1.75rem !important;
            min-width: 1.75rem !important;
            min-height: 1.75rem !important;
            max-width: 1.75rem !important;
            max-height: 1.75rem !important;
            top: 0.55rem !important;
            right: 0.4rem !important;
            background: transparent !important;
            box-shadow: none !important;
            color: #cbd5e1 !important;
            opacity: 0.85;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) > #panel-hide-btn:hover {
            color: #64748b !important;
            background: rgba(241, 245, 249, 0.7) !important;
        }

        html[data-theme="dark"] .trip-sheet-grabber {
            background: #475569;
        }

        html[data-theme="dark"] .trip-drag-handle:hover .trip-sheet-grabber,
        html[data-theme="dark"] .trip-drag-handle:focus-visible .trip-sheet-grabber {
            background: #94a3b8;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .driver-active-body {
            display: flex !important;
            flex-direction: column;
            overflow-y: auto !important;
            overflow-x: hidden !important;
            -webkit-overflow-scrolling: touch;
            pointer-events: auto !important;
            max-height: none;
            scrollbar-width: none !important;
            -ms-overflow-style: none !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .driver-active-body::-webkit-scrollbar {
            width: 0 !important;
            height: 0 !important;
            display: none !important;
        }

        body.trip-active.driver-mode .control-panel-header {
            min-height: 1.85rem;
            margin-bottom: 0;
            padding: 0 0.15rem;
            /* Header no arrastra el panel; solo el chevron de esquina es tocable */
            pointer-events: none !important;
            position: relative;
            z-index: 15;
        }

        /* Chevron Â«vÂ»: siempre visible y tocable en viaje (hijo directo del panel) */
        body.trip-active.driver-mode #control-panel > #panel-hide-btn,
        body.trip-active.driver-mode #control-panel > .panel-hide-btn,
        body.driver-mode #control-panel > #panel-hide-btn,
        body.trip-active.driver-mode #control-panel.panel-collapsed > #panel-hide-btn,
        body.trip-active.driver-mode.panel-minimized #control-panel > #panel-hide-btn {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            pointer-events: auto !important;
            z-index: 500 !important;
            position: absolute !important;
            right: 0.45rem !important;
            top: 0.3rem !important;
            transform: none !important;
        }

        /*
         * Sheet inferior (no pantalla completa).
         * Selectores con :not(.panel-minimized):not(.panel-collapsed) para ganar
         * a body.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel
         * y a las reglas capacitor-native/android.
         */
        body.trip-active.driver-mode #control-panel,
        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-native.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-android.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel {
            position: absolute !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            top: auto !important;
            width: 100% !important;
            margin: 0 !important;
            height: auto !important;
            /* Faja corta (~1/3 pantalla): el resto se ve scrolleando */
            max-height: min(36dvh, 16rem) !important;
            min-height: 0;
            padding: 0.1rem 0.65rem max(0.4rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            cursor: default !important;
            touch-action: pan-y;
            border-radius: 1.35rem 1.35rem 0 0 !important;
            background: #fff !important;
            box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18) !important;
            pointer-events: auto !important;
            z-index: 320 !important;
            display: flex !important;
            flex-direction: column !important;
            visibility: visible !important;
            opacity: 1 !important;
            transform: none !important;
            overflow: hidden !important;
        }

        /*
         * Mapa: gestos como Google Maps (1 dedo pan, pellizco zoom, 2 dedos rotar/inclinar).
         * touch-action en el mapa gana a body { touch-action: manipulation }.
         */
        body.trip-active.driver-mode #map,
        body.trip-active.driver-mode #map-container,
        body.trip-active.driver-mode:not(.panel-minimized) #map,
        body.trip-active.driver-mode:not(.panel-minimized) #map-container,
        body.driver-nav-mode #map,
        body.driver-nav-mode #map-container,
        body.is-navigating.driver-mode #map,
        body.is-navigating.driver-mode #map-container,
        body.map-free-look #map,
        body.map-free-look #map-container {
            touch-action: pan-x pan-y pinch-zoom !important;
            pointer-events: auto !important;
            z-index: 1;
            -webkit-user-select: none;
            user-select: none;
        }

        body.trip-active.driver-mode #map *,
        body.driver-nav-mode #map *,
        body.map-free-look #map * {
            /* No bloquear multitouch del canvas de Maps en WebView */
            touch-action: inherit;
        }

        /* Ocultar basura en viaje; NO el chat (vive en #trip-floats-layer) */
        body.trip-active.driver-mode #driver-objectives-active,
        body.trip-active.driver-mode #driver-earnings-float,
        body.trip-active.driver-mode #driver-radar-float,
        body.trip-active.driver-mode #service-zone-map-chip {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        /* Capa de flotantes: el contenedor no come toques; el chat sÃ­ es tocable */
        body.trip-active.driver-mode #trip-floats-layer {
            display: block !important;
            visibility: visible !important;
            pointer-events: none !important;
            opacity: 1 !important;
        }

        /* Pastilla de chat: compacta (no a lo ancho del mapa) */
        body.trip-active.driver-mode #trip-chat-float-pill:not(.hidden),
        body.trip-active.driver-mode #trip-floats-layer #trip-chat-float-pill:not(.hidden) {
            display: block !important;
            width: auto !important;
            max-width: max-content !important;
            min-width: 0 !important;
            height: auto !important;
            padding: 0 !important;
            margin: 0 !important;
            background: transparent !important;
            border: none !important;
            box-shadow: none !important;
            opacity: 1 !important;
            visibility: visible !important;
            pointer-events: auto !important;
            z-index: 28500 !important;
        }

        body.trip-active.driver-mode #trip-chat-float-pill .trip-pill-face {
            display: inline-flex !important;
            align-items: center;
            gap: 0.3rem;
            width: auto !important;
            max-width: none !important;
            min-height: 2.15rem;
            padding: 0.4rem 0.7rem !important;
            border-radius: 999px !important;
            font-size: 0.68rem !important;
            font-weight: 900;
            line-height: 1;
            white-space: nowrap;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.38);
        }

        body.trip-active.driver-mode #trip-chat-float-pill .trip-pill-face i.fa-comments {
            font-size: 0.85rem;
        }

        body.trip-active.driver-mode #trip-chat-float-pill.hidden {
            display: none !important;
        }

        /* Panel de chat abierto: tarjeta chica, no media pantalla */
        body.trip-active.driver-mode #chat-float:not(.hidden),
        body.trip-active.driver-mode #trip-floats-layer #chat-float:not(.hidden) {
            display: flex !important;
            flex-direction: column;
            pointer-events: auto !important;
            visibility: visible !important;
            width: min(280px, calc(100vw - 1.5rem)) !important;
            max-width: min(280px, calc(100vw - 1.5rem)) !important;
            left: auto !important;
            right: 0.65rem !important;
            padding: 0.55rem 0.6rem !important;
            border-radius: 0.9rem !important;
            z-index: 28600 !important;
        }

        body.trip-active.driver-mode #chat-float.hidden {
            display: none !important;
        }

        body.trip-active.driver-mode #chat-float .trip-chat-messages {
            height: 7.5rem !important;
            max-height: 22dvh !important;
        }

        body.trip-active.driver-mode #chat-float .trip-chat-input {
            font-size: 0.85rem !important;
            padding: 0.45rem 0.65rem !important;
            min-height: 2.25rem;
        }

        body.trip-active.driver-mode #chat-float .trip-chat-send {
            width: 2.25rem !important;
            height: 2.25rem !important;
        }

        /* Conductor en viaje: NO FAB Â«CentrarÂ» en el mapa (va en el panel verde / mini-barra) */
        body.trip-active.driver-mode #fab-center,
        body.driver-nav-mode #fab-center,
        body.driver-mode.is-navigating #fab-center,
        body.trip-active.driver-mode #fab-center:not(.hidden),
        body.driver-nav-mode #fab-center:not(.hidden) {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
            opacity: 0 !important;
        }

        .driver-panel-nav-center-btn {
            display: inline-flex !important;
            align-items: center;
            gap: 0.25rem;
            flex-shrink: 0;
            border: 0;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.2) !important;
            color: #fff !important;
            font-size: 0.65rem;
            font-weight: 800;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            padding: 0.4rem 0.65rem;
            min-height: 2rem;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            pointer-events: auto !important;
            z-index: 2;
        }

        .driver-panel-nav-center-btn:active {
            transform: scale(0.97);
            background: rgba(255, 255, 255, 0.28) !important;
        }

        .trip-mini-center-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.25rem;
            pointer-events: auto !important;
        }

        /* Ocultar basura: partner card completo, fotos, ruta larga */
        body.trip-active.driver-mode #trip-partner-info,
        body.trip-active.driver-mode #active-trip-route-summary,
        body.trip-active.driver-mode #tp-driver-extra,
        body.trip-active.driver-mode #tp-vehicle-photos,
        body.trip-active.driver-mode #tp-license-photos,
        body.trip-active.driver-mode #trip-expanded-content,
        body.trip-active.driver-mode #trip-actions-sticky,
        body.trip-active.driver-mode #driver-trip-accepted-kicker {
            display: none !important;
        }

        /* â€”â€” Sheet Uber â€”â€” */
        body.trip-active.driver-mode .driver-uber-sheet {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            padding: 0.15rem 0 0.25rem;
        }

        body.trip-active.driver-mode .driver-uber-pax {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            padding: 0.15rem 0.1rem;
        }

        body.trip-active.driver-mode .driver-uber-pax-photo {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 999px;
            object-fit: cover;
            background: #e2e8f0;
            flex-shrink: 0;
            border: 2px solid #fff;
            box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
        }

        body.trip-active.driver-mode .driver-uber-pax-name {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        body.trip-active.driver-mode .driver-uber-next-addr {
            margin: 0.15rem 0 0;
            font-size: 0.72rem;
            font-weight: 700;
            color: #64748b;
            line-height: 1.25;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        body.trip-active.driver-mode .driver-uber-eta {
            text-align: center;
            padding: 0.35rem 0.5rem;
            border-radius: 0.75rem;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
            min-width: 3.25rem;
        }

        body.trip-active.driver-mode .driver-uber-eta-time {
            display: block;
            font-size: 1.15rem;
            font-weight: 900;
            color: #047857;
            line-height: 1;
        }

        body.trip-active.driver-mode .driver-uber-eta-label {
            font-size: 0.55rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            color: #059669;
        }

        body.trip-active.driver-mode .driver-uber-secondary-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 0.4rem;
            margin-top: 0.15rem;
        }

        body.trip-active.driver-mode .driver-uber-secondary-row .driver-gmaps-secondary-btn,
        body.trip-active.driver-mode .driver-uber-secondary-row .driver-active-tool-btn {
            min-height: 2.85rem !important;
            margin: 0 !important;
            width: 100%;
            border-radius: 0.85rem !important;
            font-size: 0.7rem !important;
            font-weight: 900 !important;
        }

        body.trip-active.driver-mode .driver-inapp-nav-btn {
            min-height: 3.75rem !important;
            border-radius: 1rem !important;
            background: linear-gradient(135deg, #000 0%, #1e293b 100%) !important;
            color: #fff !important;
            box-shadow: 0 8px 22px rgba(15, 23, 42, 0.28) !important;
        }

        body.trip-active.driver-mode .driver-route-hero-label {
            font-size: 0.78rem !important;
            letter-spacing: 0.12em !important;
        }

        body.trip-active.driver-mode .driver-route-hero-addr {
            font-size: 0.78rem !important;
            -webkit-line-clamp: 1 !important;
        }

        body.trip-active.driver-mode #driver-destination-controls #btn-driver-arrived-dest {
            min-height: 3.75rem !important;
            border-radius: 1rem !important;
            font-size: 0.85rem !important;
        }

        /*
         * Minimizado: barra compacta (NO display:none del driver idle).
         * body.driver-mode.panel-minimized #control-panel { display:none } se anula aquÃ­.
         */
        body.trip-active.driver-mode #control-panel.panel-collapsed,
        body.trip-active.driver-mode.panel-minimized #control-panel,
        body.capacitor-native.trip-active.driver-mode.panel-minimized #control-panel,
        body.capacitor-android.trip-active.driver-mode.panel-minimized #control-panel {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            max-height: 5.25rem !important;
            min-height: 0 !important;
            height: auto !important;
            overflow: hidden !important;
            top: auto !important;
            bottom: 0 !important;
            padding-top: 0.1rem !important;
            padding-bottom: max(0.35rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            z-index: 320 !important;
            pointer-events: auto !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed #trip-mini-bar.driver-active-eta,
        body.trip-active.driver-mode.panel-minimized #control-panel #trip-mini-bar.driver-active-eta {
            display: flex !important;
            margin: 0;
            padding: 0.35rem 0.5rem 0.45rem;
            align-items: center;
            pointer-events: auto !important;
        }

        /* Sin asa Â«MinimizarÂ» ni en minimizado: solo mini-barra con Abrir */
        body.trip-active.driver-mode #control-panel.panel-collapsed .trip-drag-handle,
        body.trip-active.driver-mode.panel-minimized #control-panel .trip-drag-handle {
            display: none !important;
            height: 0 !important;
            min-height: 0 !important;
            padding: 0 !important;
            margin: 0 !important;
            pointer-events: none !important;
            overflow: hidden !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed #driver-active-body,
        body.trip-active.driver-mode.panel-minimized #control-panel #driver-active-body,
        body.trip-active.driver-mode #control-panel.panel-collapsed #trip-expanded-content,
        body.trip-active.driver-mode #control-panel.panel-collapsed #trip-actions-sticky,
        body.trip-active.driver-mode.panel-minimized #control-panel #trip-expanded-content,
        body.trip-active.driver-mode.panel-minimized #control-panel #trip-actions-sticky {
            display: none !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed #panel-content,
        body.trip-active.driver-mode.panel-minimized #control-panel #panel-content,
        body.trip-active.driver-mode #control-panel.panel-collapsed #active-trip-panel,
        body.trip-active.driver-mode.panel-minimized #control-panel #active-trip-panel {
            flex: 0 0 auto !important;
            min-height: 0 !important;
            max-height: none !important;
            height: auto !important;
            overflow: hidden !important;
        }

        body.trip-active.driver-mode #control-panel.panel-is-floating,
        body.trip-active.driver-mode #control-panel.is-drag-positioned {
            border-radius: 1.75rem 1.75rem 0 0 !important;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.15) !important;
        }

        body.trip-active.driver-mode #control-panel.is-dragging {
            cursor: default !important;
        }

        body.trip-active.driver-mode #active-trip-panel {
            display: flex !important;
            flex-direction: column;
            min-height: 0;
            gap: 0;
            flex: 1 1 auto;
        }

        body.trip-active.driver-mode #driver-route-hero:not(.hidden) {
            display: block !important;
        }

        body.trip-active.driver-mode #driver-active-tools {
            display: none !important;
        }

        body.trip-active.driver-mode .driver-active-tool-btn {
            min-height: 2.85rem !important;
            font-size: 0.7rem !important;
            font-weight: 900 !important;
            border-radius: 0.85rem !important;
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: 0.3rem;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            color: #0f172a;
        }

        body.trip-active.driver-mode #driver-destination-controls:not(.hidden) {
            display: block !important;
        }

        /* Pastilla de chat: compacta, arriba del sheet (no gigante) */
        body.trip-active.driver-mode #trip-chat-float-pill:not(.hidden) {
            bottom: calc(6.25rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
            right: 0.65rem !important;
            left: auto !important;
            width: auto !important;
            max-width: max-content !important;
            z-index: 28500;
        }

        body.trip-active.driver-mode.panel-minimized #trip-chat-float-pill:not(.hidden),
        body.trip-active.driver-mode #control-panel.panel-collapsed ~ * #trip-chat-float-pill:not(.hidden) {
            bottom: calc(5.75rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        }

        body.trip-active.driver-mode.driver-trip-dest-phase #trip-chat-float-pill:not(.hidden),
        body.trip-active.driver-mode.driver-pin-phase #trip-chat-float-pill:not(.hidden) {
            bottom: calc(7.5rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        }

        @media (max-width: 480px) {
            /* Anular el chat a pantalla completa en conductor */
            body.trip-active.driver-mode #chat-float.trip-float:not(.hidden) {
                left: auto !important;
                right: 0.65rem !important;
                width: min(280px, calc(100vw - 1.5rem)) !important;
                max-width: min(280px, calc(100vw - 1.5rem)) !important;
            }
        }

        body.trip-active.driver-mode.driver-trip-dest-phase #control-panel:not(.panel-collapsed) {
            max-height: min(38%, 18rem) !important;
            min-height: 11rem;
        }

        body.trip-active.driver-mode.driver-trip-dest-phase #control-panel.panel-collapsed,
        body.trip-active.driver-mode.driver-trip-dest-phase.panel-minimized #control-panel {
            max-height: 4.75rem !important;
            min-height: 0 !important;
        }

        body.trip-active.driver-mode #driver-destination-controls .driver-pin-hero-kicker {
            display: block;
            margin: 0.5rem 0 0.25rem;
            font-size: 0.58rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #64748b;
        }

        body.trip-active.driver-mode #driver-destination-controls #btn-driver-arrived-dest:not(:disabled) {
            background: linear-gradient(135deg, #059669 0%, #10b981 55%, #34d399 100%);
            box-shadow: 0 12px 30px rgba(5, 150, 105, 0.32);
        }

        body.trip-active.driver-mode .driver-gmaps-route-icon,
        body.trip-active.driver-mode .driver-inapp-nav-icon {
            width: 2.35rem;
            height: 2.35rem;
            border-radius: 0.85rem;
            background: rgba(255, 255, 255, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            flex-shrink: 0;
        }

        body.trip-active.driver-mode .driver-gmaps-secondary-btn {
            display: inline-flex !important;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            min-height: 2.85rem;
            padding: 0.45rem 0.5rem;
            border-radius: 0.85rem;
            border: 1.5px solid rgba(66, 133, 244, 0.4);
            background: #fff;
            color: #1a73e8;
            border: 1.5px solid rgba(66, 133, 244, 0.45);
            background: #fff;
            color: #1a73e8;
            font-size: 0.72rem;
            font-weight: 900;
            letter-spacing: 0.02em;
            box-shadow: 0 4px 14px rgba(26, 115, 232, 0.12);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        body.trip-active.driver-mode .driver-gmaps-secondary-btn:active {
            transform: scale(0.98);
            background: #e8f0fe;
        }

        html[data-theme="dark"] body.trip-active.driver-mode .driver-gmaps-secondary-btn {
            background: #0f172a;
            border-color: rgba(96, 165, 250, 0.45);
            color: #93c5fd;
        }

        body.trip-active.driver-mode .driver-route-hero-label {
            margin: 0;
            font-size: 0.68rem;
            font-weight: 900;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            opacity: 0.92;
        }

        body.trip-active.driver-mode .driver-gmaps-route-addr {
            margin: 0.35rem 0 0;
            font-size: clamp(0.82rem, 3.6vw, 1rem);
            font-weight: 800;
            line-height: 1.35;
            white-space: normal;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
            text-overflow: ellipsis;
            opacity: 1;
        }

        body.trip-active.driver-mode .driver-active-cta {
            margin-top: 0;
            padding-top: 0.65rem;
            border-top: none;
            background: transparent;
        }

        body.trip-active.driver-mode #panel-content {
            display: flex !important;
            flex-direction: column;
            min-height: 0;
            flex: 1 1 auto;
            overflow: hidden;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #panel-content {
            min-height: 0;
        }

        body.trip-active.driver-mode.panel-minimized #panel-content,
        body.trip-active.driver-mode #control-panel.panel-collapsed #panel-content {
            min-height: 0 !important;
            flex: 0 0 auto !important;
            overflow: hidden !important;
        }

        body.trip-active.driver-mode .driver-active-eta-label {
            display: block;
        }

        body.trip-active:not(.driver-mode) .driver-active-eta-label {
            display: none;
        }

        body.trip-active.driver-mode #trip-mini-time {
            color: #10b981;
            font-size: clamp(1.5rem, 6vw, 1.85rem);
        }

        body.trip-active.driver-mode .driver-active-body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            padding-bottom: max(0.7rem, calc(0.4rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))));
            scrollbar-width: thin;
            -ms-overflow-style: auto;
        }

        /* Viaje conductor maximizado: CORTO (~36% pantalla), scroll al final */
        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel {
            max-height: min(36dvh, 16rem) !important;
            display: flex !important;
            flex-direction: column !important;
            overflow: hidden !important;
            padding-bottom: max(0.45rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #panel-content {
            overflow-y: auto !important;
            overflow-x: hidden !important;
            -webkit-overflow-scrolling: touch;
            min-height: 0 !important;
            flex: 1 1 auto !important;
            padding-bottom: max(0.65rem, calc(0.35rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)))) !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #active-trip-panel {
            min-height: 0 !important;
            flex: 1 1 auto !important;
            overflow: hidden !important;
            display: flex !important;
            flex-direction: column !important;
        }

        /* Pasajero en viaje: panel también corto */
        body.client-mode.trip-active:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.passenger-trip-float-active.client-mode #control-panel:not(.panel-collapsed) {
            max-height: min(42dvh, 18.5rem) !important;
        }

        body.trip-active.driver-mode .driver-active-body::-webkit-scrollbar {
            display: none !important;
            width: 0 !important;
        }

        body.trip-active.driver-mode .driver-active-route {
            background: #fff;
            border-color: #e2e8f0;
            box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
        }

        body.trip-active.driver-mode .driver-active-passenger .driver-assigned-body {
            padding: 0.85rem 1rem;
        }

        body.trip-active.driver-mode .driver-active-passenger .driver-vehicle-panel,
        body.trip-active.driver-mode .driver-active-passenger #tp-driver-extra {
            display: none !important;
        }

        body.trip-active.driver-mode .driver-active-passenger #tp-role-label {
            margin-bottom: 0.15rem;
        }

        body.trip-active.driver-mode .driver-active-cta {
            flex-shrink: 0;
            margin-top: auto;
            padding-top: 0.45rem;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.92) 28%, #fff 100%);
            border-top: 1px solid rgba(241, 245, 249, 0.95);
        }

        body.trip-active.driver-mode .driver-route-hero,
        body.trip-active.driver-mode .driver-pin-hero,
        body.trip-active.driver-mode #driver-destination-controls {
            margin-left: 0;
            margin-right: 0;
            padding: 0;
            background: transparent;
            border: none;
            box-shadow: none;
            text-align: left;
        }

        body.trip-active.driver-mode .driver-route-hero-kicker {
            display: none;
        }

        body.trip-active.driver-mode .driver-pin-hero-kicker {
            margin: 0 0 0.35rem;
            font-size: 0.58rem;
            color: #64748b;
        }

        body.trip-active.driver-mode .driver-pin-hero-hint {
            margin: 0 0 0.5rem;
            color: #475569;
            font-size: 0.65rem;
        }

        body.trip-active.driver-mode .driver-active-primary-btn {
            min-height: 6.5rem;
            border-radius: 1.25rem;
            background: linear-gradient(135deg, #2563eb 0%, #3b82f6 52%, #60a5fa 100%);
            box-shadow: 0 12px 30px rgba(37, 99, 235, 0.34);
            font-size: 0.78rem;
            letter-spacing: 0.08em;
            padding: 1rem 1.1rem;
        }

        body.trip-active.driver-mode .driver-active-primary-btn:disabled {
            background: #cbd5e1 !important;
            color: #64748b !important;
            box-shadow: none !important;
        }

        body.trip-active.driver-mode .driver-active-tools {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
            margin-top: 0.35rem;
        }

        body.trip-active.driver-mode #driver-active-tools.hidden {
            display: none !important;
        }

        .driver-active-tool-btn {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.2rem;
            min-height: 3.25rem;
            padding: 0.45rem 0.35rem;
            border-radius: 1rem;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #334155;
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .driver-active-tool-btn i {
            font-size: 1rem;
            color: #2563eb;
        }

        .driver-active-tool-badge {
            position: absolute;
            top: 0.2rem;
            right: 0.35rem;
            min-width: 1.1rem;
            height: 1.1rem;
            padding: 0 0.2rem;
            border-radius: 999px;
            background: #dc2626;
            color: #fff;
            font-size: 0.58rem;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #f8fafc;
        }

        body.trip-active.driver-mode .trip-passenger-only {
            display: none !important;
        }

        body.trip-active.driver-mode #trip-expanded-content {
            display: none !important;
        }

        body.trip-active #trip-floats-layer:not(.hidden) {
            visibility: visible;
            pointer-events: none;
        }

        body.trip-active.passenger-track-mode #control-panel.panel-collapsed #trip-expanded-content {
            display: none !important;
        }

        body.trip-active:not(.driver-mode) #driver-active-cta,
        body.trip-active:not(.driver-mode) #driver-active-tools {
            display: none !important;
        }

        body.trip-active.driver-mode #trip-actions-sticky {
            display: none !important;
        }

        body.trip-active:not(.driver-mode) #trip-mini-time {
            color: #2563eb;
            font-size: 1.25rem;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed,
        body.trip-active.driver-mode.panel-minimized #control-panel {
            max-height: 4.75rem !important;
            min-height: 0 !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed .driver-active-cta {
            border-top: none;
            background: transparent;
            padding-top: 0;
            display: none !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed #driver-active-tools {
            display: none !important;
        }

        /* Minimizado: no mostrar â€œIr al origen/destinoâ€ ni controles de llegada / PIN */
        body.trip-active.driver-mode #control-panel.panel-collapsed #driver-route-hero,
        body.trip-active.driver-mode #control-panel.panel-collapsed #driver-destination-controls,
        body.trip-active.driver-mode #control-panel.panel-collapsed #driver-panel-pin,
        body.trip-active.driver-mode.panel-minimized #control-panel #driver-route-hero,
        body.trip-active.driver-mode.panel-minimized #control-panel #driver-destination-controls,
        body.trip-active.driver-mode.panel-minimized #control-panel #driver-panel-pin {
            display: none !important;
        }

        /* Fase PIN: botones bien tocables en ficha expandida (destino = pastilla flotante) */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #driver-panel-pin:not(.hidden) {
            display: block !important;
            pointer-events: auto !important;
            position: relative;
            z-index: 5;
        }

        body.trip-active.driver-mode #driver-panel-pin button,
        body.trip-active.driver-mode #driver-destination-controls button,
        body.trip-active.driver-mode #pin-input-group button {
            pointer-events: auto !important;
            touch-action: manipulation !important;
            cursor: pointer;
            position: relative;
            z-index: 6;
        }

        body.trip-active.driver-mode #btn-driver-arrived-dest.is-arrival-blocked {
            opacity: 0.72;
            filter: grayscale(0.15);
        }

        /* Controles de destino del sheet: el botÃ³n vive en #driver-arrived-dest-float */
        body.trip-active.driver-mode #driver-destination-controls {
            display: none !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed #trip-mini-bar,
        body.trip-active.driver-mode.panel-minimized #control-panel #trip-mini-bar {
            display: flex !important;
        }

        /* Mini-barra solo minimizado; maximizado usa el asa superior */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #trip-mini-bar {
            display: none !important;
        }

        body.trip-active.driver-mode #control-panel.panel-collapsed .trip-drag-handle,
        body.trip-active.driver-mode.panel-minimized #control-panel .trip-drag-handle {
            display: none !important;
            height: 0 !important;
            min-height: 0 !important;
            padding: 0 !important;
            overflow: hidden !important;
            pointer-events: none !important;
        }

        /* Header compacto minimizado; el chevron vive fuera y sigue tocable */
        body.trip-active.driver-mode #control-panel.panel-collapsed .control-panel-header,
        body.trip-active.driver-mode.panel-minimized #control-panel .control-panel-header {
            display: flex !important;
            min-height: 0.35rem !important;
            height: auto !important;
            margin: 0 !important;
            padding: 0 !important;
            visibility: visible !important;
            opacity: 1 !important;
            overflow: visible !important;
            pointer-events: none !important;
        }

        /* Espacio superior en mini-barra para no chocar con el chevron */
        body.trip-active.driver-mode #control-panel.panel-collapsed #trip-mini-bar,
        body.trip-active.driver-mode.panel-minimized #control-panel #trip-mini-bar {
            padding-right: 2.75rem !important;
        }

        /* Refuerzo final: asa integrada (sin pastilla ni mÃ¡rgenes raros) */
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-drag-handle,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) #driver-panel-min-btn,
        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-sheet-min-bar {
            display: flex !important;
            flex-direction: column !important;
            visibility: visible !important;
            height: auto !important;
            min-height: 0 !important;
            max-height: none !important;
            width: 100% !important;
            max-width: none !important;
            margin: 0 0 0.15rem !important;
            padding: 0.2rem 0.5rem 0.4rem !important;
            overflow: visible !important;
            pointer-events: auto !important;
            opacity: 1 !important;
            z-index: 6 !important;
            background: transparent !important;
            border: none !important;
            border-radius: 0 !important;
            box-shadow: none !important;
            cursor: pointer !important;
            touch-action: manipulation !important;
            gap: 0.28rem !important;
            align-items: center !important;
            justify-content: center !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .driver-panel-min-hint {
            display: block !important;
            color: #94a3b8 !important;
            font-size: 0.58rem !important;
            font-weight: 800 !important;
            text-transform: uppercase !important;
            letter-spacing: 0.12em !important;
            clip: auto !important;
            position: static !important;
            width: auto !important;
            height: auto !important;
            margin: 0 !important;
            overflow: visible !important;
        }

        body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-sheet-grabber {
            width: 2.35rem !important;
            height: 0.22rem !important;
            background: #d1d5db !important;
        }

        html[data-theme="dark"] body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .driver-panel-min-hint {
            color: #64748b !important;
        }

        html[data-theme="dark"] body.trip-active.driver-mode:not(.panel-minimized) #control-panel:not(.panel-collapsed) .trip-sheet-grabber {
            background: #475569 !important;
        }

        html[data-theme="dark"] body.trip-active.driver-mode #control-panel {
            background: rgba(15, 23, 42, 0.98);
        }

        /*
         * Viaje activo maximizado en mÃ³vil: SIEMPRE faja abajo (no full-screen).
         * El mapa de arriba sigue tocable y la navegaciÃ³n (giro/GPS) sigue activa.
         * Estas reglas van al final a propÃ³sito para ganar a height:100% del driver idle.
         */
        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.trip-active.driver-mode.is-navigating:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.trip-active.driver-mode.driver-nav-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.trip-active.driver-mode.driver-trip-dest-phase:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-native.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
        body.capacitor-android.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel {
            position: absolute !important;
            left: 0 !important;
            right: 0 !important;
            bottom: 0 !important;
            top: auto !important;
            width: 100% !important;
            height: auto !important;
            max-height: min(48dvh, 22rem) !important;
            min-height: 0 !important;
            border-radius: 1.35rem 1.35rem 0 0 !important;
            z-index: 320 !important;
            box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.18) !important;
            transform: none !important;
        }

        @media (max-width: 768px) {
            body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
            body.trip-active.driver-mode.is-navigating:not(.panel-minimized):not(.panel-collapsed) #control-panel,
            body.trip-active.driver-mode.driver-nav-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
            body.capacitor-native.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel,
            body.capacitor-android.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel {
                max-height: min(46dvh, 20.5rem) !important;
                top: auto !important;
                height: auto !important;
            }
        }

        /* Mapa sigue recibiendo gestos aunque el panel estÃ© maximizado abajo */
        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #map,
        body.trip-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #map-container,
        body.trip-active.driver-mode.is-navigating:not(.panel-minimized) #map,
        body.trip-active.driver-mode.is-navigating:not(.panel-minimized) #map-container {
            pointer-events: auto !important;
            touch-action: pan-x pan-y pinch-zoom !important;
        }

        html[data-theme="dark"] body.trip-active.driver-mode .driver-active-route {
            background: #1e293b;
            border-color: #334155;
        }

        html[data-theme="dark"] body.trip-active.driver-mode .driver-active-cta {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, rgba(15, 23, 42, 0.95) 30%, #0f172a 100%);
            border-top-color: #334155;
        }

        html[data-theme="dark"] body.trip-active.driver-mode .driver-active-tool-btn {
            background: #1e293b;
            border-color: #334155;
            color: #e2e8f0;
        }

        /* â€”â€” Banner verificaciÃ³n pasajero â€”â€” */
        .passenger-verify-banner {
            display: flex;
            align-items: center;
            gap: 10px;
            width: calc(100% - 1rem);
            margin: 0.5rem 0.5rem 0.75rem;
            padding: 12px 14px;
            border: none;
            border-radius: 18px;
            text-align: left;
            cursor: pointer;
            position: relative;
            overflow: hidden;
            background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 45%, #7c3aed 100%);
            box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .passenger-verify-banner:active {
            transform: scale(0.98);
        }

        .passenger-verify-banner--review {
            cursor: default;
            background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #f59e0b 100%);
            box-shadow: 0 8px 22px rgba(217, 119, 6, 0.28);
        }

        .passenger-verify-banner__glow {
            position: absolute;
            inset: -40% auto auto -20%;
            width: 120px;
            height: 120px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.18);
            filter: blur(2px);
            pointer-events: none;
        }

        .passenger-verify-banner__icon {
            flex-shrink: 0;
            width: 40px;
            height: 40px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.2);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
        }

        .passenger-verify-banner__icon--review {
            background: rgba(255, 255, 255, 0.22);
        }

        .passenger-verify-banner__body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .passenger-verify-banner__title {
            font-size: 11px;
            font-weight: 900;
            color: #fff;
            line-height: 1.25;
            letter-spacing: 0.02em;
        }

        .passenger-verify-banner__text {
            font-size: 9.5px;
            font-weight: 600;
            color: rgba(255, 255, 255, 0.92);
            line-height: 1.35;
        }

        .passenger-verify-banner__cta {
            flex-shrink: 0;
            width: 28px;
            height: 28px;
            border-radius: 999px;
            background: rgba(255, 255, 255, 0.22);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
        }

        html[data-theme="dark"] .passenger-verify-banner--review .passenger-verify-banner__text {
            color: rgba(255, 255, 255, 0.95);
        }

        /* â€”â€” Modal elecciÃ³n verificar ahora / mÃ¡s tarde (estilo Uber) â€”â€” */
        .passenger-verify-choice-overlay {
            position: fixed;
            inset: 0;
            z-index: 34000;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding: 0;
            background: rgba(15, 23, 42, 0.55);
            backdrop-filter: blur(5px);
            -webkit-backdrop-filter: blur(5px);
            animation: cityModalFadeIn 0.2s ease-out;
        }

        @media (min-width: 640px) {
            .passenger-verify-choice-overlay {
                align-items: center;
                padding: 1.25rem;
            }
        }

        .passenger-verify-choice-sheet {
            width: 100%;
            max-width: 22.5rem;
            padding: 1.35rem 1.2rem 1.15rem;
            border-radius: 1.35rem 1.35rem 0 0;
            background: #fff;
            text-align: center;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.22);
            animation: cityModalSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @media (min-width: 640px) {
            .passenger-verify-choice-sheet {
                border-radius: 1.35rem;
            }
        }

        .passenger-verify-choice-icon {
            width: 3.1rem;
            height: 3.1rem;
            margin: 0 auto 0.65rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb, #7c3aed);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
        }

        .passenger-verify-choice-sheet h2 {
            margin: 0 0 0.4rem;
            font-size: 1.1rem;
            font-weight: 900;
            color: #0f172a;
            letter-spacing: -0.02em;
        }

        .passenger-verify-choice-text {
            margin: 0 0 0.65rem;
            font-size: 0.78rem;
            font-weight: 600;
            color: #475569;
            line-height: 1.45;
        }

        .passenger-verify-choice-list {
            list-style: none;
            margin: 0 0 0.95rem;
            padding: 0.65rem 0.75rem;
            text-align: left;
            border-radius: 0.9rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
        }

        .passenger-verify-choice-list li {
            font-size: 0.72rem;
            font-weight: 700;
            color: #334155;
            margin-bottom: 0.35rem;
            display: flex;
            align-items: flex-start;
            gap: 0.4rem;
            line-height: 1.35;
        }

        .passenger-verify-choice-list li:last-child {
            margin-bottom: 0;
        }

        .passenger-verify-choice-btn {
            width: 100%;
            min-height: 3rem;
            border: none;
            border-radius: 1rem;
            font-size: 0.82rem;
            font-weight: 900;
            cursor: pointer;
            margin-bottom: 0.4rem;
            touch-action: manipulation;
        }

        .passenger-verify-choice-btn--primary {
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
        }

        .passenger-verify-choice-btn--later {
            background: #f1f5f9;
            color: #0f172a;
        }

        .passenger-verify-choice-foot {
            margin: 0.35rem 0 0;
            font-size: 0.62rem;
            font-weight: 600;
            color: #94a3b8;
        }

        html[data-theme="dark"] .passenger-verify-choice-sheet {
            background: #1e293b;
        }

        html[data-theme="dark"] .passenger-verify-choice-sheet h2 {
            color: #f8fafc;
        }

        html[data-theme="dark"] .passenger-verify-choice-text {
            color: #cbd5e1;
        }

        html[data-theme="dark"] .passenger-verify-choice-list {
            background: #0f172a;
            border-color: #334155;
        }

        html[data-theme="dark"] .passenger-verify-choice-list li {
            color: #e2e8f0;
        }

        html[data-theme="dark"] .passenger-verify-choice-btn--later {
            background: #334155;
            color: #f1f5f9;
        }

        /* --- Tutorial pasajero (tour guiado) --- */
        body.passenger-tutorial-active {
            overflow: hidden;
        }

        .passenger-tutorial-root {
            position: fixed;
            inset: 0;
            z-index: 55000;
            pointer-events: none;
        }

        .passenger-tutorial-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(15, 23, 42, 0.45);
            pointer-events: auto;
        }

        .passenger-tutorial-spotlight {
            position: fixed;
            z-index: 55001;
            border-radius: 14px;
            box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72);
            pointer-events: none;
            transition: top 0.22s ease, left 0.22s ease, width 0.22s ease, height 0.22s ease;
        }

        .passenger-tutorial-card {
            position: fixed;
            z-index: 55002;
            width: min(92vw, 22rem);
            max-height: min(78dvh, 28rem);
            overflow-y: auto;
            background: #fff;
            border-radius: 1.25rem;
            box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
            padding: 1rem 1rem 0.85rem;
            pointer-events: auto;
            border: 1px solid rgba(148, 163, 184, 0.35);
            transition: top 0.2s ease, left 0.2s ease;
        }

        html[data-theme="dark"] .passenger-tutorial-card {
            background: #1e293b;
            border-color: rgba(71, 85, 105, 0.6);
            color: #e2e8f0;
        }

        .passenger-tutorial-card-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 0.65rem;
        }

        .passenger-tutorial-step-badge {
            font-size: 0.65rem;
            font-weight: 900;
            letter-spacing: 0.08em;
            text-transform: uppercase;
            color: #2563eb;
            background: #eff6ff;
            padding: 0.2rem 0.55rem;
            border-radius: 999px;
        }

        html[data-theme="dark"] .passenger-tutorial-step-badge {
            background: rgba(37, 99, 235, 0.2);
            color: #93c5fd;
        }

        .passenger-tutorial-close {
            width: 2rem;
            height: 2rem;
            border: none;
            border-radius: 0.65rem;
            background: #f1f5f9;
            color: #64748b;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        html[data-theme="dark"] .passenger-tutorial-close {
            background: #334155;
            color: #cbd5e1;
        }

        .passenger-tutorial-card-icon {
            width: 2.75rem;
            height: 2.75rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #2563eb, #1d4ed8);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.15rem;
            margin-bottom: 0.65rem;
        }

        .passenger-tutorial-card-title {
            font-size: 1rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.25;
            margin-bottom: 0.45rem;
        }

        html[data-theme="dark"] .passenger-tutorial-card-title {
            color: #f8fafc;
        }

        .passenger-tutorial-card-body {
            font-size: 0.8rem;
            line-height: 1.45;
            color: #475569;
            margin-bottom: 0.85rem;
        }

        html[data-theme="dark"] .passenger-tutorial-card-body {
            color: #cbd5e1;
        }

        .passenger-tutorial-card-actions {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            padding-top: 0.25rem;
            border-top: 1px solid #e2e8f0;
        }

        html[data-theme="dark"] .passenger-tutorial-card-actions {
            border-top-color: #334155;
        }

        .passenger-tutorial-card-nav {
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
            flex-wrap: wrap;
        }

        .passenger-tutorial-btn {
            border: none;
            border-radius: 0.75rem;
            padding: 0.55rem 0.85rem;
            font-size: 0.72rem;
            font-weight: 800;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            transition: transform 0.12s ease, opacity 0.12s ease;
        }

        .passenger-tutorial-btn:active {
            transform: scale(0.97);
        }

        .passenger-tutorial-btn--ghost {
            background: #f8fafc;
            color: #64748b;
        }

        html[data-theme="dark"] .passenger-tutorial-btn--ghost {
            background: #334155;
            color: #e2e8f0;
        }

        .passenger-tutorial-btn--primary {
            background: #2563eb;
            color: #fff;
            box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
        }

        @media (max-width: 639px) {
            .passenger-tutorial-card {
                width: calc(100vw - 1rem);
                max-width: none;
                padding: 0.7rem 0.8rem 0.6rem;
                max-height: min(36dvh, 13.5rem);
                -webkit-overflow-scrolling: touch;
            }

            .passenger-tutorial-card--docked-top {
                top: max(0.45rem, var(--safe-top, env(safe-area-inset-top, 0px))) !important;
                left: 0.5rem !important;
                right: 0.5rem !important;
                bottom: auto !important;
                transform: none !important;
            }

            .passenger-tutorial-card--docked-bottom {
                bottom: max(0.45rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
                left: 0.5rem !important;
                right: 0.5rem !important;
                top: auto !important;
                transform: none !important;
            }

            .passenger-tutorial-card--center {
                top: 50% !important;
                left: 50% !important;
                right: auto !important;
                bottom: auto !important;
                transform: translate(-50%, -50%) !important;
                max-height: min(72dvh, 22rem);
            }

            .passenger-tutorial-card-icon {
                width: 2.15rem;
                height: 2.15rem;
                font-size: 0.95rem;
                margin-bottom: 0.45rem;
            }

            .passenger-tutorial-card-title {
                font-size: 0.88rem;
                margin-bottom: 0.35rem;
            }

            .passenger-tutorial-card-body {
                font-size: 0.74rem;
                line-height: 1.4;
                margin-bottom: 0.6rem;
            }

            .passenger-tutorial-btn {
                padding: 0.48rem 0.7rem;
                font-size: 0.68rem;
            }

            .passenger-tutorial-card-nav {
                gap: 0.35rem;
            }

            .passenger-tutorial-spotlight {
                box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.55);
                border: 2px solid rgba(37, 99, 235, 0.9);
                border-radius: 12px;
            }

            .passenger-tutorial-backdrop {
                background: rgba(15, 23, 42, 0.35);
            }

            body.passenger-tutorial-active.client-mode #control-panel:not(.panel-collapsed):not(.panel-hidden) {
                max-height: min(46dvh, 50%) !important;
            }

            body.passenger-tutorial-active.driver-mode:not(.panel-minimized):not(.panel-collapsed) #control-panel {
                max-height: min(54dvh, 58%) !important;
                height: auto !important;
                top: auto !important;
                bottom: 0 !important;
            }

            body.passenger-tutorial-active #panel-content {
                -webkit-overflow-scrolling: touch;
            }
        }

        /* â€”â€” Promociones pasajero (compactas + arrastrables) â€”â€” */
        /* fixed por defecto: en WebView Android absolute dentro del mapa a menudo no se ve */
        .passenger-promo-strip {
            position: fixed;
            left: 0.55rem;
            right: auto;
            top: calc(4.6rem + var(--safe-top, env(safe-area-inset-top, 0px)));
            bottom: auto;
            z-index: 70;
            max-width: min(16.5rem, calc(100vw - 1.1rem));
            display: flex;
            align-items: stretch;
            gap: 0.2rem;
            pointer-events: auto;
            /* Solo el grip bloquea gestos; la X y tarjetas deben recibir tap */
            touch-action: manipulation;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }

        /* display:flex del strip gana a Tailwind .hidden si no se fuerza */
        .passenger-promo-strip.hidden {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        /* Con panel abierto (pasajero) y promos: nunca quedar bajo el panel */
        body.client-mode:not(.panel-minimized):not(.trip-active):not(.is-searching):not(.driver-mode)
        .passenger-promo-strip:not(.hidden) {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 70 !important;
        }

        .passenger-promo-strip.is-drag-positioned {
            position: fixed !important;
            right: auto;
            bottom: auto;
            max-width: min(16.5rem, calc(100vw - 0.75rem));
            z-index: 70;
        }

        .passenger-promo-strip.is-dragging {
            opacity: 0.96;
            z-index: 60;
            filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.22));
        }

        .passenger-promo-drag-handle {
            flex: 0 0 auto;
            width: 1.55rem;
            min-width: 1.55rem;
            min-height: 2.75rem;
            align-self: stretch;
            border: 1px solid rgba(251, 191, 36, 0.4);
            border-radius: 0.55rem;
            background: rgba(255, 251, 235, 0.95);
            color: #b45309;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.7rem;
            cursor: grab;
            touch-action: none;
            -webkit-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
            -webkit-tap-highlight-color: transparent;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
            padding: 0;
            line-height: 1;
        }

        .passenger-promo-strip.is-dragging .passenger-promo-drag-handle {
            cursor: grabbing;
        }

        .passenger-promo-close {
            flex: 0 0 auto;
            width: 1.55rem;
            min-width: 1.55rem;
            min-height: 2.75rem;
            align-self: stretch;
            border: 1px solid rgba(148, 163, 184, 0.45);
            border-radius: 0.55rem;
            background: rgba(255, 255, 255, 0.95);
            color: #64748b;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
            padding: 0;
            line-height: 1;
        }

        .passenger-promo-close:active {
            background: #fee2e2;
            color: #b91c1c;
        }

        @media (max-width: 768px) {
            .passenger-promo-drag-handle,
            .passenger-promo-close {
                width: 1.75rem;
                min-width: 1.75rem;
                min-height: 3rem;
                font-size: 0.78rem;
            }

            .passenger-promo-strip {
                max-width: min(17rem, calc(100vw - 0.9rem));
            }
        }

        body.trip-active .passenger-promo-strip:not(.driver-copa-promo-strip),
        body.is-searching .passenger-promo-strip:not(.driver-copa-promo-strip),
        body.driver-mode .passenger-promo-strip:not(.driver-copa-promo-strip) {
            display: none !important;
        }

        /*
         * Copa conductor = mismo UI que promos de pasajero
         * (passenger-promo-strip: grip + track + âœ•, arrastrable).
         * Visible solo en driver-mode; promos de pasajero se ocultan en driver-mode.
         */
        .driver-copa-promo-strip,
        #driver-copa-map-strip.driver-copa-promo-strip {
            position: fixed !important;
            left: 0.55rem;
            right: auto;
            top: calc(4.6rem + var(--safe-top, env(safe-area-inset-top, 0px)));
            bottom: auto;
            z-index: 120 !important; /* encima del panel (100) */
            max-width: min(16.5rem, calc(100vw - 1.1rem));
            display: flex !important;
            align-items: stretch;
            gap: 0.2rem;
            pointer-events: auto !important;
            touch-action: manipulation;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }

        .driver-copa-promo-strip.hidden,
        #driver-copa-map-strip.driver-copa-promo-strip.hidden {
            display: none !important;
            visibility: hidden !important;
            pointer-events: none !important;
        }

        body.driver-mode .driver-copa-promo-strip:not(.hidden) {
            display: flex !important;
            visibility: visible !important;
            opacity: 1 !important;
            z-index: 120 !important;
        }

        body.client-mode .driver-copa-promo-strip {
            display: none !important;
        }

        .driver-copa-promo-strip.is-drag-positioned {
            position: fixed !important;
            right: auto !important;
            bottom: auto !important;
            max-width: min(16.5rem, calc(100vw - 0.75rem));
            z-index: 120 !important;
        }

        .driver-copa-promo-strip.is-dragging {
            opacity: 0.96;
            z-index: 130 !important;
            filter: drop-shadow(0 10px 18px rgba(15, 23, 42, 0.22));
        }

        /* Track con chips de copa */
        .driver-copa-promo-strip .passenger-promo-track {
            display: flex;
            flex-direction: column;
            gap: 0.28rem;
            flex: 1 1 auto;
            min-width: 0;
            max-width: min(13rem, calc(100vw - 4.5rem));
            overflow: visible;
        }

        .driver-copa-promo-strip .copa-chip {
            max-width: 100%;
            width: 100%;
        }

        /* âœ• igual que passenger-promo-close, bien visible */
        .driver-copa-promo-strip .passenger-promo-close {
            display: flex !important;
            flex: 0 0 1.55rem !important;
            width: 1.55rem !important;
            min-width: 1.55rem !important;
            min-height: 2.75rem !important;
            pointer-events: auto !important;
            cursor: pointer !important;
            z-index: 2;
        }

        @media (max-width: 768px) {
            .driver-copa-promo-strip .passenger-promo-drag-handle,
            .driver-copa-promo-strip .passenger-promo-close {
                width: 1.75rem !important;
                min-width: 1.75rem !important;
                min-height: 3rem !important;
                font-size: 0.78rem;
            }
        }

        /* Nunca copa dentro del panel central */
        #control-panel #driver-copa-strip,
        #driver-view #driver-copa-strip,
        #control-panel .copa-strip-bar,
        #driver-view .copa-strip-bar {
            display: none !important;
            visibility: hidden !important;
            height: 0 !important;
            overflow: hidden !important;
            pointer-events: none !important;
        }

        /* basura de builds viejos */
        .driver-copa-badge {
            display: none !important;
        }

        .passenger-promo-track {
            display: flex;
            gap: 0.35rem;
            overflow-x: auto;
            padding: 0.05rem 0.05rem 0.15rem;
            scroll-snap-type: x mandatory;
            -webkit-overflow-scrolling: touch;
            pointer-events: auto;
            touch-action: pan-x;
            max-width: 100%;
            min-width: 0;
            flex: 1 1 auto;
        }

        .passenger-promo-track::-webkit-scrollbar {
            display: none;
        }

        .passenger-promo-card {
            flex: 0 0 auto;
            min-width: 6.6rem;
            max-width: 7.6rem;
            scroll-snap-align: start;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            gap: 0.05rem;
            padding: 0.32rem 0.42rem 0.36rem;
            border-radius: 0.65rem;
            border: 1px solid rgba(251, 191, 36, 0.4);
            background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 55%, #fff 100%);
            box-shadow: 0 4px 12px rgba(15, 23, 42, 0.1);
            text-align: left;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease;
        }

        .passenger-promo-card:active {
            transform: scale(0.98);
        }

        .passenger-promo-card-badge {
            font-size: 0.48rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            color: #b45309;
            background: rgba(251, 191, 36, 0.22);
            padding: 0.06rem 0.28rem;
            border-radius: 999px;
            line-height: 1.2;
        }

        .passenger-promo-card-amount {
            font-size: 0.78rem;
            font-weight: 900;
            color: #92400e;
            line-height: 1.05;
        }

        .passenger-promo-card-title {
            font-size: 0.58rem;
            font-weight: 800;
            color: #78350f;
            line-height: 1.2;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .passenger-promo-card-meta {
            font-size: 0.5rem;
            font-weight: 600;
            color: #a16207;
            line-height: 1.2;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .passenger-promo-card-cta {
            margin-top: 0.02rem;
            font-size: 0.52rem;
            font-weight: 900;
            color: #d97706;
            text-transform: uppercase;
            letter-spacing: 0.03em;
        }

        .passenger-promo-chip {
            display: inline-flex;
            align-items: center;
            padding: 0.35rem 0.65rem;
            border-radius: 999px;
            font-size: 0.62rem;
            font-weight: 900;
            color: #92400e;
            background: #fef3c7;
            border: 1px solid #fcd34d;
            white-space: nowrap;
        }

        .favorite-chip-promo {
            border-color: #fcd34d !important;
            background: #fffbeb !important;
            color: #b45309 !important;
        }

        .fare-promo-note {
            font-size: 0.72rem;
            font-weight: 700;
            color: #b45309;
            text-align: center;
            margin-top: 0.35rem;
            line-height: 1.35;
        }

        .promo-claim-modal {
            position: fixed;
            inset: 0;
            z-index: 45000;
            display: flex;
            align-items: flex-end;
            justify-content: center;
        }

        .promo-claim-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(15, 23, 42, 0.55);
        }

        .promo-claim-sheet {
            position: relative;
            width: 100%;
            max-width: 28rem;
            background: #fff;
            border-radius: 1.35rem 1.35rem 0 0;
            padding: 0.85rem 1.15rem calc(1.15rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.18);
        }

        .promo-claim-handle {
            width: 2.5rem;
            height: 0.28rem;
            border-radius: 999px;
            background: #e2e8f0;
            margin: 0 auto 0.75rem;
        }

        .promo-claim-title {
            font-size: 1.05rem;
            font-weight: 900;
            color: #0f172a;
            text-align: center;
            margin-bottom: 0.35rem;
        }

        .promo-claim-title i {
            color: #d97706;
            margin-right: 0.35rem;
        }

        .promo-claim-sub,
        .promo-claim-hint {
            font-size: 0.78rem;
            color: #64748b;
            text-align: center;
            line-height: 1.4;
            margin-bottom: 0.75rem;
        }

        .promo-claim-hint {
            font-size: 0.68rem;
            margin-top: 0.45rem;
            margin-bottom: 0.65rem;
        }

        .promo-claim-input {
            width: 100%;
            border: 2px solid #e2e8f0;
            border-radius: 0.85rem;
            padding: 0.75rem 0.9rem;
            font-size: 1rem;
            font-weight: 800;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            text-align: center;
        }

        .promo-claim-input:focus {
            outline: none;
            border-color: #f59e0b;
            box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
        }

        .promo-claim-btn {
            width: 100%;
            padding: 0.85rem;
            border: none;
            border-radius: 0.9rem;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff;
            font-size: 0.85rem;
            font-weight: 900;
            letter-spacing: 0.03em;
        }

        .promo-claim-btn:disabled {
            opacity: 0.65;
        }

        .promo-claim-cancel {
            width: 100%;
            margin-top: 0.55rem;
            padding: 0.65rem;
            border: none;
            background: transparent;
            color: #94a3b8;
            font-size: 0.78rem;
            font-weight: 700;
        }

        html[data-theme="dark"] .passenger-promo-card {
            background: linear-gradient(135deg, #422006 0%, #78350f 100%);
            border-color: rgba(251, 191, 36, 0.35);
        }

        html[data-theme="dark"] .passenger-promo-drag-handle {
            background: rgba(66, 32, 6, 0.95);
            border-color: rgba(251, 191, 36, 0.35);
            color: #fcd34d;
        }

        html[data-theme="dark"] .passenger-promo-close {
            background: rgba(30, 41, 59, 0.95);
            border-color: rgba(100, 116, 139, 0.5);
            color: #94a3b8;
        }

        html[data-theme="dark"] .passenger-promo-card-title,
        html[data-theme="dark"] .passenger-promo-card-amount {
            color: #fde68a;
        }

        html[data-theme="dark"] .passenger-promo-card-meta,
        html[data-theme="dark"] .passenger-promo-card-cta {
            color: #fcd34d;
        }

        html[data-theme="dark"] .promo-claim-sheet {
            background: #1e293b;
        }

        /* â€”â€” Admin APK upload â€”â€” */
        .admin-apk-step-hint {
            margin: 0 0 0.75rem;
            padding: 0.55rem 0.75rem;
            border-radius: 0.75rem;
            background: rgba(37, 99, 235, 0.15);
            border: 1px solid rgba(96, 165, 250, 0.35);
            color: #bfdbfe;
            font-size: 0.75rem;
            font-weight: 700;
            line-height: 1.35;
        }

        .admin-apk-status {
            padding: 0.85rem 0.9rem;
            border-radius: 0.9rem;
            border: 1px solid rgba(148, 163, 184, 0.25);
            background: rgba(15, 23, 42, 0.45);
        }

        .admin-apk-status--live {
            border-color: rgba(52, 211, 153, 0.45);
            background: rgba(6, 78, 59, 0.25);
        }

        .admin-apk-status-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            margin: 0;
            font-size: 0.82rem;
            font-weight: 900;
            color: #94a3b8;
        }

        .admin-apk-status-badge--ok {
            color: #6ee7b7;
        }

        .admin-apk-drop {
            border: 2px dashed rgba(52, 211, 153, 0.45);
            border-radius: 1.15rem;
            background: rgba(15, 23, 42, 0.55);
            padding: 1.35rem 1rem;
            text-align: center;
            cursor: pointer;
            transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
            outline: none;
        }

        .admin-apk-drop:hover,
        .admin-apk-drop:focus-visible {
            border-color: rgba(52, 211, 153, 0.85);
            background: rgba(16, 185, 129, 0.08);
        }

        .admin-apk-drop.is-dragover {
            border-color: #34d399;
            background: rgba(16, 185, 129, 0.14);
            transform: scale(1.01);
        }

        .admin-apk-drop.is-ready {
            border-color: #fbbf24;
            background: rgba(251, 191, 36, 0.08);
        }

        .admin-apk-drop.is-uploading {
            border-color: #60a5fa;
            background: rgba(37, 99, 235, 0.12);
            pointer-events: none;
            opacity: 0.95;
        }

        .admin-apk-progress-wrap {
            padding: 0.85rem 0.9rem;
            border-radius: 0.9rem;
            background: rgba(15, 23, 42, 0.65);
            border: 1px solid rgba(96, 165, 250, 0.4);
        }

        .admin-apk-progress-bar {
            height: 0.85rem;
            border-radius: 999px;
            background: rgba(148, 163, 184, 0.25);
            overflow: hidden;
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.25);
        }

        .admin-apk-progress-fill {
            height: 100%;
            width: 0%;
            border-radius: 999px;
            background: linear-gradient(90deg, #3b82f6, #34d399, #fbbf24);
            background-size: 200% 100%;
            animation: admin-apk-progress-shine 1.2s linear infinite;
            transition: width 0.12s ease;
        }

        @keyframes admin-apk-progress-shine {
            0% { background-position: 100% 0; }
            100% { background-position: -100% 0; }
        }

        /* â€”â€” Badge dorado "Descarga nuestra app" (compacto) â€”â€” */
        .app-download-badge {
            position: absolute;
            right: 0.45rem;
            top: calc(4.5rem + var(--safe-top, env(safe-area-inset-top, 0px)));
            z-index: 39;
            display: flex;
            align-items: stretch;
            gap: 0.12rem;
            max-width: min(11.5rem, calc(100vw - 1.2rem));
            filter: drop-shadow(0 4px 10px rgba(180, 83, 9, 0.3));
            touch-action: none;
            transform: scale(0.92);
            transform-origin: top right;
        }

        .app-download-badge.is-drag-positioned {
            position: fixed;
            right: auto;
            top: auto;
        }

        .app-download-badge.is-dragging {
            opacity: 0.95;
            z-index: 70;
        }

        .app-download-badge.hidden {
            display: none !important;
        }

        .app-download-badge-drag,
        .app-download-badge-close {
            flex: 0 0 auto;
            width: 1.15rem;
            min-height: 2.05rem;
            border: 1px solid rgba(251, 191, 36, 0.55);
            border-radius: 0.5rem;
            background: rgba(120, 53, 15, 0.92);
            color: #fde68a;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.52rem;
            cursor: grab;
            touch-action: none;
            -webkit-user-select: none;
            user-select: none;
            -webkit-tap-highlight-color: transparent;
            padding: 0;
        }

        .app-download-badge-close {
            cursor: pointer;
            font-size: 0.48rem;
            opacity: 0.9;
        }

        .app-download-badge.is-dragging .app-download-badge-drag {
            cursor: grabbing;
        }

        .app-download-badge-main {
            position: relative;
            flex: 1 1 auto;
            min-width: 0;
            display: flex;
            align-items: center;
            gap: 0.28rem;
            padding: 0.22rem 0.38rem 0.22rem 0.28rem;
            border-radius: 0.65rem;
            border: 1px solid rgba(253, 224, 71, 0.75);
            background: linear-gradient(125deg, #78350f 0%, #b45309 28%, #f59e0b 55%, #fde68a 72%, #d97706 100%);
            background-size: 220% 220%;
            animation: app-dl-gold-shift 3.2s ease-in-out infinite;
            color: #1c1917;
            box-shadow:
                0 0 0 1px rgba(255, 255, 255, 0.18) inset,
                0 4px 10px rgba(180, 83, 9, 0.35);
            overflow: hidden;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .app-download-badge-main:active {
            transform: scale(0.98);
        }

        .app-download-badge-glow {
            position: absolute;
            inset: -40% -20%;
            background: linear-gradient(
                105deg,
                transparent 35%,
                rgba(255, 255, 255, 0.55) 48%,
                transparent 62%
            );
            animation: app-dl-shine 2.4s linear infinite;
            pointer-events: none;
        }

        .app-download-badge-icon {
            position: relative;
            z-index: 1;
            width: 1.15rem;
            height: 1.15rem;
            border-radius: 0.35rem;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(28, 25, 23, 0.2);
            color: #14532d;
            font-size: 0.7rem;
            animation: app-dl-spin-soft 4.5s linear infinite;
            flex-shrink: 0;
        }

        .app-download-badge-text {
            position: relative;
            z-index: 1;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            min-width: 0;
            text-align: left;
        }

        .app-download-badge-kicker {
            font-size: 0.42rem;
            font-weight: 900;
            letter-spacing: 0.06em;
            text-transform: uppercase;
            color: rgba(28, 25, 23, 0.72);
            line-height: 1.05;
        }

        .app-download-badge-title {
            font-size: 0.62rem;
            font-weight: 900;
            letter-spacing: -0.01em;
            color: #1c1917;
            line-height: 1.1;
            white-space: nowrap;
            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
        }

        .app-download-badge-chevron {
            position: relative;
            z-index: 1;
            margin-left: auto;
            color: #1c1917;
            font-size: 0.58rem;
            opacity: 0.85;
            animation: app-dl-bob 1.4s ease-in-out infinite;
            flex-shrink: 0;
        }

        @keyframes app-dl-gold-shift {
            0%, 100% { background-position: 0% 50%; }
            50% { background-position: 100% 50%; }
        }

        @keyframes app-dl-shine {
            0% { transform: translateX(-45%) rotate(12deg); }
            100% { transform: translateX(45%) rotate(12deg); }
        }

        @keyframes app-dl-spin-soft {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        @keyframes app-dl-bob {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(2px); }
        }

        .app-download-badge.is-update .app-download-badge-main {
            background: linear-gradient(125deg, #7c2d12 0%, #ea580c 30%, #fbbf24 58%, #fef3c7 78%, #c2410c 100%);
            background-size: 220% 220%;
        }

        /* Ocultar promo de descarga en web; el badge de UPDATE nativo usa .is-update */
        body.trip-active .app-download-badge:not(.is-update):not(.driver-copa-badge),
        body.is-searching .app-download-badge:not(.is-update):not(.driver-copa-badge),
        body.driver-mode .app-download-badge:not(.is-update),
        body.map-pick-mode .app-download-badge {
            display: none !important;
        }

        /* Update SIEMPRE visible (conductor/pasajero), encima de todo el UI */
        body .app-download-badge.is-update:not(.hidden) {
            display: flex !important;
            z-index: 99950 !important;
            pointer-events: auto !important;
        }

        body:not(.map-pick-mode) .app-download-badge.is-update:not(.hidden) {
            display: flex !important;
        }

        /* Barra fija inferior de actualización (no depende del badge) */
        .apk-update-force-bar {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 99980;
            padding: 0.55rem 0.75rem calc(0.55rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
            background: linear-gradient(180deg, rgba(120, 53, 15, 0.97), rgba(180, 83, 9, 0.98));
            border-top: 2px solid #fbbf24;
            box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.28);
            pointer-events: auto;
        }
        .apk-update-force-bar.hidden { display: none !important; }
        .apk-update-force-bar-inner {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            max-width: 32rem;
            margin: 0 auto;
        }
        .apk-update-force-bar-text {
            flex: 1 1 auto;
            min-width: 0;
            color: #fffbeb;
            font-size: 0.78rem;
            line-height: 1.25;
        }
        .apk-update-force-bar-text strong {
            display: block;
            font-size: 0.85rem;
            font-weight: 900;
            color: #fff;
        }
        .apk-update-force-bar-text span {
            opacity: 0.92;
            font-size: 0.72rem;
        }
        .apk-update-force-bar-btn {
            flex: 0 0 auto;
            border: 0;
            border-radius: 999px;
            background: #fbbf24;
            color: #78350f;
            font-weight: 900;
            font-size: 0.78rem;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            padding: 0.65rem 1rem;
            min-height: 2.6rem;
            cursor: pointer;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        }
        .apk-update-force-bar-btn:active { transform: scale(0.97); }
        body.apk-update-bar-visible #control-panel {
            padding-bottom: calc(4.2rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px))) !important;
        }

        @media (max-width: 768px) {
            .app-download-badge {
                max-width: min(11.25rem, calc(100vw - 1rem));
                transform: scale(0.9);
            }

            .app-download-badge-drag,
            .app-download-badge-close {
                width: 1.2rem;
                min-height: 2.1rem;
            }

            .app-download-badge-title {
                font-size: 0.6rem;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .app-download-badge-main,
            .app-download-badge-glow,
            .app-download-badge-icon,
            .app-download-badge-chevron {
                animation: none !important;
            }
        }

        /* â€”â€” Tutorial instalaciÃ³n APK â€”â€” */
        .apk-tutorial-overlay,
        .apk-update-overlay {
            position: fixed;
            inset: 0;
            z-index: 36000;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            padding: 0;
            background: rgba(15, 23, 42, 0.72);
            backdrop-filter: blur(7px);
            -webkit-backdrop-filter: blur(7px);
            animation: cityModalFadeIn 0.2s ease-out;
        }

        @media (min-width: 640px) {
            .apk-tutorial-overlay,
            .apk-update-overlay {
                align-items: center;
                padding: 1.25rem;
            }
        }

        .apk-tutorial-sheet {
            width: 100%;
            max-width: 26rem;
            max-height: min(92vh, 40rem);
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            padding: 1.15rem 1.1rem 1.25rem;
            border-radius: 1.35rem 1.35rem 0 0;
            background: #fffbeb;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.28);
            position: relative;
            animation: cityModalSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @media (min-width: 640px) {
            .apk-tutorial-sheet {
                border-radius: 1.35rem;
                box-shadow: 0 24px 48px rgba(15, 23, 42, 0.28);
            }
        }

        .apk-tutorial-x {
            position: absolute;
            top: 0.65rem;
            right: 0.65rem;
            width: 2rem;
            height: 2rem;
            border: none;
            border-radius: 0.6rem;
            background: rgba(120, 53, 15, 0.1);
            color: #92400e;
            cursor: pointer;
        }

        .apk-tutorial-hero {
            text-align: center;
            padding: 0.25rem 1.5rem 0.75rem;
        }

        .apk-tutorial-hero-icon {
            width: 3.1rem;
            height: 3.1rem;
            margin: 0 auto 0.55rem;
            border-radius: 1rem;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.55rem;
            color: #14532d;
            background: linear-gradient(135deg, #fde68a, #f59e0b);
            box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
            animation: app-dl-spin-soft 8s linear infinite;
        }

        .apk-tutorial-hero h2 {
            margin: 0;
            font-size: 1.15rem;
            font-weight: 900;
            color: #78350f;
            letter-spacing: -0.02em;
        }

        .apk-tutorial-sub {
            margin: 0.3rem 0 0;
            font-size: 0.72rem;
            font-weight: 600;
            color: #a16207;
        }

        .apk-tutorial-trust {
            margin: 0.35rem 0 0.85rem;
            padding: 0.75rem 0.85rem;
            border-radius: 1rem;
            background: #fff;
            border: 1px solid rgba(251, 191, 36, 0.45);
        }

        .apk-tutorial-trust-title {
            margin: 0 0 0.4rem;
            font-size: 0.78rem;
            font-weight: 900;
            color: #92400e;
        }

        .apk-tutorial-trust ul {
            margin: 0;
            padding-left: 1rem;
            font-size: 0.7rem;
            font-weight: 600;
            color: #57534e;
            line-height: 1.45;
        }

        .apk-tutorial-trust li {
            margin-bottom: 0.35rem;
        }

        .apk-tutorial-steps {
            list-style: none;
            margin: 0;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
        }

        .apk-tutorial-steps li {
            display: flex;
            gap: 0.55rem;
            align-items: flex-start;
            padding: 0.55rem 0.6rem;
            border-radius: 0.85rem;
            background: #fff;
            border: 1px solid rgba(253, 230, 138, 0.8);
        }

        .apk-tutorial-num {
            flex: 0 0 auto;
            width: 1.45rem;
            height: 1.45rem;
            border-radius: 999px;
            background: linear-gradient(135deg, #f59e0b, #d97706);
            color: #fff;
            font-size: 0.72rem;
            font-weight: 900;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .apk-tutorial-steps strong {
            display: block;
            font-size: 0.74rem;
            color: #78350f;
            margin-bottom: 0.12rem;
        }

        .apk-tutorial-steps p {
            margin: 0;
            font-size: 0.66rem;
            font-weight: 600;
            color: #78716c;
            line-height: 1.4;
        }

        .apk-tutorial-actions {
            display: flex;
            flex-direction: column;
            gap: 0.45rem;
            margin-top: 0.95rem;
        }

        .apk-tutorial-btn {
            min-height: 3rem;
            border: none;
            border-radius: 1rem;
            font-size: 0.82rem;
            font-weight: 900;
            cursor: pointer;
            touch-action: manipulation;
        }

        .apk-tutorial-btn--primary {
            background: linear-gradient(135deg, #f59e0b, #d97706 55%, #b45309);
            color: #1c1917;
            box-shadow: 0 8px 22px rgba(217, 119, 6, 0.35);
        }

        .apk-tutorial-btn--ghost {
            background: transparent;
            color: #92400e;
        }

        .apk-tutorial-foot {
            margin: 0.65rem 0 0;
            text-align: center;
            font-size: 0.58rem;
            font-weight: 700;
            color: #a8a29e;
        }

        /* â€”â€” Modal update APK nativo â€”â€” */
        .apk-update-sheet {
            width: 100%;
            max-width: 22.5rem;
            padding: 1.45rem 1.25rem 1.15rem;
            border-radius: 1.35rem 1.35rem 0 0;
            background: #fff;
            text-align: center;
            box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.28);
            animation: cityModalSlideUp 0.28s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @media (min-width: 640px) {
            .apk-update-sheet {
                border-radius: 1.35rem;
            }
        }

        .apk-update-icon {
            width: 3.25rem;
            height: 3.25rem;
            margin: 0 auto 0.7rem;
            border-radius: 1rem;
            background: linear-gradient(135deg, #f59e0b, #ea580c);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.3rem;
            box-shadow: 0 10px 24px rgba(234, 88, 12, 0.35);
        }

        .apk-update-sheet h2 {
            margin: 0 0 0.4rem;
            font-size: 1.1rem;
            font-weight: 900;
            color: #0f172a;
        }

        .apk-update-text {
            margin: 0 0 0.45rem;
            font-size: 0.8rem;
            font-weight: 600;
            color: #475569;
            line-height: 1.45;
        }

        .apk-update-notes {
            margin: 0 0 0.55rem;
            padding: 0.45rem 0.6rem;
            border-radius: 0.75rem;
            background: #fffbeb;
            border: 1px solid #fde68a;
            font-size: 0.72rem;
            font-weight: 700;
            color: #92400e;
        }

        .apk-update-hint {
            margin: 0 0 0.95rem;
            font-size: 0.68rem;
            font-weight: 600;
            color: #64748b;
            line-height: 1.4;
        }

        .apk-update-btn {
            width: 100%;
            min-height: 3rem;
            border: none;
            border-radius: 1rem;
            font-size: 0.82rem;
            font-weight: 900;
            cursor: pointer;
            margin-bottom: 0.4rem;
            touch-action: manipulation;
        }

        .apk-update-btn--gold {
            background: linear-gradient(135deg, #fbbf24, #f59e0b 50%, #d97706);
            color: #1c1917;
            box-shadow: 0 8px 20px rgba(217, 119, 6, 0.32);
        }

        .apk-update-btn--ghost {
            background: #f1f5f9;
            color: #334155;
        }

        .apk-update-later {
            display: block;
            width: 100%;
            border: none;
            background: transparent;
            color: #94a3b8;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 0.45rem;
            cursor: pointer;
        }

        html[data-theme="dark"] .apk-tutorial-sheet {
            background: #1c1917;
        }

        html[data-theme="dark"] .apk-tutorial-hero h2 {
            color: #fde68a;
        }

        html[data-theme="dark"] .apk-tutorial-trust,
        html[data-theme="dark"] .apk-tutorial-steps li {
            background: #292524;
            border-color: rgba(251, 191, 36, 0.25);
        }

        html[data-theme="dark"] .apk-tutorial-steps strong {
            color: #fde68a;
        }

        html[data-theme="dark"] .apk-tutorial-steps p,
        html[data-theme="dark"] .apk-tutorial-trust ul {
            color: #a8a29e;
        }

        html[data-theme="dark"] .apk-update-sheet {
            background: #1e293b;
        }

        html[data-theme="dark"] .apk-update-sheet h2 {
            color: #f8fafc;
        }

        html[data-theme="dark"] .apk-update-text {
            color: #cbd5e1;
        }

        html[data-theme="dark"] .apk-update-btn--ghost {
            background: #334155;
            color: #e2e8f0;
        }

        html[data-theme="dark"] .promo-claim-title {
            color: #f8fafc;
        }

        html[data-theme="dark"] .promo-claim-sub,
        html[data-theme="dark"] .promo-claim-hint {
            color: #94a3b8;
        }

        html[data-theme="dark"] .promo-claim-input {
            background: #0f172a;
            border-color: #334155;
            color: #f8fafc;
        }

        /* â”€â”€â”€ HonduBot (asistente IA de soporte) â”€â”€â”€ */
        #hondubot-root {
            position: fixed;
            inset: 0;
            z-index: 42000;
            pointer-events: none;
        }
        #hondubot-root .hondubot-fab,
        #hondubot-root .hondubot-panel {
            pointer-events: auto;
        }
        #hondubot-root .hondubot-panel,
        #hondubot-root .hondubot-panel * {
            pointer-events: auto;
        }
        .hondubot-chip {
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            user-select: none;
        }
        .hondubot-fab {
            position: fixed;
            right: max(1rem, var(--safe-right));
            bottom: max(5.5rem, calc(var(--safe-bottom) + 4.75rem));
            width: 3.35rem;
            height: 3.35rem;
            border-radius: 1.1rem;
            border: none;
            background: linear-gradient(145deg, #2563eb 0%, #0c4a8e 100%);
            color: #fff;
            box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.2rem;
            cursor: pointer;
            transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
            z-index: 42001;
        }
        .hondubot-fab:active {
            transform: scale(0.94);
        }
        .hondubot-fab--open {
            opacity: 0;
            pointer-events: none;
            transform: scale(0.6);
        }
        .hondubot-fab-dot {
            position: absolute;
            top: 0.35rem;
            right: 0.35rem;
            width: 0.55rem;
            height: 0.55rem;
            border-radius: 999px;
            background: #34d399;
            border: 2px solid #1d4ed8;
        }
        .hondubot-panel {
            position: fixed;
            right: max(0.75rem, var(--safe-right));
            bottom: max(0.75rem, calc(var(--safe-bottom) + 0.5rem));
            width: min(24rem, calc(100vw - 1.5rem));
            height: min(34rem, calc(100dvh - 5.5rem));
            max-height: calc(100dvh - var(--safe-top) - var(--safe-bottom) - 4rem);
            background: #ffffff;
            border-radius: 1.35rem;
            box-shadow: 0 20px 50px rgba(15, 23, 42, 0.28);
            border: 1px solid #e2e8f0;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            z-index: 42002;
        }
        .hondubot-panel.hidden {
            display: none !important;
        }
        .hondubot-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.5rem;
            padding: 0.85rem 0.9rem;
            background: linear-gradient(135deg, #1d4ed8, #0c4a8e);
            color: #fff;
        }
        .hondubot-head-left {
            display: flex;
            align-items: center;
            gap: 0.65rem;
            min-width: 0;
        }
        .hondubot-avatar {
            width: 2.35rem;
            height: 2.35rem;
            border-radius: 0.85rem;
            background: rgba(255, 255, 255, 0.18);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        .hondubot-title {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 900;
            letter-spacing: 0.01em;
        }
        .hondubot-sub {
            margin: 0;
            font-size: 0.68rem;
            opacity: 0.85;
            font-weight: 600;
        }
        .hondubot-head-actions {
            display: flex;
            gap: 0.25rem;
            flex-shrink: 0;
        }
        .hondubot-icon-btn {
            width: 2rem;
            height: 2rem;
            border: none;
            border-radius: 0.65rem;
            background: rgba(255, 255, 255, 0.14);
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .hondubot-icon-btn:active {
            background: rgba(255, 255, 255, 0.28);
        }
        .hondubot-messages {
            flex: 1;
            overflow-y: auto;
            padding: 0.85rem;
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            background: #f8fafc;
            -webkit-overflow-scrolling: touch;
        }
        .hondubot-row {
            display: flex;
        }
        .hondubot-row--user {
            justify-content: flex-end;
        }
        .hondubot-row--bot {
            justify-content: flex-start;
        }
        .hondubot-bubble {
            max-width: 88%;
            padding: 0.65rem 0.8rem;
            border-radius: 1rem;
            font-size: 0.86rem;
            line-height: 1.45;
            word-break: break-word;
        }
        .hondubot-bubble--user {
            background: #2563eb;
            color: #fff;
            border-bottom-right-radius: 0.35rem;
            font-weight: 600;
        }
        .hondubot-bubble--bot {
            background: #fff;
            color: #0f172a;
            border: 1px solid #e2e8f0;
            border-bottom-left-radius: 0.35rem;
        }
        .hondubot-typing {
            display: inline-flex;
            gap: 0.28rem;
            align-items: center;
            min-height: 1.2rem;
        }
        .hondubot-typing span {
            width: 0.4rem;
            height: 0.4rem;
            border-radius: 999px;
            background: #94a3b8;
            animation: hondubot-bounce 1.1s infinite ease-in-out;
        }
        .hondubot-typing span:nth-child(2) { animation-delay: 0.15s; }
        .hondubot-typing span:nth-child(3) { animation-delay: 0.3s; }
        @keyframes hondubot-bounce {
            0%, 80%, 100% { transform: translateY(0); opacity: 0.45; }
            40% { transform: translateY(-4px); opacity: 1; }
        }
        .hondubot-chips {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
            padding: 0.45rem 0.75rem 0.15rem;
            background: #f8fafc;
            border-top: 1px solid #eef2f7;
        }
        .hondubot-chip {
            border: 1px solid #bfdbfe;
            background: #eff6ff;
            color: #1d4ed8;
            font-size: 0.72rem;
            font-weight: 700;
            padding: 0.45rem 0.75rem;
            border-radius: 999px;
            cursor: pointer;
            min-height: 2rem;
        }
        .hondubot-chip:active:not(:disabled) {
            background: #dbeafe;
            transform: scale(0.97);
        }
        .hondubot-chip:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
        .hondubot-form {
            display: flex;
            gap: 0.45rem;
            padding: 0.65rem 0.75rem 0.85rem;
            background: #fff;
            border-top: 1px solid #e2e8f0;
        }
        .hondubot-form input {
            flex: 1;
            min-width: 0;
            border: 1px solid #e2e8f0;
            border-radius: 0.9rem;
            padding: 0.7rem 0.85rem;
            font-size: 0.9rem;
            outline: none;
            background: #f8fafc;
        }
        .hondubot-form input:focus {
            border-color: #93c5fd;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
            background: #fff;
        }
        .hondubot-send {
            width: 2.75rem;
            height: 2.75rem;
            flex-shrink: 0;
            border: none;
            border-radius: 0.9rem;
            background: #2563eb;
            color: #fff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 14px rgba(37, 99, 235, 0.3);
        }
        .hondubot-send:disabled {
            opacity: 0.55;
            cursor: not-allowed;
        }
        /* Ocultar FAB durante viaje activo para no chocar con chat del viaje */
        body.trip-active .hondubot-fab:not(.hondubot-fab--open) {
            bottom: max(8.5rem, calc(var(--safe-bottom) + 7.5rem));
        }
        html[data-theme="dark"] .hondubot-panel {
            background: #0f172a;
            border-color: #1e293b;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
        }
        html[data-theme="dark"] .hondubot-messages {
            background: #020617;
        }
        html[data-theme="dark"] .hondubot-bubble--bot {
            background: #1e293b;
            color: #e2e8f0;
            border-color: #334155;
        }
        html[data-theme="dark"] .hondubot-chips {
            background: #020617;
            border-top-color: #1e293b;
        }
        html[data-theme="dark"] .hondubot-chip {
            background: #172554;
            border-color: #1e3a8a;
            color: #93c5fd;
        }
        html[data-theme="dark"] .hondubot-form {
            background: #0f172a;
            border-top-color: #1e293b;
        }
        html[data-theme="dark"] .hondubot-form input {
            background: #1e293b;
            border-color: #334155;
            color: #f8fafc;
        }

        /* —— Conductor: tarjeta HORIZONTAL baja estilo Uber (sin scroll) —— */
        .driver-trip-offer-popup {
            position: fixed;
            inset: 0;
            z-index: 35000;
            display: flex;
            align-items: flex-end;
            justify-content: center;
            pointer-events: none !important;
            padding:
                0
                max(0.65rem, var(--safe-left, env(safe-area-inset-left, 0px)))
                max(0.65rem, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 0.4rem))
                max(0.65rem, var(--safe-right, env(safe-area-inset-right, 0px)));
            overscroll-behavior: none;
            touch-action: none;
            background: transparent !important;
        }

        .driver-trip-offer-popup:not(.hidden) {
            pointer-events: none !important;
            display: flex !important;
        }

        .driver-trip-offer-popup.hidden {
            display: none !important;
        }

        .driver-trip-offer-popup-backdrop {
            display: none !important;
        }

        /* Rectángulo VERTICAL — ancho celular real (~16.5–17.5rem)
           max-height acotado: el mapa queda libre arriba y la ruta no queda tapada */
        .driver-trip-offer-popup-sheet {
            position: relative;
            z-index: 1;
            width: min(17rem, calc(100vw - 1.5rem));
            max-width: 17rem;
            max-height: min(52vh, 26rem) !important;
            height: auto !important;
            display: flex;
            flex-direction: column;
            margin: 0 auto;
            padding: 0.65rem 0.75rem 0.7rem;
            background: #ffffff;
            border-radius: 1.2rem;
            border: 1px solid rgba(226, 232, 240, 0.95);
            box-shadow:
                0 12px 36px rgba(15, 23, 42, 0.22),
                0 2px 8px rgba(15, 23, 42, 0.08);
            animation: driver-offer-popup-slide 0.26s cubic-bezier(0.22, 1, 0.36, 1);
            overflow: hidden;
            pointer-events: auto !important;
            transform: translateZ(0);
            -webkit-transform: translateZ(0);
        }

        /* Celulares angostos (360–390 px) */
        @media (max-width: 400px) {
            .driver-trip-offer-popup {
                padding-left: max(0.55rem, var(--safe-left, env(safe-area-inset-left, 0px)));
                padding-right: max(0.55rem, var(--safe-right, env(safe-area-inset-right, 0px)));
                padding-bottom: max(0.55rem, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 0.35rem));
            }
            .driver-trip-offer-popup-sheet {
                width: min(16.5rem, calc(100vw - 1.1rem));
                max-width: 16.5rem;
                padding: 0.55rem 0.65rem 0.6rem;
            }
            .uber-vert-name { font-size: 0.95rem; }
            .uber-vert-price { font-size: 1.35rem; }
            .uber-vert-btn { min-height: 2.6rem; font-size: 0.84rem; }
        }

        .driver-trip-offer-popup-handle {
            display: none !important;
        }

        /* Quitar bloque "Nueva solicitud" / timer grande / subtítulo */
        .driver-trip-offer-popup-top {
            display: none !important;
        }

        .driver-trip-offer-popup-headline {
            flex: 1 1 auto;
            min-width: 0;
        }

        .driver-trip-offer-popup-timer-wrap {
            position: relative;
            width: 2.2rem;
            height: 2.2rem;
            flex-shrink: 0;
        }

        .driver-trip-offer-popup-timer-svg {
            width: 100%;
            height: 100%;
            transform: rotate(-90deg);
        }

        .driver-trip-offer-popup-timer-track {
            fill: none;
            stroke: #e2e8f0;
            stroke-width: 4;
        }

        .driver-trip-offer-popup-timer-arc {
            fill: none;
            stroke: #059669;
            stroke-width: 4;
            stroke-linecap: round;
            stroke-dasharray: 150.8;
            stroke-dashoffset: 0;
            transition: stroke-dashoffset 0.35s linear, stroke 0.2s ease;
        }

        .driver-trip-offer-popup-timer-arc.is-urgent {
            stroke: #ea580c;
        }

        .driver-trip-offer-popup-timer-arc.is-critical {
            stroke: #e11d48;
        }

        .driver-trip-offer-popup-timer-sec {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.65rem;
            font-weight: 900;
            color: #0f172a;
            letter-spacing: -0.02em;
        }

        .driver-trip-offer-popup-title {
            margin: 0;
            font-size: 0.72rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.15;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .driver-trip-offer-popup-sub {
            margin: 0.05rem 0 0;
            font-size: 0.58rem;
            font-weight: 700;
            color: #64748b;
            line-height: 1.2;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            display: block;
            -webkit-line-clamp: unset;
        }

        .driver-trip-offer-popup-close {
            flex-shrink: 0;
            width: 2.15rem;
            height: 2.15rem;
            min-width: 2.15rem;
            min-height: 2.15rem;
            border-radius: 999px;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #475569;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
            -webkit-tap-highlight-color: transparent;
        }

        .driver-trip-offer-popup-body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-x: hidden;
            overflow-y: auto; /* si la ruta es larga, scrollea el panel, no tapa el mapa */
            -webkit-overflow-scrolling: touch;
            padding: 0;
        }

        .driver-trip-offer-popup-queue {
            display: none !important;
        }

        /* —— Tarjeta vertical (rectángulo de pie, solo esto en celular) —— */
        .driver-offer-card--uber-vert {
            margin: 0 !important;
            padding: 0 !important;
            border: none !important;
            box-shadow: none !important;
            background: transparent !important;
            display: flex;
            flex-direction: column;
            gap: 0.42rem;
        }
        .uber-vert-toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.4rem;
        }
        .uber-vert-toolbar-right {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            flex-shrink: 0;
        }
        .uber-vert-map {
            width: 2rem;
            height: 2rem;
            border: 1px solid #bbf7d0;
            background: #ecfdf5;
            color: #047857;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.78rem;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .uber-vert-timer {
            display: inline-flex;
            align-items: center;
            gap: 0.28rem;
            font-size: 0.68rem;
            font-weight: 900;
            color: #047857;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
            border-radius: 999px;
            padding: 0.18rem 0.5rem;
            line-height: 1.2;
        }
        .uber-vert-timer.is-urgent {
            color: #c2410c;
            background: #fff7ed;
            border-color: #fed7aa;
        }
        .uber-vert-timer.is-critical {
            color: #be123c;
            background: #fff1f2;
            border-color: #fecdd3;
        }
        .uber-vert-x {
            width: 2rem;
            height: 2rem;
            border: 1px solid #e2e8f0;
            background: #f8fafc;
            color: #64748b;
            border-radius: 999px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .uber-vert-head {
            display: flex;
            flex-direction: column;
            gap: 0.28rem;
            min-width: 0;
        }
        .uber-vert-name {
            margin: 0;
            font-size: 1rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.15;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .uber-vert-chips {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
            gap: 0.3rem;
        }
        .uber-vert-stars {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            color: #b45309;
            background: #fffbeb;
            border: 1px solid #fde68a;
            font-weight: 900;
            font-size: 0.72rem;
            border-radius: 999px;
            padding: 0.12rem 0.45rem;
            line-height: 1.2;
        }
        .uber-vert-stars i { color: #f59e0b; font-size: 0.65rem; }
        .uber-vert-pax {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.68rem;
            font-weight: 900;
            color: #92400e;
            background: #fef3c7;
            border: 1px solid #fcd34d;
            border-radius: 999px;
            padding: 0.12rem 0.45rem;
            line-height: 1.2;
        }
        .uber-vert-pax i { font-size: 0.62rem; }
        .uber-vert-dist {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.68rem;
            font-weight: 800;
            color: #1d4ed8;
            background: #eff6ff;
            border: 1px solid #bfdbfe;
            border-radius: 999px;
            padding: 0.12rem 0.45rem;
            line-height: 1.2;
        }
        .uber-vert-unverif {
            display: inline-flex;
            align-items: center;
            gap: 0.2rem;
            font-size: 0.58rem;
            font-weight: 900;
            text-transform: uppercase;
            letter-spacing: 0.02em;
            color: #b91c1c;
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 999px;
            padding: 0.12rem 0.45rem;
            line-height: 1.2;
        }
        .uber-vert-route {
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            padding: 0.4rem 0.5rem;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 0.75rem;
        }
        .driver-offer-card--uber-vert .driver-offer-route-full {
            margin: 0;
        }
        .uber-vert-ab {
            font-size: 0.72rem;
            font-weight: 700;
            color: #334155;
            line-height: 1.25;
            white-space: normal;
            word-break: break-word;
            overflow: visible;
        }
        .uber-vert-ab b {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1rem;
            height: 1rem;
            border-radius: 999px;
            font-size: 0.58rem;
            color: #fff;
            margin-right: 0.28rem;
            background: #059669;
        }
        .uber-vert-ab:last-child b { background: #2563eb; }
        .uber-vert-price-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 0.4rem;
        }
        .uber-vert-price {
            font-size: 1.45rem;
            font-weight: 900;
            color: #047857;
            line-height: 1;
            letter-spacing: -0.02em;
        }
        .uber-vert-price-row .trip-pay-badge {
            font-size: 0.58rem !important;
            padding: 0.12rem 0.4rem !important;
        }
        /* Aceptar siempre visible aunque la ruta/direcciones hagan scroll */
        .uber-vert-actions {
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            position: sticky;
            bottom: 0;
            z-index: 4;
            flex-shrink: 0;
            margin-top: 0.1rem;
            padding-top: 0.45rem;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #ffffff 32%);
        }
        html[data-theme="dark"] .uber-vert-actions {
            background: linear-gradient(180deg, rgba(15, 23, 42, 0) 0%, #0f172a 32%);
        }
        .uber-vert-btn {
            border: 0;
            border-radius: 0.8rem;
            font-weight: 900;
            font-size: 0.88rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            min-height: 2.75rem;
            padding: 0.5rem 0.7rem;
            width: 100%;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
        }
        .uber-vert-btn--go {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            color: #fff;
            box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
        }
        .uber-vert-btn--skip {
            background: #f1f5f9;
            color: #475569;
            border: 1px solid #e2e8f0;
            min-height: 2.35rem;
            font-size: 0.8rem;
        }
        html[data-theme="dark"] .uber-vert-name { color: #f8fafc; }
        html[data-theme="dark"] .uber-vert-map {
            background: #064e3b;
            border-color: #059669;
            color: #6ee7b7;
        }
        html[data-theme="dark"] .uber-vert-route {
            background: #0f172a;
            border-color: #1e293b;
        }
        html[data-theme="dark"] .uber-vert-ab { color: #cbd5e1; }
        html[data-theme="dark"] .uber-vert-price { color: #6ee7b7; }
        html[data-theme="dark"] .uber-vert-btn--skip {
            background: #1e293b;
            color: #cbd5e1;
            border-color: #334155;
        }
        html[data-theme="dark"] .uber-vert-stars {
            background: rgba(245, 158, 11, 0.12);
            border-color: rgba(245, 158, 11, 0.35);
            color: #fbbf24;
        }
        html[data-theme="dark"] .uber-vert-pax {
            background: rgba(245, 158, 11, 0.14);
            border-color: rgba(252, 211, 77, 0.4);
            color: #fcd34d;
        }
        html[data-theme="dark"] .uber-vert-dist {
            background: rgba(37, 99, 235, 0.15);
            border-color: rgba(59, 130, 246, 0.35);
            color: #93c5fd;
        }

        body.driver-offer-popup-open {
            /* Mapa casi a pantalla completa; hoja solo abajo */
            overflow: hidden;
            position: relative;
            touch-action: manipulation;
        }

        body.driver-offer-popup-open #control-panel,
        body.driver-offer-popup-open #driver-incoming-offer,
        body.driver-offer-popup-open #app-header,
        body.driver-offer-popup-open #driver-radar-float,
        body.driver-offer-popup-open .driver-city-bar {
            opacity: 0 !important;
            pointer-events: none !important;
            visibility: hidden !important;
        }

        body.driver-offer-popup-open #map-container,
        body.driver-offer-popup-open #map {
            opacity: 1 !important;
            pointer-events: auto !important;
            visibility: visible !important;
            height: 100% !important;
            max-height: 100% !important;
            z-index: 1 !important;
        }

        body.driver-offer-popup-open .driver-trip-offer-popup {
            touch-action: none;
            z-index: 35000 !important;
        }

        body.driver-offer-popup-open .driver-trip-offer-popup-body {
            touch-action: pan-y;
        }

        body.driver-offer-popup-open .driver-trip-offer-popup-sheet {
            /* No anular el tope: la ruta del mapa debe quedar visible arriba */
            max-height: min(52vh, 26rem) !important;
            /* Sheet siempre tocable para Aceptar, aunque se use el mapa arriba */
            pointer-events: auto !important;
        }

        /* Asegurar que el recuadro de oferta no se “pierda” bajo capas del mapa */
        body.driver-offer-popup-open .driver-trip-offer-popup:not(.hidden) {
            visibility: visible !important;
            opacity: 1 !important;
        }

        body.driver-offer-popup-open .driver-trip-offer-popup-top {
            margin-bottom: 0.25rem !important;
            gap: 0.35rem !important;
        }

        body.driver-rating-active .driver-trip-offer-popup:not(.hidden) {
            z-index: 14000;
        }

        @keyframes driver-offer-popup-fade {
            from { opacity: 0; }
            to { opacity: 1; }
        }

        @keyframes driver-offer-popup-slide {
            from { transform: translate3d(0, 110%, 0); }
            to { transform: translate3d(0, 0, 0); }
        }

        @media (prefers-reduced-motion: reduce) {
            .driver-trip-offer-popup-backdrop,
            .driver-trip-offer-popup-sheet {
                animation: none !important;
            }
        }

        @media (max-width: 380px) {
            .driver-trip-offer-popup-sheet {
                width: min(17.25rem, calc(100vw - 1.2rem));
                max-width: 17.25rem;
            }
            .uber-vert-btn {
                min-height: 2.55rem;
                font-size: 0.82rem;
            }
            .uber-vert-price {
                font-size: 1.3rem;
            }
        }

        @media (max-height: 560px) {
            .driver-trip-offer-popup-sheet {
                padding: 0.4rem 0.55rem 0.5rem;
            }
            .uber-vert-btn {
                min-height: 2.4rem;
            }
        }

        body.capacitor-native .driver-trip-offer-popup-sheet,
        body.capacitor-android .driver-trip-offer-popup-sheet {
            padding-bottom: max(0.55rem, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) * 0.35 + 0.45rem));
        }

        html[data-theme="dark"] .driver-trip-offer-popup-sheet {
            background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
            box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.55);
        }

        html[data-theme="dark"] .driver-trip-offer-popup-handle {
            background: #334155;
        }

        html[data-theme="dark"] .driver-trip-offer-popup-title {
            color: #f8fafc;
        }

        html[data-theme="dark"] .driver-trip-offer-popup-sub,
        html[data-theme="dark"] .driver-trip-offer-popup-queue {
            color: #94a3b8;
        }

        html[data-theme="dark"] .driver-trip-offer-popup-timer-sec {
            color: #f1f5f9;
        }

        html[data-theme="dark"] .driver-trip-offer-popup-timer-track {
            stroke: #334155;
        }

        html[data-theme="dark"] .driver-trip-offer-popup-close {
            background: #1e293b;
            border-color: #334155;
            color: #cbd5e1;
        }

        html[data-theme="dark"] .driver-trip-offer-popup-body .driver-offer-card {
            background: #0f172a;
            border-color: #059669;
        }

        @media (min-width: 768px) {
            .driver-trip-offer-popup {
                align-items: flex-end;
                justify-content: center;
                padding-bottom: 1.25rem;
            }

            .driver-trip-offer-popup-sheet {
                border-radius: 1.15rem;
                width: 18.5rem;
                max-width: 18.5rem;
                max-height: none !important;
            }
        }

/* ========== Copa HonduRaite â€” retos globales ========== */
#driver-copa-active,
#passenger-copa-active {
    position: fixed;
    inset: 0;
    z-index: 27980;
    pointer-events: none;
}

/* Ocultar basura de versiones anteriores */
.driver-copa-dismiss-fab,
#driver-copa-strip {
    display: none !important;
}

.copa-float {
    position: fixed;
    pointer-events: auto;
    max-width: min(300px, calc(100vw - 1.3rem));
    padding: 0.75rem 0.85rem;
    border-radius: 1.1rem;
    background: linear-gradient(145deg, #fffbeb 0%, #fef3c7 55%, #fde68a 100%);
    border: 2px solid #f59e0b;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.28);
    cursor: grab;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.copa-float--min {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.copa-float.is-dragging {
    z-index: 29000 !important;
    transition: none !important;
    cursor: grabbing;
    touch-action: none !important;
}

.copa-float-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.copa-float-kicker {
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #b45309;
}

.copa-float-title {
    font-size: 0.88rem;
    font-weight: 900;
    color: #78350f;
    line-height: 1.25;
}

.copa-float-time {
    font-size: 0.68rem;
    font-weight: 800;
    color: #92400e;
    margin: 0.2rem 0 0.45rem;
}

.copa-float-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    flex-shrink: 0;
}

.copa-min-btn,
.copa-close-btn {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 999px;
    border: 1px solid #fbbf24;
    background: #fffbeb;
    color: #b45309;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.copa-close-btn {
    width: 1.85rem;
    height: 1.85rem;
    border: 1.5px solid rgba(185, 28, 28, 0.45);
    background: #fff;
    color: #b91c1c;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.2);
    font-size: 0.8rem;
    font-weight: 900;
    z-index: 2;
    position: relative;
}

.copa-close-btn--lg {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
}



.copa-close-btn:active,
.copa-min-btn:active {
    transform: scale(0.94);
}

.copa-min-row {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.copa-min-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.65rem 0.34rem 0.4rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 83, 9, 0.5);
    background: linear-gradient(145deg, #fffbeb 0%, #fde68a 40%, #fbbf24 100%);
    color: #78350f;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    box-shadow:
        0 4px 16px rgba(180, 83, 9, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.45) inset;
    animation: copa-chip-breathe 2.8s ease-in-out infinite;
    max-width: min(220px, 70vw);
}

.copa-min-pill-stat {
    opacity: 0.85;
    font-weight: 900;
    white-space: nowrap;
}

.copa-float--min .copa-close-btn {
    width: 1.4rem;
    height: 1.4rem;
    font-size: 0.6rem;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.2);
}

.copa-progress {
    margin: 0.35rem 0 0.5rem;
}

.copa-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.62rem;
    font-weight: 800;
    color: #92400e;
    margin-bottom: 0.25rem;
}

.copa-progress-track {
    height: 0.45rem;
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.35);
    overflow: hidden;
}

.copa-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #f59e0b, #ea580c);
    transition: width 0.35s ease;
}

.copa-tier-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.45rem;
}

.copa-tier-pill {
    font-size: 0.55rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0.2rem 0.4rem;
    border-radius: 999px;
    border: 1px solid transparent;
}

.copa-tier-pill--locked {
    background: #f3f4f6;
    color: #9ca3af;
}

.copa-tier-pill--ready {
    background: #dcfce7;
    color: #047857;
    border-color: #6ee7b7;
}

.copa-tier-pill--claimed {
    background: #fef3c7;
    color: #b45309;
    border-color: #fbbf24;
}

.copa-tier-pill--paid {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.copa-claim-btn {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.55rem 0.5rem;
    border: none;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 900;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.copa-open-btn {
    width: 100%;
    margin-top: 0.4rem;
    padding: 0.45rem;
    border: none;
    border-radius: 0.7rem;
    background: rgba(255, 255, 255, 0.7);
    color: #92400e;
    font-size: 0.68rem;
    font-weight: 800;
}

.copa-status {
    font-size: 0.68rem;
    font-weight: 800;
    margin-top: 0.35rem;
}

.copa-status--wait { color: #b45309; }
.copa-status--paid { color: #047857; }
.copa-status--warn { color: #c2410c; }

/* Chip Copa â€” barrita con âœ• como promos de pasajeros */
#driver-copa-strip,
#passenger-copa-strip {
    display: block;
    margin-top: 0.2rem !important;
    margin-bottom: 0.3rem !important;
    max-width: 100%;
}

/* Panel central abierto (pasajero): ocultar banners de copa para no tapar el booking */
body.client-mode:not(.panel-minimized):not(.panel-hidden) #passenger-copa-active,
body.client-mode:not(.panel-minimized):not(.panel-hidden) #passenger-copa-strip {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.copa-strip-bar {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    padding: 0.2rem 0.25rem 0.2rem 0.15rem;
    border-radius: 999px;
    background: rgba(255, 251, 235, 0.72);
    border: 1px solid rgba(251, 191, 36, 0.45);
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.copa-strip-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.copa-strip-track::-webkit-scrollbar {
    display: none;
}

.copa-strip-track .copa-chip {
    flex: 0 0 auto;
    max-width: min(240px, 72vw);
}

/* âœ• estilo passenger-promo-close */
.copa-strip-close {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    border: 1px solid rgba(185, 28, 28, 0.35);
    background: #fef2f2;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.18);
}

.copa-strip-close:active {
    transform: scale(0.94);
    background: #fee2e2;
}

.copa-chip-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    max-width: 100%;
}

.copa-chip-close {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 1px solid #fca5a5;
    background: #fef2f2;
    color: #b91c1c;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.58rem;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(185, 28, 28, 0.15);
}

.copa-chip-close:active {
    transform: scale(0.94);
}

.copa-chip {
    --copa-gold: #fbbf24;
    --copa-gold-deep: #b45309;
    --copa-live: #22c55e;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.34rem 0.6rem 0.34rem 0.34rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 83, 9, 0.48);
    background:
        linear-gradient(145deg, #fffbeb 0%, #fde68a 32%, #fbbf24 68%, #f59e0b 100%);
    color: #78350f;
    text-align: left;
    box-shadow:
        0 6px 18px rgba(180, 83, 9, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset,
        0 1px 0 rgba(255, 255, 255, 0.55) inset;
    overflow: hidden;
    isolation: isolate;
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.18s ease;
    animation: copa-chip-breathe 2.8s ease-in-out infinite;
}

/* anillo dorado sutil */
.copa-chip::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        120deg,
        rgba(253, 230, 138, 0.95),
        rgba(245, 158, 11, 0.75),
        rgba(180, 83, 9, 0.65),
        rgba(253, 230, 138, 0.95)
    );
    background-size: 220% 220%;
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: copa-chip-border 3.6s linear infinite;
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
}

/* destello dorado */
.copa-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: -40%;
    width: 40%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.55),
        transparent
    );
    transform: skewX(-18deg);
    animation: copa-chip-sweep 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

.copa-chip:active {
    transform: scale(0.97);
}

.copa-chip--map {
    max-width: min(16.5rem, calc(100vw - 2rem));
    box-shadow:
        0 8px 22px rgba(180, 83, 9, 0.32),
        0 0 0 1px rgba(255, 255, 255, 0.45) inset,
        0 0 18px rgba(251, 191, 36, 0.35);
}

.copa-chip-pulse {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #22c55e !important;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    flex-shrink: 0;
    z-index: 2;
    animation: copa-chip-dot 1.5s ease-out infinite;
}

.copa-chip-ico {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 1;
    color: #fde68a;
    background: linear-gradient(160deg, #78350f 0%, #92400e 45%, #b45309 100%);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 2px 8px rgba(120, 53, 15, 0.35),
        0 0 0 1px rgba(255, 255, 255, 0.15) inset;
    flex-shrink: 0;
}

.copa-chip-body {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.1;
    white-space: nowrap;
    color: #78350f;
}

.copa-chip-label {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.52rem;
    font-weight: 900;
    color: #92400e;
}

.copa-chip-rank {
    padding: 0.1rem 0.32rem;
    border-radius: 999px;
    background: linear-gradient(145deg, #b45309 0%, #92400e 100%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fffbeb;
    font-size: 0.55rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(120, 53, 15, 0.3);
}

/* Letras LIVE en rojo (solo el texto, sin pastilla cafÃ©) */
.copa-chip-rank.copa-chip-rank--live,
.copa-chip-body .copa-chip-rank--live {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: #ef4444 !important;
    padding: 0 0.05rem;
    text-shadow: 0 0 6px rgba(239, 68, 68, 0.35);
    font-weight: 900;
    letter-spacing: 0.1em;
}

.copa-chip-sep {
    color: #b45309;
    font-weight: 700;
    opacity: 0.7;
}

.copa-chip-meta {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #92400e;
    font-weight: 750;
    font-size: 0.56rem;
}

.copa-chip-chevron {
    position: relative;
    z-index: 2;
    font-size: 0.5rem;
    color: #b45309;
    flex-shrink: 0;
}

@keyframes copa-chip-breathe {
    0%, 100% {
        box-shadow:
            0 6px 18px rgba(180, 83, 9, 0.26),
            0 0 0 1px rgba(255, 255, 255, 0.45) inset,
            0 0 12px rgba(251, 191, 36, 0.2);
    }
    50% {
        box-shadow:
            0 8px 24px rgba(180, 83, 9, 0.34),
            0 0 0 1px rgba(255, 255, 255, 0.55) inset,
            0 0 22px rgba(251, 191, 36, 0.4),
            0 0 30px rgba(245, 158, 11, 0.18);
    }
}

@keyframes copa-chip-border {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

@keyframes copa-chip-sweep {
    0%, 40% { left: -45%; opacity: 0; }
    50% { opacity: 1; }
    70%, 100% { left: 110%; opacity: 0; }
}

@keyframes copa-chip-dot {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    }
    70% {
        transform: scale(1.08);
        box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* legacy aliases â†’ mismo look dorado */
.copa-strip-btn,
.copa-public-strip-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    max-width: 100%;
    padding: 0.3rem 0.55rem 0.3rem 0.32rem;
    border-radius: 999px;
    border: 1px solid rgba(180, 83, 9, 0.48);
    background: linear-gradient(145deg, #fffbeb 0%, #fde68a 40%, #fbbf24 100%);
    color: #78350f;
    box-shadow: 0 6px 18px rgba(180, 83, 9, 0.28);
}

.copa-strip-emoji { font-size: 0.72rem; }
.copa-strip-text {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
}
.copa-strip-title,
.copa-strip-meta {
    font-size: 0.56rem;
    font-weight: 700;
    color: #78350f;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 9rem;
}
.copa-strip-meta { color: #92400e; font-weight: 650; }
.copa-strip-chevron { color: #b45309; font-size: 0.5rem; }

/* Modal conductor */
.copa-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 42000;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0.75rem;
    padding-bottom: max(0.75rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}

.copa-modal-overlay.hidden { display: none !important; }

.copa-modal {
    width: 100%;
    max-width: 28rem;
    max-height: min(88dvh, 720px);
    background: #fff;
    border-radius: 1.35rem 1.35rem 1rem 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.copa-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #ea580c 70%, #c2410c);
    color: #fff;
}

.copa-modal-kicker {
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.9;
}

.copa-modal-title {
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.25;
    margin-top: 0.15rem;
}

.copa-modal-close {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 999px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    flex-shrink: 0;
}

.copa-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.1rem 1.25rem;
    -webkit-overflow-scrolling: touch;
}

.copa-modal-desc {
    font-size: 0.82rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}

.copa-modal-meta {
    font-size: 0.72rem;
    font-weight: 800;
    color: #b45309;
    margin-bottom: 0.85rem;
}

.copa-modal-loading {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    font-weight: 700;
}

.copa-section {
    margin-bottom: 1.1rem;
}

.copa-section-title {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 0.55rem;
}

.copa-tier-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    margin-top: 0.55rem;
}

.copa-tier-card {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.45rem;
    background: #f8fafc;
}

.copa-tier-card--ok {
    border-color: #6ee7b7;
    background: #ecfdf5;
}

.copa-tier-card-label {
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #64748b;
}

.copa-tier-card-target {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
}

.copa-tier-card-reward {
    font-size: 0.58rem;
    font-weight: 700;
    color: #475569;
    line-height: 1.25;
    margin-top: 0.15rem;
    min-height: 1.8em;
}

.copa-tier-card-st {
    font-size: 0.58rem;
    font-weight: 900;
    color: #059669;
    margin-top: 0.25rem;
}

.copa-quality-note {
    font-size: 0.68rem;
    font-weight: 700;
    color: #b45309;
    margin-top: 0.5rem;
}

.copa-city-list,
.copa-lb-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.copa-city-row,
.copa-lb-row {
    display: grid;
    grid-template-columns: 2rem 1fr auto;
    gap: 0.35rem;
    align-items: center;
    padding: 0.45rem 0.5rem;
    border-radius: 0.65rem;
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 700;
    color: #334155;
}

.copa-lb-row {
    grid-template-columns: 2rem 1fr 4.5rem 2rem;
}

.copa-city-row--me,
.copa-lb-row--me {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.copa-rank {
    font-weight: 900;
    color: #d97706;
}

.copa-lb-city {
    font-size: 0.62rem;
    color: #94a3b8;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.copa-lb-pts {
    font-weight: 900;
    color: #0f172a;
    text-align: right;
}

.copa-empty {
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 700;
    padding: 0.5rem 0;
}

/* Staff form */
.copa-preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .copa-preset-grid { grid-template-columns: 1fr; }
}

.copa-preset-btn {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    padding: 0.7rem 0.75rem;
    border-radius: 0.85rem;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    text-align: left;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.copa-preset-btn:hover {
    border-color: #fbbf24;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.12);
}

.copa-preset-emoji { font-size: 1.1rem; }
.copa-preset-title {
    font-size: 0.78rem;
    font-weight: 900;
    color: #0f172a;
}
.copa-preset-sub {
    font-size: 0.62rem;
    font-weight: 700;
    color: #64748b;
}

.copa-tier-form-row {
    display: grid;
    grid-template-columns: 4.5rem 5rem 1fr;
    gap: 0.4rem;
    align-items: center;
    margin-bottom: 0.4rem;
}

.copa-tier-form-label {
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #64748b;
}

.copa-check-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
    margin: 0.55rem 0 0.25rem;
}

.copa-quality-row {
    margin-top: 0.35rem;
    max-width: 10rem;
}

/* ========== Copa: rentabilidad + ranking pï¿½blico ========== */
.copa-econ-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.copa-tier-form-row--4 {
    grid-template-columns: 4rem 4.5rem 4.5rem 1fr !important;
}

.copa-profit {
    margin: 0.75rem 0;
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
}

.copa-profit--ok {
    border-color: #6ee7b7;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.copa-profit--bad {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fef2f2, #fff1f2);
}

.copa-profit-title {
    font-size: 0.82rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.copa-profit--ok .copa-profit-title { color: #047857; }
.copa-profit--bad .copa-profit-title { color: #b91c1c; }

.copa-profit-sub {
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.copa-profit-table-wrap {
    overflow-x: auto;
    margin: 0.4rem 0;
}

.copa-profit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.62rem;
    font-weight: 700;
}

.copa-profit-table th,
.copa-profit-table td {
    padding: 0.3rem 0.35rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.copa-profit-table th {
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.55rem;
    letter-spacing: 0.04em;
}

.copa-profit-row--bad td {
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.45);
}

.copa-profit-fleet {
    font-size: 0.68rem;
    font-weight: 700;
    color: #334155;
    margin-top: 0.4rem;
}

.copa-profit-blockers {
    margin: 0.45rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #b91c1c;
}

.copa-profit-blockers li { margin-bottom: 0.25rem; }

.copa-profit-ok-msg {
    font-size: 0.68rem;
    font-weight: 800;
    color: #047857;
    margin-top: 0.4rem;
}

#public-copa-strip,
#public-pcopa-strip {
    position: absolute;
    left: 0.55rem;
    right: auto;
    top: max(4.35rem, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 3.55rem));
    z-index: 36;
    pointer-events: none;
    width: auto;
    max-width: calc(100vw - 1.2rem);
    display: none;
}

#public-pcopa-strip {
    top: max(6.1rem, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 5.3rem));
}

#public-copa-strip:not(.hidden),
#public-pcopa-strip:not(.hidden) {
    display: flex !important;
    align-items: center;
    gap: 0.25rem;
    pointer-events: auto;
}

/* Chip + âœ• en vista pasajero (ranking pÃºblico Copa conductores) */
#public-copa-strip .public-copa-strip-inner,
#public-pcopa-strip .public-copa-strip-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    max-width: 100%;
    pointer-events: auto;
}

#public-copa-strip .public-copa-close,
#public-pcopa-strip .public-copa-close,
#public-copa-strip .copa-chip-close,
#public-pcopa-strip .copa-chip-close {
    flex: 0 0 auto !important;
    width: 1.55rem !important;
    min-width: 1.55rem !important;
    height: 1.55rem !important;
    min-height: 1.55rem !important;
    align-self: center;
    border-radius: 999px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    cursor: pointer !important;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

#public-copa-strip .copa-chip--map,
#public-pcopa-strip .copa-chip--map {
    max-width: min(14.5rem, calc(100vw - 3.5rem));
    flex: 1 1 auto;
    min-width: 0;
}

.copa-public-note {
    font-size: 0.7rem;
    font-weight: 700;
    color: #b45309;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    .copa-econ-grid { grid-template-columns: 1fr; }
    .copa-tier-form-row--4 {
        grid-template-columns: 3.5rem 1fr 1fr !important;
    }
    .copa-tier-form-row--4 .copa-tier-form-label {
        grid-column: 1;
    }
}

/* Competencia todos vs todos */
.copa-compete-tag {
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #b45309;
    margin: 0.15rem 0 0.25rem;
}
.copa-rank-big {
    font-size: 0.95rem;
    font-weight: 900;
    color: #78350f;
    margin: 0.15rem 0;
}
.copa-podium-line {
    font-size: 0.62rem;
    font-weight: 800;
    color: #92400e;
    margin: 0.25rem 0 0.35rem;
}
.copa-podium-banner {
    padding: 0.65rem 0.75rem;
    border-radius: 0.85rem;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border: 1px solid #fde68a;
    margin-bottom: 0.85rem;
}
.copa-podium-prizes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}
.copa-podium-chip {
    font-size: 0.62rem;
    font-weight: 900;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fbbf24;
    color: #92400e;
}
.copa-lb-row--podium {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

/* ===== Tiendas virtuales / marketplace emprendedores ===== */
body.stores-panel-open { overflow: hidden; }
.stores-panel {
  position: fixed; inset: 0; z-index: 42000;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
}
.stores-panel.hidden { display: none !important; }
.stores-panel-sheet {
  width: 100%; max-width: 32rem; max-height: min(94dvh, 900px);
  background: #fff; border-radius: 1.5rem 1.5rem 0 0;
  display: flex; flex-direction: column;
  box-shadow: 0 -12px 40px rgba(15,23,42,.2);
  padding-bottom: max(0.5rem, var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
}
.stores-panel-head {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 0.9rem 0.65rem;
  border-bottom: 1px solid #f1f5f9;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
}
.stores-panel-head--merchant {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
}
.stores-kicker {
  font-size: 0.62rem; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; color: #b45309; margin: 0;
}
.stores-panel-head--merchant .stores-kicker { color: #047857; }
.stores-title {
  font-size: 1rem; font-weight: 900; color: #0f172a; margin: 0;
  line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stores-icon-btn {
  width: 2.35rem; height: 2.35rem; border-radius: 0.85rem;
  border: 1px solid #e2e8f0; background: #fff; color: #334155;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stores-icon-btn--close { color: #b91c1c; }
.stores-toggle-open {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.4rem 0.7rem; border-radius: 999px;
  border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c;
  font-size: 0.65rem; font-weight: 900; text-transform: uppercase;
}
.stores-toggle-open.is-open {
  border-color: #a7f3d0; background: #ecfdf5; color: #047857;
}
.stores-panel-body {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 0.85rem 0.9rem 1.25rem;
  -webkit-overflow-scrolling: touch;
}
.stores-cart-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-top: 1px solid #fde68a;
  background: #fffbeb;
}
.stores-cart-bar.hidden { display: none !important; }
.stores-cart-count { font-size: 0.7rem; font-weight: 800; color: #92400e; margin: 0; }
.stores-cart-total { font-size: 1.05rem; font-weight: 900; color: #78350f; margin: 0; }
.stores-primary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  padding: 0.7rem 1rem; border-radius: 0.9rem; border: none;
  background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff;
  font-size: 0.75rem; font-weight: 900; text-transform: uppercase;
  box-shadow: 0 6px 16px rgba(217, 119, 6, 0.28);
}
.stores-secondary-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.55rem 0.85rem; border-radius: 0.8rem;
  border: 1px solid #e2e8f0; background: #fff; color: #334155;
  font-size: 0.72rem; font-weight: 800;
}
.stores-danger-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.5rem 0.75rem; border-radius: 0.75rem;
  border: 1px solid #fecaca; background: #fef2f2; color: #b91c1c;
  font-size: 0.7rem; font-weight: 800;
}
.stores-banner {
  padding: 0.85rem; border-radius: 1rem;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fde68a; margin-bottom: 0.85rem;
}
.stores-banner-title {
  font-size: 0.85rem; font-weight: 900; color: #92400e; margin: 0 0 0.25rem;
}
.stores-banner-sub {
  font-size: 0.72rem; color: #78350f; margin: 0; line-height: 1.35;
}
.stores-list, .orders-list, .store-products { display: flex; flex-direction: column; gap: 0.55rem; }
.store-card {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  text-align: left; padding: 0.75rem; border-radius: 1rem;
  border: 1px solid #e2e8f0; background: #fff;
  box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.store-card--closed { opacity: 0.72; }
.store-card-icon {
  width: 2.6rem; height: 2.6rem; border-radius: 0.85rem;
  background: #fff7ed; color: #d97706;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.store-card-name { font-size: 0.9rem; font-weight: 900; color: #0f172a; margin: 0; }
.store-badge-18 {
  display: inline-block;
  font-size: 0.58rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.35rem;
  border-radius: 0.35rem;
  background: #ffe4e6;
  color: #be123c;
  vertical-align: middle;
  line-height: 1.2;
}
.store-card-wrap--pending .store-card { border-color: #fcd34d; }
.store-card-meta { font-size: 0.68rem; color: #64748b; margin: 0.1rem 0 0; font-weight: 700; }
.store-card-addr { font-size: 0.65rem; color: #94a3b8; margin: 0.15rem 0 0; }
.store-card-status {
  font-size: 0.58rem; font-weight: 900; text-transform: uppercase;
  padding: 0.25rem 0.45rem; border-radius: 999px;
  background: #f1f5f9; color: #64748b; flex-shrink: 0;
}
.store-card-status.is-open { background: #ecfdf5; color: #047857; }
.stores-empty {
  text-align: center; padding: 2rem 1rem; color: #64748b;
}
.stores-empty i { font-size: 1.6rem; color: #cbd5e1; margin-bottom: 0.5rem; display: block; }
.stores-empty--sm { padding: 1rem; }
.stores-section-label {
  font-size: 0.65rem; font-weight: 900; letter-spacing: .08em;
  text-transform: uppercase; color: #94a3b8; margin: 0 0 0.4rem;
}
.store-detail-head {
  display: flex; gap: 0.75rem; padding: 0.75rem;
  border-radius: 1rem; background: #fff7ed; border: 1px solid #fde68a;
  margin-bottom: 0.85rem;
}
.store-detail-avatar {
  width: 3rem; height: 3rem; border-radius: 1rem;
  background: #fff; color: #d97706;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.store-detail-name { font-size: 1rem; font-weight: 900; margin: 0; color: #0f172a; }
.store-detail-meta { font-size: 0.72rem; color: #64748b; margin: 0.15rem 0 0; font-weight: 700; }
.store-detail-addr, .store-detail-desc {
  font-size: 0.72rem; color: #475569; margin: 0.25rem 0 0; line-height: 1.3;
}
.product-card {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.7rem; border-radius: 0.9rem; border: 1px solid #e2e8f0; background: #fff;
}
.product-card--off { opacity: 0.55; }
.product-card-name { font-size: 0.85rem; font-weight: 900; color: #0f172a; margin: 0; }
.product-card-desc { font-size: 0.68rem; color: #64748b; margin: 0.15rem 0 0; }
.product-card-price { font-size: 0.85rem; font-weight: 900; color: #b45309; margin: 0.2rem 0 0; }
.product-qty {
  display: inline-flex; align-items: center; gap: 0.35rem; flex-shrink: 0;
  font-weight: 900; font-size: 0.85rem; color: #0f172a;
}
.product-qty-btn {
  width: 1.85rem; height: 1.85rem; border-radius: 0.55rem;
  border: 1px solid #fcd34d; background: #fffbeb; color: #b45309; font-weight: 900;
}
.stores-add-btn {
  padding: 0.45rem 0.7rem; border-radius: 0.65rem; border: none;
  background: #f59e0b; color: #fff; font-size: 0.68rem; font-weight: 900;
}
.cart-line {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.65rem 0; border-bottom: 1px solid #f1f5f9;
}
.cart-line-total { font-size: 0.8rem; font-weight: 900; color: #0f172a; min-width: 4.2rem; text-align: right; }
.cart-summary {
  margin-top: 0.75rem; padding: 0.75rem; border-radius: 0.9rem;
  background: #f8fafc; border: 1px solid #e2e8f0;
}
.stores-field { display: block; }
.stores-field > span {
  display: block; font-size: 0.65rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin-bottom: 0.3rem;
}
.stores-input {
  width: 100%; padding: 0.7rem 0.8rem; border-radius: 0.8rem;
  border: 1px solid #e2e8f0; background: #fff; font-size: 0.85rem;
  outline: none;
}
.stores-input:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.checkout-store-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.4rem 0.7rem; border-radius: 999px;
  background: #ecfdf5; color: #047857; font-size: 0.75rem; font-weight: 800;
}
.order-card {
  padding: 0.8rem; border-radius: 1rem; border: 1px solid #e2e8f0; background: #fff;
}
.order-card-top { display: flex; justify-content: space-between; gap: 0.5rem; align-items: flex-start; }
.order-card-title { font-size: 0.88rem; font-weight: 900; margin: 0; color: #0f172a; }
.order-card-sub { font-size: 0.7rem; color: #64748b; margin: 0.2rem 0 0; line-height: 1.3; }
.order-card-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 0.85rem;
  margin-top: 0.5rem; font-size: 0.72rem; font-weight: 800; color: #475569;
}
.order-notes { font-size: 0.7rem; color: #64748b; margin: 0.4rem 0 0; font-style: italic; }
.order-status {
  font-size: 0.58rem; font-weight: 900; text-transform: uppercase;
  padding: 0.25rem 0.45rem; border-radius: 999px; flex-shrink: 0;
}
.order-status--amber { background: #fef3c7; color: #b45309; }
.order-status--blue { background: #dbeafe; color: #1d4ed8; }
.order-status--violet { background: #ede9fe; color: #6d28d9; }
.order-status--emerald { background: #d1fae5; color: #047857; }
.order-status--slate { background: #f1f5f9; color: #475569; }
.order-status--red { background: #fee2e2; color: #b91c1c; }
.order-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.merchant-tabs {
  display: flex; gap: 0.35rem; padding: 0.5rem 0.9rem;
  border-bottom: 1px solid #f1f5f9; background: #fff;
}
.merchant-tab {
  flex: 1; padding: 0.55rem 0.35rem; border-radius: 0.75rem;
  border: 1px solid transparent; background: #f8fafc; color: #64748b;
  font-size: 0.7rem; font-weight: 900; text-transform: uppercase;
}
.merchant-tab.active {
  background: #ecfdf5; color: #047857; border-color: #a7f3d0;
}
.delivery-stores-entry {
  margin-bottom: 0.65rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px dashed #fcd34d;
}
.delivery-mode-tabs {
  display: flex; gap: 0.4rem; margin-bottom: 0.55rem;
}
.delivery-mode-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem;
  padding: 0.5rem 0.4rem; border-radius: 0.75rem;
  border: 1px solid #fde68a; background: #fff; color: #92400e;
  font-size: 0.68rem; font-weight: 900;
}
.delivery-mode-tab.active {
  background: #f59e0b; border-color: #d97706; color: #fff;
}
.delivery-stores-cta {
  width: 100%; display: flex; align-items: center; gap: 0.65rem;
  padding: 0.7rem 0.75rem; border-radius: 0.95rem;
  border: 1px solid #fcd34d; background: linear-gradient(135deg, #fffbeb, #fef3c7);
  text-align: left; color: #78350f;
}
.delivery-stores-cta-icon {
  width: 2.4rem; height: 2.4rem; border-radius: 0.75rem;
  background: #fff; color: #d97706;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.delivery-stores-cta-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.delivery-stores-cta-copy strong { font-size: 0.8rem; font-weight: 900; }
.delivery-stores-cta-copy small { font-size: 0.65rem; opacity: 0.85; font-weight: 600; }

/* ===== Tiendas virtuales: secciï¿½n propia + fotos de producto ===== */
.client-stores-section {
  margin-bottom: 0.65rem !important;
  border: 1px solid #fde68a !important;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 70%) !important;
}
.trip-step-badge--stores {
  background: #f59e0b !important;
  color: #fff !important;
  font-size: 0.7rem !important;
}
.client-stores-cta {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid #fcd34d;
  background: #fff;
  text-align: left;
  color: #78350f;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.12);
}
.client-stores-cta-icon {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 0.85rem;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}
.client-stores-cta-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.client-stores-cta-copy strong {
  font-size: 0.84rem;
  font-weight: 900;
  color: #92400e;
}
.client-stores-cta-copy small {
  font-size: 0.65rem;
  font-weight: 600;
  color: #a16207;
  line-height: 1.25;
}
.client-stores-cta-chevron { color: #d97706; flex-shrink: 0; }
.client-stores-actions {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.client-stores-actions .stores-secondary-btn {
  flex: 1;
  font-size: 0.65rem;
  padding: 0.5rem 0.4rem;
}
.trip-service-chip--stores {
  border-color: #fcd34d !important;
  color: #b45309 !important;
  background: #fffbeb !important;
}
.product-card-photo {
  width: 4.1rem;
  height: 4.1rem;
  border-radius: 0.85rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.product-card-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 1.1rem;
}
.product-card-photo.is-broken {
  display: none;
}
.cart-line-photo {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.65rem;
  object-fit: cover;
  flex-shrink: 0;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.cart-line-photo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 0.85rem;
}
.m-prod-photo-pick {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem;
  border-radius: 0.95rem;
  border: 1px dashed #f59e0b;
  background: #fff;
}
.m-prod-photo-preview {
  width: 100%;
  max-height: 9rem;
  min-height: 5.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #fff7ed;
}
.m-prod-photo-preview--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  color: #d97706;
  font-size: 0.72rem;
  font-weight: 800;
}
.m-prod-photo-preview--empty i { font-size: 1.4rem; opacity: 0.7; }
.m-prod-photo-hint {
  font-size: 0.68rem;
  font-weight: 800;
  color: #b45309;
}

/* ===== Menï¿½ inicial pasajero (elige viaje / pedido / envï¿½oï¿½) ===== */
.passenger-home-hub {
  padding: 0.35rem 0.15rem 0.85rem;
}
.passenger-home-hub.hidden { display: none !important; }
.passenger-home-hero {
  margin-bottom: 0.85rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1.15rem;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 55%, #fff 100%);
  border: 1px solid #dbeafe;
}
.passenger-home-kicker {
  margin: 0;
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #2563eb;
}
.passenger-home-title {
  margin: 0.2rem 0 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
}
.passenger-home-sub {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.35;
}
.passenger-home-grid {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.passenger-home-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.9rem;
  border-radius: 1.1rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  text-align: left;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.passenger-home-card:active {
  transform: scale(0.985);
}
.passenger-home-card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 1.05rem;
}
.passenger-home-card--trip .passenger-home-card-icon {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
}
.passenger-home-card--stores .passenger-home-card-icon {
  background: linear-gradient(135deg, #fbbf24, #d97706);
}
.passenger-home-card--delivery .passenger-home-card-icon {
  background: linear-gradient(135deg, #f59e0b, #b45309);
}
.passenger-home-card--freight .passenger-home-card-icon {
  background: linear-gradient(135deg, #10b981, #047857);
}
.passenger-home-card--tow .passenger-home-card-icon {
  background: linear-gradient(135deg, #f43f5e, #be123c);
}
.passenger-home-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}
.passenger-home-card-text strong {
  font-size: 0.95rem;
  font-weight: 900;
  color: #0f172a;
}
.passenger-home-card-text small {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  line-height: 1.25;
}
.passenger-home-card-chevron {
  color: #94a3b8;
  flex-shrink: 0;
}
.passenger-home-foot {
  margin: 0.85rem 0.25rem 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  text-align: center;
  line-height: 1.35;
}
.passenger-mode-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.15rem 0.65rem;
  margin-bottom: 0.15rem;
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
}
.passenger-mode-bar.hidden { display: none !important; }
.passenger-mode-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 900;
  flex-shrink: 0;
}
.passenger-mode-title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.passenger-mode-sub {
  margin: 0.1rem 0 0;
  font-size: 0.62rem;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.passenger-mode-change {
  margin-left: auto;
  flex-shrink: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 0.7rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.65rem;
  font-weight: 900;
}
body.passenger-mode-home #passenger-booking-route,
body.passenger-mode-home #passenger-booking-advanced,
body.passenger-mode-home #passenger-booking-service,
body.passenger-mode-home #booking-float-layer,
body.passenger-mode-home #client-stores-section {
  display: none !important;
}
/* En bï¿½squeda/viaje activo no mostrar hub */
body.is-searching #passenger-home-hub,
body.is-active-trip #passenger-home-hub {
  display: none !important;
}
body.is-searching #passenger-mode-bar,
body.is-active-trip #passenger-mode-bar {
  display: none !important;
}
.passenger-stores-landing {
  margin-top: 0.25rem;
}
.passenger-stores-landing.hidden { display: none !important; }

/* ===== Menï¿½ inicio: botones horizontales compactos (sin scroll) ===== */
.passenger-home-hub {
  padding: 0.2rem 0.1rem 0.45rem !important;
}
.passenger-home-hero {
  margin-bottom: 0.5rem !important;
  padding: 0.55rem 0.75rem !important;
  border-radius: 0.95rem !important;
}
.passenger-home-title {
  font-size: 1.05rem !important;
  margin: 0.1rem 0 0 !important;
}
.passenger-home-sub { display: none !important; }
.passenger-home-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0.45rem !important;
  flex-direction: unset !important;
}
/* ï¿½ltima fila: Flete + Grï¿½a centrados en 2 columnas del grid de 3 */
.passenger-home-card--freight {
  grid-column: 1 / 2;
}
.passenger-home-card--tow {
  grid-column: 2 / 3;
}
.passenger-home-card {
  width: 100% !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  padding: 0.65rem 0.35rem 0.55rem !important;
  border-radius: 0.95rem !important;
  text-align: center !important;
  min-height: 5.4rem;
}
.passenger-home-card-icon {
  width: 2.35rem !important;
  height: 2.35rem !important;
  border-radius: 0.75rem !important;
  font-size: 0.95rem !important;
}
.passenger-home-card-text {
  flex: none !important;
  align-items: center !important;
  gap: 0.05rem !important;
}
.passenger-home-card-text strong {
  font-size: 0.72rem !important;
  line-height: 1.1 !important;
}
.passenger-home-card-text small {
  font-size: 0.58rem !important;
  line-height: 1.15 !important;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.passenger-home-card-chevron { display: none !important; }
.passenger-home-foot {
  margin: 0.45rem 0.15rem 0 !important;
  font-size: 0.62rem !important;
}
/* Pantallas muy angostas: 2 columnas, filas cortas */
@media (max-width: 340px) {
  .passenger-home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .passenger-home-card--freight,
  .passenger-home-card--tow {
    grid-column: auto !important;
  }
}
/* Si hay mï¿½s alto disponible, un poco mï¿½s grandes */
@media (min-width: 400px) {
  .passenger-home-card {
    min-height: 5.8rem;
    padding: 0.75rem 0.4rem 0.65rem !important;
  }
  .passenger-home-card-text strong { font-size: 0.78rem !important; }
}

/* Botones Mi tienda / Crear tienda */
.client-stores-actions--3 {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem !important;
}
.client-stores-actions--3 .stores-primary-btn--sm {
  grid-column: 1 / -1;
  padding: 0.55rem 0.75rem;
  font-size: 0.7rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.2);
}
.stores-primary-btn--sm {
  font-size: 0.7rem;
  padding: 0.55rem 0.7rem;
}

/* ===== Mundo de tiendas: pantalla completa (no panel chico) ===== */
.stores-world {
  position: fixed !important;
  inset: 0 !important;
  z-index: 46000 !important;
  background: #f1f5f9 !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 0 !important;
  align-items: stretch !important;
}
.stores-world.hidden { display: none !important; }
.stores-world-inner {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: #f8fafc;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding-bottom: var(--safe-bottom, env(safe-area-inset-bottom, 0px));
}
.stores-world-head {
  flex-shrink: 0;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 100%);
  border-bottom: 1px solid #fde68a;
  padding: max(0.55rem, var(--safe-top, env(safe-area-inset-top, 0px))) 0.75rem 0.55rem;
}
.stores-world-head--merchant {
  background: linear-gradient(180deg, #ecfdf5 0%, #fff 100%);
  border-bottom-color: #a7f3d0;
}
.stores-world-head-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.45rem;
}
.stores-world-toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.stores-world-toolbar.hidden { display: none !important; }
.stores-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.stores-search-wrap > i {
  position: absolute;
  left: 0.75rem;
  color: #94a3b8;
  font-size: 0.85rem;
  pointer-events: none;
}
.stores-search-input {
  width: 100%;
  padding: 0.7rem 2.2rem 0.7rem 2.2rem;
  border-radius: 0.9rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  outline: none;
}
.stores-search-input:focus {
  border-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}
.stores-search-clear {
  position: absolute;
  right: 0.45rem;
  width: 1.6rem;
  height: 1.6rem;
  border: none;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
}
/* Acciones de emprendedor: siempre 2 columnas, legibles en celular */
.stores-merchant-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  width: 100%;
}
.stores-action-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 0;
  min-height: 2.35rem;
  padding: 0.45rem 0.5rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  font-size: 0.72rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stores-action-chip i {
  flex-shrink: 0;
  font-size: 0.78rem;
}
.stores-action-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stores-action-chip--my-store {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}
.stores-action-chip--create {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #fff;
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25);
}

/* CategorÃ­as: en celular se envuelven; en ancho mayor pueden ser una fila con scroll */
.stores-category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
  padding-bottom: 0.1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stores-category-chips::-webkit-scrollbar { display: none; }
.stores-cat-chip {
  flex: 1 1 auto;
  min-width: calc(33.333% - 0.35rem);
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.42rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
  line-height: 1.15;
}
.stores-cat-chip i {
  flex-shrink: 0;
  font-size: 0.72rem;
}
.stores-cat-chip-label {
  overflow: hidden;
  text-overflow: ellipsis;
}
.stores-cat-chip.active {
  background: #f59e0b;
  border-color: #d97706;
  color: #fff;
}
@media (max-width: 359px) {
  .stores-cat-chip {
    min-width: calc(50% - 0.35rem);
    font-size: 0.64rem;
    padding: 0.4rem 0.4rem;
  }
  .stores-action-chip {
    font-size: 0.66rem;
    min-height: 2.2rem;
    padding: 0.4rem 0.35rem;
  }
}
@media (min-width: 480px) {
  .stores-category-chips {
    flex-wrap: nowrap;
    overflow-x: auto;
  }
  .stores-cat-chip {
    flex: 0 0 auto;
    min-width: 0;
  }
}
.stores-world-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #64748b;
}
.stores-city-label i { color: #f59e0b; margin-right: 0.2rem; }
.stores-world-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.75rem 0.75rem 1.25rem;
}
.stores-world-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, #fff7ed, #fef3c7);
  border: 1px solid #fde68a;
}
.stores-world-hero-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 900;
  color: #92400e;
}
.stores-world-hero-sub {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: #a16207;
  line-height: 1.3;
}
.stores-world-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.stores-browse-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 420px) {
  .stores-browse-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 768px) {
  .stores-browse-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .stores-world-inner {
    max-width: 56rem;
    margin: 0 auto;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
  }
}
.store-card--browse {
  flex-direction: column !important;
  align-items: stretch !important;
  padding: 0 !important;
  overflow: hidden;
  text-align: left;
  min-height: 0;
}
.store-card-cover {
  width: 100%;
  height: 6.5rem;
  object-fit: cover;
  background: linear-gradient(135deg, #fef3c7, #fdba74);
  display: block;
}
.store-card-cover--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d97706;
  font-size: 1.75rem;
}
.store-card-body {
  padding: 0.65rem 0.7rem 0.75rem;
}
.store-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem;
}
.store-card-desc {
  margin: 0.3rem 0 0;
  font-size: 0.68rem;
  color: #64748b;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.stores-empty--full {
  grid-column: 1 / -1;
  padding: 2.5rem 1rem;
}
/* Ocultar mapa y panel de viaje cuando el mundo de tiendas estï¿½ abierto */
body.stores-world-open #map-container.stores-world-hidden,
body.stores-world-open #control-panel.stores-world-hidden,
body.stores-world-open #panel-expand-fab.stores-world-hidden,
.stores-world-hidden {
  visibility: hidden !important;
  pointer-events: none !important;
}
body.stores-world-open #app-header {
  /* El marketplace usa su propio header; el header app puede quedar detrï¿½s */
}
body.stores-world-open .stores-world {
  /* por encima del header de la app */
  z-index: 50000 !important;
}
/* Cart bar en mundo full */
.stores-world .stores-cart-bar {
  flex-shrink: 0;
}

/* ===== Usar TODO el ancho horizontal (tiendas + menï¿½) ===== */
.stores-world,
.stores-world-inner {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  border-left: none !important;
  border-right: none !important;
}
.stores-world-head {
  padding-left: max(0.65rem, var(--safe-left, env(safe-area-inset-left, 0px))) !important;
  padding-right: max(0.65rem, var(--safe-right, env(safe-area-inset-right, 0px))) !important;
}
.stores-world-body {
  padding-left: max(0.55rem, var(--safe-left, env(safe-area-inset-left, 0px))) !important;
  padding-right: max(0.55rem, var(--safe-right, env(safe-area-inset-right, 0px))) !important;
}
/* Toolbar: bï¿½squeda ancha + chips en fila cuando hay espacio */
@media (min-width: 560px) {
  .stores-world-toolbar {
    display: grid !important;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    grid-template-areas:
      " search search\
 \chips meta\;
 align-items: center;
 gap: 0.45rem 0.75rem !important;
 }
 .stores-search-wrap { grid-area: search; }
 .stores-category-chips { grid-area: chips; min-width: 0; }
 .stores-world-meta { grid-area: meta; justify-content: flex-end; }
}
@media (min-width: 900px) {
 .stores-world-toolbar {
 grid-template-columns: minmax(14rem, 1fr) minmax(0, 2fr) auto;
 grid-template-areas: \search chips meta\;
 }
}
/* Hero a lo ancho */
.stores-world-hero {
 width: 100%;
 flex-wrap: nowrap !important;
 align-items: center !important;
}
@media (max-width: 480px) {
 .stores-world-hero { flex-wrap: wrap !important; }
}
/* Grid de tiendas: mï¿½s columnas, menos aire perdido */
.stores-browse-grid {
 grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
 gap: 0.5rem !important;
}
@media (min-width: 520px) {
 .stores-browse-grid {
 grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
 }
}
@media (min-width: 760px) {
 .stores-browse-grid {
 grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
 gap: 0.65rem !important;
 }
}
@media (min-width: 1024px) {
 .stores-browse-grid {
 grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
 }
}
@media (min-width: 1280px) {
 .stores-browse-grid {
 grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
 }
}
/* Tarjetas: cubrir ancho de celda */
.store-card--browse {
 width: 100% !important;
 height: 100%;
}
.store-card-cover {
 height: 5.5rem !important;
}
@media (min-width: 760px) {
 .store-card-cover { height: 6.75rem !important; }
}
/* Productos del menï¿½ en columnas */
.store-products {
 display: grid !important;
 grid-template-columns: 1fr !important;
 gap: 0.5rem !important;
}
.store-products > .stores-section-label {
 grid-column: 1 / -1;
}
@media (min-width: 480px) {
 .store-products {
 grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
 }
}
@media (min-width: 800px) {
 .store-products {
 grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
 }
}
/* Detalle de tienda a lo ancho */
.store-detail-head {
 width: 100%;
}
/* Menï¿½ inicio: 5 botones en una sola fila cuando cabe */
@media (min-width: 420px) {
 .passenger-home-grid {
 grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
 }
 .passenger-home-card--freight,
 .passenger-home-card--tow {
 grid-column: auto !important;
 }
 .passenger-home-card {
 min-height: 5.2rem;
 }
}
/* Panel control del pasajero: no estrechar de mï¿½s en tablets */
@media (min-width: 768px) {
 #control-panel.collapsible-panel,
 #control-panel {
 max-width: min(100%, 42rem);
 }
}
/* Cart bar full width */
.stores-world .stores-cart-bar {
 width: 100%;
 padding-left: max(0.75rem, var(--safe-left, env(safe-area-inset-left, 0px)));
 padding-right: max(0.75rem, var(--safe-right, env(safe-area-inset-right, 0px)));
}

/* Buscador de tiendas: siempre a todo el ancho (tambiï¿½n en pantallas grandes) */
.stores-world-toolbar {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.45rem !important;
  width: 100% !important;
}
.stores-search-wrap {
  width: 100% !important;
  max-width: 100% !important;
  grid-area: unset !important;
  flex: none !important;
}
.stores-search-input {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.stores-merchant-chips,
.stores-category-chips {
  width: 100% !important;
  max-width: 100% !important;
  grid-area: unset !important;
}
.stores-world-meta {
  width: 100% !important;
  grid-area: unset !important;
  justify-content: space-between !important;
}
/* Anular layouts de grid en tablet/desktop que partï¿½an el buscador */
@media (min-width: 560px) {
  .stores-world-toolbar {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }
  .stores-search-wrap,
  .stores-merchant-chips,
  .stores-category-chips,
  .stores-world-meta {
    grid-area: unset !important;
  }
}
@media (min-width: 900px) {
  .stores-world-toolbar {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: none !important;
    grid-template-areas: none !important;
  }
}

/* Logo / imagen de tienda (emprendedor + catï¿½logo) */
.m-store-logo-pick {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem;
  border-radius: 0.95rem;
  border: 1px dashed #f59e0b;
  background: #fff;
}
.m-store-logo-preview {
  width: 100%;
  max-height: 10rem;
  min-height: 6.5rem;
  object-fit: cover;
  border-radius: 0.75rem;
  background: #fff7ed;
}
.m-store-logo-preview--empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  color: #d97706;
  font-size: 0.75rem;
  font-weight: 800;
  min-height: 6.5rem;
  width: 100%;
  border-radius: 0.75rem;
  background: #fffbeb;
}
.m-store-logo-preview--empty i {
  font-size: 1.75rem;
  opacity: 0.8;
}
.store-detail-logo {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1rem;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fde68a;
  background: #fff7ed;
}
.stores-world-hero-limit {
  width: 100%;
  margin: 0.15rem 0 0;
  font-size: 0.65rem;
  font-weight: 700;
  color: #a16207;
}

/* ===== Imï¿½genes de tienda: se adaptan al espacio sin deformarse ===== */
.store-card-cover,
.store-detail-logo,
.m-store-logo-preview,
.product-card-photo,
.cart-line-photo {
  object-fit: cover !important;
  object-position: center center !important;
  background: linear-gradient(145deg, #fff7ed 0%, #ffedd5 50%, #fde68a 100%) !important;
  image-rendering: auto;
}

/* Portada en el listado de tiendas */
.store-card--browse {
  overflow: hidden !important;
}
.store-card-cover {
  width: 100% !important;
  height: 0 !important;
  padding-bottom: 62% !important; /* ratio fijo ~16:10 */
  position: relative !important;
  display: block !important;
  flex-shrink: 0 !important;
}
/* img con padding-bottom trick necesita absolute fill */
img.store-card-cover {
  height: auto !important;
  padding-bottom: 0 !important;
  aspect-ratio: 16 / 10;
  max-height: none !important;
  min-height: 0 !important;
}
.store-card-cover--icon {
  aspect-ratio: 16 / 10;
  height: auto !important;
  padding-bottom: 0 !important;
  min-height: 5rem;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* Logo grande en detalle de tienda */
.store-detail-head {
  align-items: center !important;
  gap: 0.85rem !important;
}
.store-detail-logo,
.store-detail-avatar {
  width: 4.75rem !important;
  height: 4.75rem !important;
  min-width: 4.75rem !important;
  min-height: 4.75rem !important;
  max-width: 4.75rem !important;
  max-height: 4.75rem !important;
  border-radius: 1.05rem !important;
  object-fit: cover !important;
  object-position: center !important;
  flex-shrink: 0 !important;
  border: 2px solid #fde68a;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}
@media (min-width: 520px) {
  .store-detail-logo,
  .store-detail-avatar {
    width: 5.5rem !important;
    height: 5.5rem !important;
    min-width: 5.5rem !important;
    min-height: 5.5rem !important;
    max-width: 5.5rem !important;
    max-height: 5.5rem !important;
  }
}

/* Vista previa al subir logo en Mi tienda */
.m-store-logo-pick {
  overflow: hidden;
}
.m-store-logo-preview {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  max-height: none !important;
  min-height: 0 !important;
  height: auto !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0.85rem !important;
}
.m-store-logo-preview--empty {
  aspect-ratio: 16 / 9 !important;
  min-height: 0 !important;
  height: auto !important;
}

/* Productos: cuadrado consistente */
.product-card-photo {
  width: 4.1rem !important;
  height: 4.1rem !important;
  min-width: 4.1rem !important;
  min-height: 4.1rem !important;
  max-width: 4.1rem !important;
  max-height: 4.1rem !important;
  border-radius: 0.85rem !important;
  object-fit: cover !important;
  object-position: center !important;
}
.product-card-photo--placeholder {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.cart-line-photo {
  width: 2.85rem !important;
  height: 2.85rem !important;
  min-width: 2.85rem !important;
  min-height: 2.85rem !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0.65rem !important;
}

/* Vista previa producto al agregar */
.m-prod-photo-preview {
  width: 100% !important;
  aspect-ratio: 1 / 1 !important;
  max-height: 12rem !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 0.85rem !important;
  background: #fff7ed !important;
}
.m-prod-photo-preview--empty {
  aspect-ratio: 1 / 1 !important;
  max-height: 12rem !important;
  width: 100% !important;
}

/* Evitar que imï¿½genes rotas rompan el layout */
.store-card-cover.is-broken,
.store-detail-logo.is-broken,
.product-card-photo.is-broken {
  opacity: 0.35;
  object-fit: contain !important;
}

/* Contenedor de portada: recorta cualquier tamaï¿½o de imagen */
.store-card-cover-wrap {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  background: linear-gradient(145deg, #fff7ed, #fde68a);
  flex-shrink: 0;
}
.store-card-cover-wrap .store-card-cover,
.store-card-cover-wrap img.store-card-cover {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  min-height: 0 !important;
  padding: 0 !important;
  aspect-ratio: auto !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
}
.store-card-cover-wrap .store-card-cover--icon {
  position: absolute !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 1.85rem;
  color: #d97706;
}
.store-detail-logo-wrap {
  width: 4.75rem;
  height: 4.75rem;
  min-width: 4.75rem;
  min-height: 4.75rem;
  border-radius: 1.05rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fde68a;
  background: #fff7ed;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.12);
}
.store-detail-logo-wrap .store-detail-logo {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  max-height: none !important;
  border: none !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block;
}
@media (min-width: 520px) {
  .store-detail-logo-wrap {
    width: 5.5rem;
    height: 5.5rem;
    min-width: 5.5rem;
    min-height: 5.5rem;
  }
}

/* ===== Foto de perfil: se adapta al cï¿½rculo en toda la app ===== */
.profile-photo-box {
  position: relative;
  overflow: hidden !important;
  flex-shrink: 0;
  box-sizing: border-box;
}
.profile-photo-box--header {
  width: 2rem !important;
  height: 2rem !important;
  min-width: 2rem !important;
  min-height: 2rem !important;
  border-radius: 999px !important;
}
@media (min-width: 640px) {
  .profile-photo-box--header {
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    min-height: 2.25rem !important;
  }
}
.profile-photo-box--lg {
  width: 5rem !important;
  height: 5rem !important;
  min-width: 5rem !important;
  min-height: 5rem !important;
  border-radius: 999px !important;
}

/* Avatar en cajas de perfil (header / registro): llena SOLO su contenedor acotado */
.profile-photo-img,
.profile-photo-box > img,
#avatar-placeholder > img,
#edit-photo-preview > img,
#photo-preview > img,
#passenger-reg-photo-preview {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: inherit;
  background: #e2e8f0;
}

/*
 * Fotos del CONDUCTOR en viaje / flotantes: tamaño FIJO.
 * Antes heredaban width/height 100% y al minimizar el panel
 * se expandían sobre el mapa (bug: “solo se ve la foto”).
 */
#client-trip-photo,
.client-trip-photo {
  width: 3.1rem !important;
  height: 3.1rem !important;
  max-width: 3.1rem !important;
  max-height: 3.1rem !important;
  min-width: 3.1rem !important;
  min-height: 3.1rem !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
  background: #e2e8f0;
}

#client-trip-min-photo,
.client-trip-min-photo {
  width: 2.1rem !important;
  height: 2.1rem !important;
  max-width: 2.1rem !important;
  max-height: 2.1rem !important;
  min-width: 2.1rem !important;
  min-height: 2.1rem !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
  background: #93c5fd;
}

#tp-photo {
  width: 3.5rem !important;
  height: 3.5rem !important;
  max-width: 3.5rem !important;
  max-height: 3.5rem !important;
  min-width: 3.5rem !important;
  min-height: 3.5rem !important;
  object-fit: cover !important;
  object-position: center center !important;
  display: block !important;
  border-radius: 999px !important;
  flex-shrink: 0 !important;
  background: #e2e8f0;
}

/* Burbuja del conductor: NO forzar pastilla por CSS al minimizar el panel
   (eso impedía maximizar al tocar la burbuja azul). El estado lo marca .trip-float--min */

/* Avatar header: el contenedor es el recorte */
#avatar-placeholder {
  position: relative;
  overflow: hidden !important;
  border-radius: 999px !important;
  padding: 0 !important;
  line-height: 0;
}
#avatar-placeholder > img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 999px !important;
}

/* Preview en panel de perfil */
#edit-photo-preview {
  position: relative;
  overflow: hidden !important;
  border-radius: 999px !important;
  padding: 0 !important;
}
#edit-photo-preview > img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  border-radius: 999px !important;
}
#edit-photo-preview > i {
  line-height: normal;
}

/* Registro / setup conductor: cara */
.setup-photo-face {
  overflow: hidden !important;
  position: relative;
}
.setup-photo-face img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: inherit;
}

/* Fotos redondas en paneles de viaje / ops */
img.rounded-full.object-cover,
.rounded-full > img {
  object-fit: cover !important;
  object-position: center center !important;
}

.client-trip-photo,
#tp-photo {
  object-fit: cover !important;
  object-position: center center !important;
  overflow: hidden;
}
/* Refuerzo: sin barra horizontal extra bajo Minimizar (pasajero) */
body.client-mode #control-panel > .control-panel-header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: none !important;
}
body.client-mode #control-panel > .control-panel-header .control-panel-grab {
  display: none !important;
}

/* ===== Pasajero: Minimizar = ocultar panel central del TODO (mapa limpio) ===== */
body.client-mode.panel-hidden #control-panel,
body.client-mode #control-panel.panel-hidden,
body.client-mode.panel-hidden.panel-minimized #control-panel,
body.client-mode.is-searching.panel-hidden #control-panel,
body.client-mode.trip-active.panel-hidden #control-panel,
body.capacitor-native.client-mode.panel-hidden #control-panel,
body.capacitor-android.client-mode.panel-hidden #control-panel {
  transform: translateY(110%) !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
  max-height: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* FAB para volver a abrir el panel cuando está oculto del todo */
body.client-mode.panel-hidden .panel-expand-fab,
body.panel-hidden .panel-expand-fab,
body.driver-mode.panel-minimized:not(.trip-active) .panel-expand-fab {
  display: inline-flex !important;
  z-index: 200 !important;
}

/* Mapa a pantalla completa cuando el panel estï¿½ oculto */
body.client-mode.panel-hidden #map-container,
body.client-mode.panel-hidden #map {
  opacity: 1 !important;
  pointer-events: auto !important;
  height: 100% !important;
  max-height: none !important;
}

/* Mi tienda / Crear tienda en la franja de categorï¿½as */
.stores-cat-chip--action {
  border-color: #fcd34d !important;
  background: #fffbeb !important;
  color: #b45309 !important;
  font-weight: 900 !important;
}
.stores-cat-chip--my-store {
  border-color: #a7f3d0 !important;
  background: #ecfdf5 !important;
  color: #047857 !important;
}
.stores-cat-chip--create {
  border-color: #f59e0b !important;
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  color: #fff !important;
}
/* En pantallas angostas: acciones arriba, filtros abajo sin cortar texto */
@media (max-width: 479px) {
  .stores-merchant-chips {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
  }
  .stores-category-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: visible !important;
  }
}
.stores-world-hero--compact {
  padding: 0.55rem 0.75rem !important;
  margin-bottom: 0.55rem !important;
}
.stores-world-hero--compact .stores-world-hero-actions { display: none !important; }

/* Compartir catï¿½logo */
.merchant-share-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.75rem;
  border-radius: 1rem;
  border: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
}
.merchant-share-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 900;
  color: #1d4ed8;
}
.merchant-share-sub {
  margin: 0.15rem 0 0;
  font-size: 0.65rem;
  font-weight: 600;
  color: #3b82f6;
  line-height: 1.25;
}
.order-pay-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}
.order-pay-badge--saldo {
  background: #f3e8ff;
  color: #7e22ce;
}
.order-pay-badge--cash {
  background: #d1fae5;
  color: #047857;
}

/* ===== Icono Grua con gancho (no troca) ===== */
.icon-grua,
i.icon-grua,
.fas.icon-grua,
.fa-solid.icon-grua,
.fa-truck-monster {
  display: inline-block !important;
  width: 1.15em !important;
  height: 1.15em !important;
  min-width: 1.15em;
  min-height: 1.15em;
  line-height: 1 !important;
  font-size: inherit !important;
  font-family: inherit !important;
  font-weight: normal !important;
  font-style: normal !important;
  vertical-align: -0.18em;
  speak: never;
  background-color: currentColor !important;
  background-image: none !important;
  /* Silueta: cabina + pluma + cable + gancho */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23fff'%3E%3Cpath d='M6 32h18l4-12h10l3 8h4v-5H30l-3-9H8v18zm3-13h12l2.5 7H9v-7z'/%3E%3Crect x='4' y='34' width='36' height='6' rx='1'/%3E%3Crect x='38' y='36' width='16' height='4' rx='1'/%3E%3Cpath d='M26 34l5-3 20-24 4 3.2L32 36z'/%3E%3Crect x='48' y='10' width='3.2' height='20' rx='1'/%3E%3Cpath d='M44.5 29h10.5v3H53c0 4.2-3.2 7.5-7.2 7.5-2.3 0-4.4-1-5.8-2.6l2.5-2.1c.8 1 2 1.6 3.3 1.6 2.2 0 4-1.7 4-3.9h-5.3V29z'/%3E%3Ccircle cx='13' cy='48' r='5.5'/%3E%3Ccircle cx='13' cy='48' r='2.2' fill='%23000'/%3E%3Ccircle cx='42' cy='48' r='5.5'/%3E%3Ccircle cx='42' cy='48' r='2.2' fill='%23000'/%3E%3Crect x='18' y='40' width='20' height='3.5' rx='1'/%3E%3C/g%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23fff'%3E%3Cpath d='M6 32h18l4-12h10l3 8h4v-5H30l-3-9H8v18zm3-13h12l2.5 7H9v-7z'/%3E%3Crect x='4' y='34' width='36' height='6' rx='1'/%3E%3Crect x='38' y='36' width='16' height='4' rx='1'/%3E%3Cpath d='M26 34l5-3 20-24 4 3.2L32 36z'/%3E%3Crect x='48' y='10' width='3.2' height='20' rx='1'/%3E%3Cpath d='M44.5 29h10.5v3H53c0 4.2-3.2 7.5-7.2 7.5-2.3 0-4.4-1-5.8-2.6l2.5-2.1c.8 1 2 1.6 3.3 1.6 2.2 0 4-1.7 4-3.9h-5.3V29z'/%3E%3Ccircle cx='13' cy='48' r='5.5'/%3E%3Ccircle cx='13' cy='48' r='2.2' fill='%23000'/%3E%3Ccircle cx='42' cy='48' r='5.5'/%3E%3Ccircle cx='42' cy='48' r='2.2' fill='%23000'/%3E%3Crect x='18' y='40' width='20' height='3.5' rx='1'/%3E%3C/g%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  color: inherit;
}
.icon-grua::before,
i.icon-grua::before,
.fas.icon-grua::before,
.fa-solid.icon-grua::before,
.fa-truck-monster::before {
  content: none !important;
  display: none !important;
  background: none !important;
}
.passenger-home-card--tow .icon-grua,
.passenger-home-card--tow .fa-truck-monster,
.driver-type-btn--grua .icon-grua,
.driver-type-btn--grua .fa-truck-monster,
.service-type-btn .icon-grua,
.service-type-btn .fa-truck-monster {
  width: 1.4em !important;
  height: 1.4em !important;
}

/* Admin/supervisor: borrar tiendas virtuales */
.store-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}
.store-card-wrap .store-card--browse {
  flex: 1 1 auto;
  width: 100%;
}
.store-admin-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  width: 100%;
  min-height: 2rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.7rem;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}
.store-admin-delete-btn:active {
  background: #fee2e2;
}
.store-staff-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.65rem 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.9rem;
  border: 1px solid #fecaca;
  background: linear-gradient(135deg, #fff1f2, #fef2f2);
}
.store-staff-bar-label {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 900;
  color: #9f1239;
}
.store-staff-delete-btn {
  flex: 0 0 auto;
  min-height: 2.2rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
}

/* Staff: invitar empresa por WhatsApp */
.stores-merchant-chips--staff {
  grid-template-columns: 1fr 1fr !important;
}
.stores-merchant-chips--staff .stores-action-chip--invite {
  grid-column: 1 / -1;
}
.stores-action-chip--invite {
  border-color: #6ee7b7 !important;
  background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
  color: #047857 !important;
  box-shadow: 0 3px 10px rgba(16, 185, 129, 0.18);
}
.stores-action-chip--invite i {
  color: #25d366;
  font-size: 0.95rem;
}
.hr-invite-business-banner {
  margin: 0 0 0.85rem;
  padding: 0.7rem 0.8rem;
  border-radius: 1rem;
  border: 1px solid #fcd34d;
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
}
.hr-invite-business-banner-title {
  margin: 0 0 0.25rem;
  font-size: 0.78rem;
  font-weight: 900;
  color: #92400e;
}
.hr-invite-business-banner-text {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 600;
  color: #78350f;
  line-height: 1.35;
}

/* ===== Vista previa de oferta en mapa (NO es viaje aceptado) ===== */
body.driver-offer-map-peek #control-panel,
body.driver-offer-map-peek #control-panel.driver-offer-peek-hidden {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: translateY(110%) !important;
  max-height: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
}
body.driver-offer-map-peek #active-trip-panel,
body.driver-offer-map-peek #trip-mini-bar,
body.driver-offer-map-peek #driver-active-cta,
body.driver-offer-map-peek #driver-active-tools {
  display: none !important;
  visibility: hidden !important;
}
body.driver-offer-map-peek #driver-trip-offer-popup {
  display: none !important;
}
body.driver-offer-map-peek #driver-offer-map-hint {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
body.driver-offer-map-peek #map-container,
body.driver-offer-map-peek #map {
  height: 100% !important;
  max-height: 100% !important;
}

.driver-offer-peek-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 46000;
  padding: 0.55rem 0.75rem calc(0.65rem + var(--safe-bottom, env(safe-area-inset-bottom, 0px)));
  pointer-events: none;
  /* Siempre encima del mapa en peek: no se pierde el Aceptar */
  visibility: visible;
  opacity: 1;
}
.driver-offer-peek-bar.hidden { display: none !important; }
body.driver-offer-map-peek .driver-offer-peek-bar:not(.hidden) {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: none;
}
.driver-offer-peek-bar-inner {
  pointer-events: auto;
  max-width: 28rem;
  margin: 0 auto;
  padding: 0.65rem 0.75rem;
  border-radius: 1.15rem 1.15rem 0.9rem 0.9rem;
  background: linear-gradient(180deg, #fffbeb 0%, #fff 55%);
  border: 2px solid #f59e0b;
  box-shadow: 0 -8px 28px rgba(15, 23, 42, 0.18);
}
.driver-offer-peek-badge {
  margin: 0 0 0.5rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
}
.driver-offer-peek-actions {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 0.4rem;
}
.driver-offer-peek-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 2.65rem;
  padding: 0.45rem 0.4rem;
  border-radius: 0.85rem;
  border: 1px solid #e2e8f0;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1.1;
  -webkit-tap-highlight-color: transparent;
}
.driver-offer-peek-btn--back {
  background: #0f172a;
  border-color: #0f172a;
  color: #fff;
}
.driver-offer-peek-btn--accept {
  background: #16a34a;
  border-color: #15803d;
  color: #fff;
}
.driver-offer-peek-btn--decline {
  background: #fff;
  border-color: #fca5a5;
  color: #b91c1c;
}
