        :root {
            --orange: #FF7A00;
            --orange2: #FF4E00;
            --purple: #7B2FBE;
            --gradient: linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);

            --primary-color: #fc7b03;
            --primary-gradient: linear-gradient(135deg, #8a2be2, #fc7b03);
            /* Identidad Sistema: Violeta a Naranja */
            --bg-color: #f7f7f7;
            --surface-color: #ffffff;
            --text-primary: #333333;
            --text-secondary: #777777;
            --border-color: #eaeaea;
            --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
            --shadow-lg: 0 -4px 16px rgba(0, 0, 0, 0.12);

            --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
            /* --shadow-md: 0 6px 18px rgba(0,0,0,0.15); */
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body,
        html {
            font-family: 'Plus Jakarta Sans', sans-serif;
            width: 100%;
            height: 100%;
            overflow: hidden;
            background-color: var(--bg-color);
        }

        /* Contenedor del Mapa */
        #map {
            width: 100%;
            height: 52vh;
            z-index: 1;
            transition: height 0.3s ease-in-out;
        }

        /* Botón de Perfil / Menú (Header Flotante) */
        .app-header {
            position: absolute;
            top: 20px;
            left: 20px;
            z-index: 1000;
            background: var(--surface-color);
            padding: 10px 15px;
            border-radius: 50px;
            box-shadow: var(--shadow-sm);
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            color: var(--text-primary);
        }

        .menu-icon {
            width: 24px;
            height: 2px;
            background: var(--text-primary);
            position: relative;
        }

        .menu-icon::before,
        .menu-icon::after {
            content: '';
            position: absolute;
            width: 24px;
            height: 2px;
            background: var(--text-primary);
            left: 0;
        }

        .menu-icon::before {
            top: -6px;
        }

        .menu-icon::after {
            top: 6px;
        }


        .panel-handle {
            width: 40px;
            height: 4px;
            background: #ddd;
            border-radius: 2px;
            margin: 0 auto 15px auto;
        }

        h2 {
            font-size: 1.25rem;
            margin-bottom: 20px;
            color: var(--text-primary);
            font-weight: 700;
        }

        /* Entradas de ubicación (Origen y Destino) */
        .location-inputs {
            position: relative;
            display: flex;
            flex-direction: column;
            gap: 15px;
            flex: 1;

        }

        /* Línea que conecta el punto de origen con el destino */
        .route-line {
            position: absolute;
            left: 11px;
            top: 25px;
            bottom: 25px;
            width: 2px;
            background: var(--border-color);
            z-index: 1;
        }

        .input-group {
            display: flex;
            align-items: center;
            gap: 15px;
            z-index: 2;
        }

        .dot-origin {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary-color);
            border: 3px solid #ffe6cc;
            flex-shrink: 0;
        }

        .dot-destination {
            width: 10px;
            height: 10px;
            background: #20b2aa;
            flex-shrink: 0;
        }

        .dot-originA {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary-color);
            border: 3px solid #e07e15;
            flex-shrink: 0;
        }

        .dot-destinationB {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: blue;
            border: 3px solid #20b2aa;

            flex-shrink: 0;
        }


        .location-input {
            flex: 1;
            padding: 15px;
            padding-right: 35px;
            /* Espacio para la X */
            background: var(--bg-color);
            border: 1px solid transparent;
            border-radius: 10px;
            font-size: 1rem;
            color: var(--text-primary);
            transition: all 0.2s;
            width: 100%;
        }

        .location-input:focus {
            outline: none;
            border-color: var(--primary-color);
            background: var(--surface-color);
            box-shadow: 0 0 0 3px rgba(252, 123, 3, 0.1);
        }

        .location-input::placeholder {
            color: var(--text-secondary);
        }

        .clear-input-btn {
            position: absolute;
            right: 15px;
            font-size: 1.2rem;
            color: #999;
            cursor: pointer;
            display: none;
            /* Oculto por defecto, se muestra por JS */
            user-select: none;
        }

        .clear-input-btn:hover {
            color: #555;
        }

        /* ============ STEP 3: WAITING FOR DRIVER ============ */
        #step-waiting {
            padding: 0 16px 24px;
            display: none;
        }

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

        .waiting-header h2 {
            font-size: 18px;
            font-weight: 900;
        }

        .cancel-link {
            font-size: 13px;
            color: var(--text3);
            cursor: pointer;
            font-weight: 600;
            text-decoration: underline;
        }

        .searching-anim {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            margin: 8px 0 20px;
        }

        .search-dot {
            width: 8px;
            height: 8px;
            background: var(--orange);
            border-radius: 50%;
            animation: bounce-dot .8s ease-in-out infinite;
        }

        .search-dot:nth-child(2) {
            animation-delay: .15s;
        }

        .search-dot:nth-child(3) {
            animation-delay: .3s;
        }

        @keyframes bounce-dot {

            0%,
            100% {
                transform: translateY(0);
                opacity: .4;
            }

            50% {
                transform: translateY(-8px);
                opacity: 1;
            }
        }


        /* Ajustes para el Autocomplete de Google Places */
        .pac-container {
            z-index: 10000 !important;
            border-radius: 0 0 10px 10px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
            border: none;
            font-family: 'Inter', sans-serif;
            margin-top: 5px;
        }

        .pac-item {
            padding: 10px;
            cursor: pointer;
            font-size: 0.95rem;
        }

        /* Botón de Acción */
        .btn-confirm {
            width: 100%;
            padding: 16px;
            background: var(--primary-gradient);
            color: white;
            border: none;
            border-radius: 12px;
            font-size: 1.1rem;
            font-weight: 600;
            margin-top: auto;
            cursor: pointer;
            transition: background 0.2s, transform 0.1s;
        }

        .btn-confirm:active {
            transform: scale(0.98);
            background: #e66a00;
        }

        .btn-confirm:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        /* Pantalla de Carga */
        .loading-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.8);
            z-index: 2000;
            display: none;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .spinner {
            width: 40px;
            height: 40px;
            border: 4px solid #f3f3f3;
            border-top: 4px solid var(--primary-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }

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

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

        .status-text {
            margin-top: 15px;
            font-weight: 500;
            color: var(--text-primary);
            text-align: center;
        }

        /* --- NUEVOS ESTILOS UERBI --- */
        /* Panel Inferior (Bottom Sheet) */

        .bottom-panel {
            height: 40vh;
            z-index: 1000;
            flex-direction: column;
            padding: 20px;
            transition: transform 0.3s ease-in-out, height 0.3s ease-in-out;
            height: auto;
            overflow-y: auto;
            padding-bottom: 30px;
            position: relative;

            position: absolute;
            bottom: 0;
            width: 100%;
            max-height: 85vh;
            background: var(--surface-color);
            border-radius: 20px 20px 0 0;
            box-shadow: var(--shadow-lg);

            display: flex;
            flex-direction: column;
        }

        .hidden-panel {
            display: none !important;
        }

        /* Toggle Panel visibility */
        .panel-toggle-btn {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 1.2rem;
            cursor: pointer;
            color: var(--text-secondary);
            background: var(--bg-color);
            border-radius: 50%;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
        }

        /* Clases para animación SlideUp/Down */
        .slide-down {
            transform: translateY(100%);
        }

        .floating-show-panel-btn {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            background: var(--surface-color);
            padding: 12px 20px;
            border-radius: 20px;
            box-shadow: var(--shadow-md);
            font-weight: bold;
            display: none;
            /* Oculto por defecto */
            cursor: pointer;
            z-index: 999;
            align-items: center;
            gap: 10px;
            transition: all 0.2s;
        }

        .floating-show-panel-btn:hover {
            background: #f9f9f9;
        }

        /* Estado 1: Sugerencia de encuentro */
        .pickup-suggestion-box {
            padding: 15px;
            background: #f0fdf4;
            border-radius: 12px;
            margin-bottom: 20px;
            border: 1px solid #bbf7d0;
        }

        .pickup-title {
            font-weight: 700;
            font-size: 1.1rem;
            margin-bottom: 5px;
        }

        .pickup-subtitle {
            font-size: 0.9rem;
            color: var(--text-secondary);
            margin-bottom: 10px;
        }

        .pickup-address {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
        }

        .pickup-address .dot {
            width: 10px;
            height: 10px;
            background: #10b981;
            border-radius: 50%;
        }

        /* Estado 2: Selección de Vehículo */
        .vehicle-list {
            display: flex;
            flex-direction: column;
            gap: 15px;
            margin-bottom: 20px;
        }

        .vehicle-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 15px;
            border-radius: 12px;
            border: 1px solid var(--border-color);
            background: var(--surface-color);
            cursor: pointer;
            transition: all 0.2s;
        }

        .vehicle-item.selected {
            border-color: var(--primary-color);
            background: #fff3e6;
        }

        .vehicle-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .vehicle-icon {
            font-size: 2rem;
            width: 50px;
            text-align: center;
        }

        .vehicle-details h4 {
            font-size: 1.1rem;
            margin-bottom: 4px;
        }

        .vehicle-details p {
            font-size: 0.85rem;
            color: var(--text-secondary);
        }

        .vehicle-price {
            font-weight: 700;
            font-size: 1.1rem;
        }

        /* Estado 3: Asignado / Viaje */
        .driver-card {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 15px;
            background: var(--surface-color);
            border-radius: 12px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
        }

        .driver-avatar {
            width: 50px;
            height: 50px;
            border-radius: 50%;
            background: #ddd;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            color: #555;
            overflow: hidden;
        }

        .driver-avatar img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .driver-info h3 {
            margin-bottom: 4px;
        }

        .driver-info p {
            font-size: 0.9rem;
            color: var(--text-secondary);
        }

        .ride-options {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .ride-option-btn {
            padding: 15px;
            background: var(--surface-color);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            text-align: left;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
        }

        .btn-cancel {
            color: #ef4444;
            text-align: center;
            justify-content: center;
            margin-top: 10px;
            border: none;
            background: #fef2f2;
        }

        /* Panel de Simulación (Admin) */
        .simulator-panel {
            position: fixed;
            top: 70px;
            right: 10px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 15px;
            border-radius: 10px;
            z-index: 3000;
            font-size: 0.8rem;
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 150px;
        }

        .simulator-btn {
            padding: 8px;
            background: #333;
            color: white;
            border: 1px solid #555;
            border-radius: 5px;
            cursor: pointer;
        }

        .simulator-btn:hover {
            background: #555;
        }

        /* --- Modal de Instalación PWA --- */
        .install-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            z-index: 9999;
            display: none;
            justify-content: center;
            align-items: center;
            animation: fadeIn 0.3s;
        }

        .install-modal {
            background: var(--surface-color);
            width: 90%;
            max-width: 320px;
            border-radius: 20px;
            padding: 25px;
            text-align: center;
            box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
            position: relative;
        }

        .install-img {
            width: 70px;
            height: 70px;
            margin: 0 auto 15px;
        }

        .install-img img {
            width: 100%;
            border-radius: 15px;
        }

        .install-title {
            font-size: 1.3rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 10px;
        }

        .install-desc {
            font-size: 0.95rem;
            color: var(--text-secondary);
            margin-bottom: 20px;
            line-height: 1.4;
        }

        .install-buttons {
            display: flex;
            gap: 10px;
        }

        .btn-install,
        .btn-no-install {
            flex: 1;
            padding: 12px;
            border-radius: 10px;
            font-weight: 600;
            cursor: pointer;
            border: none;
        }

        .btn-install {
            background: var(--primary-gradient);
            color: white;
        }

        .btn-no-install {
            background: #f1f2f6;
            color: var(--text-secondary);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        /* Contenedor Controles Superiores Derechos */
        .top-right-controls {
            position: absolute;
            top: 20px;
            right: 20px;
            z-index: 1000;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* Botón estilo Mapa Toggle */
        .map-toggle-btn {
            background: var(--surface-color);
            padding: 10px;
            border-radius: 50%;
            box-shadow: var(--shadow-sm);
            cursor: pointer;
            font-size: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            width: 45px;
            height: 45px;
            user-select: none;
            transition: transform 0.2s;
        }

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

        /* --- Menú Lateral y Flujo Repartidor --- */
        .side-menu-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.4);
            z-index: 10001;
            display: none;
            opacity: 0;
            transition: opacity 0.3s;
        }

        .side-menu {
            position: fixed;
            top: 0;
            left: -100%;
            width: 85%;
            max-width: 320px;
            height: 100%;
            background: var(--surface-color);
            z-index: 10002;
            transition: left 0.3s ease;
            box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
            display: flex;
            flex-direction: column;
            overflow-y: auto;
        }

        .side-menu.open {
            left: 0;
        }

        .side-header {
            padding: 40px 20px 20px;
            background: #eef2f6;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .user-info h3 {
            margin-bottom: 5px;
            font-size: 1.2rem;
        }

        .user-info p {
            color: var(--text-secondary);
            font-size: 0.9rem;
            cursor: pointer;
        }

        .user-avatar-menu {
            width: 60px;
            height: 60px;
            border-radius: 50%;
            background: #ddd;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            overflow: hidden;
        }

        .menu-items {
            padding: 10px 0;
        }

        .menu-item {
            padding: 15px 25px;
            display: flex;
            align-items: center;
            gap: 15px;
            font-size: 1.05rem;
            color: var(--text-primary);
            cursor: pointer;
        }

        .menu-item:hover {
            background: #f1f2f6;
        }

        .menu-divider {
            border: 0;
            height: 1px;
            background: #eee;
            margin: 10px 0;
        }

        /* Estilos flujo Repartidor */
        .driver-modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: #ffb000;
            z-index: 10005;
            display: none;
            flex-direction: column;
            overflow-y: auto;
            padding: 20px;
            transition: transform 0.3s;
            transform: translateX(100%);
        }

        .driver-modal.open {
            transform: translateX(0);
            display: flex;
        }

        .driver-heading {
            font-size: 1.8rem;
            font-weight: 800;
            color: #111;
            margin-top: 30px;
            margin-bottom: 20px;
            line-height: 1.1;
        }

        .driver-white-box {
            background: var(--surface-color);
            padding: 20px;
            border-radius: 12px;
            box-shadow: var(--shadow-sm);
            margin-bottom: 20px;
            margin-top: auto;
        }

        .form-label {
            display: block;
            font-size: 0.95rem;
            margin-bottom: 8px;
            font-weight: 600;
        }

        .form-input {
            width: 100%;
            padding: 15px;
            background: #fdfdfd;
            border: 1px solid #ccc;
            border-radius: 8px;
            font-size: 1rem;
            margin-bottom: 15px;
        }

        .otp-container {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
            justify-content: space-between;
        }

        .otp-container input {
            width: 55px;
            height: 65px;
            text-align: center;
            font-size: 1.7rem;
            border: 1px solid var(--primary-color);
            border-radius: 8px;
            color: var(--primary-color);
        }

        .req-list {
            list-style: none;
            padding: 0;
        }

        .req-list li {
            padding: 15px 0;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
            cursor: pointer;
            font-size: 0.95rem;
            font-weight: 500;
        }

        .req-list li::after {
            content: "›";
            font-size: 1.5rem;
            color: #ccc;
        }

        .btn-driver-next {
            background: white;
            color: black;
            font-weight: 700;
            border: none;
            padding: 15px;
            border-radius: 50px;
            font-size: 1.1rem;
            /* Se arregla llave faltante */
        }

        .btn-close-driver {
            position: absolute;
            top: 15px;
            right: 20px;
            font-size: 1.5rem;
            background: transparent;
            border: none;
            cursor: pointer;
            color: #111;
            z-index: 10006;
            font-weight: bold;
        }

        /* --- Panel Modo Chofer --- */
        .driver-online-panel {
            position: absolute;
            bottom: 30px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 1000;
            display: none;
            width: 90%;
            max-width: 350px;
            background: var(--surface-color);
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
            text-align: center;
        }

        .btn-connect {
            width: 100%;
            padding: 18px;
            border-radius: 30px;
            border: none;
            font-size: 1.4rem;
            font-weight: 800;
            color: white;
            background: var(--primary-gradient);
            cursor: pointer;
            box-shadow: 0 4px 15px rgba(252, 125, 3, 0.4);
            transition: transform 0.2s, background 0.3s;
        }

        .btn-connect.online {
            background: #ef4444;
            /* Rojo para desconectar */
            box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
        }

        .btn-connect:active {
            transform: scale(0.95);
        }

        .driver-status-text {
            margin-top: 15px;
            color: var(--text-secondary);
            font-weight: 600;
            font-size: 1.1rem;
        }

        .input-group {
            position: relative;
            margin-bottom: 15px;
        }

        /*  Boton Cerrar en Inputs */
        .location-input {
            width: 100%;
            padding: 12px 45px 12px 40px;
            /* espacio para la X */
            border-radius: 25px;
            border: 1px solid #ddd;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
            font-size: 14px;
            outline: none;
            transition: 0.3s;
            font-size: 16px;
            font-weight: 600;

        }

        .location-input:focus {
            border-color: #00c896;
            box-shadow: 0 4px 15px rgba(0, 200, 150, 0.2);
            font-size: 17px;
            font-weight: 700;
        }

        .clear-input-btn {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);

            width: 22px;
            height: 22px;

            background: #333;
            color: #FFD700;
            /* Amarillo */

            border-radius: 50%;
            font-size: 13px;
            font-weight: bold;
            text-align: center;
            line-height: 22px;

            cursor: pointer;
            display: none;

            transition: 0.3s ease;
        }

        .clear-input-btn:hover {
            background: #000;
            transform: translateY(-50%) scale(1.1);
        }

        /* Muestra css Ruta km y tiempo */
        /* Route info strip on map */
        .route-info {
            position: absolute;
            top: 75%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: rgba(255, 255, 255, 0.95);
            border-radius: 50px;
            padding: 8px 16px;
            font-size: 13px;
            font-weight: 700;
            box-shadow: var(--shadow-md);
            z-index: 150;
            display: none;
            backdrop-filter: blur(8px);
            pointer-events: none;
            white-space: nowrap;
            color: var(--orange);
        }

        .route-info.show {
            display: block;
        }

        .route-info span {
            color: var(--orange);
        }

        .route-info.show {
            display: block;
        }


        /* Loading spinner for map */
        .map-loading {
            position: absolute;
            inset: 0;
            z-index: 50;
            background: #e8e8e8;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            gap: 12px;
        }

        .map-loading .spinner {
            width: 36px;
            height: 36px;
            border: 3px solid var(--border);
            border-top-color: var(--orange);
            border-radius: 50%;
            animation: spin .7s linear infinite;
        }


        .map-loading p {
            font-size: 13px;
            color: var(--text2);
            font-weight: 600;
        }




/* Nueva CSS ??? */
          
    :root {
      --orange: #FF7A00;
      --orange2: #FF4E00;
      --purple: #7B2FBE;
      --gradient: linear-gradient(135deg, var(--purple) 0%, var(--orange) 100%);
      --primary: #fc7b03;
      --primary-gradient: linear-gradient(135deg, #8a2be2, #fc7b03);
      --bg: #f7f7f7;
      --surface: #ffffff;
      --text1: #1a1a1a;
      --text2: #555;
      --text3: #999;
      --border: #eaeaea;
      --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
      --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.12);
      --shadow-lg: 0 -4px 20px rgba(0, 0, 0, 0.14);
      --green: #10b981;
      --red: #ef4444;
      --teal: #20b2aa;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      font-family: 'Inter', sans-serif;
      -webkit-tap-highlight-color: transparent;
    }

    html,
    body {
      width: 100%;
      height: 100%;
      overflow: hidden;
      background: var(--bg);
    }

    /* MAP */
    #map {
      width: 100%;
      height: 100vh;
      position: fixed;
      top: 0;
      left: 0;
      z-index: 1;
    }

    /* APP HEADER */
    .app-header {
      position: fixed;
      top: 16px;
      left: 16px;
      z-index: 300;
      background: var(--surface);
      padding: 8px 16px;
      border-radius: 50px;
      box-shadow: var(--shadow-sm);
      display: flex;
      align-items: center;
      gap: 10px;
      font-weight: 700;
      color: var(--text1);
      font-size: 15px;
      cursor: pointer;
    }

    .logo-pill {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      background: var(--primary-gradient);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 14px;
      color: #fff;
      font-weight: 900;
      flex-shrink: 0;
    }

    /* TOP RIGHT */
    .top-right {
      position: fixed;
      top: 16px;
      right: 16px;
      z-index: 300;
      display: flex;
      flex-direction: column;
      gap: 8px;
      align-items: flex-end;
    }

    .chip {
      background: var(--surface);
      border-radius: 50px;
      box-shadow: var(--shadow-sm);
      padding: 7px 14px;
      font-size: 12px;
      font-weight: 700;
      display: flex;
      align-items: center;
      gap: 6px;
      color: var(--text2);
      cursor: pointer;
      transition: all .2s;
    }

    .chip.online {
      background: var(--primary-gradient);
      color: #fff;
    }

    .status-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: var(--text3);
    }

    .chip.online .status-dot {
      background: rgba(255, 255, 255, .8);
      animation: blink 1.4s infinite;
    }

    @keyframes blink {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: .3
      }
    }

    /* EARNINGS HUD (top-left below header) */
    .hud-box {
      position: fixed;
      top: 72px;
      left: 16px;
      z-index: 300;
      background: var(--surface);
      border-radius: 16px;
      box-shadow: var(--shadow-sm);
      padding: 10px 14px;
      display: none;
      min-width: 120px;
    }

    .hud-box.show {
      display: block;
    }

    .hud-lbl {
      font-size: 10px;
      color: var(--text3);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .hud-val {
      font-size: 22px;
      font-weight: 900;
      color: var(--primary);
      line-height: 1.1;
    }

    .hud-sub {
      font-size: 11px;
      color: var(--text2);
      margin-top: 1px;
    }

    /* MAP BADGE */
    .map-badge {
      position: fixed;
      z-index: 200;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(255, 255, 255, .96);
      border-radius: 50px;
      padding: 8px 18px;
      font-size: 13px;
      font-weight: 700;
      box-shadow: var(--shadow-md);
      color: var(--orange);
      backdrop-filter: blur(8px);
      white-space: nowrap;
      top: 58%;
      display: none;
      pointer-events: none;
    }

    .map-badge.show {
      display: block;
    }

    /* BOTTOM PANEL (base) */

    .top-panel {
      transition: all 0.4s ease;
      overflow: hidden;
    }

    .top-panel.collapsed {
      height: 0;
      padding: 0;
      opacity: 0;
    }

    .toggle-btn {
      width: 2%;
      background: #ff6b00;
      color: white;
      border: none;
      padding: 6px;
      font-weight: bold;
      cursor: pointer;
    }

    .bpanel {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 200;
      background: var(--surface);
      border-radius: 24px 24px 0 0;
      box-shadow: var(--shadow-lg);
      display: none;
      flex-direction: column;
      max-height: 88vh;
      overflow-y: auto;
      padding: 0 20px 36px;
      -webkit-overflow-scrolling: touch;
    }

    .bpanel.show {
      display: flex;
    }

    .bpanel::-webkit-scrollbar {
      display: none;
    }

    .handle {
      width: 40px;
      height: 4px;
      background: #ddd;
      border-radius: 2px;
      margin: 14px auto 18px;
      flex-shrink: 0;
    }

    .ptitle {
      font-size: 18px;
      font-weight: 800;
      color: var(--text1);
      margin-bottom: 16px;
      text-align: center;
    }

    /* PANEL OFFLINE */
    .offline-hero {
      text-align: center;
      padding: 16px 0 20px;
    }

    .offline-icon {
      font-size: 60px;
      margin-bottom: 10px;
      animation: float 3s ease-in-out infinite;
    }

    @keyframes float {

      0%,
      100% {
        transform: translateY(0)
      }

      50% {
        transform: translateY(-8px)
      }
    }

    .offline-title {
      font-size: 22px;
      font-weight: 900;
      color: var(--text1);
      margin-bottom: 6px;
    }

    .offline-sub {
      font-size: 14px;
      color: var(--text2);
      line-height: 1.5;
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin: 18px 0;
    }

    .stat-tile {
      background: var(--bg);
      border-radius: 14px;
      padding: 12px 8px;
      text-align: center;
      border: 1px solid var(--border);
    }

    .stat-tile .v {
      font-size: 20px;
      font-weight: 900;
      color: var(--primary);
    }

    .stat-tile .l {
      font-size: 10px;
      color: var(--text3);
      font-weight: 600;
      margin-top: 2px;
      text-transform: uppercase;
      letter-spacing: .4px;
    }

    .btn-connect {
      width: 100%;
      padding: 18px;
      border: none;
      border-radius: 16px;
      font-size: 17px;
      font-weight: 800;
      color: #fff;
      background: var(--primary-gradient);
      box-shadow: 0 4px 20px rgba(252, 123, 3, .35);
      cursor: pointer;
      transition: transform .15s;
    }

    .btn-connect:active {
      transform: scale(.97);
    }

    .btn-connect.is-online {
      background: linear-gradient(135deg, #ef4444, #b91c1c);
      box-shadow: 0 4px 20px rgba(239, 68, 68, .35);
    }

    /* PANEL REQUESTS */
    .req-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 16px;
    }

    .nbadge {
      background: var(--primary-gradient);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 3px 10px;
      border-radius: 20px;
    }

    .empty-box {
      text-align: center;
      padding: 40px 20px;
    }

    .empty-icon {
      font-size: 44px;
      margin-bottom: 12px;
      opacity: .35;
      animation: float 3s ease-in-out infinite;
    }

    .empty-text {
      font-size: 13px;
      color: var(--text3);
      font-weight: 500;
      line-height: 1.7;
    }

    /* REQUEST CARD */
    .rcard {
      background: var(--surface);
      border: 1.5px solid var(--border);
      border-radius: 18px;
      padding: 16px;
      margin-bottom: 12px;
      box-shadow: var(--shadow-sm);
      cursor: pointer;
      animation: cardIn .3s ease;
      position: relative;
      overflow: hidden;
      transition: transform .15s;
    }

    .rcard::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--primary-gradient);
      border-radius: 18px 18px 0 0;
    }

    @keyframes cardIn {
      from {
        opacity: 0;
        transform: translateY(10px)
      }

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

    .rcard:active {
      transform: scale(.985);
    }

    .rcard-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 12px;
    }

    .rpass {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .ravatar {
      width: 42px;
      height: 42px;
      border-radius: 50%;
      background: var(--primary-gradient);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 15px;
      font-weight: 800;
      flex-shrink: 0;
    }

    .rname {
      font-size: 14px;
      font-weight: 700;
      color: var(--text1);
    }

    .rstars {
      font-size: 11px;
      color: var(--orange);
      font-weight: 600;
    }

    .rprice {
      font-size: 22px;
      font-weight: 900;
      color: var(--green);
    }

    .rroute {
      background: var(--bg);
      border-radius: 12px;
      padding: 12px 14px;
      margin-bottom: 12px;
      position: relative;
    }

    .rroute-line {
      position: absolute;
      left: 20px;
      top: 26px;
      bottom: 26px;
      width: 2px;
      background: var(--border);
    }

    .rpt {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      position: relative;
      z-index: 1;
    }

    .rpt+.rpt {
      margin-top: 10px;
    }

    .dot-o {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--primary);
      border: 2px solid #ffe6cc;
      flex-shrink: 0;
      margin-top: 3px;
    }

    .dot-d {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--teal);
      border: 2px solid #cceeed;
      flex-shrink: 0;
      margin-top: 3px;
    }

    .raddr {
      font-size: 12px;
      color: var(--text2);
      line-height: 1.35;
    }

    .raddr strong {
      color: var(--text1);
      font-weight: 700;
    }

    .rmeta {
      display: flex;
      gap: 14px;
      font-size: 11px;
      color: var(--text3);
      font-weight: 600;
    }

    .ractions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }

    .btn-acc {
      flex: 1;
      padding: 13px;
      border: none;
      border-radius: 12px;
      background: var(--primary-gradient);
      color: #fff;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 3px 12px rgba(252, 123, 3, .3);
      transition: transform .15s;
    }

    .btn-acc:active {
      transform: scale(.97);
    }

    .btn-rej {
      padding: 13px 16px;
      border: 1.5px solid #ddd;
      border-radius: 12px;
      background: var(--bg);
      color: var(--text2);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
    }

    .btn-rej:active {
      background: #fee2e2;
      border-color: var(--red);
      color: var(--red);
    }

    /* PANEL TRIP */

    #p-trip {
      transition: transform .4s ease;
    }

    #p-trip.collapsed {
      transform: translateY(-75%);
    }

    .trip-steps {
      display: flex;
      align-items: flex-start;
      gap: 0;
      margin-bottom: 20px;
    }

    .floating-toggle {
      position: fixed;
      top: 120px;
      /* ajusta según tu diseño */
      right: 15px;
      z-index: 9999;
      width: 42px;
      height: 42px;
      border-radius: 50%;
      border: none;
      background: #ff6b00;
      color: #fff;
      font-size: 18px;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
    }

    .ts {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 5px;
      position: relative;
    }

    .ts-circle {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--border);
      border: 2px solid var(--border);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      font-weight: 700;
      color: var(--text3);
      transition: all .4s;
      z-index: 1;
    }

    .ts.done .ts-circle {
      background: var(--green);
      border-color: var(--green);
      color: #fff;
    }

    .ts.active .ts-circle {
      background: var(--primary-gradient);
      border-color: var(--primary);
      color: #fff;
      box-shadow: 0 0 0 5px rgba(252, 123, 3, .15);
      animation: pr .9s infinite;
    }

    @keyframes pr {

      0%,
      100% {
        box-shadow: 0 0 0 5px rgba(252, 123, 3, .15)
      }

      50% {
        box-shadow: 0 0 0 9px rgba(252, 123, 3, .04)
      }
    }

    .ts-label {
      font-size: 9px;
      font-weight: 700;
      color: var(--text3);
      text-transform: uppercase;
      text-align: center;
    }

    .ts.active .ts-label,
    .ts.done .ts-label {
      color: var(--primary);
    }

    .ts-line {
      position: absolute;
      top: 14px;
      left: 50%;
      right: -50%;
      height: 2px;
      background: var(--border);
      z-index: 0;
    }

    .ts.done .ts-line {
      background: var(--green);
    }

    .ts:last-child .ts-line {
      display: none;
    }

    .status-card {
      background: var(--bg);
      border-radius: 16px;
      padding: 14px 16px;
      border-left: 4px solid var(--primary);
      margin-bottom: 14px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .sc-icon {
      font-size: 28px;
      flex-shrink: 0;
    }

    .sc-lbl {
      font-size: 10px;
      color: var(--text3);
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: .5px;
    }

    .sc-val {
      font-size: 15px;
      font-weight: 800;
      color: var(--text1);
      margin-top: 2px;
    }

    .sc-sub {
      font-size: 12px;
      color: var(--text2);
      margin-top: 2px;
      line-height: 1.4;
    }

    .route-mini {
      background: var(--bg);
      border-radius: 14px;
      padding: 12px 14px;
      margin-bottom: 14px;
      position: relative;
    }

    .route-mini-line {
      position: absolute;
      left: 20px;
      top: 22px;
      bottom: 22px;
      width: 2px;
      background: var(--border);
    }

    .pass-card {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--bg);
      border-radius: 14px;
      padding: 12px 14px;
      margin-bottom: 14px;
    }

    .pass-av {
      width: 44px;
      height: 44px;
      border-radius: 50%;
      background: var(--primary-gradient);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      font-size: 16px;
      flex-shrink: 0;
    }

    .pass-name {
      font-size: 14px;
      font-weight: 700;
      color: var(--text1);
    }

    .pass-stars {
      font-size: 11px;
      color: var(--orange);
      font-weight: 600;
      margin-top: 1px;
    }

    .pass-phone {
      font-size: 11px;
      color: var(--text2);
      margin-top: 1px;
    }

    .btn-call {
      margin-left: auto;
      background: var(--bg);
      border: 1.5px solid var(--border);
      border-radius: 50%;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 16px;
      cursor: pointer;
      flex-shrink: 0;
    }

    .fare-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: linear-gradient(135deg, rgba(138, 43, 226, .06), rgba(252, 123, 3, .06));
      border: 1px solid rgba(252, 123, 3, .18);
      border-radius: 14px;
      padding: 12px 16px;
      margin-bottom: 14px;
    }

    .fare-lbl {
      font-size: 11px;
      color: var(--text2);
      font-weight: 600;
    }

    .fare-method {
      font-size: 11px;
      color: var(--text3);
    }

    .fare-amt {
      font-size: 24px;
      font-weight: 900;
      color: var(--primary);
    }

    .btn-main {
      width: 100%;
      padding: 16px;
      border: none;
      border-radius: 16px;
      background: var(--primary-gradient);
      color: #fff;
      font-size: 16px;
      font-weight: 800;
      cursor: pointer;
      box-shadow: 0 4px 20px rgba(252, 123, 3, .3);
      transition: transform .15s;
      margin-bottom: 8px;
    }

    .btn-main:active {
      transform: scale(.98);
    }

    .btn-sec {
      width: 100%;
      padding: 13px;
      border: 1.5px solid var(--border);
      border-radius: 14px;
      background: var(--bg);
      color: var(--text2);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      margin-bottom: 8px;
    }

    .btn-cancel-t {
      width: 100%;
      padding: 13px;
      border: none;
      border-radius: 14px;
      background: #fef2f2;
      color: var(--red);
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
    }

    .btn-disconnect {
      flex: 1;
      padding: 13px 16px;
      border: none;
      border-radius: 14px;
      background: #fef2f2;
      color: var(--red);
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      transition: all .2s;
      white-space: nowrap;
    }

    .btn-disconnect:active {
      background: #fee2e2;
    }

    /* Banner post-rechazo */
    .disconnect-hint {
      display: flex;
      align-items: center;
      gap: 10px;
      background: #fff7ed;
      border: 1.5px solid #fed7aa;
      border-radius: 14px;
      padding: 12px 14px;
      margin-top: 10px;
      font-size: 13px;
      color: #92400e;
      font-weight: 600;
      max-height: 0;
      overflow: hidden;
      opacity: 0;
      transition: max-height .35s ease, opacity .3s ease, margin .3s ease;
      margin-top: 0;
    }

    .disconnect-hint.show {
      max-height: 80px;
      opacity: 1;
      margin-top: 10px;
    }

    .disconnect-hint span {
      flex: 1;
    }

    .disconnect-hint button {
      background: var(--red);
      color: #fff;
      border: none;
      border-radius: 10px;
      padding: 7px 13px;
      font-size: 12px;
      font-weight: 700;
      cursor: pointer;
      white-space: nowrap;
      flex-shrink: 0;
    }

    .disconnect-hint .close-hint {
      background: transparent;
      color: #92400e;
      padding: 6px;
      font-size: 14px;
      border-radius: 50%;
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* PANEL RATING */
    .rating-hero {
      text-align: center;
      padding: 8px 0 18px;
    }

    .rh-icon {
      font-size: 52px;
      margin-bottom: 8px;
    }

    .trip-summary-card {
      background: var(--bg);
      border-radius: 14px;
      padding: 14px;
      margin-bottom: 18px;
      border: 1px solid var(--border);
    }

    .sum-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 5px 0;
      font-size: 13px;
    }

    .sum-row:not(:last-child) {
      border-bottom: 1px solid var(--border);
    }

    .sum-row .k {
      color: var(--text2);
      font-weight: 500;
    }

    .sum-row .v {
      font-weight: 700;
      color: var(--text1);
    }

    .sum-row .v.green {
      color: var(--green);
      font-size: 20px;
    }

    .stars-row {
      display: flex;
      justify-content: center;
      gap: 8px;
      margin: 14px 0 18px;
    }

    .star-b {
      font-size: 38px;
      color: #ddd;
      cursor: pointer;
      background: none;
      border: none;
      transition: all .2s;
    }

    .star-b.lit {
      color: var(--orange);
      transform: scale(1.1);
    }

    textarea.comment {
      width: 100%;
      padding: 13px 16px;
      border: 1.5px solid var(--border);
      border-radius: 14px;
      font-size: 14px;
      color: var(--text1);
      outline: none;
      resize: none;
      background: var(--bg);
      font-family: inherit;
      margin-bottom: 16px;
      transition: border-color .2s;
    }

    textarea.comment:focus {
      border-color: var(--primary);
      background: var(--surface);
    }

    /* MODAL NUEVA SOLICITUD */
    .modal-overlay {
      position: fixed;
      inset: 0;
      z-index: 500;
      background: rgba(0, 0, 0, .55);
      backdrop-filter: blur(4px);
      display: none;
      align-items: flex-end;
      justify-content: center;
    }

    .modal-overlay.show {
      display: flex;
    }

    .modal-sheet {
      background: var(--surface);
      border-radius: 28px 28px 0 0;
      width: 100%;
      padding: 0 20px 36px;
      animation: sheetIn .35s ease;
      max-height: 92vh;
      overflow-y: auto;
    }

    .modal-sheet::-webkit-scrollbar {
      display: none;
    }

    @keyframes sheetIn {
      from {
        transform: translateY(70%);
        opacity: 0
      }

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

    @keyframes ringPulse {

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

      50% {
        transform: scale(1.5);
        opacity: 1
      }
    }

    .new-pill {
      display: inline-block;
      background: var(--primary-gradient);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      padding: 4px 14px;
      border-radius: 20px;
      letter-spacing: .5px;
      margin: 18px auto 8px;
    }

    .modal-top-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 14px;
    }

    .modal-pass {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .modal-av {
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: var(--primary-gradient);
      color: #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 800;
      flex-shrink: 0;
    }

    .modal-pname {
      font-size: 16px;
      font-weight: 800;
      color: var(--text1);
    }

    .modal-pstars {
      font-size: 12px;
      color: var(--orange);
      font-weight: 600;
    }

    .modal-price {
      font-size: 28px;
      font-weight: 900;
      color: var(--green);
    }

    .modal-route {
      background: var(--bg);
      border-radius: 14px;
      padding: 14px 16px;
      margin-bottom: 14px;
      position: relative;
    }

    .modal-route-line {
      position: absolute;
      left: 21px;
      top: 26px;
      bottom: 26px;
      width: 2px;
      background: var(--border);
    }

    .modal-stats {
      display: flex;
      gap: 8px;
      margin-bottom: 14px;
    }

    .ms {
      flex: 1;
      background: var(--bg);
      border-radius: 12px;
      padding: 10px;
      text-align: center;
      border: 1px solid var(--border);
    }

    .ms .mv {
      font-size: 19px;
      font-weight: 900;
      color: var(--primary);
    }

    .ms .ml {
      font-size: 9px;
      color: var(--text3);
      font-weight: 600;
      text-transform: uppercase;
      margin-top: 1px;
    }

    .ms.green-ms {
      border: 1px solid rgba(16, 185, 129, .25);
      background: rgba(16, 185, 129, .06);
    }

    .ms.green-ms .mv {
      color: var(--green);
    }

    .cdown-row {
      background: var(--bg);
      border-radius: 12px;
      padding: 12px 16px;
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 14px;
    }

    .cdown-track {
      flex: 1;
      height: 6px;
      background: var(--border);
      border-radius: 3px;
      overflow: hidden;
    }

    .cdown-fill {
      height: 100%;
      background: var(--primary-gradient);
      border-radius: 3px;
      transition: width .95s linear;
    }

    .cdown-num {
      font-size: 20px;
      font-weight: 900;
      color: var(--text1);
      min-width: 24px;
      text-align: right;
    }

    .modal-btns {
      display: flex;
      gap: 8px;
    }

    /* LOADING */
    .loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 600;
      background: rgba(255, 255, 255, .85);
      backdrop-filter: blur(4px);
      display: none;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 14px;
    }

    .loading-overlay.show {
      display: flex;
    }

    .spinner {
      width: 40px;
      height: 40px;
      border: 4px solid var(--border);
      border-top: 4px solid var(--primary);
      border-radius: 50%;
      animation: spin .8s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg)
      }
    }

    .loading-txt {
      font-size: 14px;
      font-weight: 600;
      color: var(--text2);
    }

    /* SWEET ALERT */
    .sw-overlay {
      position: fixed;
      inset: 0;
      z-index: 900;
      background: rgba(0, 0, 0, .45);
      backdrop-filter: blur(6px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 24px;
    }

    .sw-overlay.show {
      display: flex;
    }

    .sw-card {
      background: var(--surface);
      border-radius: 24px;
      padding: 32px 24px 24px;
      width: 100%;
      max-width: 320px;
      text-align: center;
      box-shadow: 0 24px 60px rgba(0, 0, 0, .25);
      animation: swIn .32s cubic-bezier(.34, 1.56, .64, 1);
    }

    @keyframes swIn {
      from {
        transform: scale(.7);
        opacity: 0
      }

      to {
        transform: scale(1);
        opacity: 1
      }
    }

    @keyframes swOut {
      from {
        transform: scale(1);
        opacity: 1
      }

      to {
        transform: scale(.85);
        opacity: 0
      }
    }

    .sw-icon {
      font-size: 52px;
      margin-bottom: 14px;
      line-height: 1;
      animation: swIconBounce .4s .1s cubic-bezier(.34, 1.56, .64, 1) both;
    }

    @keyframes swIconBounce {
      from {
        transform: scale(0) rotate(-15deg);
        opacity: 0
      }

      to {
        transform: scale(1) rotate(0);
        opacity: 1
      }
    }

    .sw-title {
      font-size: 19px;
      font-weight: 900;
      color: var(--text1);
      margin-bottom: 8px;
      line-height: 1.2;
    }

    .sw-text {
      font-size: 14px;
      color: var(--text2);
      font-weight: 500;
      line-height: 1.5;
      margin-bottom: 24px;
    }

    .sw-actions {
      display: flex;
      gap: 10px;
    }

    .sw-btn {
      flex: 1;
      padding: 14px;
      border: none;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 700;
      cursor: pointer;
      font-family: inherit;
      transition: transform .15s, box-shadow .15s;
    }

    .sw-btn:active {
      transform: scale(.96);
    }

    .sw-btn-cancel {
      background: var(--bg);
      color: var(--text2);
      border: 1.5px solid var(--border);
    }

    .sw-btn-danger {
      background: linear-gradient(135deg, #ef4444, #b91c1c);
      color: #fff;
      box-shadow: 0 4px 16px rgba(239, 68, 68, .35);
    }

    .sw-btn-primary {
      background: var(--primary-gradient);
      color: #fff;
      box-shadow: 0 4px 16px rgba(252, 123, 3, .35);
    }

    /* TOAST */
    .toast-wrap {
      position: fixed;
      top: 80px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 800;
      width: 90%;
      max-width: 340px;
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      pointer-events: none;
    }

    .toast {
      background: #1a1a1a;
      color: #fff;
      padding: 12px 18px;
      border-radius: 14px;
      font-size: 13px;
      font-weight: 600;
      box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
      display: flex;
      align-items: center;
      gap: 8px;
      animation: tIn .3s ease;
      width: 100%;
    }

    @keyframes tIn {
      from {
        transform: translateY(-14px);
        opacity: 0
      }

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

    .toast.success {
      background: #064e3b;
    }

    .toast.error {
      background: #7f1d1d;
    }

    .toast.info {
      background: #1e3a5f;
    }
  
    .toast.warning {
      background: #c4a910;
    }






    /* --- TRACKER / BARRA DE PROGRESO --- */
.ride-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
}

.tracker-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    width: 50px;
}

.step-circle {
    width: 24px;
    height: 24px;
    background-color: #ccc; /* Gris por defecto */
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}

.step-label {
    font-size: 10px;
    color: #999;
    text-align: center;
}

.tracker-line {
    flex-grow: 1;
    height: 3px;
    background-color: #eee;
    margin: 0 5px;
    margin-bottom: 24px; /* Alinea con el círculo */
    z-index: 1;
}

/* Estado: Completado (Verde como en tu imagen) */
.tracker-step.completed .step-circle {
    background-color: #4CAF50;
}
.tracker-step.completed .step-label {
    color: #4CAF50;
    font-weight: bold;
}

/* Estado: Activo (Morado como en tu imagen) */
.tracker-step.active .step-circle {
    background-color: #9C27B0; /* Morado Uerbi */
    box-shadow: 0 0 8px rgba(156, 39, 176, 0.5);
    transform: scale(1.1);
}
.tracker-step.active .step-label {
    color: #9C27B0;
    font-weight: bold;
}

/* Colorear la línea anterior cuando un paso está activo o completado */
/* Esto requiere un poco de JS o selectores CSS hermanos avanzados, 
   pero para empezar lo haremos simple en el JS */

   /* Línea gris por defecto */
.ts .ts-line {
    background-color: #e0e0e0;
    height: 3px;
    flex: 1;
    transition: background-color 0.4s ease;
}

/* Línea verde cuando el paso está completado */
.ts.completed .ts-line {
    background-color: #4CAF50;
}

/* Línea naranja cuando el paso está activo */
.ts.active .ts-line {
    background-color: #FF7A00;
}