/* ===========================================================================
   Reporte interno de Campaña Ad-hoc
   Dashboard con KPIs, mapa Leaflet, timeline y charts SVG/CSS.
   =========================================================================== */

/* Eliminar padding del main-content (mismo patrón que campanas.css) */
.main-content:has(.reporte-adhoc-page) {
    padding: 0 !important;
}

.reporte-adhoc-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 95px);
    width: 100%;
    padding: 0;
    overflow: hidden;
    background: var(--bg-primary);

    --reporte-card: var(--bg-secondary, #2a2a2a);
    --reporte-track: rgba(255,255,255,0.08);
    --reporte-good: #7CC576;
    --reporte-warn: #f59e0b;
    --reporte-bad: #E74C3C;
}

:root.light-mode .reporte-adhoc-page {
    --reporte-track: rgba(0,0,0,0.06);
}

.reporte-adhoc-page .camara-panel {
    margin: 0;
    padding: 0.75rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.reporte-adhoc-page .camara-header {
    margin: 0 0 0.5rem 0;
    padding: 0.25rem 0.5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.reporte-adhoc-page .camara-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reporte-adhoc-page .header-icon-gradient svg {
    stroke: white !important;
}

.reporte-adhoc-page .camara-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.5rem;
    flex: 1;
    min-height: 0;
    gap: 14px;
}

.reporte-adhoc-page .camara-body > * {
    width: 100%;
    align-self: stretch;
    box-sizing: border-box;
}

/* === Botón volver === */
.reporte-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.reporte-back-btn:hover {
    background: rgba(240, 116, 0, 0.08);
    border-color: #F07400;
    color: #F07400;
    transform: translateX(-2px);
}

/* === Título === */
.reporte-titulo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.reporte-titulo-cliente {
    font-weight: 600;
    color: #00b4ff;
}

.reporte-titulo-marca {
    font-weight: 700;
    color: var(--text-primary);
}

.reporte-titulo-sep {
    opacity: 0.4;
}

.reporte-titulo-camp {
    font-weight: 500;
    color: var(--text-secondary);
}

/* === Status badge === */
.reporte-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fff;
}

.reporte-status-activa {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.30);
}

.reporte-status-finalizada {
    background: var(--primary-gradient);
    box-shadow: 0 2px 8px rgba(240, 116, 0, 0.30);
}

/* === Loading & empty === */
.reporte-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 80px 20px;
    color: var(--text-secondary);
}

.campanas-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid var(--border-color);
    border-top-color: #F07400;
    border-radius: 50%;
    animation: campanas-spin 0.9s linear infinite;
}

@keyframes campanas-spin {
    to { transform: rotate(360deg); }
}

.reporte-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 90px 20px;
    gap: 14px;
    text-align: center;
    color: var(--text-secondary);
}

.reporte-empty-icon {
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(240, 116, 0, 0.06);
    color: #F07400;
    border: 2px dashed var(--border-color);
    margin-bottom: 6px;
}

.reporte-empty h5 {
    margin: 0;
    color: var(--text-primary);
}

/* === Toolbar global de período === */
.reporte-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 10px 14px;
    background: var(--reporte-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.reporte-toolbar-grupo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.reporte-toolbar-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 700;
}

.reporte-toolbar-hint {
    font-size: 11.5px;
    color: var(--text-secondary);
    font-style: italic;
    flex: 1 1 auto;
    min-width: 0;
}

.reporte-toolbar-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    background: rgba(240, 116, 0, 0.12);
    border: 1px solid rgba(240, 116, 0, 0.45);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #F07400;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.reporte-toolbar-chip:hover {
    background: rgba(240, 116, 0, 0.22);
    transform: translateY(-1px);
}

.reporte-chip-label {
    line-height: 1.2;
}

.reporte-chip-x {
    font-size: 16px;
    line-height: 1;
    font-weight: 700;
    opacity: 0.85;
}

.reporte-section-hint {
    font-size: 11px;
    color: var(--text-secondary);
    font-style: italic;
    opacity: 0.85;
}

/* === KPI strip === */
.reporte-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    width: 100%;
}

.reporte-kpi-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--reporte-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.reporte-kpi-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}

.reporte-kpi-icon.kpi-orange { background: linear-gradient(135deg, #F07400, #ff9244); }
.reporte-kpi-icon.kpi-blue { background: linear-gradient(135deg, #00b4ff, #4dc8ff); }
.reporte-kpi-icon.kpi-green { background: linear-gradient(135deg, #10b981, #34d399); }
.reporte-kpi-icon.kpi-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.reporte-kpi-icon.kpi-cyan { background: linear-gradient(135deg, #06b6d4, #22d3ee); }

.reporte-kpi-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.reporte-kpi-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.reporte-kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
    display: flex;
    flex-direction: column;
}

.reporte-kpi-value.reporte-kpi-fecha {
    font-size: 16px;
}

.reporte-kpi-sub {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.reporte-kpi-sub.delta-up {
    color: var(--reporte-good);
    font-weight: 700;
}

.reporte-kpi-sub.delta-down {
    color: var(--reporte-bad);
    font-weight: 700;
}

.reporte-kpi-sub-inline {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-left: 2px;
    text-transform: lowercase;
    letter-spacing: 0.2px;
}

/* === Sections genéricas === */
.reporte-section {
    background: var(--reporte-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.reporte-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.reporte-section-header h6 {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.reporte-section-title-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.reporte-section-title-icon.tone-orange { background: linear-gradient(135deg, #F07400, #ff9244); }
.reporte-section-title-icon.tone-blue { background: linear-gradient(135deg, #00b4ff, #4dc8ff); }
.reporte-section-title-icon.tone-purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); }
.reporte-section-title-icon.tone-cyan { background: linear-gradient(135deg, #06b6d4, #22d3ee); }
.reporte-section-title-icon.tone-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }

.reporte-section-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Mapa === */
.reporte-section-mapa {
    flex-shrink: 0;
}

.reporte-mapa {
    width: 100%;
    height: 420px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    z-index: 0;
}

.reporte-mapa-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 11.5px;
    color: var(--text-secondary);
}

.leg-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.leg-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.leg-dot.leg-base { background: #00b4ff; }
.leg-dot.leg-in { background: #7CC576; }
.leg-dot.leg-out { background: #E74C3C; }
.leg-dot.leg-tab { background: #F07400; }

/* === Timeline === */
.reporte-timeline {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 6px;
}

.reporte-timeline-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    padding: 30px 10px;
}

.reporte-timeline-bars {
    display: flex;
    gap: 10px;
    min-height: 200px;
    padding: 28px 4px 4px;
    align-items: flex-end;
    width: 100%;
    border-bottom: 1px solid var(--border-color);
}

.reporte-tl-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1 1 0;
    min-width: 48px;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.2s ease;
}

/* Cuando hay un bin seleccionado, atenuar los demás para enfatizar el filtro activo */
.reporte-timeline-bars:has(.reporte-tl-col.is-active) .reporte-tl-col:not(.is-active) {
    opacity: 0.45;
}

.reporte-timeline-bars:has(.reporte-tl-col.is-active) .reporte-tl-col:not(.is-active):hover {
    opacity: 0.85;
}

.reporte-tl-bar-wrap {
    width: 100%;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.reporte-tl-bar {
    width: 70%;
    max-width: 56px;
    min-width: 18px;
    min-height: 8px;
    background: linear-gradient(180deg, rgba(240, 116, 0, 0.30) 0%, rgba(255, 146, 68, 0.30) 100%);
    border: 2px solid rgba(240, 116, 0, 0.55);
    border-radius: 8px 8px 0 0;
    box-shadow: 0 4px 18px rgba(240, 116, 0, 0.18);
    transition: all 0.35s cubic-bezier(0.25, 0.1, 0.25, 1);
    position: relative;
}

.reporte-tl-col:hover .reporte-tl-bar {
    filter: brightness(1.10);
    box-shadow: 0 6px 24px rgba(240, 116, 0, 0.30);
    transform: scaleY(1.04);
    transform-origin: bottom;
}

/* Bin activo: relleno saturado + glow naranja para destacar el filtro */
.reporte-tl-col.is-active .reporte-tl-bar {
    background: linear-gradient(180deg, rgba(240, 116, 0, 0.85) 0%, rgba(255, 146, 68, 0.85) 100%);
    border-color: #F07400;
    box-shadow: 0 6px 28px rgba(240, 116, 0, 0.55);
}

.reporte-tl-col.is-active .reporte-tl-count {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
}

.reporte-tl-col.is-active .reporte-tl-label {
    color: #F07400;
    font-weight: 700;
}

.reporte-tl-count {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    color: var(--text-primary);
    font-weight: 700;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 1px 8px;
    line-height: 1.3;
    white-space: nowrap;
}

.reporte-tl-label {
    font-size: 10.5px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-transform: capitalize;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* === Granularity toggle === */
.reporte-gran-toggle {
    display: inline-flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}

.reporte-gran-toggle button {
    background: transparent;
    border: none;
    padding: 5px 14px;
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
    font-weight: 600;
}

.reporte-gran-toggle button:hover {
    color: var(--text-primary);
}

.reporte-gran-toggle button.active {
    background: var(--primary-gradient);
    color: #fff;
}

/* === Charts grid === */
.reporte-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
    width: 100%;
}

.reporte-card-chart {
    min-height: 220px;
}

.reporte-chart-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 12.5px;
    padding: 40px 10px;
}

/* === Donut chart === */
.reporte-card-donut {
    grid-column: span 2;
}

.reporte-donut-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    width: 100%;
    flex: 1 1 auto;
    padding: 8px 4px;
}

.reporte-donut-chart {
    position: relative;
    width: 200px;
    height: 200px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reporte-donut {
    width: 200px;
    height: 200px;
    transform: rotate(-90deg);
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.18));
}

.reporte-donut circle {
    transition: stroke-width 0.2s ease;
}

.reporte-donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.reporte-donut-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    background: linear-gradient(135deg, #F07400, #ff9244);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.reporte-donut-lbl {
    margin-top: 4px;
    font-size: 10.5px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.reporte-donut-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    opacity: 0.75;
}

.reporte-donut-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1 1 240px;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-self: center;
}

.reporte-donut-legend li {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 10px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.reporte-donut-legend li:hover {
    transform: translateX(2px);
    border-color: rgba(240, 116, 0, 0.35);
}

.reporte-donut-legend li.is-propia {
    border-color: rgba(240, 116, 0, 0.40);
    background: linear-gradient(135deg, rgba(240, 116, 0, 0.10), rgba(240, 116, 0, 0.03));
}

.reporte-donut-legend .leg-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.reporte-donut-legend .leg-sw {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.06), 0 2px 6px rgba(0, 0, 0, 0.25);
}

.reporte-donut-legend .leg-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-primary);
}

.reporte-donut-legend .leg-pill {
    flex-shrink: 0;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    background: var(--primary-gradient);
    padding: 2px 7px;
    border-radius: 999px;
}

.reporte-donut-legend .leg-val {
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
}

.reporte-donut-legend .leg-val small {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--text-secondary);
    opacity: 0.85;
}

.reporte-donut-legend .leg-track {
    height: 4px;
    background: var(--reporte-track);
    border-radius: 999px;
    overflow: hidden;
}

.reporte-donut-legend .leg-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* === Bar list (estilo "Efectividad Por Usuario") === */
.reporte-bar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.reporte-bar-list-fancy .reporte-bar-item {
    display: grid;
    grid-template-columns: minmax(0, 110px) 1fr 44px;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease;
}

.reporte-bar-list-fancy .reporte-bar-item:hover {
    transform: translateX(2px);
}

.reporte-bar-name {
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    text-align: right;
}

.reporte-bar-val {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 700;
    flex-shrink: 0;
    text-align: left;
}

.reporte-bar-track {
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: visible;
    position: relative;
}

:root.light-mode .reporte-bar-track,
.light-mode .reporte-bar-track {
    background: rgba(0, 0, 0, 0.04);
}

.reporte-bar-fill {
    position: relative;
    height: 100%;
    border-radius: 8px;
    transition: width 0.9s cubic-bezier(0.25, 0.1, 0.25, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    min-width: 8px;
}

.reporte-bar-fill.tone-orange {
    background: linear-gradient(90deg, rgba(240, 116, 0, 0.30) 0%, rgba(255, 146, 68, 0.30) 100%);
    border: 2px solid rgba(240, 116, 0, 0.55);
    box-shadow: 0 4px 18px rgba(240, 116, 0, 0.18);
}

.reporte-bar-fill.tone-blue {
    background: linear-gradient(90deg, rgba(0, 180, 255, 0.30) 0%, rgba(77, 200, 255, 0.30) 100%);
    border: 2px solid rgba(0, 180, 255, 0.55);
    box-shadow: 0 4px 18px rgba(0, 180, 255, 0.18);
}

.reporte-bar-fill.tone-purple {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.30) 0%, rgba(167, 139, 250, 0.30) 100%);
    border: 2px solid rgba(139, 92, 246, 0.55);
    box-shadow: 0 4px 18px rgba(139, 92, 246, 0.18);
}

.reporte-bar-pct {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    opacity: 0.95;
}

.reporte-bar-list-fancy .reporte-bar-item:hover .reporte-bar-fill {
    filter: brightness(1.10);
}

/* Si la barra es muy corta, mover el % afuera */
.reporte-bar-fill.is-narrow .reporte-bar-pct {
    position: absolute;
    left: calc(100% + 6px);
    color: var(--text-secondary);
    text-shadow: none;
    font-weight: 600;
}

/* === Alertas === */
.reporte-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    width: 100%;
}

.reporte-alert-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reporte-alert-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}

.reporte-alert-num.warn { color: var(--reporte-warn); }
.reporte-alert-num.ok { color: var(--reporte-good); }

.reporte-alert-title {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-primary);
}

.reporte-alert-hint {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.35;
}

.reporte-alert-list {
    list-style: none;
    margin: 6px 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.reporte-alert-list li {
    font-size: 12px;
    color: var(--text-primary);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: baseline;
}

.reporte-alert-list li small {
    color: var(--text-secondary);
    font-size: 10.5px;
}

.reporte-alert-more {
    color: var(--text-secondary);
    font-size: 11px;
    font-style: italic;
    margin-top: 2px;
}

.reporte-alert-ok-msg {
    font-size: 12px;
    color: var(--reporte-good);
    margin-top: 4px;
}

/* === Leaflet integration en dark mode === */
.leaflet-tile-dark {
    filter: brightness(0.95);
}

/* Popups Leaflet alineados con tema */
.reporte-mapa .leaflet-popup-content-wrapper {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 10px;
}

.reporte-mapa .leaflet-popup-content {
    margin: 8px 10px;
}

.reporte-mapa .leaflet-popup-tip {
    background: var(--bg-secondary);
}

/* Responsive */
@media (max-width: 900px) {
    .reporte-card-donut { grid-column: span 1; }
    .reporte-donut-legend { min-width: 0; flex-basis: 100%; }
}

@media (max-width: 768px) {
    .reporte-mapa { height: 320px; }
    .reporte-tl-col { min-width: 40px; }
    .reporte-tl-bar { width: 60%; max-width: 28px; }
    .reporte-bar-list-fancy .reporte-bar-item {
        grid-template-columns: minmax(0, 90px) 1fr 40px;
        gap: 8px;
    }
    .reporte-donut-chart, .reporte-donut { width: 170px; height: 170px; }
    .reporte-donut-num { font-size: 26px; }
}
