* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background-color: #f2f2f2;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    align-items: center;
    max-width: 1200px;
    width: 100%;
}

.header-logo {
    height: 50px;
    margin-right: 20px;
}

.header-title {
    font-size: 24px;
    font-weight: bold;
   /* color: #000;*/
}

.main-container {
    max-width: 100%;
    padding: 10px 20px;
    margin: 10px auto;
    flex: 1;
}

.filtros-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.filtros-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filtros-group {
    display: flex;
    flex-direction: column;
    min-width: 120px;
    flex: 1;
}

.filtros-group label {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
}

.filtros-group input, 
.filtros-group select {
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
}

.filtros-group button {
    padding: 8px 12px;
    background-color: #d9534f;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.table-container {
    overflow-x: auto;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    table-layout: fixed;
}

thead {
    position: sticky;
    /*top: 80px; /* Ajustado para que quede debajo del filtro */*/
    z-index: 10;
}

th, td {
    padding: 6px 8px;
    border: 1px solid #ddd;
    text-align: left;
    vertical-align: top;
}

th {
    background-color: #d9534f;
    color: white;
    position: sticky;
    top: 80px; /* Ajustado para que quede debajo del filtro */
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Anchos específicos para columnas */
.num-col { width: 40px; }
.fecha-col { width: 80px; }
.paciente-col { width: 120px; }
.cedula-col { width: 80px; }
.edad-col { width: 50px; }
.sexo-col { width: 50px; }
.diagnostico-col { width: 100px; }
.ubicacion-col { width: 80px; }
.abo-col { width: 50px; }
.rh-col { width: 50px; }
.componente-col { width: 100px; }
.medico-col { width: 100px; }
.ubicacion-extra-col { width: 80px; }
.piso-col { width: 50px; }
.cama-col { width: 50px; }
.diagnostico-extra-col { width: 100px; }
.abo-extra-col { width: 50px; }
.rh-extra-col { width: 50px; }
.unidad-col { width: 80px; }
.componente-extra-col { width: 100px; }
.serologia-neg-col { width: 50px; }
.serologia-proc-col { width: 50px; }
.serologia-abo-col { width: 50px; }
.serologia-rh-col { width: 50px; }
.serologia-entregado-col { width: 100px; }
.serologia-fecha-col { width: 80px; }
.serologia-hora-col { width: 80px; }
.serologia-recibe-col { width: 100px; }
.observacion-col { width: 150px; }
.registro-col { width: 80px; }

/* Estilos para el enlace Ver BOLETA */
.ver-boleta {
    font-size: 10px;
    color: #d9534f;
    text-decoration: none;
    margin-left: 3px;
    white-space: nowrap;
}

.ver-boleta:hover {
    text-decoration: underline;
}

/* Footer styles */
.footer-full {
    background-color: #333;
    color: white;
    padding: 15px 0;
    width: 100%;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn-footer {
    padding: 8px 15px;
    background-color: #d9534f;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-footer:hover {
    background-color: #c9302c;
}

/* Estilos para sumatorias */
.sumatorias {
    background-color: #fff;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sumatorias h3 {
    margin-bottom: 15px;
    color: #d9534f;
    text-align: center;
}

.sumatorias-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: space-between;
}

.sumatorias-table {
    flex: 1;
    min-width: 250px;
    background-color: #f9f9f9;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.sumatorias-table h4 {
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.sumatorias-table table {
    width: 100%;
    font-size: 12px;
}

.sumatorias-table th {
    background-color: #5bc0de;
}

/* Estilos para pantallas pequeñas */
@media screen and (max-width: 768px) {
    .filtros-form {
        flex-direction: column;
    }
    
    .filtros-group {
        width: 100%;
    }
    
    .table-container {
        font-size: 11px;
    }
    
    th, td {
        padding: 4px 6px;
    }
    
    .footer-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-footer {
        width: 100%;
        text-align: center;
        margin-bottom: 5px;
    }
    
    .sumatorias-container {
        flex-direction: column;
    }
    
    .sumatorias-table {
        min-width: 100%;
    }
    
    /* Reducir aún más algunas columnas en móviles */
    .diagnostico-col, .diagnostico-extra-col { width: 80px; }
    .ubicacion-col, .ubicacion-extra-col { width: 60px; }
    .observacion-col { width: 120px; }
}

@media screen and (max-width: 480px) {
    .header-title {
        font-size: 18px;
    }
    
    .header-logo {
        height: 40px;
    }
    
    /* Ocultar algunas columnas menos importantes en móviles muy pequeños */
    .serologia-neg-col,
    .serologia-proc-col,
    .serologia-abo-col,
    .serologia-rh-col,
    .serologia-hora-col,
    .piso-col,
    .cama-col {
        display: none;
    }
    
    .filtros-container {
        position: static;
    }
    
    thead, th {
        top: 0;
    }
}