/* ============================================================
   ESTILOS GENERALES
   ============================================================ */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #ffffff;
    margin: 0;
    padding: 0;
    color: #222;
}

.report-container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

/* ============================================================
   BARRA SUPERIOR
   ============================================================ */
.barra-superior {
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #dc3545, #000);
    margin-bottom: 25px;
    border-radius: 3px;
}

/* ============================================================
   ENCABEZADO PRINCIPAL
   ============================================================ */
.encabezado-principal {
    padding: 25px 20px;
    margin-bottom: 30px;
    background: #0d0d0d;
    border-radius: 10px;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 0 10px rgba(0,0,0,0.35);
}

.logos-encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.logo-encabezado {
    height: 70px;
    object-fit: contain;
}

.titulo-encabezado {
    font-size: 32px;
    font-weight: 800;
    color: #ff2e2e;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ============================================================
   SECCIONES
   ============================================================ */
.seccion {
    margin-top: 25px;
    padding: 15px 20px;
    border: 1px solid #dddddd;
    border-radius: 6px;
    background: #fafafa;
}

.seccion-titulo {
    font-size: 20px;
    font-weight: bold;
    color: #cc0000;
    margin-bottom: 10px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 5px;
}

/* ============================================================
   COLUMNAS
   ============================================================ */
.fila-dos-columnas {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.columna {
    flex: 1;
    min-width: 220px;
}

.item-label {
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.icono-rojo {
    color: #ff2e2e;
}

.item-valor {
    font-size: 18px;
    font-weight: 700;
    padding-left: 5px;
    margin-bottom: 12px;
}

/* ============================================================
   GRÁFICA — FIX PARA HTML2CANVAS
   ============================================================ */
.grafica-contenedor {
    width: 100%;
    max-width: 600px;
    margin: 30px auto;
}

/* ============================================================
   TABLAS DE PROTOCOLOS
   ============================================================ */
.tabla-protocolos {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.tabla-protocolos th,
.tabla-protocolos td {
    border: 1px solid #dddddd;
    padding: 8px 10px;
    vertical-align: top;
}

.tabla-protocolos th {
    background-color: #f5f5f5;
    color: #333;
    text-align: left;
}

.titulo-dieta {
    background: #f8f9fa;
    padding: 14px 18px;
    border-left: 6px solid #dc3545;
    margin-top: 25px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.divisor-dieta {
    border: none;
    border-top: 2px solid #eee;
    margin: 30px 0;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    margin-top: 30px;
    font-size: 14px;
    color: #555;
    text-align: right;
    border-top: 1px solid #eeeeee;
    padding-top: 10px;
}

.mensaje-destacado {
    margin-top: 25px;
    padding: 15px 20px;
    background: #fff7e6;
    border-left: 4px solid #050505;
    font-size: 18px;
    color: #cc6600;
    font-weight: 600;
    text-align: center;
    border-radius: 6px;
}

.mensaje-destacado-interno {
    margin-top: 25px;
    padding: 15px;
    background: #fff3f3;
    border-left: 4px solid #ff2e2e;
    font-size: 18px;
    font-weight: 600;
    color: #b30000;
    border-radius: 6px;
}

.footer-sc {
    margin-top: 40px;
    padding: 20px 10px;
    text-align: center;
    font-size: 14px;
    color: #555;
    border-top: 2px solid #eee;
}

/* ============================================================
   BOTONES
   ============================================================ */
.btn-descargar {
    background-color: #000;
    color: #ff1a1a;
    border: 2px solid #ff1a1a;
    padding: 12px 25px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
    text-align: center;
    transition: 0.25s ease;
}

.btn-descargar:hover {
    background-color: #ff1a1a;
    color: #000;
    box-shadow: 0 0 12px #ff1a1a;
    transform: scale(1.05);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .titulo-encabezado {
        font-size: 26px;
    }

    .logo-encabezado {
        height: 55px;
    }
}

@media (max-width: 480px) {
    .titulo-encabezado {
        font-size: 22px;
    }

    .item-valor {
        font-size: 16px;
    }
}

/* ============================================================
   IMPRESIÓN — FIX PARA FIREFOX Y HTML2CANVAS
   ============================================================ */
@media print {

    html, body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .report-container {
        max-width: 100% !important;
        padding: 10mm !important;
    }

    #reporteCompleto {
        width: 100% !important;
    }

    img, canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    button, .btn-descargar {
        display: none !important;
    }

    body {
        -moz-transform: none !important;
        transform: none !important;
    }
}