@charset "utf-8";
/* CSS Document */

/* --- Estilos Generales de Modernización --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-image: url("../imagenes/fondo_interiores.jpg");
    background-size: cover;
    background-attachment: fixed;
    margin: 0;
    padding: 20px;
    color: #333;
}

a:link, a:visited, a:hover, a:active {
    text-decoration: none;
    color: inherit;
}

center form {
    margin: 20px 0;
}

/* Buscador Principal*/
.search-box {
    margin: 20px auto;
    text-align: center;
}
.search-box input[name="buscar"] {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    width: 300px;
    max-width: 100%;
}

.search-box input[type="submit"] {
    background-color: #001AB3;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.search-box input[type="submit"]:hover {
    background-color: #001170;
}

/* Estructura del Formulario Principal */
.form-container {
    max-width: 1100px;
    margin: 0 auto;
	margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.96);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.main-title {
    text-align: center;
    color: #fff;
    margin-bottom: 25px;
    font-weight: 600;
}

/* Cabecera del Reporte */
.ficha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #001AB3;
    color: white;
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 25px;
}

.ficha-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.btn-print {
    background-color: #ffffff;
    color: #001AB3;
    border: none;
    padding: 8px 16px;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-print:hover {
    background-color: #e6e6e6;
}

.btn-sistema {
    padding: 10px 25px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 4px;
    color: white !important;
    display: inline-block;
    transition: opacity 0.2s;
}

.btn-sistema:hover {
    opacity: 0.9;
}

.btn-editar { background-color: #001AB3; }
.btn-eliminar { background-color: #BE0003 }
.btn-regresar { background-color: #555; }

/* Títulos de Sección */
.section-title {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #001AB3;
    border-bottom: 2px solid #001AB3;
    padding-bottom: 6px;    
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Estructura en Columnas (CSS Grid) */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px 30px; 
	margin-bottom: 20px;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px 20px;
	margin-bottom: 20px;
}

.grid-4-col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
	margin-bottom: 20px;
}

/* Sub-bloques internos */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
	
}

.form-group-row {
    display: flex;
    align-items: center;
    gap: 10px;
	margin-bottom: 5px;
}

.form-group-row label {
    min-width: 140px;
	flex: 1;
}

/* Elementos de Formulario Estilizados de Solo Lectura */
label {
    font-size: 13.5px;
    font-weight: 600;
    color: #444;
}

/* Entradas de texto, selectores y textareas globales */
input[type="text"], input[type="date"], select, textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: inherit;
    font-size: 13.5px;
    box-sizing: border-box;
}

input[type="text"]:focus, input[type="date"]:focus, select:focus, textarea:focus {
    border-color: #001AB3;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 26, 179, 0.2);
}

textarea {
    resize: vertical;
	height: 120px;
	margin-top: 10px;
}

/* Bloques Especiales Combinados (ej. Varicela + Fecha) */
.inline-disease-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.inline-disease-group label {
    width: 130px;
    flex-shrink: 0;
}
.inline-disease-group input[placeholder="Si/No"] {
    width: 70px;
	text-align: center;
    flex-shrink: 0;
}

/* Ajustes de Subsecciones Estilo Grid */
.sub-panel {
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 6px;
    background: #fbfbfb;
}
.sub-panel-title {
    font-size: 14px;
    font-weight: bold;
    color: #670000;
    margin-top: 0;
    margin-bottom: 12px;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 4px;
}
/* Sección de Confirmación e Inferior */

.footer-message {
    color: #053C41; 
    font-size: 18px; 
    text-align: center;
    margin-top: 30px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Contenedor de acciones finales */
.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
	align-items: center;
    margin-bottom: 40px;
}

/*==========================
 ENCABEZADO CONSULTA
===========================*/
.encabezado-consulta{
    width:100%;
    text-align:center;
    margin:25px auto;
}

.form-busqueda{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
}

.campo-busqueda{
    width:350px;
    max-width:90%;
    padding:10px 15px;
    font-size:16px;
    border:1px solid #CCC;
    border-radius:6px;
}

.btn-buscar{
    padding:10px 25px;
    font-size:16px;
    border:none;
    border-radius:6px;
    background:#0B6E77;
    color:#FFF;
    cursor:pointer;
}

.btn-buscar:hover{
    background:#084F56;
}

.titulo-consulta{
    color:#FFF;
    margin-top:25px;
    font-size:28px;
    font-weight:bold;
}

/* Mensaje de Error Al No Encontrar Ficha en Buscar*/
.error-container {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    padding: 25px;
    border-radius: 6px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.mensaje-formulario {
    color: #670000;
    font-weight: bold;
    margin-top: 15px;
}

@media (max-width:768px){
    .form-busqueda{
        flex-direction:column;
    }

    .campo-busqueda{
        width:100%;
    }

    .btn-buscar{
        width:100%;
    }

    .titulo-consulta{

        font-size:22px;
    }
}
/* FIN DE ENCABEZADO CONSULTA */


/* --- Media Queries para Adaptación Móvil Total --- */
@media (max-width: 900px) {
    .grid-3-col {
        grid-template-columns: 1fr;
     gap: 15px;
    }

    }

@media (max-width: 768px) {
    body {padding: 10px; }
    .form-container { padding: 15px; }
    .grid-2-col, .grid-3-col, .grid-4-col { grid-template-columns: 1fr; gap: 15px; }
    .form-group-row { flex-direction: column; align-items: flex-start; }
    .inline-disease-group { flex-wrap: wrap; }
    .inline-disease-group label { width: 100%; }
    .inline-disease-group input[placeholder="Si/No"] { width: 100%; }
}