* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #eef3f7;
    color: #163152;
    padding: 24px;
}

.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
}

.header-dashboard {
    background: linear-gradient(90deg, #0a5ca8, #1772c4);
    color: #fff;
    border-radius: 18px;
    padding: 22px 24px;
    margin-bottom: 10px;
}

.header-dashboard h1 {
    font-size: 30px;
    margin-bottom: 8px;
    font-weight: 700;
}

.header-dashboard p {
    font-size: 16px;
    opacity: 0.98;
}

.resumen-superior {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 10px;
}


.texto-rojo {
    color: #d92323 !important;
}

.panel-filtros {
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: minmax(320px, 1.8fr) minmax(220px, 1fr) minmax(220px, 1fr) 130px 130px;
    gap: 14px;
    align-items: end;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    min-width: 0;

}

.filtro-item label {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #243a57;
    white-space: nowrap;
}

.filtro-item select,
.filtro-item button {
    height: 30px;
    border-radius: 12px;
    border: 1px solid #c9d3df;
    padding: 0 14px;
    font-size: 15px;
    outline: none;
    width: 100%;
}

.filtro-item select {
    background: #fff;
    min-width: 0;
}

.filtro-item button {
    border: none;
    background: #08152e;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease-in-out;
}

.filtro-item button:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.btn-secundario {
    background: #4d647f !important;
}

.filtro-red,
.filtro-microred,
.filtro-vacuna,
.filtro-buscar,
.filtro-limpiar {
    min-width: 0;
}

.btn-secundario {
    background: #4d647f !important;
}

.bloque-progreso,
.bloque-resumen,
.tabla-box {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    margin-bottom: 18px;
}

.bloque-progreso h2,
.bloque-resumen h2 {
    font-size: 22px;
    color: #0a5ca8;
    margin-bottom: 10px;
    font-weight: 800;
}

.barra-general {
    width: 100%;
    height: 26px;
    background: #dcdfe5;
    border-radius: 999px;
    overflow: hidden;
}

.barra-general-interna {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f0ad4e, #28a745);
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 26px;
    font-size: 13px;
    border-radius: 999px;
    transition: width 0.4s ease;
    white-space: nowrap;
}

.grid-resumen {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
}

.mini-card {
    border: 1px solid #d5dfeb;
    border-radius: 16px;
    padding: 14px 14px 16px;
    background: #f9fbfd;
    min-height: 92px;
}

.mini-card span {
    display: block;
    font-size: 12px;
    color: #5b6775;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.mini-card strong {
    font-size: 20px;
    font-weight: 800;
    color: #0a5ca8;
    line-height: 1.2;
    word-break: break-word;
}

.barra {
    width: 140px;
    height: 18px;
    background: #d9dde3;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
}

.barra-interna {
    height: 100%;
    color: white;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
    white-space: nowrap;
    font-weight: 700;
    border-radius: 999px;
}

.ok,
.warn,
.bad {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.ok {
    background: #28a745;
}

.warn {
    background: #f0ad4e;
}

.bad {
    background: #e52525;
}

.icono-vacuna {
    font-size: 22px;
}
.tabla-box {
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    margin-bottom: 10px;
}

.tabla-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

table.tabla-vacunometro {
    width: 100% !important;
    min-width: 1100px;
    border-collapse: collapse !important;
    table-layout: fixed;
}

table.tabla-vacunometro thead th {
    background: #0a5ca8 !important;
    color: #fff !important;
    border: 1px solid #d4dbe5 !important;
    padding: 12px 10px !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-size: 14px;
    white-space: nowrap;
}

table.tabla-vacunometro tbody td {
    border: 1px solid #d4dbe5 !important;
    padding: 10px 12px !important;
    text-align: center;
    vertical-align: middle !important;
    background: #f7f9fb;
    font-size: 14px;
    word-break: break-word;
}

table.tabla-vacunometro tbody td.col-nivel {
    text-align: left !important;
    font-weight: 700;
    color: #132b46;
}

table.tabla-vacunometro tbody tr:nth-child(odd) td {
    background: #eef4fa;
}

table.tabla-vacunometro tbody tr:hover td {
    background: #e3edf8 !important;
}

.text-center {
    text-align: center !important;
}

.icono-vacuna {
    font-size: 22px;
    display: inline-block;
    line-height: 1;
}

.barra {
    width: 130px;
    height: 18px;
    background: #d9dde3;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto;
}

.barra-interna {
    height: 100%;
    color: #fff;
    font-size: 11px;
    text-align: center;
    line-height: 18px;
    white-space: nowrap;
    font-weight: 700;
    border-radius: 999px;
    padding: 0 4px;
}

.ok,
.warn,
.bad {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 98px;
    padding: 6px 12px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.ok {
    background: #28a745;
}

.warn {
    background: #f0ad4e;
}

.bad {
    background: #e52525;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 10px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #c9d3df;
    border-radius: 8px;
    padding: 4px 8px;
    background: #fff;
}

/* Tablet */
@media (max-width: 992px) {
    table.tabla-vacunometro {
        min-width: 980px;
    }

    table.tabla-vacunometro thead th,
    table.tabla-vacunometro tbody td {
        font-size: 13px;
        padding: 9px 8px !important;
    }

    .barra {
        width: 115px;
        height: 17px;
    }

    .barra-interna {
        font-size: 10px;
        line-height: 17px;
    }

    .ok,
    .warn,
    .bad {
        min-width: 88px;
        font-size: 11px;
        padding: 5px 10px;
    }

    .icono-vacuna {
        font-size: 20px;
    }
}

/* Móvil */
@media (max-width: 576px) {
    .tabla-box {
        padding: 10px;
        border-radius: 14px;
    }

    table.tabla-vacunometro {
        min-width: 900px;
    }

    table.tabla-vacunometro thead th,
    table.tabla-vacunometro tbody td {
        font-size: 12px;
        padding: 8px 6px !important;
    }

    .barra {
        width: 95px;
        height: 16px;
    }

    .barra-interna {
        font-size: 9px;
        line-height: 16px;
        padding: 0 2px;
    }

    .ok,
    .warn,
    .bad {
        min-width: 78px;
        font-size: 10px;
        padding: 4px 8px;
    }

    .icono-vacuna {
        font-size: 18px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        font-size: 12px;
    }

    .dataTables_wrapper .dataTables_filter input {
        width: 120px;
    }
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 12px;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1px solid #c9d3df;
    border-radius: 8px;
    padding: 4px 8px;
    background: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
}

@media (max-width: 1500px) {
    .resumen-superior {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-resumen {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .panel-filtros {
        grid-template-columns: 1fr;
    }

    .resumen-superior {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-resumen {
        grid-template-columns: repeat(2, 1fr);
    }

    .header-dashboard h1 {
        font-size: 24px;
    }
}

@media (max-width: 576px) {
    body {
        padding: 14px;
    }

    .resumen-superior,
    .grid-resumen {
        grid-template-columns: 1fr;
    }

    .card-top strong,
    .mini-card strong {
        font-size: 18px;
    }

    .bloque-progreso h2,
    .bloque-resumen h2 {
        font-size: 18px;
    }
}

.bloque-progreso,
.bloque-resumen,
.tabla-box {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    margin-bottom: 10px;
}

.barra-general {
    width: 100%;
    height: 28px;
    background: #dcdfe5;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.barra-general-interna {
    height: 100%;
    width: 0%;
    color: #fff;
    font-weight: 700;
    text-align: center;
    line-height: 28px;
    font-size: 13px;
    border-radius: 999px;
    transition: width 0.35s ease, background 0.35s ease;
    white-space: nowrap;
}

.grafico-box {
    background: #fff;
    border-radius: 20px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    margin-bottom: 10px;
}

.grafico-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 14px;
}

.grafico-header h2 {
    font-size: 22px;
    color: #0a5ca8;
    font-weight: 800;
    margin: 0;
}

.grafico-header p {
    margin: 0;
    font-size: 14px;
    color: #5b6775;
}

#graficoVacunometro {
    width: 100% !important;
    height: 420px !important;
}

#graficoPorVacuna {
    width: 100% !important;
    height: 420px !important;
}

.card-top {
    background: #fff;
    border-radius: 18px;
    padding: 18px 20px 16px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    min-height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.card-top span {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #5b6775;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.card-top strong {
    font-size: 20px;
    font-weight: 800;
    color: #163152;
    line-height: 1.15;
    word-break: break-word;
}

.card-avance {
    display: block;
    margin-top: 8px;
    margin-bottom: 10px;
    color: #5b6775;
    font-size: 13px;
}

.card-avance b {
    color: #163152;
    font-weight: 800;
}

.mini-barra {
    width: 100%;
    height: 18px;
    background: #d9dde3;
    border-radius: 999px;
    overflow: hidden;
    margin-top: auto;
    position: relative;
}

.mini-barra-interna {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition: width 0.4s ease, background 0.3s ease;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 10px;
    text-align: center;
    white-space: nowrap;
    min-width: 58px;
    padding: 0 8px;
}

.mini-barra-interna.ok {
    background: #28a745;
}

.mini-barra-interna.warn {
    background: #f0ad4e;
}

.mini-barra-interna.bad {
    background: #e52525;
}

.acciones-exportar {
    display: flex;
    justify-content: flex-end; /* lo manda a la derecha */
    margin-bottom: 12px;
}

#btnDescargarGrafico2 {
    background: #0a5ca8;
    color: #fff;
    border: none;
    padding: 6px 12px;   /* más pequeño */
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    width: auto;
}

#btnDescargarGrafico2:hover {
    opacity: 0.9;
}

/* contenedor de botones */
div.dt-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

/* estilo base */
.dt-button {
    background: #0a5ca8 !important;
    color: #fff !important;
    border: none !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* hover */
.dt-button:hover {
    background: #084b89 !important;
    transform: translateY(-1px);
}

/* botón activo */
.dt-button:active {
    transform: scale(0.97);
}

/* quitar borde raro de DataTables */
.dt-button:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* colores por tipo */
.dt-button.buttons-excel {
    background: #0a5ca8 !important; /* verde Excel */
}

.dt-button.buttons-excel:hover {
    background: #155c34 !important;
}

.dt-button.buttons-pdf {
    background: #0a5ca8  !important; /* rojo PDF */
}

.dt-button.buttons-pdf:hover {
    background: #992d22 !important;
}

.dt-button.buttons-print {
    background: #0a5ca8  !important; /* gris imprimir */
}

.dt-button.buttons-print:hover {
    background: #545b62 !important;
}

.dataTables_wrapper .dt-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

/* botones */
.dataTables_wrapper .dt-buttons {
    display: flex;
    gap: 8px;
}

/* buscador */
.dataTables_wrapper .dataTables_filter {
    margin:0;
}

.header-fecha {
    position: absolute;
    top: 30px;
    right: 100px;
}

.btn-actualizado {
    background: #0a1831;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: default;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* efecto hover suave */
.btn-actualizado:hover {
    background: #040f24;
    cursor: pointer;
}

/* texto interno */
.btn-actualizado span {
    font-weight: 600;
}

#graficoRanking {
    width: 100% !important;
    height: 460px !important;
}

.titulo-seccion {
    color: #0a5ca8;
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 14px;
}

.tabla-matriz {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    table-layout: fixed;
}

.tabla-matriz th {
    background: #0a5ca8;
    color: #fff;
    padding: 12px 8px;
    border: 1px solid #d4dbe5;
    font-size: 13px;
    text-align: center;
}

.tabla-matriz td {
    border: 1px solid #d4dbe5;
    padding: 10px;
    background: #f7f9fb;
    vertical-align: middle;
    text-align: center;
}

.tabla-matriz td:first-child {
    text-align: left;
    font-weight: 800;
    color: #132b46;
    width: 220px;
    background: #eaf2fb;
}



.celda-vacuna .datos {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
    color: #243a57;
}

.celda-vacuna .porcentaje {
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 6px;
}

.barra-celda {
    width: 100%;
    height: 18px;
    background: #d9dde3;
    border-radius: 999px;
    overflow: hidden;
}

.barra-celda-interna {
    height: 100%;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    border-radius: 999px;
    min-width: 35px;
}

.celda-rojo {
    background: #e52525;
}

.celda-naranja {
    background: #f0ad4e;
}

.celda-verde {
    background: #28a745;
}

.accordion-box {
    margin-bottom: 16px;
}

.accordion-header {
    background: linear-gradient(135deg, #0a5ca8, #1e6fbf);
    color: #fff;
    padding: 14px 18px;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 800;
}

.accordion-header h3 {
    margin: 0;
    font-size: 16px;
}

.icono-toggle {
    font-size: 16px;
    transition: transform 0.3s ease;
}

/* contenido */
.accordion-content {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
}

/* activo */
.accordion-box.activo .accordion-content {
    max-height: 1000px; /* suficiente para mostrar todo */
}

.accordion-box.activo .icono-toggle {
    transform: rotate(180deg);
}

.btn-descargar {
    background: #0a5ca8;
    color: #fff;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 10px;
}

.btn-descargar-sql {
    display: inline-block;
    background: #198754;
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}

.btn-descargar-sql:hover {
    background: #157347;
}

.contenedor-boton {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}