/* ==========================================================================
   GEOVISOR CICOL - CENTRAL INDÍGENA DE COMUNIDADES ORIGINARIAS DE LOMERÍO
   Estilos Principales - UI Moderna, Responsive y Liviana
   Paleta: Verde Selva Chiquitana, Dorado Chiquitano, Blanco, Dark Glassmorphism
   ========================================================================== */

:root {
    --primary: #15803d;         /* Verde institucional Lomerío */
    --primary-dark: #0f5127;
    --primary-light: #22c55e;
    --accent: #eab308;          /* Amarillo / Dorado de la bandera */
    --accent-hover: #ca8a04;
    --accent-red: #ef4444;      /* Alertas / Incendios */
    --accent-orange: #f97316;
    --bg-dark: #0d131a;         /* Fondo base oscuro elegante */
    --bg-card: rgba(18, 24, 38, 0.88);
    --bg-card-hover: rgba(28, 36, 56, 0.95);
    --border-glass: rgba(255, 255, 255, 0.12);
    --border-active: rgba(34, 197, 94, 0.4);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #cbd5e1;
    --shadow-premium: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
    --sidebar-width: 380px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* ================== MAPA CONTENEDOR ================== */
#map {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    background: #090d13;
}

/* Leaflet Overrides */
.leaflet-bar {
    border: none !important;
    box-shadow: var(--shadow-premium) !important;
    border-radius: 12px !important;
    overflow: hidden;
}
.leaflet-bar a {
    background-color: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    backdrop-filter: blur(12px);
    transition: all 0.2s ease;
}
.leaflet-bar a:hover {
    background-color: var(--primary) !important;
    color: #fff !important;
}
.leaflet-popup-content-wrapper {
    background: rgba(15, 23, 42, 0.95) !important;
    color: var(--text-main) !important;
    border-radius: 16px !important;
    border: 1px solid var(--border-glass) !important;
    box-shadow: var(--shadow-premium) !important;
    backdrop-filter: blur(16px);
    padding: 2px !important;
}
.leaflet-popup-tip {
    background: rgba(15, 23, 42, 0.95) !important;
}

/* ================== HEADER PRINCIPAL ================== */
.top-header {
    position: absolute;
    top: 14px;
    left: 14px;
    right: 14px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

.brand-badge {
    pointer-events: auto;
    background: var(--bg-card);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border-glass);
    border-radius: 18px;
    padding: 8px 18px 8px 12px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-premium);
    position: relative;
    overflow: hidden;
}

.brand-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(180deg, #15803d 33.3%, #ffffff 33.3%, #ffffff 66.6%, #eab308 66.6%);
}

.brand-logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-jaguar {
    width: 50px;
    height: 50px;
    object-fit: contain;
    border-radius: 50%;
    background: #ffffff;
    padding: 1px;
    border: 2px solid var(--accent);
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.brand-text h1 {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    line-height: 1.2;
}

.brand-text h1 span {
    color: var(--accent);
}

.brand-text p {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-tag {
    font-size: 0.62rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    text-transform: uppercase;
}

/* ================== KPI STATS BAR ================== */
.kpi-container {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kpi-chip {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 7px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-premium);
    transition: all 0.25s ease;
}

.kpi-chip:hover {
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.kpi-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.kpi-icon.fire {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.kpi-icon.weather {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.kpi-icon.patrol {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.kpi-info {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.04em;
}

.kpi-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}

/* ================== ACTIONS BUTTONS ================== */
.header-actions {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-header {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    color: var(--text-main);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-premium);
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-header:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    color: #fff;
    transform: translateY(-1px);
}

.btn-header.btn-patrol {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    border: 1px solid #22c55e;
    color: #fff;
}

.btn-header.btn-patrol:hover {
    box-shadow: 0 0 18px rgba(34, 197, 94, 0.4);
}

.btn-header.btn-report {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.35);
    color: #facc15;
}

.btn-header.btn-report:hover {
    background: rgba(234, 179, 8, 0.25);
    box-shadow: 0 0 16px rgba(234, 179, 8, 0.3);
}

/* ================== SIDEBAR (PANEL DE CAPAS) ================== */
.sidebar {
    position: absolute;
    top: 80px;
    left: 14px;
    bottom: 20px;
    width: var(--sidebar-width);
    max-width: calc(100vw - 28px);
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    z-index: 1000;
    box-shadow: var(--shadow-premium);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
}

.sidebar.collapsed {
    transform: translateX(-410px);
    opacity: 0;
    pointer-events: none;
}

.sidebar-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-header h2 i {
    color: var(--accent);
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1rem;
    cursor: pointer;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Pestañas de navegación en Sidebar */
.sidebar-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(10, 15, 26, 0.4);
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 11px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.tab-btn:hover {
    color: var(--text-light);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(234, 179, 8, 0.05);
}

.tab-content {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: none;
}

.tab-content.active {
    display: block;
}

/* Personalización del Scrollbar */
.tab-content::-webkit-scrollbar {
    width: 5px;
}
.tab-content::-webkit-scrollbar-track {
    background: transparent;
}
.tab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Acordeón de Categorías de Capas */
.layer-group {
    margin-bottom: 14px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    overflow: hidden;
}

.layer-group-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    user-select: none;
    transition: background 0.2s;
}

.layer-group-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.layer-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
}

.layer-group-title i {
    color: var(--primary-light);
    font-size: 0.9rem;
}

.layer-group-arrow {
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.layer-group.open .layer-group-arrow {
    transform: rotate(180deg);
}

.layer-group-body {
    display: none;
    padding: 10px 14px 12px;
    border-top: 1px solid var(--border-glass);
}

.layer-group.open .layer-group-body {
    display: block;
}

/* Items individuales de Capas */
.layer-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.layer-item:last-child {
    border-bottom: none;
}

.layer-info {
    display: flex;
    align-items: center;
    gap: 9px;
    flex: 1;
    overflow: hidden;
}

.layer-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.layer-name {
    font-size: 0.78rem;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Switch Toggle iOS Style */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.15);
    transition: 0.25s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.25s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(16px);
}

/* Filtro Temporal de Focos de Calor */
.hotspot-filter-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 14px;
}

.filter-box-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #f87171;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.filter-pills {
    display: flex;
    gap: 6px;
}

.filter-pill {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-light);
    border-radius: 8px;
    padding: 5px 0;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.12);
}

.filter-pill.active {
    background: #ef4444;
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

/* ================== BOTÓN FLOTANTE PARA ABRIR SIDEBAR ================== */
.sidebar-toggle-floating {
    position: absolute;
    top: 86px;
    left: 14px;
    z-index: 999;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: var(--shadow-premium);
    transition: all 0.25s;
}

.sidebar-toggle-floating:hover {
    background: var(--primary);
    transform: scale(1.05);
}

/* ================== BARRA FLOTANTE DE HERRAMIENTAS (DERECHA) ================== */
.map-toolbar {
    position: absolute;
    top: 86px;
    right: 14px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tool-btn {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    color: var(--text-main);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: var(--shadow-premium);
    transition: all 0.2s ease;
    position: relative;
}

.tool-btn:hover {
    background: var(--bg-card-hover);
    color: #fff;
    border-color: var(--border-active);
    transform: translateX(-2px);
}

.tool-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: #22c55e;
}

/* Tooltip nativo */
.tool-btn::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.95);
    color: #fff;
    padding: 5px 10px;
    border-radius: 8px;
    font-size: 0.72rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    border: 1px solid var(--border-glass);
    box-shadow: var(--shadow-premium);
}

.tool-btn:hover::after {
    opacity: 1;
}

/* ================== BUSCADOR DE COMUNIDADES ================== */
.search-container {
    position: absolute;
    top: 86px;
    left: 70px;
    z-index: 999;
    width: 280px;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    color: #fff;
    border-radius: 14px;
    padding: 10px 14px 10px 38px;
    font-size: 0.82rem;
    outline: none;
    box-shadow: var(--shadow-premium);
    transition: all 0.25s;
}

.search-input:focus {
    border-color: var(--accent);
    background: rgba(18, 24, 38, 0.95);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 6px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    max-height: 250px;
    overflow-y: auto;
    box-shadow: var(--shadow-premium);
    display: none;
}

.search-item {
    padding: 10px 14px;
    font-size: 0.8rem;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.15s;
}

.search-item:hover {
    background: rgba(234, 179, 8, 0.15);
    color: #fff;
}

/* ================== SELECTOR DE MAPA BASE ================== */
.basemap-picker-modal {
    position: absolute;
    top: 86px;
    right: 66px;
    z-index: 1001;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 14px;
    box-shadow: var(--shadow-premium);
    display: none;
    width: 240px;
}

.basemap-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}

.basemap-option {
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    text-align: center;
    background: rgba(255, 255, 255, 0.04);
    padding: 6px 4px;
    transition: all 0.2s;
}

.basemap-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.basemap-option.active {
    border-color: var(--accent);
    background: rgba(234, 179, 8, 0.15);
}

.basemap-option img {
    width: 100%;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 4px;
}

.basemap-option span {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-light);
    display: block;
}

/* ================== MODALES (PATRULLAJE, REPORTES, LOGIN) ================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: #0f172a;
    border: 1px solid var(--border-glass);
    border-radius: 24px;
    width: 100%;
    max-width: 580px;
    max-height: 90vh;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-card {
    transform: translateY(0) scale(1);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Formularios estilizados */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 6px;
}

.form-control, select, input, textarea {
    color-scheme: dark;
}

.form-control {
    width: 100%;
    background: #0f172a;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    color: #f8fafc;
    outline: none;
    transition: all 0.2s;
    color-scheme: dark;
}

.form-control:focus {
    border-color: var(--accent);
    background: #1e293b;
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

select.form-control,
select {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    color-scheme: dark !important;
    cursor: pointer;
}

select option,
select optgroup {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    padding: 10px 14px;
}

select option:checked,
select option:hover {
    background-color: #1e293b !important;
    color: #eab308 !important;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.gps-capture-box {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gps-status {
    font-size: 0.75rem;
    color: #34d399;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-gps {
    background: #10b981;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 7px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-gps:hover {
    background: #059669;
}

.photo-preview-box {
    margin-top: 10px;
    border-radius: 12px;
    overflow: hidden;
    max-height: 180px;
    display: none;
}

.photo-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    background: rgba(255, 255, 255, 0.02);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-light);
    padding: 9px 18px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    border: none;
    color: #fff;
    padding: 9px 20px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

/* ================== REPORTE IMPRIMIBLE ================== */
@media print {
    body * {
        visibility: hidden;
    }
    #printable-report-area, #printable-report-area * {
        visibility: visible;
    }
    #printable-report-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        background: #fff !important;
        color: #000 !important;
    }
}

/* ================== RESPONSIVE DESIGN ================== */
@media (max-width: 992px) {
    .kpi-container {
        display: none; /* Se ocultan los chips grandes para dar paso a la vista móvil limpia */
    }
    .search-container {
        display: none;
    }
    .brand-text h1 {
        font-size: 0.92rem;
    }
    .brand-text p {
        font-size: 0.65rem;
    }
    .sidebar {
        width: calc(100vw - 28px);
        top: 76px;
    }
}

@media (max-width: 600px) {
    .brand-text p {
        display: none;
    }
    .btn-header span {
        display: none;
    }
    .btn-header {
        padding: 8px 10px;
    }
}

/* ==========================================================================
   WIDGETS Y CONTROLES AVANZADOS (INSPIRADOS EN EL DISEÑO SOLICITADO)
   ========================================================================== */

/* Sliders Dorados de Opacidad por Capa */
.layer-opacity-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 60px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: 6px;
}
.layer-opacity-slider:hover {
    background: rgba(234, 179, 8, 0.45);
}
.layer-opacity-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #eab308;
    box-shadow: 0 0 6px rgba(234, 179, 8, 0.85);
    cursor: pointer;
    transition: transform 0.15s ease;
}
.layer-opacity-slider::-webkit-slider-thumb:hover {
    transform: scale(1.3);
}

/* Handle para Arrastre y Reordenamiento de Capas */
.drag-handle {
    color: #64748b;
    cursor: grab;
    font-size: 0.82rem;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    user-select: none;
    transition: color 0.2s;
}
.drag-handle:hover {
    color: #cbd5e1;
}
.drag-handle:active {
    cursor: grabbing;
}

/* Botones de Acción Rápida por Lote (Seleccionar / Borrar / Restablecer) */
.layer-batch-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.btn-batch {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.btn-batch:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}
.btn-batch.active-action {
    background: rgba(21, 128, 61, 0.25);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.35);
}

/* ==========================================================================
   PRIORIDAD 2: PANEL DE 172 CAPAS - CABECERA FIJA Y SCROLL INDEPENDIENTE
   ========================================================================== */
#tab-layers {
    display: none;
    flex-direction: column;
    height: 100%;
    overflow: hidden !important;
    padding: 0 !important;
}

#tab-layers.active {
    display: flex !important;
}

.tab-layers-fixed-controls {
    flex-shrink: 0;
    padding: 12px 14px 10px;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    z-index: 5;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.layer-search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    padding: 6px 12px;
    margin: 8px 0;
    transition: all 0.2s ease;
}

.layer-search-box:focus-within {
    border-color: #22c55e;
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.layer-search-box i.fa-search {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-right: 8px;
}

.layer-search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.78rem;
    outline: none;
    font-family: inherit;
}

.layer-search-box input::placeholder {
    color: #64748b;
}

.layer-search-clear {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.75rem;
    padding: 2px 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.layer-search-clear:hover {
    color: #ef4444;
}

.layers-scroll-container {
    flex: 1;
    overflow-y: auto;
    padding: 12px 14px 24px;
    min-height: 0;
    overscroll-behavior: contain;
}

.layers-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.layers-scroll-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.12);
}

.layers-scroll-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
}

.layers-scroll-container::-webkit-scrollbar-thumb:hover {
    background: rgba(34, 197, 94, 0.5);
}

/* ==========================================================================
   PRIORIDAD 1: ETIQUETAS Y DESTACADO DE COMUNIDADES
   ========================================================================== */
.community-label {
    background: rgba(15, 23, 42, 0.88) !important;
    border: 1px solid rgba(255, 255, 255, 0.24) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    border-radius: 6px !important;
    padding: 2px 7px !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
    transition: all 0.2s ease;
}

.community-label-highlighted {
    background: rgba(15, 23, 42, 0.95) !important;
    border: 2px solid #eab308 !important;
    color: #fef08a !important;
    font-weight: 800 !important;
    font-size: 12.5px !important;
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.75), 0 4px 16px rgba(0,0,0,0.7) !important;
    transform: scale(1.05);
    z-index: 1000 !important;
}

@keyframes pulse-halo {
    0% {
        transform: scale(0.9);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.6);
        opacity: 0.45;
    }
    100% {
        transform: scale(2.3);
        opacity: 0;
    }
}

.community-pulse-ring {
    animation: pulse-halo 1.8s infinite cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: center;
    pointer-events: none;
}

/* ==========================================================================
   PRIORIDAD 3: LEYENDA DINÁMICA REACTIVA Y PLEGABLE
   ========================================================================== */
.floating-legend-box {
    position: absolute;
    bottom: 24px;
    left: 410px;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 10px 14px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
    z-index: 999;
    min-width: 220px;
    max-width: 290px;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.floating-legend-box.collapsed {
    padding: 7px 12px;
    min-width: auto;
    width: auto;
}

.floating-legend-box.collapsed .floating-legend-body {
    display: none;
}

.floating-legend-box.collapsed .floating-legend-header {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.floating-legend-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #eab308;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
    cursor: pointer;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.legend-active-badge {
    background: rgba(34, 197, 94, 0.22);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.45);
    font-size: 0.62rem;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: 800;
    letter-spacing: 0;
}

.floating-legend-body {
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.floating-legend-body::-webkit-scrollbar {
    width: 4px;
}

.floating-legend-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.floating-legend-item {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
    font-size: 0.72rem;
    color: #cbd5e1;
    line-height: 1.25;
}

.legend-chip {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.legend-chip.circle {
    border-radius: 50%;
}

.legend-chip.line {
    height: 3px;
    border-radius: 1px;
}

.legend-empty-state {
    font-size: 0.72rem;
    color: #64748b;
    font-style: italic;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 7px;
}

/* Subcategoría de Capas y Encabezados */
.layer-subgroup-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #eab308;
    text-transform: uppercase;
    margin: 10px 0 6px 0;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.layer-subgroup-title span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-center-info {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   PRIORIDAD 4: INDICADORES SUPERIORES (KPI BAR) AJUSTADOS Y COLAPSABLES
   ========================================================================== */
.top-kpi-bar {
    position: absolute;
    top: 76px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    user-select: none;
    transition: top 0.3s ease, transform 0.3s ease;
    max-width: 95vw;
}

.kpi-collapse-btn {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #94a3b8;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
}

.kpi-collapse-btn:hover {
    color: #fff;
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(21, 128, 61, 0.3);
}

.top-kpi-cards {
    display: flex;
    gap: 10px;
    transition: all 0.3s ease;
}

.top-kpi-bar.collapsed .top-kpi-cards {
    display: none;
}

.top-kpi-bar.collapsed {
    top: 72px;
}

.kpi-badge-card {
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 6px 14px;
    display: flex;
    flex-direction: column;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.kpi-badge-card:hover {
    transform: translateY(-2px);
    border-color: rgba(234, 179, 8, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
}

.kpi-badge-label {
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.05em;
    margin-bottom: 2px;
}

.kpi-badge-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    color: #22c55e;
}

.kpi-badge-sub {
    font-size: 0.58rem;
    color: #64748b;
    margin-top: 2px;
}

/* ==========================================================================
   MODAL DE REPORTE SITUACIONAL OFICIAL - MEMBRETE, ALTO CONTRASTE Y CALIDAD
   ========================================================================== */
.report-modal-card {
    max-width: 820px !important;
    width: 94% !important;
    background: #0d1522 !important;
    border: 1px solid rgba(34, 197, 94, 0.35) !important;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(21, 128, 61, 0.2) !important;
}

.report-modal-body {
    padding: 20px 24px !important;
    max-height: 80vh;
    overflow-y: auto;
}

/* Membrete Oficial Institucional */
.report-header-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, rgba(21, 128, 61, 0.28) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 16px;
    padding: 14px 18px;
    margin-bottom: 16px;
}

.report-logo-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #eab308;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.report-logo {
    width: 68px;
    height: 68px;
    object-fit: contain;
}

.report-header-text {
    flex: 1;
    min-width: 0;
}

.report-institution-kicker {
    font-size: 0.62rem;
    font-weight: 800;
    color: #4ade80;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.report-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0;
}

.report-subtitle {
    font-size: 0.72rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 2px;
}

.report-badge-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.report-code-badge {
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #facc15;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.report-jurisdiction-badge {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid rgba(34, 197, 94, 0.45);
    color: #4ade80;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.report-flag-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.report-flag-img {
    width: 64px;
    height: 42px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    display: block;
}

.report-flag-label {
    font-size: 0.6rem;
    color: #94a3b8;
    font-weight: 600;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Banner Semafórico de Alerta */
.report-alert-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    margin-bottom: 16px;
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    color: #f8fafc;
    transition: all 0.3s ease;
}

.report-alert-banner.banner-warning {
    background: rgba(234, 179, 8, 0.18);
    border-color: rgba(234, 179, 8, 0.5);
}

.report-alert-banner.banner-danger {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.6);
}

.report-alert-banner.banner-success {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.5);
}

.report-alert-icon-wrap {
    font-size: 1.5rem;
    color: #facc15;
    flex-shrink: 0;
}

.report-alert-banner.banner-danger .report-alert-icon-wrap { color: #f87171; }
.report-alert-banner.banner-success .report-alert-icon-wrap { color: #4ade80; }

.report-alert-level {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.report-alert-desc {
    font-size: 0.74rem;
    color: #cbd5e1;
    margin-top: 2px;
    line-height: 1.4;
}

/* Ficha Técnica de Emisión (Grid 4 metadatos) */
.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.report-meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.report-meta-item .meta-icon {
    font-size: 1.1rem;
    color: #22c55e;
    flex-shrink: 0;
}

.report-meta-label {
    display: block;
    font-size: 0.62rem;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.report-meta-val {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: #f8fafc;
}

/* Tarjetas KPI de Métricas Clave */
.report-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.report-kpi-box {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.report-kpi-box:hover {
    transform: translateY(-2px);
    border-color: rgba(34, 197, 94, 0.4);
}

.report-kpi-header {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #94a3b8;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.report-kpi-box.box-focos .report-kpi-header { color: #f87171; }
.report-kpi-box.box-viento .report-kpi-header { color: #38bdf8; }
.report-kpi-box.box-clima .report-kpi-header { color: #facc15; }
.report-kpi-box.box-patrullaje .report-kpi-header { color: #4ade80; }

.report-kpi-num {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
}

.report-kpi-sub {
    font-size: 0.64rem;
    color: #64748b;
    margin-top: 3px;
}

/* Secciones y Tablas */
.report-section-title {
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #eab308;
    letter-spacing: 0.05em;
    margin: 16px 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.report-table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 16px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    color: #f1f5f9;
}

.report-table thead th {
    background: rgba(21, 128, 61, 0.4);
    color: #86efac;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(34, 197, 94, 0.35);
}

.report-table tbody td {
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 23, 42, 0.55);
}

.report-table tbody tr:hover td {
    background: rgba(30, 41, 59, 0.75);
}

.report-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pill-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.45);
}

.pill-warning {
    background: rgba(234, 179, 8, 0.2);
    color: #facc15;
    border: 1px solid rgba(234, 179, 8, 0.45);
}

.pill-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.pill-info {
    background: rgba(56, 189, 248, 0.2);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.45);
}

.report-diagnosis-box {
    background: rgba(15, 23, 42, 0.65);
    border-left: 3px solid #22c55e;
    border-radius: 0 10px 10px 0;
    padding: 12px 16px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.report-recommendations-list {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 18px;
}

.report-rec-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.76rem;
    color: #cbd5e1;
    margin-bottom: 8px;
    line-height: 1.45;
}

.report-rec-item:last-child {
    margin-bottom: 0;
}

.report-rec-item i {
    color: #22c55e;
    margin-top: 3px;
    flex-shrink: 0;
}

/* Bloque de Validación y Firmas */
.report-signatures-area {
    display: grid;
    grid-template-columns: 1fr 110px 1fr;
    gap: 16px;
    margin-top: 24px;
    padding-top: 14px;
    border-top: 1px dashed rgba(255, 255, 255, 0.15);
    text-align: center;
    align-items: center;
}

.signature-line {
    border-bottom: 1px solid rgba(255, 255, 255, 0.35);
    margin: 28px auto 6px;
    width: 80%;
}

.signature-name {
    font-weight: 700;
    font-size: 0.74rem;
    color: #f8fafc;
}

.signature-role {
    font-size: 0.66rem;
    color: #94a3b8;
}

.report-seal-block {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.report-seal-img {
    width: 58px;
    height: 58px;
    object-fit: contain;
    opacity: 0.9;
}

.seal-caption {
    font-size: 0.58rem;
    font-weight: 800;
    color: #eab308;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

.report-footer-note {
    font-size: 0.68rem;
    color: #64748b;
    text-align: center;
    margin-top: 16px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    line-height: 1.4;
}

/* Fallback print styles for Ctrl+P */
@media print {
    body, #map, .top-header, .top-kpi-bar, .sidebar, .map-toolbar, .search-container, .floating-legend-box, .basemap-picker-modal {
        display: none !important;
    }
}

/* ==========================================================================
   RESPONSIVIDAD MÓVIL Y TABLETS
   ========================================================================== */
@media (max-width: 1024px) {
    .top-kpi-bar {
        max-width: calc(100vw - 32px);
        overflow-x: auto;
        padding-bottom: 6px;
    }

    .kpi-badge-card {
        min-width: 105px;
        padding: 5px 10px;
    }

    .kpi-badge-value {
        font-size: 1.15rem;
    }
}

@media (max-width: 768px) {
    .top-kpi-bar {
        top: 66px;
    }

    .floating-legend-box {
        left: 14px;
        bottom: 80px;
    }

    .report-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
}


