
    html, body {
        background-color: #ffffff !important;
    }
    @media (min-width: 992px) {
        #map-container {
            display: flex !important;
            width: calc((100vh - 180px) + 360px) !important;
            max-width: 1400px !important;
            height: calc(100vh - 180px) !important;
            max-height: 1040px !important;
            background: #ffffff !important;
            margin-left: 20px !important;
            margin-right: auto !important;
            padding: 0 !important;
            position: relative !important;
            border-radius: 12px !important;
            border: 1px solid #cbd5e1 !important;
            overflow: hidden !important;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
        }
    }
    @media (max-width: 991px) {
        #map-container {
            display: flex !important;
            flex-direction: column !important;
            width: 94% !important;
            max-width: 480px !important;
            height: auto !important;
            aspect-ratio: 1 / 1 !important;
            background: #ffffff !important;
            margin-top: 50px !important;
            margin-bottom: 25px !important;
            margin-left: auto !important;
            margin-right: auto !important;
            position: relative !important;
            border-radius: 12px !important;
            border: 1px solid #cbd5e1 !important;
            overflow: hidden !important;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06) !important;
        }
        #map-canvas-wrap, #map-svg {
            background: #ffffff !important;
            background-color: #ffffff !important;
            flex: 1 !important;
            height: 100% !important;
            width: 100% !important;
        }
    }
    #floating-space-toolbar,
    #floating-join-tables-bar,
    .btn-warning#btn-toggle-edit-mode,
    .btn-success#btn-save-layout {
        display: none !important;
    }
    #map-canvas-wrap {
        flex: 1 !important;
        height: 100% !important;
        position: relative !important;
        overflow: hidden !important;
        cursor: grab;
        background: #ffffff !important;
        order: 1 !important;
    }
    @media (min-width: 992px) {
        #map-sidebar {
            display: flex !important;
            width: 360px !important;
            order: 2 !important;
            border-left: 1px solid #cbd5e1 !important;
            border-right: none !important;
        }
    }
    @media (max-width: 991px) {
        #map-sidebar {
            display: none !important;
        }
    }
    #map-svg {
        width: 100% !important;
        height: 100% !important;
        display: block !important;
    }

    #modal-select-chairs input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }
    #modal-select-chairs input {
        color: #ffffff !important;
        background-color: #1e293b !important;
        border-color: #475569 !important;
    }




    select#map-event-id,
    select#edit-space-rotation-select,
    select#block-unit,
    .btn-group,
    #edit-mode-controls,
    .bg-dark.p-3 {
        display: none !important;
    }

    #modal-select-chairs input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }
    #modal-select-chairs input {
        color: #ffffff !important;
        background-color: #1e293b !important;
        border-color: #475569 !important;
    }




    /* Ocultar selectores de eventos, aforos y barras de controles secundarias en la vista publica */
    #map-event-id, 
    .select2-container--default,
    .badge.bg-dark,
    #capacity-badge,
    .page-title,
    .breadcrumb,
    #edit-mode-controls,
    #standard-mode-controls {
        display: none !important;
    }
    .pk-map-wrap {
        margin-top: 0 !important;
    }

    #modal-select-chairs input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }
    #modal-select-chairs input {
        color: #ffffff !important;
        background-color: #1e293b !important;
        border-color: #475569 !important;
    }




                                                                                .contenedor-mesas {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100% !important;
        padding: 120px 110px !important;
        background: #ffffff;
        border-radius: 20px;
        overflow: visible !important;
        box-sizing: border-box;
    }
    .mesa-modal {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
    }
        .circular-modal {
        background-color: transparent;
        background-image: url("/storage/mobiliario/mesa-redonda.png?v=5");
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
    }
        .rectangular-modal {
        background-color: transparent;
        background-image: url("/storage/mobiliario/mesa-rectangular.png?v=5");
        background-size: 100% 100%;
        background-position: center;
        background-repeat: no-repeat;
    }
    .silla-wrapper {
        position: absolute;
        width: 58px;
        height: 58px;
        transition: none !important; /* Desactivar animación para evitar capas GPU */
    }
    .silla {
        width: 58px;
        height: 58px;
        cursor: pointer;
        transition: none !important;
    }
    .silla:hover {
    }
        .numero-silla {
        position: absolute;
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
        color: #000000;
        font-size: 15px;
        font-weight: bold;
        white-space: nowrap;
        pointer-events: none;
        z-index: 5;
    }
                                                        #modal-select-chairs .modal-dialog {
        width: fit-content !important;
        min-width: 700px !important;
        max-width: 95vw !important;
        margin: 1.75rem auto;
    }
                                                                                .contenedor-mesas {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100% !important;
        padding: 120px 110px !important;
        background: #ffffff;
        border-radius: 20px;
        overflow: visible !important;
        box-sizing: border-box;
    }

    .mesa-unida-highlight {
        outline: 4px solid #3b82f6 !important;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.8) !important;
        border-radius: 8px;
    }
    #floating-join-tables-bar {
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1050;
        background: #0f172a;
        color: #ffffff;
        padding: 12px 26px;
        border-radius: 50px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        display: flex;
        align-items: center;
        gap: 18px;
        border: 1px solid rgba(59, 130, 246, 0.4);
    }
    .contenedor-mesas-combinadas {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 40px;
        width: 100% !important;
        padding: 90px 40px !important;
        background: #ffffff;
        border-radius: 20px;
        overflow: visible !important;
        box-sizing: border-box;
    }
    .bloque-mesa-combinada {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .pk-rotate-handle {
        fill: #3b82f6;
        stroke: #ffffff;
        stroke-width: 2px;
        cursor: pointer;
        transition: transform 0.2s ease, fill 0.2s ease;
    }
    .pk-rotate-handle:hover {
        fill: #2563eb;
        transform: scale(1.2);
    }
    #floating-space-toolbar {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1040;
        background: #0f172a;
        color: #ffffff;
        padding: 8px 18px;
        border-radius: 40px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        gap: 12px;
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    #modal-select-chairs input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }
    #modal-select-chairs input {
        color: #ffffff !important;
        background-color: #1e293b !important;
        border-color: #475569 !important;
    }




    #map-container {
        display: flex;
        height: calc(100vh - 160px);
        background: #181b22;
        font-family: 'Outfit', sans-serif;
        border-radius: 12px;
        overflow: hidden;
    }
    #map-sidebar {
        width: 450px;
        background: #20242e;
        border-right: 1px solid #2f3646;
        display: flex;
        flex-direction: column;
        color: #e2e8f0;
    }
    #map-canvas-wrap {
        flex: 1 !important;
        height: 100% !important;
        position: relative !important;
        overflow: hidden !important;
        cursor: grab;
        background: #ffffff !important;
        order: 1 !important;
    }
    @media (min-width: 992px) {
        #map-sidebar {
            display: flex !important;
            width: 360px !important;
            order: 2 !important;
            border-left: 1px solid #cbd5e1 !important;
            border-right: none !important;
        }
    }
    @media (max-width: 991px) {
        #map-sidebar {
            display: none !important;
        }
    }
    #map-canvas-wrap:active {
        cursor: grabbing;
    }
    #map-svg {
        width: 100%;
        height: 100%;
        display: block;
        user-select: none;
    }
    .pk-stall-lines {
        fill: none;
        stroke: rgba(255, 255, 255, 0.15);
        stroke-width: 1.5;
    }
    .pk-space {
        cursor: pointer;
        transition: filter 0.15s ease;
    }
    .pk-space:hover {
        filter: brightness(1.2);
    }
    .selected {
        stroke: #3b82f6 !important;
        stroke-width: 3px !important;
        filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.6));
    }
    .pk-resize-handle {
        fill: #3b82f6;
        stroke: #ffffff;
        stroke-width: 1.5;
        cursor: nwse-resize;
    }
    .catalog-item {
        background: #2a303c;
        border: 1px solid #3f4756;
        border-radius: 8px;
        padding: 10px;
        margin-bottom: 10px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        transition: background 0.2s ease;
    }
    .catalog-item:hover {
        background: #323947;
    }
    .catalog-thumb {
        width: 48px;
        height: 48px;
        object-fit: contain;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 4px;
        padding: 4px;
    }
    .space-detail-field {
        background: #2a303c;
        padding: 8px 12px;
        border-radius: 6px;
        margin-bottom: 8px;
        border-left: 3px solid #3b82f6;
    }

    /* Estilos del scrollbar premium para el listado de sillas */
    #selected-chairs-list-container {
        scrollbar-width: thin;
        scrollbar-color: #4b5563 #11141a;
    }
    #selected-chairs-list-container::-webkit-scrollbar {
        width: 8px;
        display: block !important;
    }
    #selected-chairs-list-container::-webkit-scrollbar-track {
        background: #11141a !important;
        border-radius: 4px;
    }
    #selected-chairs-list-container::-webkit-scrollbar-thumb {
        background: #4b5563 !important;
        border-radius: 4px;
        border: 1px solid #11141a;
    }
    #selected-chairs-list-container::-webkit-scrollbar-thumb:hover {
        background: #3b82f6 !important;
    }

    /* Animación de rebote para el indicador de scroll */
    @keyframes bounce {
        0%, 100% { transform: translateY(0); }
        50% { transform: translateY(-3px); }
    }
    .animate-bounce {
        animation: bounce 1s infinite;
        display: inline-block;
    }
                                                        #modal-select-chairs .modal-dialog {
        width: fit-content !important;
        min-width: 700px !important;
        max-width: 95vw !important;
        margin: 1.75rem auto;
    }
                                                                                .contenedor-mesas {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100% !important;
        padding: 120px 110px !important;
        background: #ffffff;
        border-radius: 20px;
        overflow: visible !important;
        box-sizing: border-box;
    }

    .mesa-unida-highlight {
        outline: 4px solid #3b82f6 !important;
        box-shadow: 0 0 15px rgba(59, 130, 246, 0.8) !important;
        border-radius: 8px;
    }
    #floating-join-tables-bar {
        position: fixed;
        bottom: 30px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1050;
        background: #0f172a;
        color: #ffffff;
        padding: 12px 26px;
        border-radius: 50px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.4);
        display: flex;
        align-items: center;
        gap: 18px;
        border: 1px solid rgba(59, 130, 246, 0.4);
    }
    .contenedor-mesas-combinadas {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 40px;
        width: 100% !important;
        padding: 90px 40px !important;
        background: #ffffff;
        border-radius: 20px;
        overflow: visible !important;
        box-sizing: border-box;
    }
    .bloque-mesa-combinada {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .pk-rotate-handle {
        fill: #3b82f6;
        stroke: #ffffff;
        stroke-width: 2px;
        cursor: pointer;
        transition: transform 0.2s ease, fill 0.2s ease;
    }
    .pk-rotate-handle:hover {
        fill: #2563eb;
        transform: scale(1.2);
    }
    #floating-space-toolbar {
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1040;
        background: #0f172a;
        color: #ffffff;
        padding: 8px 18px;
        border-radius: 40px;
        box-shadow: 0 8px 25px rgba(0,0,0,0.3);
        display: flex;
        align-items: center;
        gap: 12px;
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    #modal-select-chairs input::placeholder {
        color: #94a3b8 !important;
        opacity: 1 !important;
    }
    #modal-select-chairs input {
        color: #ffffff !important;
        background-color: #1e293b !important;
        border-color: #475569 !important;
    }


/* === OVERRIDE GLOBAL DEFINITIONS (DESKTOP) === */
#modal-select-chairs .modal-dialog {
    width: fit-content !important;
    min-width: 720px !important;
    max-width: 95vw !important;
    margin: 1.75rem auto !important;
}

.contenedor-mesas {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    padding: 120px 110px !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.silla-wrapper {
    width: 58px !important;
    height: 58px !important;
}

.silla {
    width: 58px !important;
    height: 58px !important;
    transition: none !important;
}


.numero-silla {
    font-size: 15px !important;
    top: -20px !important;
    color: #000000 !important;
    font-weight: bold !important;
}

#modal-select-chairs input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}
#modal-select-chairs input {
    color: #ffffff !important;
    background-color: #1e293b !important;
    border-color: #475569 !important;
}

/* === OVERRIDE MOBILE DEFINITIONS === */
@media (max-width: 991px) {
    #modal-select-chairs .modal-dialog {
        min-width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 10px auto !important;
    }

    .contenedor-mesas {
        padding: 55px 40px !important;
        overflow: visible !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: auto !important;
        background: #ffffff !important;
        border-radius: 20px !important;
    }

    .mesa-modal {
        transform: scale(0.58) !important;
        transform-origin: center center !important;
        flex-shrink: 0 !important;
    }

    .silla-wrapper {
        width: 52px !important;
        height: 52px !important;
    }

    .silla {
        width: 52px !important;
        height: 52px !important;
    }

    .numero-silla {
        font-size: 13px !important;
        top: -20px !important;
    }

    #occupy-actions-container {
        flex-direction: column !important;
        gap: 8px !important;
    }

    #occupy-actions-container button {
        width: 100% !important;
        margin: 0 !important;
    }
}


/* Posicionamiento de números sin rotar contenedor (100% horizontal y centrado) */
.silla-top .numero-silla {
    position: absolute !important;
    top: -20px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}
.silla-bottom .numero-silla {
    position: absolute !important;
    top: auto !important;
    bottom: -20px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}





/* Reglas de especificidad máxima para anular el giro de las sillas */
#modal-select-chairs .contenedor-mesas .silla-wrapper img.silla {
    transition: none !important;
}
#modal-select-chairs .contenedor-mesas .silla-wrapper {
    transition: none !important;
}




