/* --- Estilos para el Modal de Login --- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.login-box {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}
.login-box h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #0056b3;
}
.login-error-message {
    color: #D8000C;
    margin-top: 15px;
    font-weight: bold;
}

/* --- Estilos Generales y Fondo (El fondo sigue aquí) --- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px 10px;
    background-color: #f4f4f4;
    color: #333;
    background-image: url('fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

header { text-align: center; margin-bottom: 25px; border-bottom: 2px solid #007bff; padding-bottom: 15px; }
header h1 { color: #0056b3; margin: 0; }

/* --- Estilos del Formulario --- */
.form-section { background-color: #ffffff; padding: 20px; margin-bottom: 20px; border-radius: 8px; border: 1px solid #ddd; }
.form-section h2 { color: #007bff; margin-top: 0; margin-bottom: 15px; font-size: 1.4em; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 15px; }
@media (min-width: 600px) { .form-grid { grid-template-columns: repeat(2, 1fr); } }
.form-group { display: flex; flex-direction: column; text-align: left; }
.form-group label { margin-bottom: 5px; font-weight: bold; color: #555; }
.form-group input, .form-group select { padding: 10px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; width: 100%; box-sizing: border-box; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #007bff; box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); }

/* --- Botones --- */
.action-buttons { display: flex; gap: 15px; justify-content: center; }
.cta-button, .secondary-button {
    flex-grow: 1;
    max-width: 250px;
    padding: 15px;
    font-size: 1.2em;
    font-weight: bold;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}
.cta-button { background-color: #007bff; }
.cta-button:hover { background-color: #0056b3; }
.secondary-button { background-color: #28a745; }
.secondary-button:hover:not(:disabled) { background-color: #218838; }
.secondary-button:disabled { background-color: #ccc; cursor: not-allowed; }

/* --- Sección del Reporte --- */
.reporte-section { margin-top: 20px; padding: 25px; background-color: #fff; border-radius: 8px; border: 1px solid #ddd; animation: fadeIn 0.5s ease-in-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.reporte-section h2 { color: #0056b3; text-align: center; margin-bottom: 20px; }
.reporte-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.report-card { background-color: #f9f9f9; padding: 15px; border-radius: 8px; border-left: 5px solid #007bff; }
.report-card h3 { margin: 0 0 10px 0; color: #007bff; }
.report-card p { margin: 5px 0 0 0; font-size: 1.1em; }
.report-card span { font-weight: normal; color: #333; }
#datos-resumen ul { list-style: none; padding: 0; column-count: 2; column-gap: 20px; }
#datos-resumen li { margin-bottom: 10px; font-size: 1em; }
#datos-resumen li strong { color: #333; }

.hidden { display: none; }

.plan-link-button {
    display: block;
    width: fit-content;
    margin: 20px auto 0 auto;
    padding: 12px 25px;
    background-color: #ffc107;
    color: #333;
    font-weight: bold;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-align: center;
}
.plan-link-button:hover {
    background-color: #e0a800;
    transform: scale(1.05);
}

/* NUEVO: Estilo para la imagen de IMC */
.imc-chart-image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 25px auto 15px auto; /* Márgenes para centrar y espaciar */
    border-radius: 8px;
}

@media print {
    /* Ocultar botón e imagen en el PDF */
    .plan-link-button, .imc-chart-image { display: none; }
}