/* ==========================================================================
   Kedem SiGOP - Estilos Glaseados Cuadrados (Glassmorphism Profesional)
   Inspirado en la paleta aurora suave y tarjetas glaseadas cuadradas de SiGOP
   ========================================================================== */

:root {
    --bg-aurora-1: #e2e8f0;
    --bg-aurora-2: #ede9fe;
    --bg-aurora-3: #fce7f3;
    --bg-aurora-4: #f1f5f9;
    
    --glass-bg: rgba(255, 255, 255, 0.78);
    --glass-bg-hover: rgba(255, 255, 255, 0.94);
    --glass-border: rgba(255, 255, 255, 0.85);
    --glass-border-subtle: rgba(226, 232, 240, 0.85);
    --glass-shadow: 0 4px 20px -2px rgba(148, 163, 184, 0.25);
    --glass-radius: 4px; /* Formato cuadrado, sin redondeces exageradas */
    
    --accent-active: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    --accent-active-border: #c2410c;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    overflow: hidden !important;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #dfe7f2 0%, #ede6f5 30%, #fae8ef 65%, #edf2f7 100%) !important;
    color: #1e293b;
}

body {
    display: flex !important;
    flex-direction: row !important;
}

.hidden {
    display: none !important;
}

/* Modales centrados con fondo glaseado blur */
#modalLogin:not(.hidden),
#modalCatalogoTurnosEmpresa:not(.hidden),
#modalMinimosSucursales:not(.hidden),
#modalRelojControl:not(.hidden),
#modalConfigFirebase:not(.hidden) {
    position: fixed !important;
    inset: 0 !important;
    z-index: 50 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(15, 23, 42, 0.45) !important;
    backdrop-filter: blur(8px) !important;
}

/* ==========================================================================
   MENÚ LATERAL IZQUIERDO (ASIDE) - GLASEADO CUADRADO CON LOS TONOS DE LA CAPTURA
   ========================================================================== */
aside#sidebarPrincipal,
aside.layout-sidebar-principal {
    width: 18rem !important;
    min-width: 18rem !important;
    height: 100dvh !important;
    flex-shrink: 0 !important;
    order: 1 !important;
    background: rgba(255, 255, 255, 0.55) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-right: 1px solid var(--glass-border) !important;
    box-shadow: 2px 0 20px rgba(148, 163, 184, 0.15) !important;
    color: #334155 !important;
}

/* Botones del menú lateral con formato glaseado cuadrado */
.nav-btn-sigop {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--glass-radius) !important;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    background: rgba(255, 255, 255, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.75);
    box-shadow: 0 1px 3px rgba(148, 163, 184, 0.1);
    transition: all 0.2s ease;
    cursor: pointer;
    margin-bottom: 0.35rem;
    text-align: left;
}

.nav-btn-sigop:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(148, 163, 184, 0.2);
}

/* Pestaña seleccionada (idéntica al botón activo en la captura) */
.nav-btn-sigop.active-tab {
    background: var(--accent-active) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    border: 1px solid var(--accent-active-border) !important;
    box-shadow: 0 4px 14px rgba(234, 88, 12, 0.35) !important;
}

.nav-btn-sigop.active-tab i {
    color: #ffffff !important;
}

/* Contenedor principal derecho */
main {
    flex: 1 1 auto !important;
    width: calc(100vw - 18rem) !important;
    height: 100dvh !important;
    min-width: 0 !important;
    order: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    background: transparent !important;
}

@media (max-width: 1023px) {
    aside#sidebarPrincipal,
    aside.layout-sidebar-principal {
        width: min(18.5rem, 84vw) !important;
        min-width: 0 !important;
        background: rgba(255, 255, 255, 0.98) !important;
    }
    main {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
    }
}

@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
    #areaContenidoDinamico {
        padding: 0.75rem !important;
        overflow-x: hidden !important;
    }
}

/* ==========================================================================
   TARJETAS Y SECCIONES GLASEADAS CUADRADAS (.glass-card)
   ========================================================================== */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--glass-radius) !important;
    box-shadow: var(--glass-shadow);
}

.glass-card-subtle {
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--glass-radius) !important;
}

.glass-input {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(203, 213, 225, 0.8) !important;
    border-radius: var(--glass-radius) !important;
    color: #0f172a !important;
    font-weight: 700;
}

.glass-input:focus {
    background: #ffffff !important;
    border-color: #f97316 !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2) !important;
}

/* ==========================================================================
   KPIs SUPERIORES ESTILO CAPTURA (Tarjetas cuadradas glaseadas con barra lateral)
   ========================================================================== */
.kpi-card-sigop {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--glass-radius) !important;
    padding: 0.65rem 0.85rem;
    box-shadow: 0 2px 8px rgba(148, 163, 184, 0.12);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.kpi-card-sigop::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--kpi-bar-color, #0284c7);
}

.kpi-blue { --kpi-bar-color: #0284c7; }
.kpi-cyan { --kpi-bar-color: #06b6d4; }
.kpi-teal { --kpi-bar-color: #0d9488; }
.kpi-orange { --kpi-bar-color: #f97316; }
.kpi-purple { --kpi-bar-color: #9333ea; }
.kpi-indigo { --kpi-bar-color: #4f46e5; }
.kpi-rose { --kpi-bar-color: #ea580c; }
.kpi-slate { --kpi-bar-color: #64748b; }

/* Botón/Badge glaseado de porcentaje en la esquina superior derecha del KPI */
.badge-kpi-porcentaje-sigop {
    background: rgba(224, 242, 254, 0.8) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #0284c7 !important;
    border: 1px solid rgba(186, 230, 253, 0.9) !important;
    border-radius: var(--glass-radius, 4px) !important;
    font-size: 10px;
    font-weight: 900;
    padding: 1px 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(148, 163, 184, 0.15);
    white-space: nowrap;
}
.badge-kpi-porcentaje-sigop.optimo {
    background: rgba(220, 252, 231, 0.85) !important;
    color: #15803d !important;
    border-color: rgba(187, 247, 208, 0.95) !important;
}

/* Botones de Asistencia Glaseados (~80% transparencia) con estética cuadrada SiGOP */
.btn-presente-sigop {
    background: rgba(224, 242, 254, 0.8) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #0369a1 !important;
    border: 1px solid rgba(125, 211, 252, 0.85) !important;
    border-radius: var(--glass-radius, 4px) !important;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-width: 68px;
}
.btn-presente-sigop:hover {
    background: rgba(186, 230, 253, 0.9) !important;
    color: #0284c7 !important;
    border-color: #38bdf8 !important;
    transform: translateY(-1px);
}
.btn-presente-sigop.activo {
    background: rgba(2, 132, 199, 0.85) !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 1px 3px rgba(2, 132, 199, 0.35);
}

.btn-ausente-sigop {
    background: rgba(255, 228, 230, 0.8) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #be123c !important;
    border: 1px solid rgba(254, 205, 211, 0.85) !important;
    border-radius: var(--glass-radius, 4px) !important;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    min-width: 68px;
}
.btn-ausente-sigop:hover {
    background: rgba(254, 205, 211, 0.9) !important;
    color: #e11d48 !important;
    border-color: #fb7185 !important;
    transform: translateY(-1px);
}
.btn-ausente-sigop.activo {
    background: rgba(225, 29, 72, 0.85) !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    box-shadow: 0 1px 3px rgba(225, 29, 72, 0.35);
}

/* ==========================================================================
   TARJETAS DE SUCURSAL EN SEMÁFORO (Cuadradas glaseadas según captura)
   ========================================================================== */
.sucursal-card-sigop {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--glass-radius) !important;
    padding: 0.85rem;
    box-shadow: 0 2px 10px rgba(148, 163, 184, 0.15);
    transition: all 0.2s ease;
    cursor: pointer;
}

.sucursal-card-sigop:hover {
    background: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(148, 163, 184, 0.25);
    border-color: #cbd5e1;
}

/* Badges cuadrados glaseados */
.badge-optimo-sigop {
    background: #dcfce7 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: var(--glass-radius) !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-deficit-sigop {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    border-radius: var(--glass-radius) !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Badges de Dotación en Terreno Confirmada (mismo tamaño no invasivo que Óptimo/Falta) */
.badge-terreno-optimo-sigop {
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #a7f3d0 !important;
    border-radius: var(--glass-radius) !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(16, 185, 129, 0.08);
}

.badge-terreno-parcial-sigop {
    background: #fffbeb !important;
    color: #b45309 !important;
    border: 1px solid #fde68a !important;
    border-radius: var(--glass-radius) !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(245, 158, 11, 0.08);
}

.badge-terreno-deficit-sigop {
    background: #fef2f2 !important;
    color: #b91c1c !important;
    border: 1px solid #fecaca !important;
    border-radius: var(--glass-radius) !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(239, 68, 68, 0.08);
}

.badge-terreno-neutral-sigop {
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: var(--glass-radius) !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.turno-box-sigop.turno-activo-box {
    border-color: #38bdf8 !important;
    background: #f0f9ff !important;
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.35);
}

/* Cajitas cuadradas de turnos dentro de la tarjeta de sucursal */
.turno-box-sigop {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: var(--glass-radius) !important;
    padding: 4px 6px;
    font-size: 10.5px;
    text-align: center;
    color: #334155;
    font-weight: 700;
}

.turno-box-sigop.alerta {
    background: #fee2e2 !important;
    border-color: #fca5a5 !important;
    color: #991b1b !important;
    font-weight: 900;
}

/* Tablas y headers con bordes cuadrados */
table, th, td, select, input, button {
    border-radius: var(--glass-radius) !important;
}

.scroll-delgado {
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}
.scroll-delgado::-webkit-scrollbar { width: 6px; height: 6px; }
.scroll-delgado::-webkit-scrollbar-thumb { 
    background-color: rgba(148, 163, 184, 0.4); 
    border-radius: var(--glass-radius); 
}

/* ========================================================================== */
/* CELDAS Y BADGES DIFERENCIADOS POR COLOR DE TURNO (ESTÉTICA CUADRADA SIGOP) */
/* ========================================================================== */

.shift-cell {
    width: 100%;
    min-width: 42px;
    height: 28px;
    line-height: 26px;
    padding: 0 2px;
    margin: 0;
    text-align: center;
    text-align-last: center;
    font-size: 11px;
    font-weight: 900;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border-radius: var(--glass-radius, 4px) !important;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
    display: inline-block;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.shift-cell:hover {
    filter: brightness(0.95);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.shift-cell:focus {
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.6);
}
.shift-cell option {
    background: #ffffff;
    color: #0f172a;
    font-weight: 700;
    padding: 4px;
}

/* Turno M (Mañana / Apertura) -> Azul cielo / Cyan vivo */
.badge-m, .shift-cell.badge-m {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    border-color: #93c5fd !important;
    font-weight: 900 !important;
}

/* Turno T (Tarde / Cierre) -> Ámbar / Naranja vivo */
.badge-t, .shift-cell.badge-t {
    background: #ffedd5 !important;
    color: #c2410c !important;
    border-color: #fdba74 !important;
    font-weight: 900 !important;
}

/* Turno N (Noche / Nocturno) -> Índigo / Púrpura profundo */
.badge-n, .shift-cell.badge-n {
    background: #ede9fe !important;
    color: #5b21b6 !important;
    border-color: #c4b5fd !important;
    font-weight: 900 !important;
}

/* Turno I (Intermedio) -> Esmeralda / Teal */
.badge-i, .shift-cell.badge-i {
    background: #ccfbf1 !important;
    color: #0f766e !important;
    border-color: #5eead4 !important;
    font-weight: 900 !important;
}

/* D y L (Libre / Descanso) -> Gris neutro limpio */
.badge-l, .badge-d, .shift-cell.badge-l, .shift-cell.badge-d {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    font-weight: 700 !important;
}

/* V (Vacaciones) -> Violeta / Feriado Legal */
.badge-v, .shift-cell.badge-v {
    background: #fae8ff !important;
    color: #86198f !important;
    border-color: #f0abfc !important;
    font-weight: 900 !important;
}

/* LM y F (Licencia Médica / Falta) -> Carmesí / Rosa de alerta */
.badge-f, .badge-lm, .shift-cell.badge-f, .shift-cell.badge-lm {
    background: #ffe4e6 !important;
    color: #be123c !important;
    border-color: #fda4af !important;
    font-weight: 900 !important;
}

/* Permisos (PCG / PSG / ADM) -> Celeste administrativo */
.badge-pcg, .badge-psg, .badge-adm, .shift-cell.badge-pcg, .shift-cell.badge-psg, .shift-cell.badge-adm {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #7dd3fc !important;
    font-weight: 900 !important;
}

/* Turno Extra (TE) -> Amarillo / Oro destacado */
.badge-te, .shift-cell.badge-te {
    background: #fef9c3 !important;
    color: #a16207 !important;
    border-color: #fde047 !important;
    font-weight: 900 !important;
}

/* Sticky column and headers en Matriz Consolidada */
#vistaPrevia {
    overflow: auto !important;
    position: relative;
}
#vistaPrevia table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
}
#vistaPrevia thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 25 !important;
    background: #0f172a !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
#vistaPrevia thead th.sticky-col {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    z-index: 40 !important;
    background: #0f172a !important;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
}
#vistaPrevia tbody td.sticky-col {
    position: sticky !important;
    left: 0 !important;
    z-index: 10 !important;
    background: #ffffff !important;
    box-shadow: 2px 0 4px rgba(0, 0, 0, 0.06);
}
#vistaPrevia tbody tr:hover td.sticky-col {
    background: #f0f9ff !important;
}

/* ==========================================================================
   ESTILOS TÁCTICOS CAD: MAPA GIS Y TELEMETRÍA EN TIEMPO REAL
   ========================================================================== */
.leaflet-popup-content-wrapper {
    background: #090f1d !important;
    color: #f8fafc !important;
    border: 1px solid #334155 !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7) !important;
    padding: 0 !important;
}
.leaflet-popup-tip {
    background: #090f1d !important;
    border: 1px solid #334155 !important;
}
.leaflet-popup-content {
    margin: 8px 12px !important;
    line-height: 1.4 !important;
}

/* Baliza Policial de Emergencia (En Ruta) */
.cad-beacon-emergency {
    position: relative;
}
.cad-beacon-emergency::after {
    content: '';
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    border-radius: 50%;
    border: 2px solid #38bdf8;
    animation: cadBeaconPulse 1.4s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}
@keyframes cadBeaconPulse {
    0% { transform: scale(0.9); opacity: 1; }
    100% { transform: scale(1.8); opacity: 0; }
}

/* Radar Satelital de Patrulla en Servicio */
.cad-radar-patrol {
    position: relative;
}
.cad-radar-patrol::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 1.5px solid #10b981;
    animation: cadRadarPulse 2.2s cubic-bezier(0.2, 0, 0.8, 1) infinite;
}
@keyframes cadRadarPulse {
    0% { transform: scale(1); opacity: 0.9; }
    70% { transform: scale(1.6); opacity: 0.15; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Onda expansiva de Incidente Crítico */
.cad-alert-ripple {
    position: relative;
}
.cad-alert-ripple::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border-radius: 50%;
    background: rgba(244, 63, 94, 0.25);
    animation: cadAlertPulse 1.2s ease-out infinite;
}
@keyframes cadAlertPulse {
    0% { transform: scale(0.8); opacity: 0.8; }
    100% { transform: scale(1.9); opacity: 0; }
}

/* Programación de servicios por turno */
.fg-workspace {max-width:80rem;margin:auto;display:grid;gap:1rem;color:#172e43}
.fg-filters,.fg-board>section,.fg-fleet,.fg-editor {background:white;border:1px solid #cbd5df;border-radius:8px;padding:1rem;min-width:0}
.fg-filters {display:flex;flex-wrap:wrap;align-items:end;gap:.8rem;border-top:3px solid #c2410c}
.fg-filters h2 {flex:1 1 12rem;align-self:center;font-size:1.25rem;font-weight:800}
.fg-filters label {display:grid;gap:.2rem;font-size:.78rem;font-weight:700}
.fg-filters select {background:white;border:1px solid #96a8b8;border-radius:4px;padding:.45rem}
.fg-board {display:grid;grid-template-columns:1fr 1fr;gap:1rem}
.fg-board h3,.fg-editor h3 {font-weight:800;font-size:1.05rem}
.fg-board small {color:#496173;margin-left:.35rem}
.fg-rows {max-height:15rem;overflow:auto;margin-top:.5rem}
.fg-row {display:flex;align-items:center;justify-content:space-between;gap:.65rem;border-top:1px solid #dee5eb;padding:.55rem 0;font-size:.84rem}
.fg-row p,.fg-empty,.fg-editor header p {color:#495e70;font-size:.8rem}
.fg-empty {padding:.65rem 0}
.fg-link {color:#075985;font-size:.8rem;font-weight:700;text-decoration:underline;cursor:pointer}
.fg-fleet summary {font-weight:700;cursor:pointer}
.fg-fleet p {font-size:.83rem;margin-top:.4rem}
.fg-editor {display:grid;gap:.8rem;border-top:3px solid #145675;scroll-margin-top:1rem}
.fg-editor nav {display:flex;flex-wrap:wrap;gap:.35rem}
.fg-editor nav button {border:1px solid #a8b7c3;border-radius:4px;padding:.48rem .8rem;font-size:.85rem;font-weight:700}
.fg-editor nav button[aria-pressed=true] {background:#164861;border-color:#164861;color:white}
.fg-summary {padding:1rem;background:#f2f6f8;border-radius:6px}
.fg-summary h4 {font-weight:800}
.fg-summary>div {display:grid;grid-template-columns:9rem 1fr;font-size:.85rem;gap:.5rem;padding:.3rem 0}
.fg-summary .fg-link {text-align:left}
.fg-primary {background:#15563d;color:white;border-radius:4px;padding:.6rem 1rem;margin-top:.6rem;font-weight:700}
@media (max-width:700px) {.fg-board{grid-template-columns:1fr}.fg-filters label{flex:1 1 8rem}.fg-summary>div{grid-template-columns:1fr}}

/* Turnos: superficies y navegación de vidrio en petróleo, hielo y cobre. */
body {
    background: radial-gradient(ellipse at 4% 12%, #a5d5df, transparent 49%),
        radial-gradient(ellipse at 80% 0%, #ddc5c2, transparent 50%),
        linear-gradient(140deg, #dbeaf0, #e7e3eb 65%, #c8dce4) !important;
}
body > aside#sidebarPrincipal {
    background: linear-gradient(158deg, #e3f3f6f5, #d5e6edf2 52%, #e8dcdcf5) !important;
    box-shadow: 4px 0 18px #22415a21 !important;
}
main .glass-card, main :is(.fg-filters, .fg-board > section, .fg-fleet, .fg-editor) {
    background: linear-gradient(120deg, #f8fcfbe8, #fbf7f5d9);
    border: 1px solid #ffffffe6;
    border-radius: 12px !important;
    box-shadow: inset 0 1px 0 #fff, 0 4px 14px #304f6020;
}
.menu-turnos { display: grid; gap: 6px; }
.grupo-menu { border-radius: 11px; border: 1px solid #ffffffb8; background: #ffffff42; }
.grupo-menu:not(:has(.nav-btn-sigop:not(.hidden))) { display: none; }
.grupo-menu[data-seccion="operacion"] { --tono: #c1e3df; --acento: #347472; }
.grupo-menu[data-seccion="personal"] { --tono: #ccdef0; --acento: #476d90; }
.grupo-menu[data-seccion="informes"] { --tono: #ded5ec; --acento: #71638c; }
.grupo-menu[data-seccion="configuracion"] { --tono: #edddc4; --acento: #84663e; }
.grupo-menu[data-seccion="administracion"] { --tono: #ecd3ce; --acento: #89635e; }
.grupo-menu summary {
    background: linear-gradient(100deg, var(--tono), color-mix(in srgb, var(--tono) 58%, white));
    box-shadow: inset 3px 0 var(--acento), inset 0 1px #ffffffa8;
    display: flex; align-items: center; gap: 9px; padding: 10px 12px;
    font-size: 13px; font-weight: 800; color: #244455; cursor: pointer;
    list-style: none; border-radius: 10px;
}
.grupo-menu summary::-webkit-details-marker { display: none; }
.grupo-menu summary > i { width: 17px; text-align: center; color: var(--acento); }
.grupo-menu summary::after {
    content: ''; width: 7px; height: 7px; margin-left: auto; border: solid currentColor;
    border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg);
}
.grupo-menu[open] summary::after { transform: rotate(45deg); }
.grupo-menu summary:hover { filter: brightness(1.035); }
.opciones-menu { margin: 5px 6px 4px 14px; padding-left: 7px; border-left: 1px solid #9aafb9; }
.menu-turnos .nav-btn-sigop {
    color: #203d4e; padding: 8px 10px; border-radius: 8px !important;
    background: linear-gradient(135deg, #f5fafbe6, #eaf0f3dd); border-color: #ffffffbf;
    box-shadow: inset 0 1px 1px #fff, 0 2px 4px #26465921;
}
.menu-turnos .nav-btn-sigop:hover { background: #f5fcff; }
.menu-turnos .nav-btn-sigop.active-tab {
    background: linear-gradient(115deg, #075568, #275972 70%, #4d596a) !important;
    border-color: #235468 !important;
    box-shadow: inset 3px 0 #8ce5e2, 0 3px 7px #103f542b !important;
}
.menu-turnos :focus-visible { outline: 3px solid #17607c; outline-offset: 2px; }
@media (max-width: 1023px) {
    .menu-turnos :is(summary, .nav-btn-sigop) { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    .menu-turnos .nav-btn-sigop { transition: none; transform: none; }
}

html:not([data-plan-cad="true"]) [data-modulo-cad] { display: none !important; }
