/* =====================================================================
   Monitor de Incendios — Rediseño v3 "Centro de mando forestal"
   Se carga DESPUÉS de incendios_dashboard.css y solo sobrescribe la UI.
   Tema Forest (DESIGN.md) en versión oscura: cristal verde bosque,
   acentos brasa/mostaza para el fuego.
   ===================================================================== */

:root {
    --fd-glass: rgba(9, 20, 14, 0.84);
    --fd-glass-strong: rgba(9, 20, 14, 0.94);
    --fd-surface: rgba(255, 255, 255, 0.045);
    --fd-surface-2: rgba(255, 255, 255, 0.08);
    --fd-border: rgba(255, 255, 255, 0.09);
    --fd-border-2: rgba(255, 255, 255, 0.16);
    --fd-text: #eef5f0;
    --fd-muted: #93a89a;
    --fd-faint: #65786b;

    --fd-green: #27ae60;
    --fd-green-glow: #22c55e;
    --fd-forest: #1e5c30;
    --fd-mustard: #f1c40f;
    --fd-ember: #f97316;
    --fd-red: #ef4444;

    --fd-radius: 16px;
    --fd-radius-sm: 10px;
    --fd-shadow: 0 18px 50px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.25);
    --fd-blur: blur(18px) saturate(140%);
    --fd-font: 'Nunito', -apple-system, 'Segoe UI', Roboto, sans-serif;
    --fd-panel-w: 340px;
    --fd-gap: 16px;
    --fd-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body.fd {
    font-family: var(--fd-font);
    background: #0b1912;
    color: var(--fd-text);
    -webkit-font-smoothing: antialiased;
}

.fd .hidden { display: none !important; }

/* SEO (antes estaba inline en el <head>) */
.visually-hidden-seo {
    position: absolute; top: 0; left: 0;
    width: 1px; height: 1px; overflow: hidden;
    opacity: 0.01; pointer-events: none;
}

/* Utilidades mínimas (la vista usaba clases de Bootstrap sin cargar su CSS) */
.fd .d-flex { display: flex; }
.fd .align-items-center { align-items: center; }
.fd .gap-2 { gap: 8px; }
.fd .m-0 { margin: 0 !important; }
.fd .me-2 { margin-right: 8px; }
.fd .ms-2 { margin-left: 8px; }
.fd .mt-3 { margin-top: 16px; }
.fd .w-100 { width: 100%; }
.fd .text-white { color: var(--fd-text) !important; }
.fd .text-danger { color: #ff6b5b !important; }
.fd .text-primary { color: #7cc4ff !important; }
.fd .mono-font { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------------
   PANEL PRINCIPAL
   --------------------------------------------------------------------- */
.fd .controls-overlay {
    position: fixed;
    top: var(--fd-gap);
    left: var(--fd-gap);
    bottom: var(--fd-gap);
    width: var(--fd-panel-w);
    min-width: 0;
    padding: 0;
    gap: 0;
    z-index: 1600;
    background: var(--fd-glass);
    backdrop-filter: var(--fd-blur);
    -webkit-backdrop-filter: var(--fd-blur);
    border: 1px solid var(--fd-border);
    border-left: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    box-shadow: var(--fd-shadow);
    color: var(--fd-text);
    font-family: var(--fd-font);
    transform: none;
    transition: transform 0.45s var(--fd-ease);
}

.fd .controls-overlay.collapsed {
    transform: translateX(calc(-100% - var(--fd-gap)));
}

.fd .controls-content {
    height: 100%;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

/* Botón para abrir/cerrar */
.fd .toggle-handle {
    position: absolute;
    top: 0;
    right: -60px;
    width: 44px;
    height: 44px;
    border: 1px solid var(--fd-border-2);
    border-radius: 12px;
    background: var(--fd-glass-strong);
    backdrop-filter: var(--fd-blur);
    -webkit-backdrop-filter: var(--fd-blur);
    color: var(--fd-text);
    font-size: 1.05rem;
    box-shadow: var(--fd-shadow);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, transform 0.2s;
}
.fd .toggle-handle:hover { background: var(--fd-forest); transform: translateY(-1px); }
.fd .controls-overlay:not(.collapsed) .toggle-handle i::before { content: "\f00d"; } /* X */

/* Marca */
.fd-brand {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 12px;
}
.fd-brand-icon {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.15rem;
    color: #fff;
    background: radial-gradient(circle at 30% 25%, #fbbf24, var(--fd-ember) 55%, #b91c1c);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.fd .controls-title h1 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--fd-text);
    line-height: 1.2;
}
.fd .controls-title p {
    margin: 2px 0 0;
    font-size: 0.72rem;
    color: var(--fd-muted);
    font-weight: 600;
}
.fd .status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #86efac;
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.fd .status-badge .pulse {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--fd-green-glow);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: fd-live 2s infinite;
}
@keyframes fd-live {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6); }
    70% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Indicadores */
.fd-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.fd-kpi {
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    border-radius: 12px;
    padding: 10px 10px 9px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.fd-kpi-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--fd-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fd-kpi-value {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: var(--fd-text);
    transition: transform 0.3s var(--fd-ease), color 0.3s;
}
.fd-kpi--hot {
    background: linear-gradient(160deg, rgba(249, 115, 22, 0.22), rgba(239, 68, 68, 0.08));
    border-color: rgba(249, 115, 22, 0.35);
}
.fd-kpi--hot .fd-kpi-value { color: #ffb37a; }
.fd-kpi--zones.is-alert { border-color: rgba(239, 68, 68, 0.45); background: rgba(239, 68, 68, 0.12); }
.fd-kpi--zones.is-alert .fd-kpi-value { color: #ff8a80; }
.fd-kpi--zones.is-calm .fd-kpi-value { color: #86efac; }
.fd-kpi-value.bump { transform: scale(1.18); }

/* Secciones */
.fd-section { display: flex; flex-direction: column; gap: 8px; }
.fd-label {
    margin: 0;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fd-faint);
    display: flex; align-items: center; gap: 6px;
}

/* Lista de zonas en alerta */
.fd-alerts .fd-label { color: #ff8a80; }
.fd-alert-list {
    list-style: none; margin: 0; padding: 0;
    display: flex; flex-direction: column; gap: 6px;
    max-height: 168px; overflow-y: auto; overflow-x: hidden;
}
.fd-alert-item {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: var(--fd-text);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.fd-alert-item:hover { background: rgba(239, 68, 68, 0.2); border-color: rgba(239, 68, 68, 0.45); }
.fd-alert-item .fd-dot {
    width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0;
    background: var(--fd-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}
.fd-alert-item .fd-alert-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-alert-item .fd-alert-count {
    font-variant-numeric: tabular-nums;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.25);
    color: #ffd2cd;
}

/* Control segmentado de periodo */
.fd .fd-segmented {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid var(--fd-border);
    border-top: 1px solid var(--fd-border);
}
.fd .btn-filter {
    background: transparent;
    border: 0;
    border-radius: 9px;
    padding: 8px 4px;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--fd-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.fd .btn-filter:hover { background: var(--fd-surface-2); color: var(--fd-text); }
.fd .btn-filter.active {
    background: linear-gradient(180deg, var(--fd-green), var(--fd-forest));
    color: #fff;
    border: 0;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Interruptores */
.fd-switch {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--fd-text);
    cursor: pointer;
    position: relative;
    user-select: none;
}
.fd-switch i { width: 16px; color: var(--fd-muted); margin-right: 6px; }
.fd-switch input { position: absolute; opacity: 0; pointer-events: none; }
.fd-switch-track {
    width: 36px; height: 20px; flex-shrink: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    position: relative;
    transition: background 0.2s;
}
.fd-switch-track::after {
    content: "";
    position: absolute; top: 2px; left: 2px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s var(--fd-ease);
}
.fd-switch input:checked + .fd-switch-track { background: var(--fd-green); }
.fd-switch input:checked + .fd-switch-track::after { transform: translateX(16px); }
.fd-switch input:focus-visible + .fd-switch-track { outline: 2px solid var(--fd-mustard); outline-offset: 2px; }

/* Herramientas */
.fd .fd-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin: 0;
}
.fd .control-btn.fd-tool {
    width: auto; height: auto;
    margin: 0;
    padding: 10px 4px 8px;
    border-radius: 12px;
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    box-shadow: none;
    color: var(--fd-text);
    display: flex; flex-direction: column; align-items: center; gap: 5px;
    font-size: 1rem;
    z-index: auto;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.fd .control-btn.fd-tool span {
    font: inherit;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--fd-muted);
}
.fd .control-btn.fd-tool:hover {
    background: var(--fd-surface-2);
    border-color: var(--fd-border-2);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: none;
}
.fd .control-btn.fd-tool.active,
.fd .control-btn.fd-tool.measuring,
.fd .control-btn.active#windBtn {
    background: rgba(241, 196, 15, 0.16) !important;
    border-color: rgba(241, 196, 15, 0.55) !important;
    color: var(--fd-mustard) !important;
    transform: none;
}
.fd .control-btn.fd-tool.active span,
.fd .control-btn.fd-tool.measuring span { color: var(--fd-mustard); }

/* CTA alertas */
.fd-cta {
    display: flex; align-items: center; gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    font: inherit;
    text-align: left;
    color: #1a1305;
    cursor: pointer;
    background: linear-gradient(135deg, #fde047 0%, var(--fd-mustard) 45%, #f39c12 100%);
    box-shadow: 0 10px 24px rgba(241, 196, 15, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.fd-cta:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(241, 196, 15, 0.38); }
.fd-cta > i:first-child {
    width: 34px; height: 34px; flex-shrink: 0;
    border-radius: 10px;
    display: grid; place-items: center;
    background: rgba(0, 0, 0, 0.12);
    font-size: 1rem;
}
.fd-cta span { display: flex; flex-direction: column; flex: 1; line-height: 1.25; }
.fd-cta strong { font-size: 0.86rem; font-weight: 800; }
.fd-cta small { font-size: 0.7rem; font-weight: 600; opacity: 0.75; }
.fd-cta-arrow { opacity: 0.6; font-size: 0.8rem; }

/* Enlaces */
.fd-links {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.fd-links a {
    flex: 1 1 auto;
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 8px 10px;
    border-radius: 10px;
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    color: var(--fd-text);
    font-size: 0.76rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s;
}
.fd-links a:hover { background: var(--fd-surface-2); }
.fd-links a i { color: var(--fd-green-glow); }

/* Pie con sincronización */
.fd-footer {
    margin-top: auto;
    display: flex; align-items: center; gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--fd-border);
    font-size: 0.72rem;
    color: var(--fd-faint);
}
.fd-footer strong { color: var(--fd-muted); font-variant-numeric: tabular-nums; }
.fd .btn-refresh {
    width: 28px; height: 28px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid var(--fd-border);
    background: var(--fd-surface);
    color: var(--fd-muted);
    cursor: pointer;
    display: grid; place-items: center;
    transition: color 0.2s, background 0.2s;
}
.fd .btn-refresh:hover { color: #fff; background: var(--fd-surface-2); }

/* ---------------------------------------------------------------------
   CONTROLES DE LEAFLET (capas, atribución)
   --------------------------------------------------------------------- */
.fd .leaflet-top.leaflet-right { top: 6px; right: 6px; }
.fd .leaflet-control-layers {
    background: var(--fd-glass-strong) !important;
    backdrop-filter: var(--fd-blur);
    -webkit-backdrop-filter: var(--fd-blur);
    border: 1px solid var(--fd-border) !important;
    border-radius: 12px !important;
    color: var(--fd-text);
    font-family: var(--fd-font);
    box-shadow: var(--fd-shadow) !important;
}
.fd .leaflet-control-layers-toggle { filter: invert(1) brightness(1.4); width: 40px; height: 40px; }
.fd .leaflet-control-layers-expanded { padding: 10px 14px 10px 10px; font-size: 0.8rem; }
.fd .leaflet-control-layers-list label { padding: 2px 0; }
.fd .leaflet-control-layers-separator { border-top-color: var(--fd-border); }
.fd .leaflet-control-layers input { accent-color: var(--fd-green); }
.fd .leaflet-control-attribution {
    background: rgba(9, 20, 14, 0.6) !important;
    color: var(--fd-muted) !important;
    border-radius: 8px 0 0 0;
    font-family: var(--fd-font);
}
.fd .leaflet-control-attribution a { color: #b7d4c0 !important; }

/* El contador diario ahora vive en el panel */
.fd .daily-counter-badge { display: none !important; }

/* ---------------------------------------------------------------------
   LÍNEA DE TIEMPO
   --------------------------------------------------------------------- */
.fd .timeline-control {
    bottom: calc(var(--fd-gap) + 8px);
    width: min(720px, calc(100vw - 48px));
    max-width: none;
    padding: 10px 14px 10px 10px;
    gap: 14px;
    background: var(--fd-glass-strong);
    backdrop-filter: var(--fd-blur);
    -webkit-backdrop-filter: var(--fd-blur);
    border: 1px solid var(--fd-border-2);
    border-radius: 999px;
    box-shadow: var(--fd-shadow);
    color: var(--fd-text);
    font-family: var(--fd-font);
}
.fd .play-btn {
    width: 42px; height: 42px;
    font-size: 1rem;
    background: radial-gradient(circle at 30% 25%, #fbbf24, var(--fd-ember) 60%, #c2410c);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.4);
}
.fd .play-btn:hover { background: radial-gradient(circle at 30% 25%, #fcd34d, #fb923c 60%, #ea580c); }
.fd .range-container { gap: 4px; }
.fd .time-label {
    position: static;
    transform: none;
    background: none;
    padding: 0;
    color: var(--fd-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.fd input[type=range]::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(241, 196, 15, 0.35), rgba(239, 68, 68, 0.6));
}
.fd input[type=range]::-webkit-slider-thumb {
    height: 18px; width: 18px;
    margin-top: -6px;
    background: #fff;
    border: 3px solid var(--fd-ember);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.25);
}
.fd input[type=range]::-moz-range-track {
    height: 6px; border-radius: 999px;
    background: linear-gradient(90deg, rgba(241, 196, 15, 0.35), rgba(239, 68, 68, 0.6));
}
.fd input[type=range]::-moz-range-thumb {
    height: 14px; width: 14px; border-radius: 50%;
    background: #fff; border: 3px solid var(--fd-ember);
}
.fd .current-date-display {
    color: var(--fd-text);
    font-size: 0.85rem;
    font-weight: 800;
    min-width: 130px;
}
.fd .btn-minimize { color: var(--fd-muted); }
.fd .btn-minimize:hover { color: #fff; }

.fd .timeline-trigger {
    bottom: calc(var(--fd-gap) + 8px);
    border: 1px solid var(--fd-border-2);
    padding: 10px 18px;
    background: var(--fd-glass-strong);
    backdrop-filter: var(--fd-blur);
    -webkit-backdrop-filter: var(--fd-blur);
    color: var(--fd-text);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: var(--fd-shadow);
}
.fd .timeline-trigger i { color: var(--fd-mustard); }
.fd .timeline-trigger:hover { background: var(--fd-forest); color: #fff; }

/* Insignias flotantes */
.fd .sat-date-badge {
    bottom: 96px;
    background: var(--fd-glass-strong);
    border: 1px solid var(--fd-border-2);
    font-family: var(--fd-font);
    font-size: 0.8rem;
}
.fd .distance-badge {
    top: var(--fd-gap);
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 10px 8px 14px;
    border-radius: 999px;
    background: var(--fd-glass-strong);
    border: 1px solid rgba(241, 196, 15, 0.5);
    font-family: var(--fd-font);
    font-variant-numeric: tabular-nums;
    box-shadow: var(--fd-shadow);
}
.fd .distance-badge i { color: var(--fd-mustard); }
.fd .distance-badge.hidden { transform: translate(-50%, -20px); }

/* Con el panel abierto en escritorio, centramos lo flotante en el área libre */
@media (min-width: 900px) {
    body.fd:has(#controlsPanel:not(.collapsed)) .timeline-control,
    body.fd:has(#controlsPanel:not(.collapsed)) .timeline-trigger,
    body.fd:has(#controlsPanel:not(.collapsed)) .sat-date-badge,
    body.fd:has(#controlsPanel:not(.collapsed)) .distance-badge {
        left: calc(50% + (var(--fd-panel-w) + var(--fd-gap)) / 2);
    }
    body.fd:has(#controlsPanel:not(.collapsed)) .timeline-control {
        width: min(720px, calc(100vw - var(--fd-panel-w) - 80px));
    }
}

/* Marca de agua: abajo a la derecha, encima de la atribución */
.fd .watermark-container { left: auto; right: 60px; bottom: 26px; }
.fd .watermark-logo { width: 120px; opacity: 0.55; }

/* ---------------------------------------------------------------------
   PANEL DE ANÁLISIS DE ZONA
   --------------------------------------------------------------------- */
.fd .zone-panel.hud-panel {
    top: var(--fd-gap);
    bottom: var(--fd-gap);
    right: var(--fd-gap);
    height: auto;
    width: 380px;
    z-index: 1700;
    border: 1px solid var(--fd-border);
    border-radius: var(--fd-radius);
    background: var(--fd-glass-strong);
    backdrop-filter: var(--fd-blur);
    -webkit-backdrop-filter: var(--fd-blur);
    box-shadow: var(--fd-shadow);
    color: var(--fd-text);
    font-family: var(--fd-font);
    overflow: hidden;
    transform: translateX(calc(100% + 2 * var(--fd-gap)));
    transition: transform 0.45s var(--fd-ease);
}
.fd .zone-panel.hud-panel.active { right: var(--fd-gap); transform: none; }

.fd .close-panel-btn {
    top: 14px; right: 14px;
    width: 32px; height: 32px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    display: grid; place-items: center;
    z-index: 2;
    transition: transform 0.25s, background 0.2s;
}
.fd .close-panel-btn:hover { background: var(--fd-red); color: #fff; transform: rotate(90deg); }

.fd .hud-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px 56px 18px 20px;
    border-bottom: 1px solid var(--fd-border);
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(39, 174, 96, 0.35), transparent 60%),
        linear-gradient(180deg, rgba(30, 92, 48, 0.55), rgba(30, 92, 48, 0.1));
}
.fd .zone-panel.hud-alert-active .hud-header {
    background:
        radial-gradient(120% 140% at 0% 0%, rgba(239, 68, 68, 0.45), transparent 60%),
        linear-gradient(180deg, rgba(127, 29, 29, 0.6), rgba(127, 29, 29, 0.1));
}
.fd-eyebrow {
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}
.fd .neon-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    text-shadow: none;
    line-height: 1.2;
}
.fd .hud-status-badge { border-radius: 999px; padding: 4px 10px; font-size: 0.66rem; }
.fd .btn-edit-zone-name {
    background: rgba(255, 255, 255, 0.1);
    border: 0; border-radius: 8px;
    color: #fff; width: 28px; height: 28px; cursor: pointer;
}

.fd .zone-panel-body.hud-body {
    padding: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}
.fd .hud-section {
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: none;
}
.fd .hud-section.no-border { background: transparent; border: 0; padding: 0; }
.fd .hud-section-title {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    color: var(--fd-faint);
    margin: 0 0 12px;
}
.fd .hud-section-title i { color: var(--fd-muted); }

.fd .hud-gauge {
    width: 70px; height: 70px;
    background: conic-gradient(var(--fd-green-glow) calc(var(--percentage) * 1%), rgba(255, 255, 255, 0.08) 0);
}
.fd #gaugeTemp.hud-gauge {
    background: conic-gradient(var(--fd-ember) calc(var(--percentage) * 1%), rgba(255, 255, 255, 0.08) 0);
}
.fd #gaugeHum.hud-gauge {
    background: conic-gradient(#38bdf8 calc(var(--percentage) * 1%), rgba(255, 255, 255, 0.08) 0);
}
.fd .gauge-center { width: 58px; height: 58px; background: #0d1d14; }
.fd .gauge-value { color: var(--fd-text); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.fd .gauge-unit { color: var(--fd-muted); }
.fd .gauge-label { color: var(--fd-muted); font-size: 0.66rem; letter-spacing: 0.06em; margin-top: 4px; }

.fd .hud-stat-box {
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid var(--fd-border);
    border-radius: 12px;
}
.fd .hud-stat-box.alert-box { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.fd .hud-stat-label { color: var(--fd-muted); }
.fd .history-stat { justify-content: center; margin-top: 8px; font-size: 0.78rem; color: var(--fd-muted); }

.fd .hud-data-grid .data-cell {
    background: var(--fd-surface);
    border: 1px solid var(--fd-border);
    border-radius: 12px;
}
.fd .data-label { color: var(--fd-faint); }
.fd .hud-coords-box {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--fd-border);
    border-radius: 10px;
    color: var(--fd-text);
}
.fd .btn-copy-hud { color: var(--fd-muted); background: none; border: 0; cursor: pointer; }
.fd .btn-copy-hud:hover { color: var(--fd-mustard); }

.fd .btn-hud-action {
    justify-content: center;
    padding: 12px;
    border-radius: 12px;
    border: 0;
    font-family: var(--fd-font);
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: #1a1305;
    background: linear-gradient(135deg, #fde047, var(--fd-mustard) 50%, #f39c12);
    box-shadow: 0 8px 20px rgba(241, 196, 15, 0.25);
}
.fd .btn-hud-action:hover { transform: translateY(-1px); }

/* ---------------------------------------------------------------------
   ACCESIBILIDAD Y MOVIMIENTO
   --------------------------------------------------------------------- */
.fd button:focus-visible,
.fd a:focus-visible {
    outline: 2px solid var(--fd-mustard);
    outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
    .fd *, .fd *::before, .fd *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------------------------------------------------------------------
   MÓVIL: el panel se vuelve una hoja inferior
   --------------------------------------------------------------------- */
@media (max-width: 640px) {
    :root { --fd-gap: 12px; }

    .fd .controls-overlay {
        top: auto;
        left: 0; right: 0; bottom: 0;
        width: 100%;
        max-height: 78vh;
        max-height: 78dvh;
        border-radius: 22px 22px 0 0;
        border-bottom: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .fd .controls-overlay.collapsed { transform: translateY(100%); }
    .fd .controls-content { padding-top: 22px; }
    .fd .controls-content::before {
        content: "";
        position: absolute; top: 8px; left: 50%;
        width: 40px; height: 4px; margin-left: -20px;
        border-radius: 4px;
        background: rgba(255, 255, 255, 0.2);
    }
    .fd .toggle-handle {
        top: -62px;
        right: auto;
        left: var(--fd-gap);
        width: 50px; height: 50px;
        border-radius: 16px;
        font-size: 1.15rem;
    }
    .fd .controls-overlay:not(.collapsed) .toggle-handle { top: -58px; }

    .fd .timeline-control { width: calc(100vw - 24px); padding: 8px 10px 8px 8px; gap: 10px; }
    .fd .current-date-display { min-width: 0; font-size: 0.74rem; }
    .fd .timeline-trigger { left: auto; right: var(--fd-gap); transform: none; }
    .fd .timeline-trigger:hover { transform: translateY(-2px); }
    .fd .timeline-trigger.hidden { transform: translateY(100%); }
    .fd .sat-date-badge { bottom: 82px; font-size: 0.72rem; }
    .fd .watermark-container { display: none; }

    .fd .zone-panel.hud-panel,
    .fd .zone-panel.hud-panel.active {
        top: auto; left: 0; right: 0; bottom: 0;
        width: 100%;
        max-height: 88vh;
        max-height: 88dvh;
        border-radius: 22px 22px 0 0;
    }
    .fd .zone-panel.hud-panel { transform: translateY(100%); }
    .fd .zone-panel.hud-panel.active { transform: none; }
}
