/* PreZero - Skin V2 (demo)
 * Activa por defecto (sigo.skin_por_defecto = v2); ?skin= en la URL la cambia.
 * Todas las reglas bajo body.skin-v2 para no afectar al resto de la app.
 * Mobile-first. Target: mockup 390x740 y tablets.
 */

/* === BASE / TIPOGRAFÍA === */
body.skin-v2 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: #1a1a1a;
    line-height: 1.5;
    letter-spacing: -0.005em;
}

body.skin-v2 h1, body.skin-v2 h2, body.skin-v2 h3,
body.skin-v2 h4, body.skin-v2 h5, body.skin-v2 h6 {
    font-weight: 600;
    letter-spacing: -0.015em;
    color: #0f0f0f;
}

body.skin-v2 a {
    color: #00343c;
    transition: color .15s ease;
}
body.skin-v2 a:hover,
body.skin-v2 a:focus {
    color: #005a66;
}

/* === BOTONES === */
body.skin-v2 .button,
body.skin-v2 button.button,
body.skin-v2 a.button {
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.03);
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
    min-height: 40px;
}

/* Color de marca para .button primario (defensivo ante Foundation #AC598C) */
body.skin-v2 .button:not(.secondary):not(.alert):not(.white):not(.success),
body.skin-v2 button.button:not(.secondary):not(.alert):not(.white):not(.success),
body.skin-v2 a.button:not(.secondary):not(.alert):not(.white):not(.success) {
    background-color: #00343c;
    color: #ffffff;
}
body.skin-v2 .button:not(.secondary):not(.alert):not(.white):not(.success):hover,
body.skin-v2 button.button:not(.secondary):not(.alert):not(.white):not(.success):hover,
body.skin-v2 a.button:not(.secondary):not(.alert):not(.white):not(.success):hover {
    background-color: #005a66;
    color: #ffffff;
}

body.skin-v2 .button:hover,
body.skin-v2 button.button:hover {
    box-shadow: 0 4px 12px rgba(0, 52, 60, 0.18),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

body.skin-v2 .button:active,
body.skin-v2 button.button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) inset;
}

body.skin-v2 .tiny.button,
body.skin-v2 .tiny.white.button {
    border-radius: 6px;
    padding: 6px 10px;
    min-height: 32px;
    font-size: 12px;
}

body.skin-v2 .button.white {
    background: #ffffff;
    color: #00343c;
    border: 1px solid rgba(0, 52, 60, 0.12);
}
body.skin-v2 .button.white:hover {
    background: #f8fafa;
    border-color: rgba(0, 52, 60, 0.25);
}

/* === TOOLBAR DEL MAPA (contenedor transparente + botones como pills) === */

/* Contenedor global del toolbar — totalmente transparente, sin altura fija */
body.skin-v2 #leaflet-toolbar,
body.skin-v2 #leaflet-toolbar-left,
body.skin-v2 #leaflet-toolbar-right {
    background: transparent !important; /* sobrescribe rgba(0,0,0,0.65) de app.css */
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    min-height: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible;
}

/* Solo el contenedor exterior lleva padding — sube el toolbar cerca del nav */
body.skin-v2 #leaflet-toolbar {
    padding: 4px 8px 8px !important;
}

/* Los contenedores internos no llevan padding ni margen propio */
body.skin-v2 #leaflet-toolbar-left,
body.skin-v2 #leaflet-toolbar-right {
    padding: 0 !important;
    margin: 0 !important;
}

/* Logo (primer hijo) — sin cambios estructurales */
body.skin-v2 #leaflet-toolbar-left .menu-lateral-logo {
    margin-right: 4px;
}

/* Contenedor individual de cada botón — separado, sin continuidad visual */
body.skin-v2 .leaflet-control-button {
    display: inline-block !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
    float: none !important;
}

/* Cada botón es una PILL flotante independiente */
body.skin-v2 #leaflet-toolbar .tiny.white.button,
body.skin-v2 #leaflet-toolbar-left a.tiny.white.button,
body.skin-v2 #leaflet-toolbar-right a.tiny.white.button,
body.skin-v2 .leaflet-control-button a.tiny.white.button {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #00343c !important;
    border-radius: 8px !important;
    border: none !important;
    /* sombra con componente inferior más visible contra el mapa */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08),
                0 3px 8px rgba(0, 52, 60, 0.14),
                0 0 0 1px rgba(0, 52, 60, 0.08) !important;
    padding: 5px 10px !important;
    min-height: 0 !important;
    height: 28px !important;
    line-height: 1 !important;
    min-width: 28px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    -webkit-backdrop-filter: blur(8px) saturate(140%);
    backdrop-filter: blur(8px) saturate(140%);
    transition: transform .12s ease, box-shadow .15s ease, background .15s ease;
    border-bottom: none !important; /* evita look "pestaña" del reset de Foundation */
}

body.skin-v2 #leaflet-toolbar .tiny.white.button:hover,
body.skin-v2 #leaflet-toolbar-left a.tiny.white.button:hover,
body.skin-v2 .leaflet-control-button a.tiny.white.button:hover {
    background: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 52, 60, 0.18),
                0 0 0 1px rgba(0, 52, 60, 0.1) !important;
    border-bottom: none !important;
}

body.skin-v2 #leaflet-toolbar .tiny.white.button:active,
body.skin-v2 .leaflet-control-button a.tiny.white.button:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) inset !important;
}

/* Iconos dentro del botón */
body.skin-v2 .leaflet-control-button a.tiny.white.button i,
body.skin-v2 .leaflet-control-button a.tiny.white.button .fi-icon,
body.skin-v2 .leaflet-control-button a.tiny.white.button .fa {
    font-size: 15px;
    color: #00343c;
    line-height: 1;
}

/* Estado activo (dropdown abierto, botón seleccionado) */
body.skin-v2 .leaflet-control-button a.tiny.white.button.active,
body.skin-v2 .sigo-dropdown-control.open a.tiny.white.button {
    background: #00343c !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0, 52, 60, 0.3),
                0 0 0 1px rgba(0, 52, 60, 0.2) !important;
}
body.skin-v2 .leaflet-control-button a.tiny.white.button.active i,
body.skin-v2 .sigo-dropdown-control.open a.tiny.white.button i {
    color: #ffffff;
}

/* Override del hover de app.css que pone border-bottom 4px (look pestaña) */
body.skin-v2 #leaflet-toolbar button:hover,
body.skin-v2 #leaflet-toolbar .button:hover,
body.skin-v2 #leaflet-toolbar a:hover {
    border-bottom: none !important;
    border-bottom-color: transparent !important;
}

/* === CONTROLES LEAFLET (zoom, capas) === */
body.skin-v2 .leaflet-control-zoom {
    border-radius: 10px !important; /* sobrescribe inline style de Leaflet */
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    border: none !important;
}

body.skin-v2 .leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #00343c;
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 18px;
    font-weight: 500;
    transition: background-color .12s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

body.skin-v2 .leaflet-control-zoom a:hover {
    background: #ffffff;
    color: #005a66;
}

body.skin-v2 .leaflet-control-layers {
    border-radius: 12px !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.96) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

body.skin-v2 .leaflet-control-layers-base label,
body.skin-v2 .leaflet-control-layers-overlays label {
    padding: 6px 4px;
    border-radius: 6px;
    transition: background-color .12s ease;
    min-height: 32px;
    display: flex;
    align-items: center;
}

body.skin-v2 .leaflet-control-layers-base label:hover,
body.skin-v2 .leaflet-control-layers-overlays label:hover {
    background: rgba(0, 52, 60, 0.06);
}

body.skin-v2 .leaflet-control-layers input[type="checkbox"],
body.skin-v2 .leaflet-control-layers input[type="radio"] {
    width: 18px;
    height: 18px;
    margin: 0 8px 0 2px;
    accent-color: #00343c;
}

/* Quitar el bg del span del checkbox (lo aplicamos a la fila entera) */
body.skin-v2 .leaflet-control-layers .leaflet-control-layers-base input:checked + span,
body.skin-v2 .leaflet-control-layers .leaflet-control-layers-overlays input:checked + span {
    background-color: transparent !important;
    box-shadow: none !important;
    color: #00343c !important;
    font-weight: 500;
    padding: 0 !important;
}

/* Fila activa (capa marcada) — sombreado a ancho completo con acento izquierdo */
body.skin-v2 .leaflet-control-layers-label:has(input:checked),
body.skin-v2 .leaflet-control-layers-base label:has(input:checked),
body.skin-v2 .leaflet-control-layers-overlays label:has(input:checked) {
    background-color: rgba(0, 52, 60, 0.08);
    border-radius: 6px;
    box-shadow: inset 3px 0 0 #00343c;
}

/* Hover sobre fila no-activa */
body.skin-v2 .leaflet-control-layers-label:not(:has(input:checked)):hover {
    background-color: rgba(0, 52, 60, 0.04);
    border-radius: 6px;
}

/* Cada fila de capa — padding uniforme, flex para alinear checkbox + texto + chevron */
body.skin-v2 .leaflet-control-layers-label {
    display: flex !important;
    align-items: center;
    padding: 6px 10px !important;
    margin: 2px 0;
    font-size: 13px;
    line-height: 1.3;
    min-height: 32px;
    transition: background-color .12s ease;
    cursor: pointer;
}

/* Texto del label */
body.skin-v2 .leaflet-control-layers-label > span {
    flex: 1;
    padding: 0 4px;
    color: #1a1a1a;
}

/* Checkbox/radio alineados */
body.skin-v2 .leaflet-control-layers-label > input[type="checkbox"],
body.skin-v2 .leaflet-control-layers-label > input[type="radio"] {
    flex-shrink: 0;
    margin: 0 6px 0 0 !important;
    width: 16px;
    height: 16px;
    accent-color: #00343c;
    cursor: pointer;
}

/* Botón chevron (angle-down) para opciones de la capa */
body.skin-v2 .leaflet-control-layers-options-button {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #00343c;
    transition: background-color .12s ease, transform .15s ease;
    cursor: pointer;
}
body.skin-v2 .leaflet-control-layers-options-button:hover {
    background-color: rgba(0, 52, 60, 0.12);
}
body.skin-v2 .leaflet-control-layers-options-button i {
    font-size: 14px;
    line-height: 1;
}

/* Opciones desplegables dentro de una capa (Etiquetas / Estilo / Leyenda) */
body.skin-v2 .leaflet-control-layers-options {
    background: rgba(0, 52, 60, 0.04);
    margin: 4px 6px 6px 28px;
    padding: 6px 8px;
    border-radius: 6px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
body.skin-v2 .leaflet-control-layers-options > div {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 5px;
    background: #ffffff;
    color: #00343c;
    border: 1px solid rgba(0, 52, 60, 0.12);
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease;
}
body.skin-v2 .leaflet-control-layers-options > div:hover {
    background: #00343c;
    color: #ffffff;
    border-color: #00343c;
}

/* Separador entre Base y Overlays — más elegante */
body.skin-v2 .leaflet-control-layers-separator {
    border-top: 1px solid rgba(0, 52, 60, 0.1);
    margin: 8px 0;
    height: 0;
}

/* Pie del panel (Desactivar todas / Reiniciar capas) — links secundarios */
body.skin-v2 .leaflet-control-layers-list > div:last-child {
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    margin-top: 4px;
    font-size: 11px;
}
body.skin-v2 .leaflet-control-layers-list > div:last-child a,
body.skin-v2 .leaflet-control-layers-list > div:last-child span {
    color: #00343c;
    text-decoration: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 5px;
    transition: background-color .12s ease;
}
body.skin-v2 .leaflet-control-layers-list > div:last-child a:hover,
body.skin-v2 .leaflet-control-layers-list > div:last-child span:hover {
    background: rgba(0, 52, 60, 0.08);
}

/* Contenedor del panel — refinar bordes y ancho máximo */
body.skin-v2 .leaflet-control-layers-expanded {
    padding: 8px !important;
    max-height: 80vh;
    overflow-y: auto;
}

/* Secciones del panel — cabeceras más legibles */
body.skin-v2 .leaflet-control-layers-base,
body.skin-v2 .leaflet-control-layers-overlays {
    padding: 6px 10px;
}

body.skin-v2 .leaflet-control-layers-separator {
    border-top: 1px solid rgba(0, 52, 60, 0.08);
    margin: 6px 0;
}

/* Flechas (chevrons) de dropdown — color coherente */
body.skin-v2 .leaflet-control-layers .leaflet-control-layers-options-button,
body.skin-v2 .leaflet-control-layers .leaflet-control-layers-styles,
body.skin-v2 .leaflet-control-layers .leaflet-control-layers-legend {
    color: #00343c;
    border-radius: 6px;
}

/* === OFFCANVAS (paneles laterales) === */
body.skin-v2 #offcanvas-left,
body.skin-v2 #offcanvas-bottom,
body.skin-v2 #offcanvas-right {
    background: #ffffff;
    box-shadow: 0 0 32px rgba(0, 0, 0, 0.12);
}

body.skin-v2 .offcanvas-content {
    padding: 0;
}

body.skin-v2 .offcanvas-header {
    background: none;
    color: #00343c;
    padding: 16px 52px 16px 18px !important;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: none;
    display: flex;
    align-items: center;
    min-height: 52px;
}

/* Subtítulo eventual debajo del header */
body.skin-v2 .offcanvas-header + div[style*="color:#888"],
body.skin-v2 .offcanvas-header + div[style*="color: #888"] {
    padding: 8px 18px !important;
    color: #6b7280 !important;
    font-size: 11px !important;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    margin-bottom: 4px;
}

body.skin-v2 .offcanvas-content a.close {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: rgba(0, 52, 60, 0.6);
    background: rgba(0, 52, 60, 0.06);
    top: 10px;
    right: 10px;
    transition: background-color .15s ease, color .15s ease;
    text-decoration: none;
}

body.skin-v2 .offcanvas-content a.close:hover {
    background: rgba(0, 52, 60, 0.12);
    color: #00343c;
}

/* === KPIs (tarjetas estadísticas) === */
body.skin-v2 .offcanvas-content [data-count] {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

/* Tarjeta KPI — los estilos actuales van inline, envolvemos con selector de contexto */
body.skin-v2 .offcanvas-content [data-count] {
    margin-bottom: 2px;
}

/* KPI container — scopeado a divs que contienen [data-count] (únicos de KPIs) */
body.skin-v2 .offcanvas-content div:has(> [data-count]) {
    border-radius: 12px !important;
    padding: 12px 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: transform .15s ease, box-shadow .15s ease;
}

body.skin-v2 .offcanvas-content div:has(> [data-count]):hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Label del KPI (segundo div interno) */
body.skin-v2 .offcanvas-content div:has(> [data-count]) > div:last-child {
    font-size: 10.5px !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.92;
    margin-top: 4px;
}

/* === FORMULARIOS / INPUTS === */
body.skin-v2 input[type="text"],
body.skin-v2 input[type="email"],
body.skin-v2 input[type="number"],
body.skin-v2 input[type="search"],
body.skin-v2 input[type="password"],
body.skin-v2 textarea,
body.skin-v2 select {
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: none;
    padding: 10px 12px;
    font-size: 14px;
    min-height: 40px;
    transition: border-color .15s ease, box-shadow .15s ease;
    background-color: #ffffff;
}

body.skin-v2 input[type="text"]:focus,
body.skin-v2 input[type="email"]:focus,
body.skin-v2 input[type="number"]:focus,
body.skin-v2 input[type="search"]:focus,
body.skin-v2 input[type="password"]:focus,
body.skin-v2 textarea:focus,
body.skin-v2 select:focus {
    border-color: #00343c;
    box-shadow: 0 0 0 3px rgba(0, 52, 60, 0.12);
    outline: none;
}

body.skin-v2 label {
    font-size: 12px;
    font-weight: 500;
    color: #444;
    letter-spacing: 0.01em;
    margin-bottom: 4px;
}

/* === LEAFLET POPUPS === */
body.skin-v2 .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14),
                0 0 0 1px rgba(0, 0, 0, 0.04);
    padding: 4px;
}

body.skin-v2 .leaflet-popup-content {
    margin: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
}

body.skin-v2 .leaflet-popup-tip {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

/* === SCROLLBARS (más discretos en móvil/tablet) === */
body.skin-v2 ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
body.skin-v2 ::-webkit-scrollbar-thumb {
    background: rgba(0, 52, 60, 0.25);
    border-radius: 3px;
}
body.skin-v2 ::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 52, 60, 0.45);
}

/* === TOP BAR (barra principal del header) === */
body.skin-v2 .top-bar {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.skin-v2 .top-bar a,
body.skin-v2 .top-bar-section a {
    font-size: 13px !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: background-color .12s ease, color .12s ease;
}

body.skin-v2 .top-bar-section li > a:not(.button):hover,
body.skin-v2 .top-bar-section li:not(.active) > a:not(.button):hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
}

body.skin-v2 .top-bar-section li.active > a:not(.button) {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
}

body.skin-v2 .top-bar-section .dropdown {
    background-color: rgba(0, 40, 46, 0.98);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    padding: 6px;
    margin-top: 4px;
}
/* puente invisible sobre esos 4px: al bajar el ratón del menú a una opción el submenú (hover) se cerraba en el hueco */
body.skin-v2 .top-bar-section .dropdown::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -6px;
    height: 6px;
}
body.skin-v2 .top-bar-section .dropdown li > a {
    border-radius: 6px;
    padding: 8px 12px !important;
    background: transparent !important;
}

/* === DROPDOWNS (Foundation f-dropdown y sigo-dropdown) === */
body.skin-v2 .f-dropdown,
body.skin-v2 .sigo-dropdown,
body.skin-v2 .dropdown-menu {
    border-radius: 10px !important;
    border: 1px solid rgba(0, 0, 0, 0.06) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14) !important;
    padding: 6px !important;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    background: rgba(255, 255, 255, 0.98) !important;
}
body.skin-v2 .f-dropdown li > a,
body.skin-v2 .sigo-dropdown li > a,
body.skin-v2 .dropdown-menu li > a {
    border-radius: 6px;
    padding: 8px 12px !important;
    color: #1a1a1a !important;
    transition: background-color .12s ease;
}
body.skin-v2 .f-dropdown li > a:hover,
body.skin-v2 .sigo-dropdown li > a:hover,
body.skin-v2 .dropdown-menu li > a:hover {
    background-color: rgba(0, 52, 60, 0.08) !important;
    color: #00343c !important;
}

/* === REVEAL MODALS === */
body.skin-v2 .reveal-modal,
body.skin-v2 .reveal-modal-bg + .reveal-modal {
    border-radius: 14px !important;
    border: none !important;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24),
                0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    padding: 24px !important;
}

/* Modal fullscreen: sin border-radius */
body.skin-v2 .reveal-modal.fullscreen {
    border-radius: 0 !important;
}
body.skin-v2 .reveal-modal h1,
body.skin-v2 .reveal-modal h2,
body.skin-v2 .reveal-modal h3 {
    letter-spacing: -0.015em;
    margin-bottom: 12px;
}
body.skin-v2 .reveal-modal .close-reveal-modal {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 12px !important;
    right: 12px !important;
    font-size: 24px;
    color: #666;
    background: rgba(0, 0, 0, 0.05);
    transition: background-color .12s ease, color .12s ease;
}
body.skin-v2 .reveal-modal .close-reveal-modal:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #1a1a1a;
}
body.skin-v2 .reveal-modal-bg {
    background-color: rgba(0, 20, 24, 0.55) !important;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

/* === SIGO TAB BAR (pestañas de la ficha de un elemento) — NO aplica a .principal (switcher móvil) ===
   Iconos del mismo tamaño y en gris medio; la pestaña activa en el color de PreZero con subrayado; hover sutil.
   Traído de acciona_demo (22-oct-2026). Solo aspecto. */
body.skin-v2 .sigo-tab-bar:not(.principal) {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0 8px;
    display: flex;
    gap: 2px;
    align-items: flex-end;
    /* Sin esto las pestañas (datos, custom, imágenes, documentos, comentarios,
       streetview…) no caben en el ancho del sidebar y las últimas — incluida
       Street View — quedaban cortadas y nunca se veían. */
    flex-wrap: wrap;
}
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 6px 6px 0 0;
    padding: 0 12px;
    color: #767676;
    font-size: 13px;
    font-weight: 500;
    transition: color .12s ease, background-color .12s ease, border-color .12s ease;
    cursor: pointer;
    /* app.css fija flex:1 y max-width:150px, lo que estiraba cada pestaña a
       150px y dejaba el icono diminuto en el centro. Aquí cada pestaña es
       solo del ancho del icono + padding. */
    flex: 0 0 auto !important;
    max-width: none !important;
    width: auto !important;
    height: 44px !important;
    min-width: 46px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    overflow: visible !important;
    opacity: 1 !important;
    position: relative;
}
/* Tab vacío de cierre — no debe consumir espacio ni mostrarse */
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item:empty,
body.skin-v2 .sigo-tab-bar:not(.principal) a.tab-item[onclick=""] {
    display: none !important;
}
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item:hover {
    background-color: rgba(20, 20, 20, 0.05);
    color: #3d3d3d;
}
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item:focus-visible {
    outline: 2px solid #00343c;
    outline-offset: -2px;
}
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item.activo,
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item.active {
    color: #00343c !important;
    border-bottom-color: #00343c !important;
    background-color: transparent !important;
}
/* Iconos: un solo tamaño, ancho fijo para que las pestañas midan igual.
   app.css les daba 25px/line-height 40px como Foundation Icons. */
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item i,
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item .fi-icon {
    font-size: 18px;
    line-height: 1;
    width: 1.25em;
    margin: 0;
    text-align: center;
    vertical-align: middle;
    color: #767676;
}
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item:hover i,
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item:hover .fi-icon {
    color: #3d3d3d;
}
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item.activo .fi-icon,
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item.active .fi-icon,
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item.activo i,
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item.active i {
    color: #00343c;
}
/* Contador (imágenes, documentos, comentarios): pequeño, arriba a la derecha del icono, en el color de PreZero */
body.skin-v2 .sigo-tab-bar:not(.principal) .tab-item .badge:not(:empty) {
    top: 5px;
    right: 3px;
    margin: 0;
    padding: 1px 4px !important;
    min-width: 0;
    line-height: 1.3;
    font-size: 10px;
    border-radius: 8px;
    background: #00343c !important;
    color: #ffffff;
}

/* === LEAFLET SIDEBAR (ficha de elementos) === */
body.skin-v2 .leaflet-sidebar {
    background-color: transparent;
}
body.skin-v2 .leaflet-sidebar .sidebar-content,
body.skin-v2 .leaflet-sidebar .ficha,
body.skin-v2 .leaflet-sidebar > div {
    background-color: #ffffff;
}
body.skin-v2 .leaflet-sidebar h1,
body.skin-v2 .leaflet-sidebar h2,
body.skin-v2 .leaflet-sidebar h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #0f0f0f;
    letter-spacing: -0.01em;
}
body.skin-v2 .leaflet-sidebar .closer {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.05);
    transition: background-color .12s ease;
}
body.skin-v2 .leaflet-sidebar .closer:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Inputs dentro del sidebar — compactos */
body.skin-v2 .leaflet-sidebar input[type="text"],
body.skin-v2 .leaflet-sidebar input[type="number"],
body.skin-v2 .leaflet-sidebar textarea,
body.skin-v2 .leaflet-sidebar select {
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
}

/* Botón primario del sidebar "Añadir/Quitar elemento" */
body.skin-v2 #anyadir-elemento-de-incidencia,
body.skin-v2 #quitar-elemento-de-incidencia {
    background-color: #00343c !important;
    color: #ffffff !important;
    border-radius: 10px !important;
    padding: 12px 16px !important;
    font-weight: 600;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 8px rgba(0, 52, 60, 0.18),
                0 0 0 1px rgba(0, 52, 60, 0.08) !important;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease;
    margin: 12px 0 !important;
}
body.skin-v2 #anyadir-elemento-de-incidencia:hover,
body.skin-v2 #quitar-elemento-de-incidencia:hover {
    background-color: #005a66 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 52, 60, 0.24) !important;
}

/* === DATATABLES (listados) === */
body.skin-v2 .dataTables_wrapper {
    font-size: 13px;
}
body.skin-v2 table.dataTable {
    border-collapse: separate;
    border-spacing: 0;
    border: none;
}
body.skin-v2 table.dataTable thead th {
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    color: #666;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 12px;
}
body.skin-v2 table.dataTable tbody tr {
    transition: background-color .12s ease;
}
body.skin-v2 table.dataTable tbody tr:hover {
    background-color: rgba(0, 52, 60, 0.04) !important;
}
body.skin-v2 table.dataTable tbody td {
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding: 10px 12px;
}
body.skin-v2 .dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 2px;
    padding: 4px 10px !important;
    min-width: 28px;
    transition: background-color .12s ease;
}
body.skin-v2 .dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #00343c !important;
    border-color: #00343c !important;
    color: #ffffff !important;
}
body.skin-v2 .dataTables_wrapper .dataTables_filter input,
body.skin-v2 .dataTables_wrapper .dataTables_length select {
    border-radius: 6px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    min-height: 32px;
}

/* === TOAST / NOTIFICACIONES === */
body.skin-v2 .toast,
body.skin-v2 .notification,
body.skin-v2 .alert-box {
    border-radius: 10px !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    padding: 12px 16px !important;
    font-size: 13px;
}

/* === BADGES / LABELS === */
body.skin-v2 .label,
body.skin-v2 .badge {
    border-radius: 5px;
    font-size: 11px;
    padding: 3px 7px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* === CHOSEN (selects custom) === */
body.skin-v2 .chosen-container-single .chosen-single {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    box-shadow: none !important;
    background: #ffffff !important;
    min-height: 36px;
    padding: 6px 10px !important;
}
body.skin-v2 .chosen-container-active.chosen-with-drop .chosen-single {
    border-color: #00343c !important;
    box-shadow: 0 0 0 3px rgba(0, 52, 60, 0.12) !important;
}
body.skin-v2 .chosen-container .chosen-drop {
    border-radius: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    margin-top: 4px;
    overflow: hidden;
}
body.skin-v2 .chosen-container .chosen-results li.highlighted {
    background-color: #00343c !important;
    color: #ffffff !important;
}

/* === INVENTARIO: Propuestas de cambio === */

/* Fila de filtros — quitar opacity hack, usar estado real con borde */
body.skin-v2 .prezero-filtro {
    background: transparent !important;
    color: #555 !important;
    border: 1px solid rgba(0, 0, 0, 0.12) !important;
    border-radius: 999px !important;
    margin: 2px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em;
    opacity: 1 !important;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
    box-shadow: none !important;
    min-height: 0;
    height: auto;
}
body.skin-v2 .prezero-filtro:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
}

/* Filtro activo según data-estado — el color real del estado */
body.skin-v2 .prezero-filtro.active[data-estado="todas"] {
    background: #00343c !important;
    color: #ffffff !important;
    border-color: #00343c !important;
}
body.skin-v2 .prezero-filtro.active[data-estado="PENDIENTE"] {
    background: #FF9800 !important;
    color: #ffffff !important;
    border-color: #FF9800 !important;
}
body.skin-v2 .prezero-filtro.active[data-estado="APROBADA"] {
    background: #4CAF50 !important;
    color: #ffffff !important;
    border-color: #4CAF50 !important;
}
body.skin-v2 .prezero-filtro.active[data-estado="RECHAZADA"] {
    background: #F44336 !important;
    color: #ffffff !important;
    border-color: #F44336 !important;
}

/* Contenedor de la lista — más aire entre tarjetas */
body.skin-v2 #prezero-inventario-lista {
    padding-top: 6px;
}

/* Tarjeta (cada propuesta) — card moderna con sombra y radius */
body.skin-v2 #prezero-inventario-lista > div {
    border: none !important;
    border-radius: 10px !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05),
                0 2px 8px rgba(0, 0, 0, 0.06),
                0 0 0 1px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    margin-bottom: 10px !important;
    transition: transform .15s ease, box-shadow .15s ease;
    position: relative;
}
body.skin-v2 #prezero-inventario-lista > div:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06),
                0 6px 16px rgba(0, 0, 0, 0.08),
                0 0 0 1px rgba(0, 0, 0, 0.05) !important;
}

/* Accent lateral — usar ::before ya que el border-left:3px inline se pierde */
body.skin-v2 #prezero-inventario-lista > div::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #FF9800; /* default PENDIENTE */
    border-radius: 10px 0 0 10px;
}
body.skin-v2 #prezero-inventario-lista > div[style*="border-left:3px solid #4CAF50"]::before,
body.skin-v2 #prezero-inventario-lista > div[style*="border-left:3px solid #2E7D32"]::before {
    background: #4CAF50;
}
body.skin-v2 #prezero-inventario-lista > div[style*="border-left:3px solid #F44336"]::before,
body.skin-v2 #prezero-inventario-lista > div[style*="border-left:3px solid #E53935"]::before {
    background: #F44336;
}

/* Header de la tarjeta (capa + id + estado) */
body.skin-v2 #prezero-inventario-lista > div > div:first-child {
    background: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    padding: 10px 14px !important;
}
body.skin-v2 #prezero-inventario-lista > div > div:first-child strong {
    font-size: 14px !important;
    color: #0f0f0f;
    letter-spacing: -0.005em;
}
body.skin-v2 #prezero-inventario-lista > div > div:first-child > div > span {
    color: #999;
    font-size: 11px !important;
    font-variant-numeric: tabular-nums;
    margin-left: 4px;
}

/* Badge de estado (PENDIENTE / APROBADA / RECHAZADA) */
body.skin-v2 #prezero-inventario-lista > div > div:first-child > span {
    border-radius: 999px !important;
    padding: 3px 10px !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}

/* Body de la tarjeta (user, descripción, cambios) */
body.skin-v2 #prezero-inventario-lista > div > div:nth-child(2) {
    padding: 10px 14px !important;
}
body.skin-v2 #prezero-inventario-lista > div > div:nth-child(2) > div:first-child {
    color: #6b7280 !important;
    font-size: 11px !important;
    margin-bottom: 6px !important;
    display: flex;
    align-items: center;
    gap: 5px;
}
body.skin-v2 #prezero-inventario-lista > div > div:nth-child(2) > div:first-child i {
    color: #9ca3af;
}

/* Filas de cambio "campo: VIEJO → NUEVO" — como pills */
body.skin-v2 #prezero-inventario-lista > div span[style*="line-through"] {
    background: rgba(229, 57, 53, 0.08) !important;
    padding: 1px 7px;
    border-radius: 4px;
    color: #C62828 !important;
    font-size: 11px;
    font-weight: 500;
    text-decoration: line-through;
}
body.skin-v2 #prezero-inventario-lista > div span[style*="color:#2E7D32"] {
    background: rgba(46, 125, 50, 0.1) !important;
    padding: 1px 7px;
    border-radius: 4px;
    color: #2E7D32 !important;
    font-size: 11px;
}

/* Footer de la tarjeta (Aprobar / Rechazar / Ver en mapa) */
body.skin-v2 #prezero-inventario-lista > div > div:last-child {
    background: #fafbfc !important;
    border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding: 8px 10px !important;
    gap: 6px;
}
body.skin-v2 #prezero-inventario-lista > div > div:last-child a.button {
    border-radius: 7px !important;
    padding: 6px 14px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    min-height: 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    transition: transform .1s ease, box-shadow .15s ease, background-color .15s ease;
}
body.skin-v2 #prezero-inventario-lista > div > div:last-child a.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12) !important;
}
body.skin-v2 #prezero-inventario-lista > div > div:last-child a.button.secondary {
    background: #ffffff !important;
    color: #00343c !important;
    border: 1px solid rgba(0, 52, 60, 0.2) !important;
}
body.skin-v2 #prezero-inventario-lista > div > div:last-child a.button.secondary:hover {
    background: rgba(0, 52, 60, 0.05) !important;
    border-color: rgba(0, 52, 60, 0.35) !important;
}

/* Botón changeSize (-) en la esquina del offcanvas-header */
body.skin-v2 .offcanvas-content a.changeSize {
    position: absolute;
    top: 10px;
    right: 62px;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: rgba(0, 52, 60, 0.6);
    background: rgba(0, 52, 60, 0.06);
    transition: background-color .15s ease, color .15s ease;
    text-decoration: none;
    line-height: 1;
}
body.skin-v2 .offcanvas-content a.changeSize:hover {
    background: rgba(0, 52, 60, 0.12);
    color: #00343c;
}

/* === TAB BAR PRINCIPAL (solo tablet/móvil) === */
@media (min-width: 1024px) {
    body.skin-v2 .sigo-tab-bar.principal {
        display: none !important;
    }
}

/* === OFFCANVAS-LEFT (desplazar bajo nav en >=801px) === */
@media only screen and (min-width: 801px) {
    #offcanvas-left {
        top: 55px !important;
    }
}

/* === MICRO-AJUSTES MÓVIL === */
@media (max-width: 640px) {
    body.skin-v2 .offcanvas-header {
        font-size: 15px;
        padding: 16px 44px 16px 16px;
    }

    body.skin-v2 #leaflet-toolbar {
        padding: 4px;
    }

    body.skin-v2 .leaflet-control-zoom a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 20px;
    }
}


/* =====================================================================
 * Mejoras traídas de acciona_demo (11 a 23-oct-2026), con los colores de PreZero
 * ===================================================================== */
/* Enlaces vacíos que deja el pie del panel de capas (<a/> mal cerrado): salían como una píldora gris al pasar el ratón */
body.skin-v2.prezero .leaflet-control-layers a:empty {
    display: none !important;
}

/* Ficha del elemento: los desplegables (chosen) salían más estrechos que los campos de texto
   y el texto largo se montaba sobre la flecha */
body.skin-v2.prezero #sidebar .formEditFeature label:has(> .chosen-container) {
    display: flex;
    align-items: center;
}
body.skin-v2.prezero #sidebar .formEditFeature label > .chosen-container {
    flex: 1 1 auto;
    width: auto !important;
    min-width: 0;
    max-width: none !important;
}
body.skin-v2.prezero #sidebar .formEditFeature .chosen-container-single .chosen-single {
    padding-right: 28px !important;
}
body.skin-v2.prezero #sidebar .formEditFeature .chosen-container-single .chosen-single span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 0;
}
/* Etiquetas de dos líneas («Zona verde asociada (código)») más compactas */
body.skin-v2.prezero #sidebar .formEditFeature label > span {
    line-height: 1.35;
}
/* Ficha: etiquetas en gris y valores en negro (el tema base pintaba el valor en azul) */
body.skin-v2.prezero #sidebar .formEditFeature label,
body.skin-v2.prezero #sidebar .formEditFeature label > span {
    color: #5a5a5a !important;
}
body.skin-v2.prezero #sidebar .formEditFeature input,
body.skin-v2.prezero #sidebar .formEditFeature select,
body.skin-v2.prezero #sidebar .formEditFeature textarea,
body.skin-v2.prezero #sidebar .formEditFeature .chosen-single span {
    color: #1a1a1a !important;
}

/* Panel de Programas (offcanvas izquierdo) */
/* En escritorio tapaba la barra de botones y dejaba «Listados» cortado: arranca bajo la barra */
@media only screen and (min-width: 802px) {
    body.skin-v2.prezero #offcanvas-left {
        top: 112px !important;
    }
}
/* En móvil ocupa toda la pantalla bajo la barra superior (antes dejaba asomar media fila de botones cortados) */
@media only screen and (max-width: 801px) {
    body.skin-v2.prezero #offcanvas-left {
        top: 45px !important;
    }
}
/* La cabecera del panel es sticky y transparente; con fondo, la lista no se le pinta por debajo al desplazarse */
body.skin-v2.prezero #offcanvas-left .offcanvas-header {
    background: #fff;
}

/* Entorno de pruebas (prezero.demo.test, sigo.clase_entorno = pruebas): se distingue por la cinta «TEST».
   Pre-producción también es un entorno «demo» para la aplicación y sacaba la cinta: allí se oculta.
   (Vicente, 27-oct: la cabecera marrón en pruebas no le gusta; se queda la de PreZero.) */
body.skin-v2.prezero:not(.pruebas) .desarrollo-banner {
    display: none !important;
}
