/* assets/css/style.css */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: transparent; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

@keyframes dash { to { stroke-dashoffset: -30; } }
.animate-dash { animation: dash 1s linear infinite; }

.strike { text-decoration: line-through; color: #94a3b8; }
.no-select { 
    user-select: none; 
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
}

/* Modificadores de arrastre y selección */
.editable-item { transition: box-shadow .15s ease, transform .15s ease; cursor: grab; }
.editable-item:active { cursor: grabbing !important; transform: scale(1.05); }
.editable-item:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); z-index: 50 !important; }
.editable-item.editor-selected { box-shadow: 0 0 0 3px #3b82f6, 0 10px 25px -5px rgba(59,130,246,0.3); z-index: 80 !important; }

/* Grid Premium Claro */
.bg-grid-premium {
    background-color: #f8fafc;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 30px 30px;
}
/* assets/css/style.css */
/* Scrollbar Premium */
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f8fafc; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* Animaciones y Estados Globales */
@keyframes dash { to { stroke-dashoffset: -30; } }
.animate-dash { animation: dash 1s linear infinite; }
.strike { text-decoration: line-through; color: #94a3b8; }
.no-select { user-select: none; -webkit-user-select: none; }

/* Grid Premium Claro para el fondo */
.bg-grid-premium {
    background-color: #f8fafc;
    background-image: radial-gradient(#e2e8f0 1.2px, transparent 1.2px);
    background-size: 30px 30px;
}

/* Sombras Premium SaaS */
.shadow-premium { box-shadow: 0 10px 30px -5px rgba(15,23,42,0.08); }
.shadow-premium-lg { box-shadow: 0 20px 50px -10px rgba(15,23,42,0.1); }

/* Estados del Editor */
.editable-item { cursor: grab; transition: box-shadow 0.2s ease, transform 0.2s ease, ring 0.2s ease; }
.editable-item:active { cursor: grabbing !important; transform: scale(1.05); }
.editable-item:hover { z-index: 100 !important; box-shadow: 0 20px 40px -8px rgba(37,99,235,0.15); border-color: #93c5fd !important; }
.editor-selected { z-index: 110 !important; border-color: #2563eb !important; border-style: solid !important; box-shadow: 0 20px 40px -8px rgba(37,99,235,0.25); }
.editor-selected::after { content: ''; position: absolute; -top: 6px; -right: 6px; width: 12px; height: 12px; background: #2563eb; border: 2px solid white; rounded-full; }

/* Sombras para los Avatares Tag */
.tag-avatar { box-shadow: 0 8px 20px -4px rgba(15,23,42,0.15); border: 4px solid white; transition: transform 0.2s ease; }
.occ-tag:hover .tag-avatar { transform: scale(1.15) translateY(-5px); }

.directory-search-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.directory-layout {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.directory-search-card {
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.directory-search-box {
    width: 100%;
    height: 58px;
    border: 1px solid #dbe4f0;
    border-radius: 20px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    padding: 0 18px;
    gap: 12px;
    margin-bottom: 20px;
}

.directory-search-box svg {
    width: 22px;
    height: 22px;
    color: #64748b;
}

.directory-search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.directory-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.directory-tab {
    border: 1px solid #dbe4f0;
    background: #ffffff;
    color: #334155;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.directory-tab:hover {
    background: #eff6ff;
    color: #2563eb;
}

.directory-tab.active {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.directory-count {
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.directory-mini-counts {
    display: inline-block;
    margin-left: 10px;
    color: #94a3b8;
    font-weight: 800;
}

.directory-scroll-area {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 8px;
    padding-bottom: 32px;
}

.directory-suite-block {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    overflow: hidden;
    margin-bottom: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.directory-suite-title {
    padding: 18px 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.directory-suite-title h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 950;
    color: #0f172a;
}

.directory-suite-title span {
    font-size: 14px;
    color: #64748b;
    font-weight: 900;
}

.directory-table {
    width: 100%;
    border-collapse: collapse;
}

.directory-table th {
    text-align: left;
    padding: 16px 30px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.directory-table td {
    padding: 20px 30px;
    border-bottom: 1px solid #edf2f7;
    color: #0f172a;
    font-weight: 800;
}

.directory-table tr:last-child td {
    border-bottom: none;
}

.directory-person {
    display: flex;
    align-items: center;
    gap: 16px;
}

.directory-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    border: 1px solid #bfdbfe;
}

.directory-badge {
    display: inline-flex;
    padding: 8px 14px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid #dbe4f0;
    font-size: 13px;
    font-weight: 900;
    color: #0f172a;
}

.directory-seat {
    color: #0f172a;
    font-family: monospace;
    font-weight: 900;
}

.directory-action {
    text-align: right;
}

.directory-location-btn {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: #eff6ff;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.directory-location-btn:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-1px);
}

.directory-location-btn svg {
    width: 22px;
    height: 22px;
}

.directory-empty {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 36px;
    text-align: center;
    color: #64748b;
    font-weight: 900;
}

.seat-highlight-pulse {
    animation: seatPulseLocation 0.75s ease-in-out 4;
    outline: 4px solid #2563eb !important;
    outline-offset: 4px !important;
    z-index: 9999 !important;
    position: relative !important;
    box-shadow:
        0 0 0 8px rgba(37, 99, 235, 0.18),
        0 0 30px rgba(37, 99, 235, 0.45) !important;
}

@keyframes seatPulseLocation {
    0% {
        transform: scale(1);
        filter: brightness(1);
    }

    50% {
        transform: scale(1.16);
        filter: brightness(1.25);
    }

    100% {
        transform: scale(1);
        filter: brightness(1);
    }
}

@media (max-width: 1279px) {
    /*
      En móvil la leyenda estorba. Se oculta siempre.
    */
    #mobile-map-legend {
        display: none !important;
    }

    #map-wrapper {
        touch-action: pan-x pan-y !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #map-zoom-target {
        transform-origin: top left !important;
    }

    /*
      Asegura que las mesas sigan recibiendo taps.
    */
    #map-wrapper [onclick],
    #map-wrapper button,
    #map-wrapper div[data-seat-code] {
        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    body.map-mobile-fullscreen {
        overflow: hidden !important;
        background: #0f1720 !important;
        width: 100vw !important;
        height: 100dvh !important;
    }

    body.map-mobile-fullscreen #map-screen {
        position: fixed !important;
        inset: 0 !important;
        z-index: 9994 !important;
        width: 100vw !important;
        height: 100dvh !important;
        background: #0f1720 !important;
        overflow: hidden !important;
        display: flex !important;
        flex-direction: column !important;
    }

    body.map-mobile-fullscreen #map-wrapper {
        position: fixed !important;
        inset: 0 !important;
        width: 100vw !important;
        height: 100dvh !important;
        padding: 16px 16px 96px 16px !important;
        background: #0f1720 !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
        pointer-events: auto !important;
    }

    body.map-mobile-fullscreen #map-wrapper > div {
        min-width: max-content !important;
        width: max-content !important;
        pointer-events: auto !important;
    }

   body.map-mobile-fullscreen #mobile-map-legend,
body.map-mobile-fullscreen header,
body.map-mobile-fullscreen .topbar,
body.map-mobile-fullscreen .sidebar,
body.map-mobile-fullscreen #main-nav {
    display: none !important;
}

/* No esconder el panel derecho */
body.map-mobile-fullscreen #right-panel {
    display: block;
    z-index: 10080 !important;
}

body.map-mobile-fullscreen #right-panel-overlay {
    z-index: 10070 !important;
}

    body.map-mobile-fullscreen #mobile-map-fullscreen-btn {
        position: fixed !important;
        z-index: 10050 !important;
        right: 16px !important;
        bottom: 18px !important;
        background: #2563eb !important;
        color: #ffffff !important;
        box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35) !important;
        pointer-events: auto !important;
    }

    body.map-mobile-fullscreen #right-panel {
        z-index: 10080 !important;
    }

    body.map-mobile-fullscreen #right-panel-overlay {
        z-index: 10070 !important;
    }
}

@media (max-width: 767px) {
    #mobile-map-legend {
        max-height: 92px;
        overflow-y: auto;
        padding: 12px 16px !important;
    }

    #mobile-map-legend > div {
        gap: 8px 14px !important;
        font-size: 9px !important;
        line-height: 1.15 !important;
    }

    #mobile-map-fullscreen-btn {
        bottom: 18px !important;
        right: 18px !important;
    }
}

/* =========================================================
   CONCENTRADO DE REPORTES POR ASOCIADO
========================================================= */

.report-concentrado-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 520px;
    gap: 24px;
    align-items: start;
    margin-bottom: 22px;
}

.report-concentrado-title {
    margin: 0;
    color: #061947;
    font-size: 24px;
    font-weight: 950;
    line-height: 1.25;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-concentrado-title i {
    width: 26px;
    height: 26px;
    color: #4f46e5;
}

.report-concentrado-subtitle {
    margin: 8px 0 0;
    color: #51617a;
    font-size: 13px;
    font-weight: 700;
}

.report-filter-box {
    background: #eef2f7;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-filter-pill {
    border: none;
    background: transparent;
    color: #0f2557;
    padding: 8px 13px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.18s ease;
}

.report-filter-pill span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: 5px;
    border-radius: 999px;
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 950;
}

.report-filter-pill.active {
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.report-filter-pill[data-report-filter="2"] span {
    background: #fef3c7;
    color: #b45309;
}

.report-filter-pill[data-report-filter="3"] span,
.report-filter-pill[data-report-filter="4"] span {
    background: #fee2e2;
    color: #dc2626;
}

.report-associate-grid {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: 12px;
    padding-bottom: 28px;
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 20px;
}

.associate-report-card {
    background: #ffffff;
    border: 1px solid #e5eaf3;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.associate-report-card:hover {
    transform: translateY(-2px);
    border-color: #dbeafe;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.associate-report-card.hidden {
    display: none;
}

.associate-report-top {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 16px;
}

.associate-report-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 14px;
    flex-shrink: 0;
}

.associate-report-avatar.warning {
    background: #fbbf24;
    color: #111827;
}

.associate-report-avatar.normal {
    background: #dfe7ff;
    color: #4f46e5;
}

.associate-report-top h3 {
    margin: 0;
    color: #061947;
    font-size: 14px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.associate-report-top p {
    margin: 4px 0 0;
    color: #8190a8;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.associate-report-count {
    background: #f8fafc;
    border: 1px solid #e8eef7;
    border-radius: 12px;
    padding: 10px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.associate-report-count span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.associate-report-badge {
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.associate-report-badge.warning {
    background: #fff7d6;
    border: 1px solid #facc15;
    color: #b45309;
}

.associate-report-badge.normal {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    color: #1e3a8a;
}

.associate-report-btn {
    width: 100%;
    border: none;
    background: #eef2f7;
    color: #0f2557;
    border-radius: 10px;
    padding: 10px;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.associate-report-btn i {
    width: 14px;
    height: 14px;
}

.associate-report-btn:hover {
    background: #dfe7f2;
}

.associate-report-btn:active {
    transform: scale(0.98);
}

@media (max-width: 1280px) {
    .report-concentrado-header {
        grid-template-columns: 1fr;
    }

    .report-filter-box {
        width: 100%;
    }

    .report-associate-grid {
        grid-template-columns: repeat(3, minmax(190px, 1fr));
    }
}

@media (max-width: 900px) {
    .report-associate-grid {
        grid-template-columns: repeat(2, minmax(170px, 1fr));
    }
}

@media (max-width: 560px) {
    .report-associate-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RANGO DE FECHAS EN REPORTES
========================================================= */

.report-date-range-box {
    margin-top: 10px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px;
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.report-date-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.report-date-field label {
    font-size: 10px;
    font-weight: 950;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.report-date-field input {
    height: 38px;
    border: 1px solid #dbe3ef;
    background: #f8fafc;
    border-radius: 10px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
    color: #0f172a;
    outline: none;
}

.report-date-field input:focus {
    background: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.report-date-btn {
    height: 38px;
    border: none;
    border-radius: 10px;
    padding: 0 13px;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.report-date-btn i {
    width: 14px;
    height: 14px;
}

.report-date-btn.apply {
    background: #2563eb;
    color: #ffffff;
}

.report-date-btn.apply:hover {
    background: #1d4ed8;
}

.report-date-btn.clear {
    background: #eef2f7;
    color: #334155;
}

.report-date-btn.clear:hover {
    background: #e2e8f0;
}

.report-date-btn:active {
    transform: scale(0.97);
}

/* =========================================================
   BOTONES EDITAR / ELIMINAR INCIDENCIAS
========================================================= */

.incident-action-btn {
    border: none;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.incident-action-btn i {
    width: 13px;
    height: 13px;
}

.incident-action-btn.edit {
    background: #fff7ed;
    color: #c2410c;
    border: 1px solid #fed7aa;
}

.incident-action-btn.edit:hover {
    background: #ffedd5;
}

.incident-action-btn.delete {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.incident-action-btn.delete:hover {
    background: #fee2e2;
}

.incident-action-btn:active {
    transform: scale(0.97);
}
/* =========================================================
   RESPONSIVE MOBILE FIRST - AJUSTE FINAL 2026-06-10
   Objetivo: teléfono usable sin romper desktop.
========================================================= */

html,
body {
    width: 100%;
    min-width: 0;
    overscroll-behavior: none;
}

* {
    box-sizing: border-box;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    touch-action: manipulation;
}

input,
select,
textarea {
    font-size: 16px;
}

#app-views {
    min-width: 0;
}

#app-views > * {
    min-width: 0;
}

.table-responsive,
#app-views table {
    max-width: 100%;
}

@media (max-width: 767px) {
    body {
        height: 100dvh !important;
        overflow: hidden !important;
    }

    #sidebar {
        width: min(86vw, 320px) !important;
    }

    header {
        height: auto !important;
        min-height: 64px !important;
        padding: 10px 12px !important;
        gap: 10px !important;
    }

    header > div:first-child {
        min-width: 0 !important;
        flex: 1 1 auto !important;
    }

    header > div:first-child #topbar-title {
        max-width: 44vw !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        font-size: 11px !important;
        letter-spacing: .12em !important;
    }

    header > .relative {
        width: 44vw !important;
        min-width: 132px !important;
        flex: 0 0 auto !important;
    }

    #global-search {
        height: 40px !important;
        border-radius: 12px !important;
        font-size: 16px !important;
    }

    #app-views {
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #app-views > div {
        padding: 16px !important;
        height: auto !important;
        min-height: 100% !important;
        overflow: visible !important;
    }

    #right-panel {
        width: 100vw !important;
        max-width: 100vw !important;
        border-left: 0 !important;
    }

    #right-panel > div,
    #right-panel form {
        max-height: 100dvh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        padding-bottom: 110px !important;
    }

    #modals-container > div {
        padding: 12px !important;
        align-items: flex-end !important;
    }

    #modals-container .max-w-3xl,
    #modals-container .max-w-2xl,
    #modals-container .max-w-xl,
    #modals-container .max-w-lg,
    #modals-container .max-w-md {
        max-width: 100% !important;
        width: 100% !important;
        border-radius: 22px 22px 0 0 !important;
        max-height: 92dvh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .grid,
    .flex {
        min-width: 0;
    }

    .shadow-2xl,
    .shadow-xl,
    .shadow-lg {
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.10) !important;
    }
}

/* Directorio */
@media (max-width: 767px) {
    .directory-layout {
        height: auto !important;
        min-height: 100% !important;
    }

    .directory-search-card {
        padding: 14px !important;
        border-radius: 18px !important;
        margin-bottom: 14px !important;
        position: sticky;
        top: 0;
        z-index: 20;
    }

    .directory-search-box {
        height: 48px !important;
        border-radius: 15px !important;
        margin-bottom: 12px !important;
    }

    .directory-search-box input {
        font-size: 16px !important;
    }

    .directory-tabs {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        padding-bottom: 4px !important;
        gap: 8px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .directory-tab {
        flex: 0 0 auto !important;
        padding: 9px 13px !important;
        font-size: 12px !important;
    }

    .directory-count,
    .directory-mini-counts {
        display: block !important;
        margin-left: 0 !important;
        font-size: 12px !important;
        line-height: 1.45 !important;
    }

    .directory-scroll-area {
        overflow: visible !important;
        padding-right: 0 !important;
        padding-bottom: 96px !important;
    }

    .directory-suite-block {
        border-radius: 18px !important;
        margin-bottom: 16px !important;
        overflow: visible !important;
    }

    .directory-suite-title {
        padding: 14px 16px !important;
        display: block !important;
    }

    .directory-suite-title h3 {
        font-size: 18px !important;
        margin-bottom: 4px !important;
    }

    .directory-suite-title span {
        font-size: 12px !important;
    }

    .directory-table,
    .directory-table thead,
    .directory-table tbody,
    .directory-table tr,
    .directory-table th,
    .directory-table td {
        display: block !important;
        width: 100% !important;
    }

    .directory-table thead {
        display: none !important;
    }

    .directory-table tbody {
        padding: 10px !important;
    }

    .directory-table tr {
        background: #ffffff !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 16px !important;
        padding: 12px !important;
        margin-bottom: 10px !important;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
    }

    .directory-table td {
        border-bottom: 0 !important;
        padding: 8px 0 !important;
        text-align: left !important;
    }

    .directory-table td:nth-child(2)::before,
    .directory-table td:nth-child(3)::before,
    .directory-table td:nth-child(4)::before {
        display: block;
        color: #94a3b8;
        font-size: 10px;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: .10em;
        margin-bottom: 4px;
    }

    .directory-table td:nth-child(2)::before { content: 'Departamento'; }
    .directory-table td:nth-child(3)::before { content: 'Mesa'; }
    .directory-table td:nth-child(4)::before { content: 'Horario'; }

    .directory-person {
        gap: 12px !important;
    }

    .directory-avatar {
        width: 44px !important;
        height: 44px !important;
        flex: 0 0 44px !important;
    }

    .directory-action {
        text-align: left !important;
        padding-top: 10px !important;
    }

    .directory-location-btn {
        width: 100% !important;
        height: 46px !important;
        border-radius: 14px !important;
    }
}

/* Reportes */
@media (max-width: 767px) {
    .report-concentrado-header {
        grid-template-columns: 1fr !important;
        gap: 14px !important;
        margin-bottom: 16px !important;
    }

    .report-concentrado-title {
        font-size: 19px !important;
        line-height: 1.25 !important;
        gap: 8px !important;
    }

    .report-concentrado-title i {
        width: 21px !important;
        height: 21px !important;
        flex: 0 0 21px !important;
    }

    .report-concentrado-subtitle {
        font-size: 12px !important;
    }

    .report-filter-box {
        border-radius: 16px !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        padding: 8px !important;
    }

    .report-filter-pill {
        width: 100% !important;
        padding: 9px 8px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
    }

    .report-date-range-box {
        margin-top: 0 !important;
        border-radius: 18px !important;
        padding: 12px !important;
        gap: 10px !important;
    }

    .report-date-field {
        flex: 1 1 100% !important;
        width: 100% !important;
    }

    .report-date-field input,
    .report-date-field select {
        width: 100% !important;
        height: 44px !important;
        font-size: 16px !important;
    }

    .report-date-btn {
        flex: 1 1 calc(50% - 6px) !important;
        justify-content: center !important;
        height: 44px !important;
        font-size: 11px !important;
        padding: 0 10px !important;
    }

    .report-associate-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        overflow: visible !important;
        padding-right: 0 !important;
        padding-bottom: 96px !important;
    }

    .associate-report-card {
        border-radius: 18px !important;
        padding: 14px !important;
    }

    .associate-report-top {
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    .associate-report-avatar {
        width: 44px !important;
        height: 44px !important;
        flex: 0 0 44px !important;
    }

    .associate-report-top h3 {
        font-size: 14px !important;
        white-space: normal !important;
        line-height: 1.25 !important;
    }

    .associate-report-top p {
        white-space: normal !important;
        font-size: 10px !important;
    }

    .associate-report-count {
        padding: 10px !important;
    }

    .associate-report-btn {
        min-height: 46px !important;
        font-size: 12px !important;
    }

    .incident-action-btn {
        flex: 1 1 auto !important;
        justify-content: center !important;
        min-height: 42px !important;
    }
}

/* Crear colaborador / tablas administrativas */
@media (max-width: 767px) {
    #admin-users-view,
    #crear-colaborador-container {
        min-width: 0 !important;
    }

    #crear-colaborador-container .grid,
    #app-views .grid.grid-cols-2,
    #app-views .grid.grid-cols-3 {
        grid-template-columns: 1fr !important;
    }

    #app-views table:not(.directory-table) {
        min-width: 760px !important;
    }

    #app-views .overflow-hidden:has(table:not(.directory-table)) {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #search-admin-user,
    #filter-admin-status {
        font-size: 16px !important;
        min-height: 44px !important;
    }
}

/* Plano y editor */
@media (max-width: 767px) {
    #map-screen {
        height: calc(100dvh - 64px) !important;
        min-height: 0 !important;
    }

    #map-wrapper {
        padding: 12px 12px 90px 12px !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch !important;
        touch-action: pan-x pan-y !important;
    }

    #map-zoom-target {
        gap: 14px !important;
        padding-bottom: 96px !important;
    }

    #map-zoom-target > div {
        padding: 12px !important;
        border-radius: 20px !important;
    }

    #map-zoom-target h3 {
        margin-bottom: 10px !important;
        font-size: 10px !important;
    }

    #mobile-map-fullscreen-btn {
        right: 14px !important;
        bottom: 14px !important;
        padding: 12px 14px !important;
        border-radius: 16px !important;
    }

    body.map-mobile-fullscreen #map-screen {
        height: 100dvh !important;
    }

    body.map-mobile-fullscreen #map-wrapper {
        padding: 14px 14px 96px 14px !important;
    }

    #map-screen > .bg-white.border-b {
        padding: 10px !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    #map-screen > .bg-white.border-b > div {
        align-items: stretch !important;
        width: max-content !important;
        min-width: 100% !important;
    }

    #map-screen > .bg-white.border-b button {
        min-height: 38px !important;
        white-space: nowrap !important;
    }
}

/* Utilidades para pantallas muy angostas */
@media (max-width: 390px) {
    header > .relative {
        width: 40vw !important;
        min-width: 116px !important;
    }

    header > div:first-child #topbar-title {
        max-width: 38vw !important;
    }

    .report-filter-box {
        grid-template-columns: 1fr !important;
    }

    .report-date-btn {
        flex-basis: 100% !important;
    }
}


/* =========================================================
   AJUSTES FINOS MÓVIL - PANEL DERECHO Y COMODIDAD GENERAL
========================================================= */
.seat-header-actions {
    align-items: center;
}

.seat-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #dbe4f0;
    background: #f8fafc;
    color: #334155;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.seat-header-action-report {
    background: #fff7ed;
    border-color: #fdba74;
    color: #c2410c;
}

.seat-header-action-danger {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

@media (max-width: 767px) {
    html, body {
        overflow-x: hidden !important;
    }

    #app-views {
        overflow-x: hidden !important;
    }

    #app-views > div {
        padding: 12px !important;
    }

    #mobile-map-fullscreen-btn {
        right: 12px !important;
        bottom: 12px !important;
        padding: 10px 12px !important;
        border-radius: 14px !important;
        font-size: 10px !important;
        gap: 6px !important;
    }

    body.right-panel-open #mobile-map-fullscreen-btn {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: translateY(16px) !important;
    }

    #right-panel {
        background: #ffffff !important;
    }

    #right-panel .right-panel-header {
        padding: 14px 16px 12px !important;
    }

    #right-panel .right-panel-seat-title {
        font-size: 2rem !important;
        line-height: 1.05 !important;
        letter-spacing: -0.05em !important;
    }

    #right-panel .right-panel-close-btn {
        padding: 10px !important;
    }

    #right-panel .right-panel-body {
        padding: 14px 16px 18px !important;
        gap: 14px !important;
    }

    #right-panel .right-panel-footer {
        padding: 14px 16px calc(14px + env(safe-area-inset-bottom)) !important;
        gap: 12px !important;
    }

    #right-panel .right-panel-footer-actions {
        gap: 10px !important;
    }

    #right-panel .right-panel-footer-actions button {
        min-height: 48px !important;
        padding-top: 0.85rem !important;
        padding-bottom: 0.85rem !important;
        font-size: 12px !important;
    }

    #right-panel .bg-white.p-1\.5.rounded-2xl.border.border-slate-200.flex.shadow-sm button {
        padding-top: 11px !important;
        padding-bottom: 11px !important;
        font-size: 11px !important;
        letter-spacing: 0.08em !important;
    }

    #right-panel .border.border-slate-200.rounded-3xl,
    #right-panel .border.border-blue-200.rounded-3xl,
    #right-panel .border.border-purple-200.rounded-3xl {
        border-radius: 20px !important;
        margin-top: 12px !important;
    }

    #right-panel .p-6,
    #right-panel .p-5 {
        padding: 14px !important;
    }

    #right-panel .grid.grid-cols-2 {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .seat-header-actions {
        gap: 8px !important;
        margin-top: 10px !important;
    }

    .seat-header-action {
        min-height: 32px !important;
        padding: 7px 10px !important;
        font-size: 10px !important;
        gap: 5px !important;
    }

    .directory-search-card {
        padding: 12px !important;
        border-radius: 16px !important;
        margin-bottom: 12px !important;
    }

    .directory-search-box {
        height: 46px !important;
        padding: 0 14px !important;
        gap: 10px !important;
        margin-bottom: 10px !important;
    }

    .directory-search-box input {
        min-width: 0 !important;
        font-size: 14px !important;
        font-weight: 800 !important;
    }

    .directory-search-box input::placeholder {
        color: #94a3b8 !important;
        font-size: 14px !important;
    }

    .directory-tab {
        min-width: 74px !important;
        text-align: center !important;
    }

    .directory-suite-block {
        margin-bottom: 12px !important;
    }

    .directory-table tbody {
        padding: 8px !important;
    }

    .directory-table tr {
        padding: 10px !important;
        border-radius: 14px !important;
    }

    .directory-table td {
        padding: 6px 0 !important;
    }

    .directory-badge {
        padding: 7px 12px !important;
        font-size: 12px !important;
        border-radius: 12px !important;
    }

    .directory-location-btn {
        height: 42px !important;
        font-size: 12px !important;
    }

    .report-concentrado-title {
        font-size: 17px !important;
    }

    .report-filter-box {
        padding: 6px !important;
        gap: 6px !important;
        border-radius: 14px !important;
    }

    .report-filter-pill {
        padding: 8px 6px !important;
        font-size: 10px !important;
    }

    .report-date-range-box {
        padding: 10px !important;
        border-radius: 16px !important;
    }

    .report-date-btn {
        min-height: 42px !important;
    }

    .associate-report-card {
        padding: 12px !important;
    }
}

@media (max-width: 390px) {
    #right-panel .right-panel-seat-title {
        font-size: 1.75rem !important;
    }

    .seat-header-actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .seat-header-action {
        width: 100% !important;
        justify-content: center !important;
    }

    .directory-search-box input::placeholder {
        font-size: 13px !important;
    }
}
