body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    position: relative;
}

/* BARRA SUPERIOR DE NAVEGACIÓN NOSCE™ */
.test-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #0f172a;
    padding: 12px 24px;
    color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.test-navbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.brand-title {
    color: #38bdf8;
    font-weight: 700;
    font-size: 1.1rem;
}

.brand-sub {
    color: #94a3b8;
    font-size: 0.85rem;
}

.btn-return-hub {
    display: inline-flex;
    align-items: center;
    background-color: #0284c7;
    color: #ffffff !important;
    border: 1px solid #38bdf8;
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-return-hub:hover {
    background-color: #0369a1;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

main {
    max-width: 1000px;
    margin: 20px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-sizing: border-box;
}

header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 2px solid #ddd;
    position: relative;
}

h1 {
    color: #4a4a4a;
    font-weight: 700;
    padding-right: 20px;
    padding-left: 20px;
    font-size: 1.8em;
    margin-top: 15px;
}

.subtitulo {
    color: #007bff;
    font-weight: 700;
}

.instrucciones {
    background-color: #e9f5ff;
    border: 1px solid #b3d9ff;
    padding: 15px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: left;
}

.instrucciones h2 {
    color: #004085;
    margin-top: 0;
}

.advertencia {
    font-weight: 700;
    color: #ff5733; 
}

/* Estilos de las Áreas del Formulario */
.area {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.titulo-area {
    color: #007bff;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
    margin-top: 0;
}

.afirmacion-grupo {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.afirmacion-texto {
    flex-basis: 65%; 
    margin: 0;
}

.control-input-nav {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-basis: 32%;
    justify-content: flex-end;
}

input[type="number"] {
    width: 65px;
    padding: 8px 5px;
    text-align: center;
    border: 2px solid #007bff;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: bold;
}

.btn-nav {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 6px 10px;
    font-size: 0.85em;
    border-radius: 4px;
    cursor: pointer;
}

.btn-sig { background-color: #28a745; }
.btn-bloqueo { background-color: #ffc107; color: #212529; font-weight: bold; }

.resumen-area {
    margin-top: 10px;
    padding: 8px;
    background-color: #f3f3f3;
    border-radius: 4px;
    text-align: right;
    font-weight: 700;
}

.validacion-mensaje {
    color: red;
    font-size: 0.9em;
    font-weight: 700;
    margin-left: 15px;
}

/* Botón Principal */
.boton-container {
    margin: 40px 0;
    text-align: center;
}

#btn-calcular-principal {
    background-color: #0056b3;
    color: white;
    padding: 20px 50px;
    font-size: 1.6em;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    max-width: 600px;
    border: none;
    transition: background-color 0.2s ease;
}

#btn-calcular-principal:hover {
    background-color: #003d80;
}

/* REPORTE DE RESULTADOS */
.resultados-container {
    margin-top: 40px;
    padding: 0;
}

.pdf-reporte-contenedor {
    background-color: #ffffff;
    padding: 20px;
    box-sizing: border-box;
}

.reporte-header-bloque {
    text-align: left;
    margin-bottom: 15px;
}

.reporte-titulo-izq {
    font-size: 2.1em;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.5px;
}

.introduccion-cid {
    margin-bottom: 15px;
    padding: 12px 15px;
    border-left: 5px solid #0056b3;
    background-color: #f8fbff;
}

.introduccion-cid h3 {
    margin-top: 0;
    margin-bottom: 6px;
    color: #0056b3;
    font-size: 1.05em;
}

.introduccion-cid p {
    font-size: 0.88em;
    margin: 0;
}

/* MARCO DEL RADAR Y CONFIGURACIÓN DE TAMAÑO */
.grafico-seccion-cid {
    position: relative;
    background: #fff;
    padding: 5px 0;
    box-sizing: border-box;
}

.radar-marco-posicionado {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    height: 350px;
}

.grafico-container-cid {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* CAJAS FLOTANTES DE REFERENCIA DE PORCENTAJE */
.caja-eje-porcentaje {
    position: absolute;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    text-align: center;
}

.eje-tag {
    font-size: 0.8em;
    font-weight: 900;
    color: #222;
    margin-bottom: 1px;
}

.badge-val {
    width: 100%;
    padding: 4px 0;
    font-size: 0.95em;
    font-weight: 900;
    color: white;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12);
}

/* Coordenadas de los 4 Vértices */
.pos-top {
    top: 0px;
    left: 50%;
    transform: translateX(-50%);
}
.pos-top .badge-val { background-color: rgba(46, 204, 113, 0.95); border: 1.5px solid #2ecc71; color: #fff; }

.pos-right {
    top: 50%;
    right: 0px;
    transform: translateY(-50%);
}
.pos-right .badge-val { background-color: rgba(52, 152, 219, 0.95); border: 1.5px solid #3498db; color: #fff; }

.pos-bottom {
    bottom: 0px;
    left: 50%;
    transform: translateX(-50%);
}
.pos-bottom .badge-val { background-color: rgba(230, 126, 34, 0.95); border: 1.5px solid #e67e22; color: #fff; }

.pos-left {
    top: 50%;
    left: 0px;
    transform: translateY(-50%);
}
.pos-left .badge-val { background-color: rgba(231, 76, 60, 0.95); border: 1.5px solid #e74c3c; color: #fff; }

.perfil-leyenda {
    font-size: 1em;
    font-weight: 700;
    color: #004085;
    margin: 10px auto;
    padding: 10px 12px;
    background-color: #f1f7ff;
    border-left: 5px solid #007bff;
    max-width: 650px;
}

.tarjetas-mosaico-cid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    max-width: 650px;
    margin: 10px auto 0 auto;
}

.tarjeta-cid-mini {
    padding: 8px 12px;
    border-radius: 6px;
    border-left: 5px solid #ccc;
    background-color: #fafafa;
    text-align: left;
}

.tarjeta-cid-mini h5 {
    margin: 0 0 1px 0;
    font-size: 0.9em;
    font-weight: 900;
}

.tarjeta-cid-mini p {
    margin: 0;
    font-size: 0.78em;
    color: #555;
}

.item-cid4 { border-left-color: #2ecc71; background-color: #f4fbf6; }
.item-cid3 { border-left-color: #3498db; background-color: #f4fafebd; }
.item-cid2 { border-left-color: #e67e22; background-color: #fdf7f4; }
.item-cid1 { border-left-color: #e74c3c; background-color: #fdf5f4; }

/* PÁGINA 2: SECCIÓN DE INTERPRETACIÓN DETALLADA */
.interpretacion-caja {
    padding: 10px 5px;
}

.interpretacion-titulo {
    color: #1a1a1a;
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 15px;
    border-bottom: 2px solid #333;
    padding-bottom: 5px;
}

.perfil-destacado-texto {
    color: #0056b3;
    margin: 5px 0 10px 0;
    font-size: 1.15em;
    font-weight: 700;
}

.interpretacion-subseccion h4 {
    margin: 0 0 5px 0;
    font-size: 0.95em;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.interpretacion-subseccion p {
    font-size: 0.95em;
    margin: 0;
}

.separador-reporte {
    border: 0;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* Botones de Control Inferior */
.boton-container-final {
    margin-top: 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn-descargar-pdf { 
    background-color: #e74c3c; 
    color: white; 
    border: none; 
    padding: 12px 35px; 
    font-weight: bold; 
    border-radius: 50px; 
    cursor: pointer; 
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-descargar-pdf:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 15px 0;
    border-top: 1px solid #ddd;
    font-size: 0.9em;
    color: #888;
}

.pdf-pagina-bloque {
    box-sizing: border-box;
    width: 100%;
}

.break-seccion-hoja {
    page-break-before: always !important;
    break-before: page !important;
    margin-top: 0 !important;
    padding-top: 10px !important;
}

.html2pdf__page-break {
    display: none !important;
}

.introduccion-cid, .grafico-seccion-cid, .interpretacion-caja {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
}

@media print {
    .test-navbar {
        display: none !important;
    }
    body {
        background: #fff;
    }
    .pdf-reporte-contenedor {
        border: none;
        padding: 0;
    }
}