        /* ===== Header action buttons ===== */
        .header-right-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* Tus Pedidos button */
        .btn-mis-pedidos {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 50px;
            border: 1px solid rgba(255, 204, 0, 0.3);
            background: rgba(255, 204, 0, 0.1);
            color: var(--ven-yellow);
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            white-space: nowrap;
            position: relative;
            flex-shrink: 0;
        }

        .btn-mis-pedidos:hover {
            background: rgba(255, 204, 0, 0.2);
            border-color: var(--ven-yellow);
        }

        .btn-mis-pedidos i {
            font-size: 0.85rem;
        }

        .btn-mis-pedidos .pedido-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #e74c3c;
            color: #fff;
            font-size: 0.6rem;
            font-weight: 700;
            display: none;
            align-items: center;
            justify-content: center;
        }

        /* "Tus Pedidos" FLOTANTE: vidrio (glassmorphism) con el amarillo de la
           marca, arriba de la barra del pedido para no taparla. Solo la muestra
           menu.js cuando el pedido ya está hecho; si no hay pedido, no existe en
           pantalla.

           Antes era una píldora amarilla maciza pegada a la barra del pedido
           (`bottom: 92px`): se montaba encima del total y del botón "Ver Pedido"
           y no se distinguía del resto. Ahora flota más arriba y es vidrio con
           tinte y borde amarillo, así resalta sobre las fotos de la carta. */
        .btn-mis-pedidos-flotante {
            position: fixed;
            left: 16px;
            /* La barra del pedido vive a 25px del borde y mide ~100px: la
               píldora va arriba de su filo, con aire de sobra. */
            bottom: 150px;
            z-index: 999;
            padding: 10px 18px;
            border-radius: 999px;
            border: 1px solid rgba(255, 242, 17, 0.55);
            background:
                linear-gradient(135deg,
                    rgba(255, 242, 17, 0.34) 0%,
                    rgba(255, 242, 17, 0.12) 48%,
                    rgba(24, 24, 26, 0.34) 100%);
            backdrop-filter: blur(16px) saturate(170%);
            -webkit-backdrop-filter: blur(16px) saturate(170%);
            color: #ffffff;
            font-size: 0.8rem;
            font-weight: 800;
            letter-spacing: 0.2px;
            text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
            box-shadow:
                0 10px 26px rgba(0, 0, 0, 0.45),
                0 8px 24px rgba(255, 242, 17, 0.22),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
            animation: tus-pedidos-aparece 0.28s ease;
        }

        .btn-mis-pedidos-flotante:hover {
            background:
                linear-gradient(135deg,
                    rgba(255, 242, 17, 0.48) 0%,
                    rgba(255, 242, 17, 0.2) 55%,
                    rgba(24, 24, 26, 0.4) 100%);
            border-color: var(--ven-yellow);
            color: #ffffff;
        }

        .btn-mis-pedidos-flotante:active {
            transform: scale(0.97);
        }

        .btn-mis-pedidos-flotante i {
            color: #fff211;
            filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.45));
        }

        /* En pantallas muy bajas (o con la barra del pedido abierta) la píldora
           sube un poco más: nunca se monta sobre el total ni sobre "Ver Pedido". */
        @media (max-height: 620px) {
            .btn-mis-pedidos-flotante { bottom: 138px; }
        }

        @keyframes tus-pedidos-aparece {
            from { opacity: 0; transform: translateY(12px) scale(0.94); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* "Volver a las mesas": EXCLUSIVO del mesero. La carta del menú normal no
           trae la marca `?mesero=1`, así que un cliente —ni el que entra por el
           QR de su mesa ni el de delivery— no tiene este botón ni puede verlo.
           Va abajo a la derecha para no chocar con "Tus Pedidos" (izquierda) ni
           con la barra del pedido (abajo). */
        .btn-volver-a-mesas {
            position: fixed;
            right: 16px;
            bottom: 92px;
            z-index: 1000;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            border-radius: 999px;
            border: 1px solid rgba(255, 204, 0, 0.75);
            background: rgba(15, 15, 18, 0.92);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: var(--ven-yellow);
            font-family: inherit;
            font-size: 0.8rem;
            font-weight: 800;
            letter-spacing: 0.2px;
            box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
            cursor: pointer;
            animation: volver-mesas-aparece 0.28s ease;
        }

        .btn-volver-a-mesas:hover {
            background: rgba(255, 204, 0, 0.16);
        }

        .btn-volver-a-mesas:active {
            transform: scale(0.97);
        }

        @keyframes volver-mesas-aparece {
            from { opacity: 0; transform: translateY(12px) scale(0.94); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        /* Chip de mesa: la que eligió el QR de la mesa. Queda en la cabecera
           para que el cliente confirme de un vistazo que escaneó el código
           correcto, y es donde se enciende la chapita de "pedido listo". */
        .mesa-chip-header {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 50px;
            border: 1px solid rgba(255, 204, 0, 0.4);
            background: rgba(255, 204, 0, 0.16);
            color: var(--ven-yellow);
            font-size: 0.75rem;
            font-weight: 700;
            white-space: nowrap;
            flex-shrink: 0;
            position: relative;
        }

        .mesa-chip-header i {
            font-size: 0.8rem;
        }

        .mesa-chip-header.pedido-listo {
            background: rgba(255, 204, 0, 0.3);
            border-color: var(--ven-yellow);
            animation: chip-pulso 0.7s ease 2;
        }

        body.light-theme .mesa-chip-header {
            background: rgba(255, 204, 0, 0.2);
            border-color: rgba(255, 204, 0, 0.5);
        }

        /* Chip del servicio en la carta de afuera (a domicilio / para llevar):
           ocupa el lugar del chip de mesa, que en esa carta no existe. */
        .servicio-chip-header {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            border-radius: 50px;
            border: 1px solid rgba(255, 204, 0, 0.4);
            background: rgba(255, 204, 0, 0.16);
            color: var(--ven-yellow);
            font-size: 0.75rem;
            font-weight: 700;
            white-space: nowrap;
            flex-shrink: 0;
            cursor: pointer;
        }

        .servicio-chip-header i {
            font-size: 0.8rem;
        }

        body.light-theme .servicio-chip-header {
            background: rgba(255, 204, 0, 0.2);
            border-color: rgba(255, 204, 0, 0.5);
        }

        /* Opciones del cuadro de servicio (a domicilio / para llevar). */
        .servicio-opcion {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            text-align: left;
            padding: 13px 15px;
            margin-bottom: 10px;
            border-radius: 16px;
            border: 1px solid rgba(255, 255, 255, 0.12);
            background: rgba(255, 255, 255, 0.04);
            color: #fff;
            font-size: 0.9rem;
            cursor: pointer;
        }

        .servicio-opcion i {
            font-size: 1.2rem;
            color: var(--ven-yellow);
            width: 22px;
            text-align: center;
        }

        .servicio-opcion b {
            display: block;
            font-size: 0.95rem;
            font-weight: 700;
        }

        .servicio-opcion small {
            display: block;
            color: rgba(255, 255, 255, 0.55);
            font-size: 0.75rem;
            margin-top: 2px;
        }

        .servicio-opcion.elegido {
            border-color: var(--ven-yellow);
            background: rgba(255, 204, 0, 0.14);
        }

        body.light-theme .servicio-opcion {
            border-color: rgba(0, 0, 0, 0.12);
            background: rgba(0, 0, 0, 0.03);
            color: #1a1a1a;
        }

        body.light-theme .servicio-opcion small {
            color: rgba(0, 0, 0, 0.55);
        }

        /* Options button (hamburger) */
        .btn-options {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: 1px solid rgba(255, 255, 255, 0.1);
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(10px);
            color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
            flex-shrink: 0;
            z-index: 9999;
        }

        .btn-options:hover {
            background: rgba(255, 255, 255, 0.15);
            color: var(--ven-yellow);
            border-color: rgba(255, 204, 0, 0.3);
        }

        .btn-options .hamburger-lines {
            display: flex;
            flex-direction: column;
            gap: 4px;
            width: 16px;
        }

        .btn-options .hamburger-lines span {
            display: block;
            height: 2px;
            background: currentColor;
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        .btn-options.open .hamburger-lines span:nth-child(1) {
            transform: translateY(6px) rotate(45deg);
        }

        .btn-options.open .hamburger-lines span:nth-child(2) {
            opacity: 0;
            transform: scaleX(0);
        }

        .btn-options.open .hamburger-lines span:nth-child(3) {
            transform: translateY(-6px) rotate(-45deg);
        }

        /* Dropdown menu */
        .options-dropdown {
            position: absolute;
            top: calc(100% + 10px);
            right: 0;
            min-width: 200px;
            background: rgba(28, 28, 32, 0.97);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 14px;
            padding: 8px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-8px) scale(0.96);
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 99999;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
        }

        .options-dropdown.show {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .dropdown-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            border-radius: 10px;
            color: rgba(255, 255, 255, 0.8);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            border: none;
            background: none;
            width: 100%;
            text-align: left;
        }

        .dropdown-item:hover {
            background: rgba(255, 255, 255, 0.08);
            color: #fff;
        }

        .dropdown-item i {
            width: 18px;
            text-align: center;
            font-size: 0.9rem;
        }

        .dropdown-item.theme-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .dropdown-item.theme-item .theme-label-group {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        /* Theme toggle switch */
        .theme-switch {
            position: relative;
            width: 42px;
            height: 22px;
            flex-shrink: 0;
        }

        .theme-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .theme-switch-slider {
            position: absolute;
            inset: 0;
            background: rgba(255, 255, 255, 0.15);
            border-radius: 22px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .theme-switch-slider::before {
            content: '';
            position: absolute;
            width: 16px;
            height: 16px;
            left: 3px;
            bottom: 3px;
            background: #fff;
            border-radius: 50%;
            transition: all 0.3s ease;
        }

        .theme-switch input:checked+.theme-switch-slider {
            background: var(--ven-yellow);
        }

        .theme-switch input:checked+.theme-switch-slider::before {
            transform: translateX(20px);
            background: #000;
        }

        /* Cancel animation overlay */
        .cancel-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.7);
            z-index: 999999;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: cancel-fade-in 0.3s ease;
        }

        .cancel-overlay .cancel-card {
            background: rgba(30, 30, 34, 0.98);
            border: 1px solid rgba(231, 76, 60, 0.3);
            border-radius: 20px;
            padding: 30px 24px;
            text-align: center;
            max-width: 320px;
            width: 90%;
            animation: cancel-scale-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        .cancel-overlay .cancel-icon {
            width: 64px;
            height: 64px;
            border-radius: 50%;
            background: rgba(231, 76, 60, 0.15);
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 16px;
            font-size: 1.8rem;
        }

        .cancel-overlay h3 {
            color: #fff;
            font-size: 1.1rem;
            margin-bottom: 6px;
        }

        .cancel-overlay p {
            color: rgba(255, 255, 255, 0.5);
            font-size: 0.85rem;
            margin-bottom: 20px;
        }

        .cancel-overlay .cancel-ok-btn {
            width: 100%;
            padding: 12px;
            border-radius: 12px;
            border: none;
            background: var(--ven-yellow);
            color: #000;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
        }

        @keyframes cancel-fade-in {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        @keyframes cancel-scale-in {
            from {
                transform: scale(0.8);
                opacity: 0;
            }

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

        /* Light theme overrides */
        body.light-theme .main-header {
            background: rgba(255, 255, 255, 0.85);
        }

        body.light-theme .btn-options {
            background: rgba(0, 0, 0, 0.06);
            border-color: rgba(0, 0, 0, 0.1);
            color: #333;
        }

        body.light-theme .options-dropdown {
            background: rgba(255, 255, 255, 0.97);
            border-color: rgba(0, 0, 0, 0.1);
        }

        body.light-theme .dropdown-item {
            color: #333;
        }

        body.light-theme .dropdown-item:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        body.light-theme .btn-mis-pedidos {
            background: rgba(255, 204, 0, 0.15);
            border-color: rgba(255, 204, 0, 0.4);
        }

        /* La flotante sigue siendo VERDE también en el tema claro (la regla de
           arriba es más específica por ser "body.light-theme .btn-mis-pedidos"). */
        body.light-theme .btn-mis-pedidos.btn-mis-pedidos-flotante {
            background: linear-gradient(135deg, #35d97e 0%, #22a95c 100%);
            border-color: rgba(46, 204, 113, 0.8);
            color: #04220f;
        }

        /* ==================================================================
           CHAT CON EL REPARTIDOR (solo pedidos de delivery)
           El botón vive en la cabecera ("Tus Pedidos" ya no: es una píldora
           flotante) y el chat se despliega dentro de la ventana "Mi Pedido".
           ================================================================== */

        .btn-chat-pedido {
            position: relative;
            display: inline-flex;
            align-items: center;
            gap: 7px;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid rgba(255, 204, 0, 0.4);
            background: rgba(255, 204, 0, 0.12);
            color: var(--ven-yellow);
            font-family: 'Poppins', sans-serif;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
        }

        .btn-chat-pedido .chat-badge {
            position: absolute;
            top: -5px;
            right: -4px;
            min-width: 17px;
            height: 17px;
            padding: 0 4px;
            border-radius: 999px;
            background: #e74c3c;
            color: #fff;
            font-size: 0.6rem;
            font-weight: 700;
            align-items: center;
            justify-content: center;
        }


        .chat-pedido-caja {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin: 14px 0;
            border: 1px solid rgba(255, 204, 0, 0.3);
            border-radius: 18px;
            background: rgba(255, 204, 0, 0.06);
            padding: 12px;
        }

        .chat-pedido-cabecera {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .chat-pedido-cabecera > i {
            font-size: 1.1rem;
            color: var(--ven-yellow);
        }

        .chat-pedido-cabecera strong {
            display: block;
            font-size: 0.9rem;
            color: #fff;
        }

        .chat-pedido-cabecera span {
            display: block;
            font-size: 0.72rem;
            color: rgba(255, 255, 255, 0.55);
        }

        body.light-theme .chat-pedido-cabecera strong {
            color: #1a1a1a;
        }

        .chat-pedido-mensajes {
            display: flex;
            flex-direction: column;
            gap: 8px;
            max-height: 210px;
            overflow-y: auto;
            overscroll-behavior: contain;
            -webkit-overflow-scrolling: touch;
        }

        .chat-pedido-mensaje {
            align-self: flex-start;
            max-width: 84%;
            padding: 8px 11px;
            border-radius: 14px;
            background: rgba(255, 255, 255, 0.1);
            color: #fff;
            font-size: 0.84rem;
            line-height: 1.35;
            word-break: break-word;
        }

        .chat-pedido-mensaje.mio {
            align-self: flex-end;
            background: var(--ven-yellow);
            color: #1a1a1a;
        }

        .chat-pedido-hora {
            display: block;
            font-size: 0.62rem;
            opacity: 0.6;
            margin-top: 3px;
        }

        .chat-pedido-vacio {
            font-size: 0.78rem;
            color: rgba(255, 255, 255, 0.5);
            line-height: 1.4;
        }

        .chat-pedido-form {
            display: flex;
            gap: 8px;
        }

        .chat-pedido-form input {
            flex: 1;
            min-width: 0;
            padding: 11px 13px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.14);
            background: rgba(0, 0, 0, 0.25);
            color: #fff;
            font-family: 'Poppins', sans-serif;
            font-size: 0.85rem;
            outline: none;
        }

        body.light-theme .chat-pedido-form input {
            background: #fff;
            color: #1a1a1a;
            border-color: rgba(0, 0, 0, 0.15);
        }

        .chat-pedido-form button {
            width: 46px;
            border: none;
            border-radius: 14px;
            background: var(--ven-yellow);
            color: #000;
            font-size: 0.95rem;
            cursor: pointer;
        }

        /* ── SEGUIMIENTO DEL DELIVERY ───────────────────────────────────────
           Pantalla completa con el mapa del viaje arriba y el chat abajo. Antes
           el chat vivía apretado dentro de "Mi Pedido", con el cartel de "sin
           repartidor" y sin forma de ver por dónde venía el pedido. */
        .seguimiento-panel {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 10020;
            display: none;              /* menu.js lo pone en 'flex' */
            flex-direction: column;
            background: radial-gradient(circle at 20% 0%, rgba(255, 204, 0, 0.12), transparent 55%), #0d0d0f;
        }

        .seguimiento-hoja {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 10px;
            width: 100%;
            max-width: 520px;
            margin: 0 auto;
            padding: 16px 14px 18px;
            min-height: 0;
        }

        .seguimiento-cabecera {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
        }

        .seguimiento-cabecera-txt strong {
            display: block;
            font-size: 1.02rem;
            color: #fff;
        }

        .seguimiento-cabecera-txt span {
            display: block;
            margin-top: 2px;
            font-size: 0.78rem;
            color: rgba(255, 204, 0, 0.9);
        }

        .seguimiento-cerrar {
            width: 38px;
            height: 38px;
            border: none;
            border-radius: 50%;
            background: rgba(231, 76, 60, 0.9);
            color: #fff;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            flex: none;
        }

        .seguimiento-mapa {
            position: relative;
            height: 34vh;
            min-height: 190px;
            border-radius: 18px;
            overflow: hidden;
            border: 1px solid rgba(255, 204, 0, 0.28);
            background: rgba(255, 255, 255, 0.04);
        }

        .seg-mapa-vacio {
            display: flex;
            align-items: center;
            justify-content: center;
            height: 100%;
            padding: 18px;
            text-align: center;
            font-size: 0.82rem;
            line-height: 1.45;
            color: rgba(255, 255, 255, 0.6);
        }

        .seg-pin {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.5rem;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
        }

        .seguimiento-datos {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .seg-fila {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            font-size: 0.8rem;
            color: rgba(255, 255, 255, 0.7);
        }

        .seg-fila strong {
            color: #fff;
            font-weight: 600;
            text-align: right;
        }

        .seg-enlace {
            align-self: flex-start;
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--ven-yellow);
            text-decoration: none;
        }

        /* El chat se queda con el espacio que sobra abajo. */
        .seguimiento-panel .chat-pedido-caja {
            margin: 0;
            flex: 1;
            min-height: 0;
        }

        .seguimiento-panel .chat-pedido-mensajes {
            flex: 1;
            max-height: none;
            min-height: 120px;
        }

        body.light-theme .seguimiento-panel {
            background: radial-gradient(circle at 20% 0%, rgba(255, 204, 0, 0.22), transparent 55%), #f7f4ec;
        }

        body.light-theme .seguimiento-cabecera-txt strong,
        body.light-theme .seg-fila strong {
            color: #1a1a1a;
        }

        body.light-theme .seg-mapa-vacio {
            color: rgba(0, 0, 0, 0.6);
        }
