﻿/* ===================== DASHBOARD ARAUCO - ESTILOS ===================== */

:root {
    --brand: #696158;
    --brand-dark: #5d564e;
    --accent: #BFB800;
    --accent-soft: #f4f3dc;
    --bg: #f6f7f8;
    --surface: #ffffff;
    --surface-soft: #faf9f6;
    --text: #282828;
    --muted: #6f6a63;
    --line: #e8e4dc;
    --shadow: 0 14px 34px rgba(40, 40, 40, .08);
    --shadow-hover: 0 18px 42px rgba(40, 40, 40, .13);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Lato', sans-serif;
    background:
        radial-gradient(circle at 18% 0%, rgba(191,184,0,.08), transparent 28%),
        linear-gradient(180deg, #fbfbfa 0%, var(--bg) 42%, #f1f2f3 100%);
    color: var(--text);
    min-height: 100vh;
}

.dashboard-loader {
    position: fixed;
    inset: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 35%, rgba(191,184,0,.14), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.84), rgba(246,247,248,.92));
    backdrop-filter: blur(8px);
    transition: opacity .35s ease, visibility .35s ease;
}
.dashboard-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.dashboard-loader.is-empty {
    background:
        radial-gradient(circle at 50% 35%, rgba(191,184,0,.08), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,.36), rgba(246,247,248,.48));
    backdrop-filter: blur(2px);
    pointer-events: none;
}
.dashboard-loader-card {
    width: 176px;
    height: 176px;
    border-radius: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(232,228,220,.95);
    box-shadow: 0 18px 48px rgba(40,40,40,.10);
    text-align: center;
}
.dashboard-loader-card--empty {
    width: 300px;
    height: auto;
    min-height: 170px;
    padding: 22px 24px 18px;
    border-color: rgba(234,102,102,.28);
    box-shadow: 0 22px 54px rgba(228,72,72,.16);
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.dashboard-loader-mark {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.dashboard-loader-mark__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(105,97,88,.14);
    border-top-color: var(--accent);
    border-right-color: rgba(191,184,0,.38);
    animation: loader-spin 1s linear infinite;
    box-sizing: border-box;
}
.dashboard-loader-mark__logo {
    width: 230px;
    height: 230px;
    min-width: 230px;
    min-height: 230px;
    object-fit: contain;
    display: block;
    position: relative;
    z-index: 1;
    opacity: 1;
}
.dashboard-loader-error-mark {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    background: rgba(239, 68, 68, .08);
    border: 3px solid rgba(239, 68, 68, .22);
    color: #dc2626;
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1;
}
.dashboard-loader-error-text {
    color: #b91c1c;
    font-size: 1.02rem;
    font-weight: 900;
    letter-spacing: -.01em;
    line-height: 1.35;
}
@keyframes loader-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== HEADER ===== */
.header {
    min-height: 85px;
    background:
        radial-gradient(circle at 8% 34%, rgba(255,255,255,.10), transparent 13%),
        linear-gradient(115deg, rgba(93,86,78,.98) 0%, var(--brand) 52%, #746b61 100%);
    color: white;
    padding: 2px 34px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(40, 40, 40, .15);
}
.header::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .17;
    background:
        repeating-radial-gradient(ellipse at 70% 12%,
            transparent 0,
            transparent 18px,
            rgba(255,255,255,.18) 19px,
            transparent 20px);
}
.header-left {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-width: 0;
    flex: 1 1 auto;
    position: relative;
    z-index: 1;
    padding-left: 110px;
    padding-right: 120px;
}
.header-icon {
    width: auto;
    height: 68px;
    padding: 0;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: visible;
    background: transparent;
    border: 0;
    box-shadow: none;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
}

.header-icon img {
    width: auto;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 0;
}
.header-copy { min-width: 0; }
.header > img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 9px rgba(0,0,0,.18));
    position: absolute;
    right: 34px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}
.header-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.header h1 {
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -.035em;
    text-shadow: 0 2px 10px rgba(0,0,0,.14);
}
.header-meta {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
    color: rgba(255,255,255,.95);
    flex-wrap: wrap;
}
.header-date, .header-updated {
    font-size: .82rem;
    line-height: 1;
    font-weight: 900;
    opacity: 1;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.16);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
    backdrop-filter: blur(6px);
}
.header-date::before { content: '▣'; font-size: .72rem; margin-right: 8px; opacity: .9; }
.header-updated::before { content: '◷'; font-size: .82rem; margin-right: 8px; opacity: .9; }
.header-date::after { display: none; }

/* ===== TABS ===== */
.tabs-shell {
    position: relative;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 16px rgba(40,40,40,.04);
}
.tabs {
    background: rgba(255,255,255,.96);
    padding: 0 26px;
    display: flex;
    gap: 14px;
    overflow-x: auto;
    padding-right: 236px;
}
.tabs-shell .tabs {
    border-bottom: 0;
    box-shadow: none;
}
.tab {
    padding: 14px 4px 12px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 800;
    color: #565656;
    line-height: 1.1;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.tab svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; fill: none; }
.tab:hover { color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--accent); }
.tab.active svg { color: var(--accent); }

.dashboard-settings-btn {
    position: absolute;
    right: 64px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(40,40,40,.08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, color .18s ease;
    z-index: 5;
}
.dashboard-download-btn {
    right: 180px;
}
.dashboard-logout-btn {
    right: 20px;
}
.dashboard-download-btn.is-loading::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid rgba(191,184,0,.24);
    border-top-color: var(--accent);
    border-right-color: rgba(191,184,0,.5);
    animation: loader-spin 1s linear infinite;
    pointer-events: none;
}
.dashboard-settings-btn:hover {
    color: var(--accent);
    border-color: rgba(191,184,0,.45);
    box-shadow: 0 12px 28px rgba(40,40,40,.12);
    transform: translateY(-50%) scale(1.03);
}
.dashboard-download-btn:hover,
.dashboard-download-btn.is-loading {
    color: var(--accent);
}
.dashboard-export-modal {
    position: absolute;
    right: 108px;
    top: calc(100% + 12px);
    z-index: 21;
}
.dashboard-export-modal[hidden] { display: none; }
.dashboard-export-modal__backdrop {
    display: none;
}
.dashboard-export-modal__card {
    min-width: 260px;
    max-width: 92vw;
    padding: 18px 20px 16px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 20px 46px rgba(40, 40, 40, .18);
    border: 1px solid var(--line);
}
.dashboard-export-modal__title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--brand);
}
.dashboard-export-modal__subtitle {
    margin-top: 4px;
    font-size: .84rem;
    color: var(--muted);
}
.dashboard-export-modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}
.dashboard-export-modal__btn {
    flex: 1;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: linear-gradient(180deg, #fff, #f8f6f1);
    color: var(--text);
    font-weight: 800;
    padding: 10px 14px;
    cursor: pointer;
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.dashboard-export-modal__btn:hover {
    transform: translateY(-1px);
    border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(191, 184, 0, .12);
}
.dashboard-export-modal__btn:active { transform: translateY(0); }

.resumen-proyeccion-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40, 38, 34, .32);
    backdrop-filter: blur(2px);
    padding: 16px;
}
.resumen-proyeccion-popup {
    width: 560px;
    max-width: 100%;
    max-height: 80vh;
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    border: 1px solid var(--line);
    box-shadow: 0 24px 54px rgba(40, 40, 40, .22);
    padding: 16px 18px 18px;
}
.resumen-proyeccion-popup__dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, .18);
    vertical-align: middle;
}
.resumen-proyeccion-popup__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.resumen-proyeccion-popup__title {
    font-size: .96rem;
    font-weight: 900;
    color: var(--brand);
}
.resumen-proyeccion-popup__close {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 8px;
}
.resumen-proyeccion-popup__close:hover {
    background: #f2f2f0;
    color: var(--text);
}
.dashboard-settings-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dashboard-settings-btn i {
    font-size: 15px;
    line-height: 1;
}
.dashboard-date-nav {
    position:absolute;
    right:64px;
    top:50%;
    transform:translateY(-50%);
    display:inline-flex;
    align-items:stretch;
    height:36px;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:999px;
    background:#fff;
    box-shadow:0 10px 24px rgba(40,40,40,.08);
    z-index:5;
}
.dashboard-date-nav__button,
.dashboard-date-nav__calendar.dashboard-settings-btn {
    position:static;
    width:35px;
    height:34px;
    min-width:35px;
    margin:0;
    padding:0;
    transform:none;
    border:0;
    border-radius:0;
    background:transparent;
    box-shadow:none;
    color:var(--brand);
    display:inline-flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}
.dashboard-date-nav__button + .dashboard-date-nav__calendar,
.dashboard-date-nav__calendar + .dashboard-date-nav__button {
    border-left:1px solid var(--line);
}
.dashboard-date-nav__button:hover,
.dashboard-date-nav__calendar.dashboard-settings-btn:hover {
    transform:none;
    color:var(--accent);
    border-color:var(--line);
    box-shadow:none;
    background:var(--surface);
}
.dashboard-date-nav__button:disabled {
    cursor:wait;
    opacity:.5;
}
.dashboard-date-nav__button svg {
    width:16px;
    height:16px;
    fill:none;
    stroke:currentColor;
    stroke-width:1.9;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.dashboard-settings-popover {
    position: absolute;
    right: 26px;
    top: calc(100% + 12px);
    width: 260px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 18px 48px rgba(40,40,40,.16);
    padding: 14px;
    z-index: 20;
}
.dashboard-settings-popover[hidden] {
    display: none !important;
}
.dashboard-settings-form {
    display: grid;
    gap: 10px;
}
.dashboard-settings-title {
    font-size: .9rem;
    font-weight: 900;
    color: var(--brand);
    letter-spacing: -.01em;
    margin-bottom: 2px;
}
.dashboard-settings-form label {
    font-size: .78rem;
    font-weight: 800;
    color: var(--muted);
}
.dashboard-settings-form input[type="date"] {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 10px;
    font-size: .84rem;
    color: var(--text);
    background: var(--surface);
    outline: none;
}
.dashboard-settings-form input[type="date"]:focus {
    border-color: rgba(191,184,0,.6);
    box-shadow: 0 0 0 3px rgba(191,184,0,.12);
}
.dashboard-settings-submit {
    margin-top: 2px;
    border: none;
    border-radius: 10px;
    padding: 10px 12px;
    background: var(--brand);
    color: #fff;
    font-size: .84rem;
    font-weight: 900;
    cursor: pointer;
}
.dashboard-settings-submit:hover {
    background: var(--brand-dark);
}

/* ===== CONTENT ===== */
.content { padding: 26px 28px 8px; max-width: 1680px; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }

body.mapa-view {
    overflow: hidden;
}

body.mapa-view .content {
    max-width: none;
}

body.mapa-view .tab-content#mapa {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--mapa-top, 0px);
    --detalle-giros-reserve: 0px;
    padding: 0;
    margin: 0;
    max-width: none;
    z-index: 40;
    background: linear-gradient(180deg, #eef2f7 0%, #e9edf3 100%);
    overflow: hidden;
}

body.mapa-view .tab-content#mapa.active {
    display: block;
}

body.mapa-view .tab-content#mapa .mapa-stage {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body.mapa-view .tab-content#mapa.mapa-detalle-giros-open {
    --detalle-giros-reserve: min(36vh, 330px);
}

body.mapa-view .tab-content#mapa .mapa-canvas {
    position: absolute;
    inset: 0;
    bottom: var(--detalle-giros-reserve, 0px);
}

body.mapa-view .tab-content#mapa .mapa-camiones-counter {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 1205;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid rgba(232, 228, 220, .96);
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 24px rgba(40, 40, 40, .12);
    color: var(--brand);
    font-weight: 900;
    font-size: .9rem;
}

body.mapa-view .tab-content#mapa .mapa-camiones-counter[hidden] {
    display: none;
}

body.mapa-view .tab-content#mapa .mapa-camiones-counter i {
    font-size: .85rem;
    color: var(--brand);
}

body.mapa-view .tab-content#mapa .mapa-panel {
    position: absolute;
    left: 20px;
    top: 20px;
    height: auto;
    width: min(470px, calc(100vw - 40px));
    max-height: calc(100% - 40px - var(--detalle-giros-reserve, 0px));
    overflow: auto;
    z-index: 1200;
    border-radius: 20px;
    border: 1px solid rgba(232, 228, 220, .92);
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 18px 44px rgba(40, 40, 40, .16);
    backdrop-filter: blur(10px);
    padding-bottom: 12px;
    transition: max-height .24s ease, transform .24s ease, opacity .18s ease;
}

body.mapa-view .tab-content#mapa .mapa-panel__collapse-btn,
body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,244,239,.98));
    color: var(--brand);
    box-shadow: 0 8px 18px rgba(40, 40, 40, .10);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-panel__collapse-btn:hover,
body.mapa-view .tab-content#mapa .mapa-panel__collapse-btn:focus-visible,
body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn:hover,
body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(40, 40, 40, .16);
    outline: none;
}

body.mapa-view .tab-content#mapa .mapa-panel__collapse-btn svg,
body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn svg {
    width: 19px;
    height: 19px;
}

body.mapa-view .tab-content#mapa .mapa-panel__sync-spinner {
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 50%;
    border: 2px solid rgba(53, 113, 204, .18);
    border-top-color: var(--brand);
    animation: loader-spin .7s linear infinite;
}

body.mapa-view .tab-content#mapa .mapa-panel__sync-spinner[hidden] {
    display: none;
}

body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn {
    position: absolute;
    left: 20px;
    top: 20px;
    z-index: 1210;
}

body.mapa-view .tab-content#mapa .mapa-stage--panel-collapsed .mapa-panel {
    pointer-events: none;
    opacity: 0;
    transform: translateX(calc(-100% - 24px));
}

body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn[hidden] {
    display: none;
}

body.mapa-view .dashboard-export-modal {
    z-index: 34060;
}

body.mapa-view .dashboard-settings-popover {
    z-index: 34050;
}

body.mapa-view .tab-content#mapa .mapa-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

body.mapa-view .tab-content#mapa .mapa-panel__title {
    font-size: 1.18rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.02em;
}

body.mapa-view .tab-content#mapa .mapa-panel__subtitle {
    margin-top: 4px;
    font-size: .86rem;
    line-height: 1.45;
    color: var(--muted);
}

body.mapa-view .tab-content#mapa .mapa-panel__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

body.mapa-view .tab-content#mapa .mapa-panel__chip {
    flex: 1 1 140px;
    min-width: 140px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(232, 228, 220, .96);
    background: linear-gradient(180deg, #fff, #fbfaf7);
    box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

body.mapa-view .tab-content#mapa .mapa-panel__chip-label {
    font-size: .7rem;
    font-weight: 900;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: .05em;
}

body.mapa-view .tab-content#mapa .mapa-panel__chip-value {
    margin-top: 4px;
    font-size: 1.28rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1.15;
}

body.mapa-view .tab-content#mapa .mapa-panel__section {
    padding: 12px;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 16px;
    background: rgba(255, 255, 255, .88);
    margin-bottom: 10px;
}

body.mapa-view .tab-content#mapa .mapa-panel__section:last-child {
    margin-bottom: 0;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-toggle {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 1255;
    appearance: none;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,244,239,.98));
    color: var(--brand);
    box-shadow: 0 12px 28px rgba(40, 40, 40, .12);
    padding: 10px 14px 10px 16px;
    font: inherit;
    font-size: .8rem;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-toggle__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(191,184,0,.12);
    color: var(--brand);
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa.mapa-detalle-giros-open .mapa-detail-giros-toggle {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px) scale(.96);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(191,184,0,.42);
    box-shadow: 0 14px 30px rgba(40, 40, 40, .14);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-toggle__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(191,184,0,.12);
    color: var(--accent);
    font-size: .78rem;
    line-height: 1;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1240;
    height: min(36vh, 330px);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(232, 228, 220, .94);
    border-radius: 18px 18px 0 0;
    background: rgba(255,255,255,.96);
    box-shadow: 0 20px 50px rgba(40,40,40,.18);
    backdrop-filter: blur(10px);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform .24s ease;
    pointer-events: auto;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer.is-open {
    transform: translateY(0);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid rgba(232, 228, 220, .96);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__close {
    appearance: none;
    border: 1px solid rgba(232, 228, 220, .96);
    background: linear-gradient(180deg, #fff, #f6f4ef);
    color: var(--brand);
    width: 28px;
    height: 28px;
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(40, 40, 40, .08);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__close:hover {
    transform: translateY(-1px);
    border-color: rgba(191,184,0,.42);
    box-shadow: 0 10px 22px rgba(40, 40, 40, .12);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__title {
    font-size: .92rem;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -.01em;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    border: 1px solid rgba(191,184,0,.22);
    background: rgba(191,184,0,.10);
    color: var(--brand);
    font-size: .7rem;
    font-weight: 900;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-drawer__table-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-table {
    width: 100%;
    min-width: 1236px;
    height: 100%;
    border-collapse: collapse;
    font-size: .8rem;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, #6e6c66, #5d5b55);
    color: #fff;
    padding: 10px 12px;
    text-align: left;
    font-size: .74rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid rgba(232, 228, 220, .92);
    color: var(--text);
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-table thead th:first-child,
body.mapa-view .tab-content#mapa .mapa-detail-giros-table tbody td:first-child {
    padding-left: 10px;
    padding-right: 10px;
    text-align: center;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros__estado-cell {
    position: relative;
    overflow: visible;
    text-align: center;
    vertical-align: middle;
    width: 54px;
    min-width: 54px;
    padding-top: 8px;
    padding-bottom: 8px;
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 20px;
    overflow: visible;
    outline: none;
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .94), 0 1px 1px rgba(0, 0, 0, .1);
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-ring--adicional {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    border: 1px solid var(--mapa-detail-estado-ring-color, rgba(20, 20, 20, .86));
    box-shadow: 0 0 0 1px rgba(220, 214, 104, .92);
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-popover {
    display: none;
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    min-width: 136px;
    padding: 9px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(221, 215, 203, .95);
    box-shadow: 0 18px 42px rgba(40, 40, 40, .13);
    z-index: 5;
    pointer-events: none;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-marker:hover .mapa-detail-estado-popover,
body.mapa-view .tab-content#mapa .mapa-detail-estado-marker:focus-visible .mapa-detail-estado-popover,
body.mapa-view .tab-content#mapa .mapa-detail-estado-marker:focus-within .mapa-detail-estado-popover {
    display: flex;
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-popover__row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

body.mapa-view .tab-content#mapa .mapa-detail-estado-popover__label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7b7b7b;
    line-height: 1;
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-table tbody tr:nth-child(even) {
    background: rgba(249, 248, 246, .88);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros-table tbody tr:hover {
    background: rgba(53, 113, 204, .05);
}

body.mapa-view .tab-content#mapa .mapa-detail-giros__empty {
    text-align: center;
    color: var(--muted);
    font-weight: 700;
    padding: 18px 12px;
    white-space: normal;
}

body.mapa-view .tab-content#mapa .mapa-panel__section-title {
    font-size: .76rem;
    font-weight: 900;
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 8px;
}

body.mapa-view .tab-content#mapa .mapa-panel__section-text {
    font-size: .88rem;
    line-height: 1.55;
    color: var(--muted);
}

body.mapa-view .tab-content#mapa .mapa-searchbox {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
}

body.mapa-view .tab-content#mapa .mapa-searchbox__input {
    flex: 1;
    min-width: 0;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: .84rem;
    padding: 10px 12px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-searchbox__input:focus {
    border-color: rgba(53, 113, 204, .55);
    box-shadow: 0 0 0 3px rgba(53, 113, 204, .12);
}

body.mapa-view .tab-content#mapa .mapa-filters-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

body.mapa-view .tab-content#mapa .mapa-filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-filter-label {
    font-size: .68rem;
    font-weight: 900;
    color: #7b8491;
    text-transform: uppercase;
    letter-spacing: .05em;
}

body.mapa-view .tab-content#mapa .mapa-filter-select,
body.mapa-view .tab-content#mapa .mapa-filter-input {
    width: 100%;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: .8rem;
    padding: 9px 10px;
    outline: none;
}

body.mapa-view .tab-content#mapa .mapa-filter-input {
    appearance: none;
}

body.mapa-view .tab-content#mapa .mapa-estados-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    justify-content: center;
    align-items: stretch;
}

body.mapa-view .tab-content#mapa .mapa-estados-grid.mapa-estados-grid--2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mapa-view .tab-content#mapa .mapa-estado-btn {
    appearance: none;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font: inherit;
    font-size: .78rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, color .16s ease, opacity .16s ease, filter .16s ease;
    box-shadow: 0 8px 18px rgba(40, 40, 40, .05);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn:hover {
    transform: translateY(-1px);
}

body.mapa-view .tab-content#mapa .mapa-estado-btn__dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 2px rgba(255,255,255,.9) inset;
    flex: 0 0 auto;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn.is-active {
    opacity: 1;
    filter: none;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn.is-inactive {
    background: #f2f2f2;
    color: #8a8f98;
    border-color: #e0e0e0;
    opacity: .78;
    filter: grayscale(1);
}

body.mapa-view .tab-content#mapa .mapa-estado-btn--global {
    background: linear-gradient(180deg, #fbfaf7, #f4f2eb);
    color: #6b7280;
    border-color: rgba(209, 213, 219, .95);
}

body.mapa-view .tab-content#mapa .mapa-estado-btn--global:hover {
    transform: translateY(-1px);
    border-color: rgba(156, 163, 175, .6);
}

body.mapa-view .tab-content#mapa .mapa-estado-btn--global:active {
    transform: translateY(0);
}

body.mapa-view .tab-content#mapa .mapa-estado-btn--global.is-active {
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    color: #374151;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn--global.is-inactive {
    background: #f2f2f2;
    color: #8a8f98;
    border-color: #e0e0e0;
    opacity: .78;
    filter: grayscale(1);
}

body.mapa-view .tab-content#mapa .mapa-estado-btn--global .mapa-estado-btn__dot {
    display: none;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="terminado"].is-active {
    background: rgba(59, 130, 246, .10);
    border-color: rgba(59, 130, 246, .24);
    color: #2563eb;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="asignado"].is-active {
    background: rgba(16, 185, 129, .10);
    border-color: rgba(16, 185, 129, .24);
    color: #059669;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="inicializado"].is-active {
    background: rgba(148, 163, 184, .16);
    border-color: rgba(148, 163, 184, .34);
    color: #64748b;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="cancelado"].is-active {
    background: rgba(239, 68, 68, .10);
    border-color: rgba(239, 68, 68, .24);
    color: #dc2626;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="terminado"].is-active .mapa-estado-btn__dot {
    background: #3b82f6;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="asignado"].is-active .mapa-estado-btn__dot {
    background: #10b981;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="inicializado"].is-active .mapa-estado-btn__dot {
    background: #94a3b8;
}

body.mapa-view .tab-content#mapa .mapa-estado-btn[data-mapa-estado="cancelado"].is-active .mapa-estado-btn__dot {
    background: #ef4444;
}

body.mapa-view .tab-content#mapa .mapa-place-results {
    display: none;
    flex-direction: column;
    gap: 0;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    margin-top: 0;
    max-height: 290px;
    overflow: auto;
    padding-right: 0;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 14px 28px rgba(40, 40, 40, .12);
    z-index: 10;
}

body.mapa-view .tab-content#mapa .mapa-place-results.is-open {
    display: flex;
}

body.mapa-view .tab-content#mapa .mapa-place-results__group {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(232, 228, 220, .96);
}

body.mapa-view .tab-content#mapa .mapa-place-results__group-title {
    padding: 10px 14px 8px;
    font-size: .64rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    background: linear-gradient(180deg, rgba(53,113,204,.04), rgba(53,113,204,0));
}

body.mapa-view .tab-content#mapa .mapa-place-results__loading {
    padding: 10px 14px;
    color: var(--muted);
    font-size: .82rem;
    background: rgba(53, 113, 204, .04);
}

body.mapa-view .tab-content#mapa .mapa-place-results__empty {
    padding: 12px;
    border-radius: 12px;
    background: rgba(53, 113, 204, .06);
    color: var(--muted);
    font-size: .82rem;
}

body.mapa-view .tab-content#mapa .mapa-place-result {
    width: 100%;
    text-align: left;
    border: 0;
    border-bottom: 1px solid rgba(232, 228, 220, .96);
    border-radius: 0;
    background: #fff;
    padding: 12px 14px;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font: inherit;
    appearance: none;
}

body.mapa-view .tab-content#mapa .mapa-place-result:hover {
    background: rgba(53, 113, 204, .05);
}

body.mapa-view .tab-content#mapa .mapa-place-result--external {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,247,244,.98));
}

body.mapa-view .tab-content#mapa .mapa-place-result--external .mapa-place-result__copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

body.mapa-view .tab-content#mapa .mapa-place-result--external .mapa-place-result__meta {
    text-transform: uppercase;
    letter-spacing: .04em;
}

body.mapa-view .tab-content#mapa .mapa-place-result__subtitle {
    display: block;
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.mapa-view .tab-content#mapa .mapa-place-result:last-child {
    border-bottom: 0;
}

body.mapa-view .tab-content#mapa .mapa-place-result__name {
    display: block;
    font-size: .85rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.25;
    min-width: 0;
    overflow-wrap: anywhere;
    flex: 1 1 auto;
}

body.mapa-view .tab-content#mapa .mapa-place-result__meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 0;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
    flex: 0 0 auto;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-place-result__icon {
    font-size: .92rem;
    line-height: 1;
}

body.mapa-view .tab-content#mapa .mapa-place-result__icon--cp {
    color: #1f3f8f;
}

body.mapa-view .tab-content#mapa .mapa-place-result__icon--cn {
    color: #6a4427;
}

body.mapa-view .tab-content#mapa .mapa-place-result__icon--ca {
    color: #f28b34;
}

body.mapa-view .tab-content#mapa .mapa-panel__styles {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

body.mapa-view .tab-content#mapa .mapa-style-btn {
    border: 1px solid rgba(232, 228, 220, .98);
    border-radius: 999px;
    background: linear-gradient(180deg, #fff, #f8f6f1);
    color: var(--brand);
    padding: 8px 12px;
    font-size: .77rem;
    font-weight: 900;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-style-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(40, 40, 40, .08);
    border-color: rgba(191,184,0,.5);
}

body.mapa-view .tab-content#mapa .mapa-style-btn.is-active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
    box-shadow: 0 10px 22px rgba(105,97,88,.2);
}

body.mapa-view .tab-content#mapa .mapa-panel__actions {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 8px 16px rgba(40,40,40,.18);
    display: inline-block;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 10px 20px rgba(40,40,40,.18);
    background: linear-gradient(180deg, #fefefe, #f4f4f1);
}

body.mapa-view .tab-content#mapa .mapa-code-marker__icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linejoin: round;
    stroke-linecap: round;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin {
    width: 52px;
    height: 72px;
    display: block;
    position: relative;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin svg {
    width: 52px;
    height: 72px;
    display: block;
    overflow: visible;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin--cp .mapa-code-marker__pin-shape {
    fill: #7ea7ff;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin--cn .mapa-code-marker__pin-shape {
    fill: #a06b3b;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin--ca .mapa-code-marker__pin-shape {
    fill: #f28b34;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin-core {
    fill: #eaf2ff;
    stroke: rgba(255,255,255,.85);
    stroke-width: 2.2;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin-icon {
    fill: #7b4d14;
}

body.mapa-view .tab-content#mapa .mapa-code-marker__pin-fa {
    position: absolute;
    left: 50%;
    top: 22px;
    transform: translate(-50%, -50%);
    font-size: 15px;
    line-height: 1;
    color: #1f3f8f;
    z-index: 2;
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--cp {
    filter: none;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--cp .mapa-code-marker__pin svg {
    overflow: visible;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--cn {
    filter: none;
}


body.mapa-view .tab-content#mapa .mapa-code-marker--cn .mapa-code-marker__pin svg {
    overflow: visible;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--cn .mapa-code-marker__pin-fa {
    color: #6a4427;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--ca {
    filter: none;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--ca .mapa-code-marker__pin svg {
    overflow: visible;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--ca .mapa-code-marker__pin-fa {
    color: #8c4b00;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--cn .mapa-code-marker__icon {
    color: #8f6b3c;
}

body.mapa-view .tab-content#mapa .mapa-code-marker--punto .mapa-code-marker__dot {
    background: #64748b;
}

body.mapa-view .tab-content#mapa .mapa-red-ferroviaria-marker-anchor {
    background: transparent;
    border: 0;
}

body.mapa-view .tab-content#mapa .mapa-red-ferroviaria-marker {
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 23px;
    height: 33px;
    transform: translate(-50%, -100%);
    transform-origin: 50% 100%;
}

body.mapa-view .tab-content#mapa .mapa-red-ferroviaria-marker svg {
    display: block;
    width: 23px;
    height: 33px;
    overflow: visible;
    filter: drop-shadow(0 8px 10px rgba(40, 40, 40, .22));
}

body.mapa-view .tab-content#mapa .mapa-red-ferroviaria-marker__shape {
    fill: #c92a35;
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 1.2;
}

body.mapa-view .tab-content#mapa .mapa-red-ferroviaria-marker__core {
    fill: #fff6f6;
    stroke: rgba(255, 255, 255, .9);
    stroke-width: 2.2;
}

body.mapa-view .tab-content#mapa .mapa-red-ferroviaria-marker__icon {
    position: absolute;
    left: 50%;
    top: 10px;
    z-index: 2;
    transform: translate(-50%, -50%);
    color: #8d1720;
    font-size: 10px;
    line-height: 1;
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-cluster-wrapper {
    background: transparent;
    border: 0;
}

body.mapa-view .tab-content#mapa .mapa-cluster {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f8f4c2;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(40,40,40,.10);
    border: 1px solid rgba(255,255,255,.78);
    background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.18), transparent 38%), linear-gradient(180deg, #a99f00, #7d7600);
}

body.mapa-view .tab-content#mapa .mapa-cluster--md {
    transform: scale(0.92);
}

body.mapa-view .tab-content#mapa .mapa-cluster--lg {
    transform: scale(0.98);
}

body.mapa-view .tab-content#mapa .mapa-cluster--xl {
    transform: scale(1.04);
}

body.mapa-view .tab-content#mapa .mapa-cluster__count {
    font-size: .72rem;
    line-height: 1;
}

body.mapa-view .tab-content#mapa .mapa-camion-cluster-wrapper {
    background: transparent;
    border: 0;
}

body.mapa-view .tab-content#mapa .mapa-camion-cluster {
    position: relative;
    width: 72px;
    height: 51px;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(40,40,40,.18));
}

body.mapa-view .tab-content#mapa .mapa-camion-cluster__img {
    width: 72px;
    height: 51px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

body.mapa-view .tab-content#mapa .mapa-camion-cluster__count {
    position: absolute;
    left: 50%;
    top: 62%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: .95rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .68), 0 0 4px rgba(0, 0, 0, .45);
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-equipo-camino-cluster-wrapper {
    background: transparent;
    border: 0;
}

body.mapa-view .tab-content#mapa .mapa-equipo-camino-cluster {
    position: relative;
    width: 72px;
    height: 51px;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(40,40,40,.18));
}

body.mapa-view .tab-content#mapa .mapa-equipo-camino-cluster__img {
    width: 72px;
    height: 51px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

body.mapa-view .tab-content#mapa .mapa-equipo-camino-cluster__count {
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: .95rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .68), 0 0 4px rgba(0, 0, 0, .45);
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-grua-cluster-wrapper {
    background: transparent;
    border: 0;
}

body.mapa-view .tab-content#mapa .mapa-grua-cluster {
    position: relative;
    width: 76px;
    height: 57px;
    display: block;
    filter: drop-shadow(0 10px 18px rgba(40,40,40,.18));
}

body.mapa-view .tab-content#mapa .mapa-grua-cluster__img {
    width: 76px;
    height: 57px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

body.mapa-view .tab-content#mapa .mapa-grua-cluster__count {
    position: absolute;
    left: 40%;
    top: 62%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .68), 0 0 4px rgba(0, 0, 0, .45);
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-flow-line {
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    mix-blend-mode: multiply;
    transition: opacity .2s ease, stroke-width .2s ease;
    pointer-events: stroke;
    will-change: stroke-dashoffset;
}

body.mapa-view .tab-content#mapa .mapa-flow-line--hit {
    mix-blend-mode: normal;
    cursor: pointer;
    pointer-events: stroke;
    opacity: .001;
}

body.mapa-view .tab-content#mapa .mapa-flow-line:focus,
body.mapa-view .tab-content#mapa .mapa-flow-line:focus-visible,
body.mapa-view .tab-content#mapa .mapa-flow-line--hit:focus,
body.mapa-view .tab-content#mapa .mapa-flow-line--hit:focus-visible {
    outline: none;
}

body.mapa-view .tab-content#mapa .leaflet-overlay-pane path:focus,
body.mapa-view .tab-content#mapa .leaflet-overlay-pane path:focus-visible,
body.mapa-view .tab-content#mapa .leaflet-interactive:focus,
body.mapa-view .tab-content#mapa .leaflet-interactive:focus-visible {
    outline: none;
}

body.mapa-view .tab-content#mapa .mapa-panel__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.mapa-view .tab-content#mapa .mapa-panel__clear-btn {
    border: 1px solid rgba(53, 113, 204, .18);
    background: rgba(53, 113, 204, .08);
    color: var(--brand);
    border-radius: 999px;
    padding: 7px 11px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-panel__clear-btn:hover {
    background: rgba(53, 113, 204, .12);
    border-color: rgba(53, 113, 204, .26);
    box-shadow: 0 8px 18px rgba(40, 40, 40, .08);
    transform: translateY(-1px);
}

body.mapa-view .tab-content#mapa .mapa-panel__clear-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

body.mapa-view .tab-content#mapa .mapa-settings-control {
    position: relative;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    z-index: 1200;
}

body.mapa-view .tab-content#mapa .mapa-settings-control .leaflet-bar {
    border: none;
    box-shadow: none;
}

body.mapa-view .tab-content#mapa .mapa-settings-control__button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 10px;
    background: rgba(255,255,255,.97);
    color: var(--brand);
    box-shadow: 0 10px 24px rgba(40,40,40,.12);
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-settings-control__button:hover {
    transform: translateY(-1px);
    border-color: rgba(191,184,0,.34);
    background: #fff;
    box-shadow: 0 14px 28px rgba(40,40,40,.14);
}

body.mapa-view .tab-content#mapa .mapa-settings-control__button:active {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(40,40,40,.10);
}

body.mapa-view .tab-content#mapa .mapa-settings-control__button svg {
    width: 14px;
    height: 14px;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    min-width: 190px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(232, 228, 220, .96);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,249,246,.98));
    box-shadow: 0 16px 34px rgba(40,40,40,.16);
    z-index: 1500;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover[hidden] {
    display: none;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__title {
    margin-bottom: 8px;
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .82rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__camiones-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-btn {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(232, 228, 220, .96);
    border-radius: 9px;
    background: rgba(255,255,255,.98);
    color: var(--muted);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(40, 40, 40, .08);
    transition: transform .15s ease, border-color .15s ease, color .15s ease, background .15s ease, box-shadow .15s ease;
    flex: 0 0 auto;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(53, 113, 204, .24);
    color: var(--brand);
    box-shadow: 0 12px 22px rgba(40, 40, 40, .12);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-btn.is-active {
    color: var(--brand);
    border-color: rgba(53, 113, 204, .28);
    background: rgba(53, 113, 204, .08);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filters {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    width: 240px;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(232, 228, 220, .96);
    background: linear-gradient(180deg, rgba(255,255,255,.99), rgba(250,249,246,.99));
    box-shadow: 0 16px 34px rgba(40,40,40,.18);
    z-index: 1600;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filters[hidden] {
    display: none;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filters-title {
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__clear-btn {
    border: 1px solid rgba(53, 113, 204, .18);
    background: rgba(53, 113, 204, .08);
    color: var(--brand);
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .68rem;
    font-weight: 800;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, transform .15s ease, box-shadow .15s ease;
    flex: 0 0 auto;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__clear-btn:hover {
    background: rgba(53, 113, 204, .12);
    border-color: rgba(53, 113, 204, .26);
    box-shadow: 0 8px 16px rgba(40, 40, 40, .08);
    transform: translateY(-1px);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__clear-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-field:last-child {
    margin-bottom: 0;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-field span {
    font-size: .72rem;
    font-weight: 800;
    color: var(--text);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-field input[type="search"] {
    width: 100%;
    height: 30px;
    border: 1px solid rgba(217, 212, 202, .96);
    border-radius: 10px;
    padding: 0 10px;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text);
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(40, 40, 40, .04);
    outline: none;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-field input[type="search"]::placeholder {
    color: rgba(105, 97, 88, .64);
    font-weight: 600;
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__filter-field input[type="search"]:focus {
    border-color: rgba(53, 113, 204, .34);
    box-shadow: 0 0 0 3px rgba(53, 113, 204, .10);
}

body.mapa-view .tab-content#mapa .mapa-settings-popover__spinner {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid rgba(105, 97, 88, .18);
    border-top-color: var(--accent);
    border-right-color: rgba(191, 184, 0, .38);
    animation: loader-spin 0.8s linear infinite;
    flex: 0 0 auto;
}

body.mapa-view .tab-content#mapa .mapa-camion-divicon {
    background: transparent;
    border: 0;
}

body.mapa-view .tab-content#mapa .mapa-camion-marker {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-camion-marker__img {
    width: 30px;
    height: 30px;
    display: block;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

body.mapa-view .tab-content#mapa .mapa-camion-marker--equipo-camino {
    width: 48px;
    height: 48px;
}

body.mapa-view .tab-content#mapa .mapa-camion-marker--equipo-camino .mapa-camion-marker__img {
    width: 42px;
    height: 42px;
}

body.mapa-view .tab-content#mapa .mapa-camion-marker--locomotora {
    width: 156px;
    height: 111.8px;
}

body.mapa-view .tab-content#mapa .mapa-camion-marker--locomotora .mapa-camion-marker__img {
    width: 150.8px;
    height: 106.6px;
}

body.mapa-view .tab-content#mapa .leaflet-marker-icon.mapa-peaje-divicon,
body.mapa-view .tab-content#mapa .leaflet-div-icon.mapa-peaje-divicon {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible;
}

body.mapa-view .tab-content#mapa .mapa-peaje-marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(47, 111, 171, .34);
    background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(240,246,252,.96));
    color: #2f6fab;
    box-shadow: 0 10px 18px rgba(40,40,40,.12);
    pointer-events: none;
}

body.mapa-view .tab-content#mapa .mapa-peaje-marker i {
    font-size: 13px;
    line-height: 1;
}

body.mapa-view .tab-content#mapa .mapa-peaje-marker--pesaje {
    border-color: rgba(139, 90, 43, .34);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,241,231,.96));
    color: #8b5a2b;
}

body.mapa-view .tab-content#mapa .mapa-peaje-marker--peaje {
    border-color: rgba(47, 111, 171, .34);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(235,243,251,.96));
    color: #2f6fab;
}

body.mapa-view .tab-content#mapa .leaflet-popup.mapa-place-popup {
    margin-bottom: 18px;
}

body.mapa-view .tab-content#mapa .leaflet-popup-pane {
    z-index: 9000 !important;
}

body.mapa-view .tab-content#mapa .mapa-place-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,249,246,.98));
    border-radius: 18px;
    border: 1px solid rgba(232, 228, 220, .98);
    box-shadow: 0 20px 48px rgba(40,40,40,.18);
    overflow: hidden;
}

body.mapa-view .tab-content#mapa .mapa-place-popup--coords .leaflet-popup-content-wrapper {
    max-width: 260px;
}

body.mapa-view .tab-content#mapa .mapa-place-popup .leaflet-popup-content {
    margin: 0;
    width: min(300px, calc(100vw - 28px));
    min-width: 0;
    max-width: none;
    padding: 12px 12px 11px;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
}

body.mapa-view .tab-content#mapa .mapa-place-popup--coords .leaflet-popup-content {
    width: min(240px, calc(100vw - 24px));
    padding: 10px 10px 9px;
}

body.mapa-view .tab-content#mapa .mapa-place-popup--coords .mapa-place-card {
    width: 100%;
}

body.mapa-view .tab-content#mapa .mapa-place-popup--coords .mapa-place-card__title {
    font-size: .92rem;
}

body.mapa-view .tab-content#mapa .mapa-place-popup--coords .mapa-place-card__coords-value {
    font-size: .92rem;
    line-height: 1.2;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-place-popup .leaflet-popup-tip {
    background: #fff;
    box-shadow: none;
}

body.mapa-view .tab-content#mapa .leaflet-popup.mapa-camion-popup {
    margin-bottom: 18px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,247,244,.98));
    border-radius: 18px;
    border: 1px solid rgba(232, 228, 220, .98);
    box-shadow: 0 20px 48px rgba(40, 40, 40, .18);
    overflow: hidden;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup .leaflet-popup-content {
    margin: 0;
    width: min(285px, calc(100vw - 28px));
    padding: 11px 10px 10px;
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup .leaflet-popup-tip {
    background: #fff;
    box-shadow: none;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__card {
    display: grid;
    gap: 9px;
    color: var(--text);
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__header {
    display: grid;
    gap: 4px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__title {
    font-size: .96rem;
    font-weight: 900;
    letter-spacing: -.02em;
    line-height: 1.15;
    color: var(--text);
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__subtitle {
    font-size: .78rem;
    line-height: 1.3;
    color: var(--muted);
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__section-card {
    display: grid;
    gap: 7px;
    padding: 10px 10px 9px;
    border-radius: 15px;
    border: 1px solid rgba(232, 228, 220, .96);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,249,246,.98));
    box-shadow: 0 10px 22px rgba(40, 40, 40, .06);
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__section-card + .mapa-camion-popup__section-card {
    margin-top: 2px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__section-body {
    display: grid;
    gap: 7px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__section-title {
    font-size: .66rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    padding-left: 1px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__grid {
    display: grid;
    gap: 8px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 10px 10px 9px;
    margin-top: 1px;
    border-radius: 18px;
    border: 1px solid rgba(232, 228, 220, .96);
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(250,249,246,.98));
    box-shadow: 0 10px 22px rgba(40, 40, 40, .06);
    overflow: hidden;
    background-clip: padding-box;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-tags {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-value--inline {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-volume {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-stack {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    align-items: flex-start;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__row {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__label {
    font-size: .7rem;
    font-weight: 900;
    color: var(--muted);
    letter-spacing: .02em;
    padding-top: 1px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__value {
    font-size: .78rem;
    line-height: 1.35;
    font-weight: 800;
    color: var(--text);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__value--date {
    font-weight: 700;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__value.is-fallback {
    color: rgba(106, 97, 87, .72);
    font-style: italic;
    opacity: .84;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-value {
    font-size: .84rem;
    line-height: 1.2;
    font-weight: 900;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-type {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(191, 184, 0, .14);
    color: var(--brand);
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__giro-type--secondary {
    background: rgba(28, 107, 190, .12);
    color: #1c6bbe;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__stack {
    display: grid;
    gap: 8px;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    padding: 0 2px 1px;
    font-size: .74rem;
    line-height: 1.3;
    color: rgba(60, 126, 74, .92);
    font-weight: 700;
    flex-wrap: wrap;
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__footer-label {
    font-weight: 900;
    color: rgba(43, 102, 60, .98);
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__footer-value {
    font-weight: 800;
    color: rgba(60, 126, 74, .92);
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__footer.is-stale {
    color: rgba(153, 62, 62, .88);
}

body.mapa-view .tab-content#mapa .mapa-camion-popup__footer.is-stale .mapa-camion-popup__footer-label,
body.mapa-view .tab-content#mapa .mapa-camion-popup__footer.is-stale .mapa-camion-popup__footer-value {
    color: rgba(153, 62, 62, .88);
}

body.mapa-view .tab-content#mapa .leaflet-tooltip.mapa-hover-tooltip {
    background: rgba(255, 255, 255, .96);
    color: var(--text);
    border: 1px solid rgba(231, 227, 221, .96);
    border-radius: 999px;
    box-shadow: 0 10px 26px rgba(40, 40, 40, .12);
    padding: 6px 12px;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1;
    backdrop-filter: blur(10px);
}

body.mapa-view .tab-content#mapa .leaflet-tooltip.mapa-red-ferroviaria-tooltip {
    color: #8d1720;
    border-color: rgba(201, 42, 53, .42);
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .leaflet-tooltip.mapa-flow-tooltip-pane {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip {
    min-width: 230px;
    max-width: 280px;
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,247,244,.98));
    border: 1px solid rgba(226, 221, 213, .96);
    border-radius: 16px;
    box-shadow: 0 18px 42px rgba(40, 40, 40, .16);
    padding: 11px 12px 10px;
    color: var(--text);
    font-family: 'Lato', sans-serif;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__path {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 8px;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__label {
    font-size: .64rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--muted);
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__value {
    font-size: .84rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(53, 113, 204, .07);
    color: var(--text);
    font-size: .76rem;
    font-weight: 800;
    margin-bottom: 9px;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__dominante {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__pill {
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(53, 113, 204, .10);
    color: var(--brand);
    font-size: .7rem;
    font-weight: 900;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__states {
    display: grid;
    gap: 6px;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__state {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: .76rem;
    color: var(--text);
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(255,255,255,.95);
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__state-label {
    font-weight: 700;
}

body.mapa-view .tab-content#mapa .mapa-flow-tooltip__state-count {
    font-weight: 900;
    color: var(--brand);
}

body.mapa-view .tab-content#mapa .leaflet-tooltip-pane {
    z-index: 8000 !important;
}

body.mapa-view .tab-content#mapa .leaflet-tooltip.mapa-hover-tooltip::before {
    border-top-color: rgba(231, 227, 221, .96);
}

body.mapa-view .tab-content#mapa .mapa-place-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    width: 100%;
    font-family: 'Lato', sans-serif;
    font-weight: 600;
    color: var(--text);
}

body.mapa-view .tab-content#mapa .mapa-place-card__header {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-place-card__title {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.mapa-view .tab-content#mapa .mapa-place-card__code {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(95, 106, 117, .08);
    color: #5d6874;
    font-size: .54rem;
    font-weight: 700;
    letter-spacing: .03em;
    line-height: 1.2;
    width: fit-content;
    max-width: 100%;
    overflow-wrap: anywhere;
}

body.mapa-view .tab-content#mapa .mapa-place-card__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
}

body.mapa-view .tab-content#mapa .mapa-place-card__coords {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 9px;
    border: 1px solid rgba(232, 228, 220, .92);
    border-radius: 14px;
    background: rgba(255,255,255,.92);
}

body.mapa-view .tab-content#mapa .mapa-place-card__coords-label {
    font-size: .66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #8d93a0;
}

body.mapa-view .tab-content#mapa .mapa-place-card__coords-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.mapa-view .tab-content#mapa .mapa-place-card__coords-value {
    flex: 1;
    min-width: 0;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
    word-break: break-all;
}

body.mapa-view .tab-content#mapa .mapa-copy-btn {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(232, 228, 220, .98);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: #5d6874;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(40,40,40,.06);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-copy-btn:hover:not(:disabled),
body.mapa-view .tab-content#mapa .mapa-copy-btn:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(40,40,40,.10);
    color: var(--brand);
}

body.mapa-view .tab-content#mapa .mapa-copy-btn:disabled {
    opacity: .45;
    cursor: default;
    box-shadow: none;
}

body.mapa-view .tab-content#mapa .mapa-place-card__summary {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: .71rem;
    font-weight: 700;
    color: var(--text);
}

body.mapa-view .tab-content#mapa .mapa-place-card__summary span:last-child {
    color: #6f7883;
}

body.mapa-view .tab-content#mapa .mapa-place-card__section {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 8px 9px;
    border: 1px solid rgba(232, 228, 220, .92);
    border-radius: 14px;
    background: rgba(255, 255, 255, .9);
}

body.mapa-view .tab-content#mapa .mapa-place-card__section--routes {
    max-height: 136px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 104, 116, .32) transparent;
}

body.mapa-view .tab-content#mapa .mapa-place-card__section--routes::-webkit-scrollbar {
    width: 6px;
}

body.mapa-view .tab-content#mapa .mapa-place-card__section--routes::-webkit-scrollbar-track {
    background: transparent;
}

body.mapa-view .tab-content#mapa .mapa-place-card__section--routes::-webkit-scrollbar-thumb {
    background: rgba(93, 104, 116, .28);
    border-radius: 999px;
}

body.mapa-view .tab-content#mapa .mapa-place-card__section-title {
    font-size: .63rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #8d93a0;
}

body.mapa-view .tab-content#mapa .mapa-place-card__tag-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

body.mapa-view .tab-content#mapa .mapa-place-card__tag-group-label {
    font-size: .64rem;
    font-weight: 700;
    color: #68707d;
    letter-spacing: .02em;
}

body.mapa-view .tab-content#mapa .mapa-place-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.mapa-view .tab-content#mapa .mapa-place-tag {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: .62rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: .01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.mapa-view .tab-content#mapa .mapa-place-tag--route {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 6px 9px;
    white-space: normal;
    width: fit-content;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-place-tag__label {
    display: block;
    max-width: 100%;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
}

body.mapa-view .tab-content#mapa .mapa-place-tag__meta {
    display: block;
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1;
    opacity: .82;
}

body.mapa-view .tab-content#mapa .mapa-place-tag--product {
    background: rgba(53, 113, 204, .09);
    border-color: rgba(53, 113, 204, .15);
    color: var(--brand);
}

body.mapa-view .tab-content#mapa .mapa-place-tag--origin {
    background: rgba(42, 152, 115, .10);
    border-color: rgba(42, 152, 115, .16);
    color: #20735a;
}

body.mapa-view .tab-content#mapa .mapa-place-tag--destination {
    background: rgba(239, 135, 58, .11);
    border-color: rgba(239, 135, 58, .18);
    color: #a95a14;
}

body.mapa-view .tab-content#mapa .mapa-place-card__states {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
}

body.mapa-view .tab-content#mapa .mapa-place-card__states-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

body.mapa-view .tab-content#mapa .mapa-place-state {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 0;
    border: none;
    background: transparent;
}

body.mapa-view .tab-content#mapa .mapa-place-state__left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

body.mapa-view .tab-content#mapa .mapa-place-state__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,.95);
    flex: 0 0 auto;
}

body.mapa-view .tab-content#mapa .mapa-place-state__label {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-place-state__count {
    font-size: .66rem;
    font-weight: 700;
    color: var(--brand);
    text-align: right;
    line-height: 1.2;
    white-space: nowrap;
}

body.mapa-view .tab-content#mapa .mapa-place-card__subtitle {
    font-size: .78rem;
    font-weight: 600;
    color: var(--brand);
    line-height: 1.35;
}

body.mapa-view .tab-content#mapa .mapa-place-filter-btn {
    border: 1px solid rgba(232, 228, 220, .96);
    background: rgba(255,255,255,.96);
    color: #5d6874;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.15;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}

body.mapa-view .tab-content#mapa .mapa-place-filter-btn:hover,
body.mapa-view .tab-content#mapa .mapa-place-filter-btn:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(53, 113, 204, .22);
    box-shadow: 0 8px 16px rgba(40,40,40,.08);
}

body.mapa-view .tab-content#mapa .mapa-place-filter-btn.is-active {
    background: rgba(53, 113, 204, .10);
    border-color: rgba(53, 113, 204, .16);
    color: var(--brand);
}

@media (max-width: 900px) {
    body.mapa-view .tab-content#mapa .mapa-panel {
        left: 12px;
        right: 12px;
        top: 12px;
        bottom: auto;
        width: auto;
        max-height: 48vh;
    }

    body.mapa-view .tab-content#mapa .mapa-panel__reopen-btn {
        left: 12px;
        top: 12px;
    }
}

/* ===== API STATUS ===== */
.api-status {
    background: var(--surface);
    color: var(--brand);
    border: 1px solid var(--line);
    border-left: 5px solid var(--accent);
    border-radius: 999px;
    padding: 9px 15px;
    font-size: .83rem;
    font-weight: 800;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(40,40,40,.06);
}

.api-error {
    width: 100%;
    min-height: 260px;
    background: #fff;
    border: 1px solid #eee4dc;
    border-left: 6px solid #EA7600;
    color: var(--brand);
    border-radius: 18px;
    padding: 34px 26px;
    box-shadow: var(--shadow);
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 900;
}
.api-error::before {
    content: '⚠️';
    display: block;
    font-size: 2rem;
    margin-right: 10px;
}

/* ===== CLIMA ===== */
.clima-container {
    min-height: 420px;
}
.clima-loading-state,
.clima-error-state,
.clima-empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    background: rgba(255,255,255,.85);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    color: var(--brand);
    font-weight: 800;
    text-align: center;
    padding: 28px;
}
.clima-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.clima-external-search {
    position: relative;
    z-index: 30;
}

#climaExternalSearchResults {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    width: 100%;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 28px rgba(38, 34, 29, .16);
    z-index: 40;
}

#climaExternalSearchResults:empty {
    display: none;
}

#climaExternalSearchResults button:hover {
    background: rgba(191, 184, 0, .08) !important;
}
.clima-zone-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}
.clima-zone-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px 14px;
    border-bottom: 1px solid var(--line);
}
.clima-zone-title {
    font-size: 1.02rem;
    font-weight: 900;
    color: var(--brand);
    letter-spacing: -.02em;
}
.clima-zone-subtitle {
    font-size: .8rem;
    font-weight: 800;
    color: var(--muted);
    white-space: nowrap;
}
.clima-locations {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
}
.clima-location-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-soft);
    padding: 12px 12px 14px;
    min-width: 0;
}
.clima-location-card--clickable {
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background-color .18s ease;
}
.clima-location-card--clickable:hover {
    transform: translateY(-2px);
    border-color: rgba(191,184,0,.42);
    background: #fff;
    box-shadow: 0 10px 24px rgba(40,40,40,.08);
}
.clima-location-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.clima-location-title {
    font-size: .92rem;
    font-weight: 800;
    color: var(--brand);
    margin-bottom: 0;
    line-height: 1.2;
    min-width: 0;
    flex: 1 1 auto;
}
.clima-detail-days-button {
    appearance: none;
    border: 1px solid rgba(191,184,0,.42);
    background: rgba(255,255,255,.92);
    color: var(--brand);
    font-family: inherit;
    font-size: .72rem;
    line-height: 1;
    font-weight: 900;
    padding: 7px 10px;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(40,40,40,.05);
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
    flex: 0 0 auto;
}
.clima-detail-days-button:hover {
    transform: translateY(-1px);
    border-color: rgba(191,184,0,.66);
    background: #fffef2;
    box-shadow: 0 8px 16px rgba(40,40,40,.08);
}
.clima-location-empty {
    min-height: 180px;
    border: 1px dashed rgba(111,106,99,.22);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    background: rgba(255,255,255,.6);
}
.clima-chart-wrap {
    position: relative;
    height: 190px;
}
.clima-chart-wrap--detail {
    height: 410px;
}
.clima-chart-wrap--hourly {
    height: 440px;
}
.clima-chart-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}
.clima-location-meta {
    margin-top: 8px;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    font-size: .78rem;
    font-weight: 800;
    color: var(--muted);
}
.clima-source-note {
    margin-top: 10px;
    text-align: right;
    font-size: .78rem;
    font-weight: 700;
    color: var(--muted);
    opacity: .88;
}
.clima-detail-view {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.clima-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-content: flex-start;
    padding: 18px 20px;
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: var(--shadow);
}
.clima-back-button {
    appearance: none;
    border: 1px solid rgba(191,184,0,.38);
    background: linear-gradient(180deg, #fffef3, #f8f5da);
    color: var(--brand);
    font-weight: 900;
    font-family: inherit;
    font-size: .88rem;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(40,40,40,.06);
}
.clima-back-button:hover {
    border-color: rgba(191,184,0,.58);
    background: linear-gradient(180deg, #fffef8, #f4efbf);
}
.clima-detail-zone {
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
}
.clima-detail-title {
    font-size: 1.24rem;
    font-weight: 900;
    color: var(--brand-dark);
    letter-spacing: -.02em;
}
.clima-detail-subtitle {
    margin-top: 4px;
    font-size: .82rem;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: -.01em;
}
.clima-detail-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    box-shadow: var(--shadow);
}

@media (max-width: 1180px) {
    .clima-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 920px) {
    .clima-locations {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 780px) {
    .clima-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .clima-chart-wrap--detail {
        height: 320px;
    }
}

/* ===== SUMMARY SECTIONS (Resumen) ===== */
.summary-section { margin-bottom: 24px; }
.summary-section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 900;
    font-size: 1.22rem;
    margin: 6px 2px 14px;
    letter-spacing: -.02em;
}
.section-icon {
    width: 39px;
    height: 39px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(40,40,40,.06);
    color: var(--brand);
    flex: 0 0 auto;
}
.section-icon svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.summary-section-title span:last-child { color: var(--text); font-weight: 900; font-size: 1.22rem; }
.summary-title-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.summary-historico-tip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: transparent;
    color: #8a7f6c;
    border: 1px solid rgba(138, 127, 108, .45);
    cursor: help;
    box-shadow: none;
    flex: 0 0 auto;
    font-size: .38rem;
    line-height: 1;
    font-weight: 700;
    transform: none;
}
.summary-historico-tip[hidden] {
    display: none !important;
}
.summary-historico-tip:hover {
    background: rgba(138, 127, 108, .08);
    border-color: rgba(138, 127, 108, .7);
    color: #66583e;
}
.summary-historico-tip--white {
    background: transparent;
    color: #fff;
    border-color: rgba(255, 255, 255, .9);
}
.summary-historico-tip--white:hover {
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-color: rgba(255, 255, 255, 1);
}

.qa-toggle-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(191,184,0,.24) !important;
    background: var(--brand) !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(40,40,40,.08);
    transition: transform .16s cubic-bezier(.2,.8,.2,1), box-shadow .16s ease, filter .16s ease, background .16s ease, color .16s ease;
    will-change: transform;
}

.qa-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(40,40,40,.10);
}

.qa-toggle-btn.is-pressed {
    transform: translateY(1px) scale(.97);
    background: #4f4533 !important;
    border-color: transparent !important;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(40,40,40,.08);
    filter: none;
}

.qa-toggle-btn.is-active {
    background: #4f4533 !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.35), 0 8px 16px rgba(40,40,40,.10);
    filter: none;
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-loader,
    .dashboard-loader-mark {
        transition: none;
        animation: none;
    }
}

/* ===== ZONE CARDS ===== */
.zone-card-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}
.zone-metric-card {
    background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.92));
    border: 1px solid rgba(232,228,220,.92);
    border-radius: 16px;
    padding: 19px 18px 17px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    min-height: 150px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.zone-metric-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(191,184,0,.46);
}
.zone-metric-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), #d7d151 70%, rgba(191,184,0,.35));
}
.zone-card-top { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom: 14px; }
.zone-name { font-weight: 900; color: #4e4b47; font-size: 1rem; letter-spacing: -.015em; }
.zone-pill {
    background: var(--surface-soft);
    color: var(--brand);
    border: 1px solid #ebe6d9;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: .73rem;
    font-weight: 900;
    line-height: 1;
}
.zone-value {
    color: #202124;
    font-size: 2.18rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -.045em;
}
.zone-subvalue { margin-top: 10px; color: var(--muted); font-size: .88rem; line-height: 1.35; }
.zone-subvalue strong { color: #4e4b47; font-weight: 900; }
.mini-progress { height: 8px; background: #e9e9e7; border-radius: 999px; margin-top: 14px; overflow: hidden; }
.mini-progress span { display:block; height:100%; background: linear-gradient(90deg, var(--accent), #c9c41c); border-radius: 999px; box-shadow: 0 0 0 1px rgba(191,184,0,.05); }
#avanceOrigenesInactivosContenido .zone-value { text-align:left; }
#avanceOrigenesInactivosContenido .zone-subvalue { text-align:left; }

/* ===== CHART CARD ===== */
.summary-chart-card { margin-top: 8px; }
.summary-chart-header { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom: 14px; flex-wrap: wrap; }
.summary-chart-header .card-title { margin-bottom: 0; }
.summary-chart-filters { display:flex; gap:12px; flex-wrap:wrap; align-items:flex-start; }
.summary-chart-filter { display:flex; flex-direction:column; gap:6px; min-width: 210px; }
.summary-chart-filter label { font-size: .78rem; color:#666; font-weight: 900; }
.summary-chart-filter select { min-width: 210px; background:#fff; }
.resumen-zona-multiselect { position:relative; min-width:210px; }
.resumen-zona-multiselect__button { width:100%; min-height:34px; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 10px; border:1px solid var(--line); border-radius:8px; background:#fff; color:#444; font:inherit; cursor:pointer; text-align:left; }
.resumen-zona-multiselect__panel { position:absolute; left:0; top:calc(100% + 6px); z-index:1200; width:100%; padding:8px; border:1px solid var(--line); border-radius:10px; background:#fff; box-shadow:0 12px 28px rgba(40,40,40,.16); }
.resumen-zona-multiselect__panel label { display:flex; align-items:center; gap:8px; padding:7px 6px; border-radius:6px; color:#444; font-size:.8rem; font-weight:700; cursor:pointer; }
.resumen-zona-multiselect__panel label:hover { background:rgba(191,184,0,.1); }
.resumen-zona-multiselect__panel input { accent-color:var(--brand); }
.resumen-zona-multiselect__clear { width:100%; margin-top:6px; padding:6px 8px; border:1px solid rgba(53,113,204,.18); border-radius:7px; background:rgba(53,113,204,.08); color:var(--brand); font-size:.72rem; font-weight:800; cursor:pointer; }
.summary-chart-container { position: relative; height: 360px; }

/* ===== CARDS GENERIC ===== */
.card {
    background: rgba(255,255,255,.96);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow);
    margin-bottom: 22px;
}
.card-title {
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--brand);
    margin-bottom: 15px;
    border-left: 4px solid var(--accent);
    padding-left: 12px;
    letter-spacing: -.01em;
}

/* ===== GRID LAYOUTS ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ===== TABLE ===== */
.table-container { overflow-x: auto; overflow-y: hidden; max-height: none; }
.table-container table { min-width: 1350px; }
/* Variante sin ancho mínimo forzado: la tabla se ajusta al ancho disponible sin scroll horizontal. */
.table-container.table-container--fit { overflow-x: visible; }
.table-container.table-container--fit table { min-width: 0; table-layout: auto; }
.tren-itinerario-resumen-table {
    overflow: hidden;
}
.tren-itinerario-resumen-table table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 0.76rem;
}
.tren-itinerario-resumen-table th,
.tren-itinerario-resumen-table td {
    padding: 7px 5px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Mantiene ambos resúmenes alineados cuando comparten la misma fila. */
.tren-itinerario-resumen-bloque {
    display: flex;
    flex-direction: column;
}
.tren-itinerario-resumen-bloque > .card {
    display: flex;
    flex: 1;
    flex-direction: column;
}
.tren-itinerario-resumen-bloque > .card > .tren-itinerario-resumen-table {
    display: flex;
    flex: 1;
}
.tren-itinerario-resumen-bloque > .card > .tren-itinerario-resumen-table > table {
    height: 100%;
}
.tren-itinerario-resumen-mensual tbody tr {
    height: 50%;
}
.tren-itinerario-resumen-mensual td {
    vertical-align: middle;
}

@media (max-width: 1180px) {
    .tren-itinerario-resumen-bloque > .card,
    .tren-itinerario-resumen-bloque > .card > .tren-itinerario-resumen-table {
        display: block;
    }
    .tren-itinerario-resumen-bloque > .card > .tren-itinerario-resumen-table > table {
        height: auto;
    }
    .tren-itinerario-resumen-mensual tbody tr {
        height: auto;
    }
}
.table-container--guias {
    position: relative;
    overflow: visible;
}
.table-container--guias .table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-height: none;
}
.table-container--guias .table-scroll table {
    min-width: 1350px;
}
/* Separador vertical entre bloques de columnas */
.separator-right { border-right: 1px solid rgba(0,0,0,.08) !important; }
.separator-left { border-left: 1px solid rgba(0,0,0,.08) !important; }
/* Última columna no necesita separador */
th:last-child, td:last-child { border-right: none !important; }
table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
th { background: var(--brand); color: white; padding: 10px 12px; text-align: left; position: sticky; top: 0; z-index: 10; }
td { padding: 10px 12px; border-bottom: 1px solid #eee; }
tr:hover { background: #f9f8f6; }
.header-table {
    background: var(--brand);
    color: #fff;
}
.text-right { text-align: right; }
.text-center { text-align: center; }
.badge { padding: 3px 8px; border-radius: 12px; font-size: 0.75rem; font-weight: 600; }
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-warning { background: #fff3e0; color: #ef6c00; }
.badge-danger { background: #ffebee; color: #c62828; }

.estado-giro-cell {
    position: relative;
    overflow: visible;
    text-align: center;
    vertical-align: middle;
}

.estado-giro-marker {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: visible;
}

.estado-giro-ring--adicional {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    border: 1px solid var(--estado-giro-anillo-color, rgba(20, 20, 20, .86));
    box-shadow: 0 0 0 1px rgba(220, 214, 104, 0.96);
}

.estado-giro-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .92), 0 1px 1px rgba(0, 0, 0, .08);
}

.estado-giro-popover {
    display: none;
}

.estado-giro-popover.estado-giro-popover--overlay {
    position: fixed;
    left: auto;
    top: auto;
    transform: translateY(-50%) scale(1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 112px;
    padding: 7px 9px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(221, 215, 203, .95);
    border-radius: 12px;
    box-shadow: 0 18px 42px rgba(40, 40, 40, .13);
    z-index: 3201;
    flex-wrap: wrap;
    pointer-events: none;
}

.estado-giro-popover__label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7b7b7b;
    line-height: 1;
}

.giro-guia-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.giro-guia-trigger {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: inherit;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.giro-guia-trigger:hover,
.giro-guia-trigger:focus-visible {
    text-decoration: underline;
    text-decoration-color: rgba(0, 0, 0, .18);
    text-underline-offset: 2px;
}

.giro-guia-popover {
    display: none !important;
}

.giro-guia-popover.giro-guia-popover--overlay {
    display: inline-flex !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 126px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(221, 215, 203, .95);
    border-radius: 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 18px 42px rgba(40, 40, 40, .13);
    overflow: hidden;
    pointer-events: none;
}

.giro-guia-popover.giro-guia-popover--overlay .giro-guia-copy {
    pointer-events: auto;
}

.giro-guia-popover__label {
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #7b7b7b;
    line-height: 1;
}

.giro-guia-popover__badge {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.giro-guia-copy {
    appearance: none;
    border: 1px solid rgba(221, 215, 203, .95);
    background: rgba(248, 247, 243, .98);
    color: #4f5964;
    border-radius: 999px;
    width: 24px;
    height: 24px;
    padding: 0;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .14s ease, border-color .14s ease, transform .14s ease, color .14s ease;
}

.giro-guia-copy:hover:not(:disabled),
.giro-guia-copy:focus-visible:not(:disabled) {
    background: rgba(242, 239, 230, .98);
    border-color: rgba(199, 192, 176, .95);
    transform: translateY(-1px);
}

.giro-guia-copy:disabled {
    opacity: .48;
    cursor: not-allowed;
}

.giro-guia-copy i {
    pointer-events: none;
}

.giro-guia-copy svg {
    pointer-events: none;
    display: block;
}

/* ===== FILTERS ===== */
.filters { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-group label { font-size: 0.8rem; color: #666; font-weight: 600; }
select, input {
    padding: 10px 12px;
    border: 1px solid #ddd7cb;
    border-radius: 10px;
    font-family: inherit;
    min-width: 25px;
    color: var(--text);
}
select:focus, input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(191,184,0,.14); }

/* ===== SUB-TABS ===== */
.sub-tabs { display: flex; gap: 10px; margin-bottom: 15px; }
.sub-tab { padding: 8px 16px; background: #f0f0f0; border-radius: 20px; cursor: pointer; font-size: 0.85rem; transition: all 0.3s; }
.sub-tab:hover { background: #e0e0e0; }
.sub-tab.active { background: var(--accent); color: white; }

/* ===== CHART ===== */
.chart-container { position: relative; height: 300px; }

/* ===== PROGRESS BAR ===== */
.progress-bar { height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--accent); transition: width 0.5s; }

/* ===== EMPTY / MISC ===== */
.empty-tab { min-height: 280px; }
.footer {
    width: 100%;
    padding: 18px 18px 12px;
    text-align: right;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .02em;
    pointer-events: none;
    user-select: none;
    box-sizing: border-box;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1250px) { .zone-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 780px) {
    .header {
        min-height: auto;
        padding: 12px 18px;
    }
    .header-left {
        padding-left: 72px;
        padding-right: 72px;
        gap: 12px;
    }
    .header-icon { height: 48px; }
    .header-icon img { width: auto; height: 100%; }
    .header > img { right: 18px; height: 28px; }
    .header h1 { font-size: 1.25rem; }
    .header-meta { gap: 6px; margin-top: 8px; }
    .header-date, .header-updated { min-height: 27px; padding: 7px 9px; font-size: .74rem; }
    .tabs { padding: 0 14px; padding-right:230px; gap: 12px; }
    .tab { padding: 12px 4px 10px; }
    .content { padding: 20px 14px 0; }
    .zone-card-grid { grid-template-columns: 1fr; }
    .zone-metric-card { min-height: auto; }
}
@media (max-width: 768px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* ===== HEADER DE TABLA AGRUPADA (2 filas) ===== */
thead tr:first-child th {
    text-align: center;
    font-size: 0.8rem;
    padding: 8px 6px;
    border-bottom: 1px solid rgba(255,255,255,.15);
}
thead tr:first-child th:first-child,
thead tr:first-child th:nth-child(2) {
    text-align: left;
}
thead tr:first-child th:first-child {
    border-top-left-radius: 12px;
}
thead tr:first-child th:last-child {
    border-top-right-radius: 12px;
}
thead tr:nth-child(2) th {
    padding: 6px 4px;
    font-size: 0.7rem;
    font-weight: 400;
}

/* ===== TABLA EXPANDIBLE - PESTAÑA DESTINO ===== */
.destino-header-filter-th { position: sticky !important; top: 0; z-index: 30000 !important; overflow: visible !important; }
.destino-header-filter-th .destino-header-filter-wrap,
.destino-header-filter-th .destino-header-filter-button { position: relative; z-index: 30001; }
.destino-header-filter-wrap { position: relative; display: inline-flex; align-items: center; justify-content: center; }
.destino-header-filter-button { display:inline-flex; align-items:center; gap:5px; border:0; background:transparent; color:inherit; font:inherit; font-weight:inherit; cursor:pointer; padding:2px 5px; }
.destino-header-filter-button.is-active { color:#fff; }
.destino-header-filter-icon { font-size:.58rem; opacity:.9; transform:rotate(180deg); }
.destino-header-filter-panel { position:fixed; z-index:20000; width:290px; max-width:72vw; max-height:390px; overflow:auto; padding:10px; background:#fff; color:var(--text); border:1px solid var(--line); border-radius:14px; box-shadow:0 18px 42px rgba(40,40,40,.18); text-align:left; }
.destino-header-filter-panel[hidden] { display:none; }
.destino-header-filter-panel > input[type="search"] { width:100%; box-sizing:border-box; padding:8px 10px; border:1px solid var(--line); border-radius:10px; font-size:.84rem; margin-bottom:8px; background:#fff; color:var(--text); }
.destino-header-filter-select-all, .destino-header-filter-option { display:flex; align-items:flex-start; gap:7px; padding:5px 3px; cursor:pointer; font-size:.82rem; line-height:1.2; }
.destino-header-filter-option[hidden] { display:none !important; }
.destino-header-filter-select-all { font-weight:800; border-bottom:1px solid var(--line); margin-bottom:3px; padding-bottom:8px; }
.destino-header-filter-option input, .destino-header-filter-select-all input { margin:2px 0 0; flex:0 0 auto; }
.destino-header-filter-clear { width:100%; margin-top:9px; padding:8px 10px; border:0; border-radius:10px; background:#f0efe8; color:var(--brand); font-weight:800; cursor:pointer; }
.destino-header-filter-empty { padding:10px 4px; color:var(--muted); font-size:.82rem; }
.destino-zona-multiselect { position:relative; z-index:50000 !important; }
#popoverZonaCamionDestino { z-index:60000 !important; }
.fila-destino { transition: background 0.15s ease; }
.fila-destino:hover { background: #f0efe8 !important; }
.fila-destino td:first-child { color: var(--accent); font-size: 0.7rem; vertical-align: middle; }
.fila-destino td:first-child .expand-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.65rem;
    line-height: 1;
}
.fila-destino td:last-child,
.fila-destino td:nth-last-child(2) { font-weight: 700; }

/* ===== TABLA EXPANDIBLE - PESTAÑA FLOTA ===== */
.fila-flota-padre { transition: background 0.15s ease; }
.fila-flota-padre:hover { background: #f0efe8 !important; }
.fila-flota-padre td:first-child { color: var(--accent); font-size: 0.7rem; vertical-align: middle; }
.fila-flota-padre td:first-child .expand-icon {
    display: inline-block;
    transition: transform 0.2s ease;
    font-size: 0.65rem;
    line-height: 1;
}

/* Filas de detalle (expandidas) */
.fila-detalle { transition: all 0.2s ease; }
.fila-detalle { background: #fcfbf9 !important; }
.fila-detalle:hover { background: #f7f5f0 !important; }
.fila-detalle td {
    border-bottom: 1px solid #f0ece3;
    padding-top: 7px;
    padding-bottom: 7px;
}
.fila-detalle:last-child td { border-bottom: 1px solid #e8e4dc; }

/* Separador visual entre destinos */
.fila-destino:not(:last-child) td { border-bottom: 1px solid #e0dcd4; }

/* Animación suave al expandir (vía JS) */
.fila-detalle[style*="table-row"] {
    animation: fadeSlideIn 0.2s ease forwards;
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== FILAS DE SECCIÓN (Plantas, Aserraderos, Canchas) ===== */
.fila-seccion td {
    border-bottom: 2px solid var(--accent);
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(191,184,0,.10), rgba(191,184,0,.06));
}
.fila-seccion:hover { background: linear-gradient(180deg, rgba(191,184,0,.05), rgba(191,184,0,.02)) !important; }
/* Fila Total al final de la tabla */
.fila-total td {
    border-bottom: none !important;
    background: var(--brand);
    color: #fff;
    padding: 10px 12px;
}
.fila-total:hover { background: var(--brand) !important; }
.fila-total-avance-inactivos td:last-child { display: none; }
/* Quitar color intercalado en filas de detalle */
tr.fila-detalle { background: #fcfbf9 !important; }


body.mapa-view .tab-content#mapa .mapa-code-marker-anchor {
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    position: relative;
}

body.mapa-view .tab-content#mapa .mapa-code-marker-anchor .mapa-code-marker__pin {
    position: absolute !important;
    left: 0;
    top: 0;
    width: 52px;
    height: 72px;
    transform: translate(-50%, -100%) !important;
    transform-origin: 50% 100%;
}

body.mapa-view .tab-content#mapa .mapa-code-marker-anchor .mapa-code-marker__pin svg {
    width: 52px;
    height: 72px;
    display: block;
}

body.mapa-view .tab-content#mapa .mapa-code-marker-anchor .mapa-code-marker__dot {
    position: absolute !important;
    left: 0;
    top: 0;
    transform: translate(-50%, -50%) !important;
}
