body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
    line-height: 1.6;
}
.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background-color: #2c3e50;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap;
}
.header-content img {
    max-height: 60px;
    transition: transform 0.3s ease;
    margin-right: 10px;
    filter: brightness(0) invert(1);
}
.header-content img:hover {
    transform: scale(1.05);
}
.header-content h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 600;
    flex-grow: 1;
}
.header-right {
    margin-left: auto;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
    max-height: 80vh;
    overflow-y: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 0.9rem;
    border: 1px solid #dee2e6;
    table-layout: fixed; /* Cambia a 'fixed' */
}

thead th {
    background-color: #34495e;
    color: white;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px;
    text-overflow: ellipsis;
    overflow: hidden;
}

th, td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    word-wrap: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
}

table th:nth-child(1),
table td:nth-child(1) {
    width: 5%; /* ID */
}

table th:nth-child(2),
table td:nth-child(2) {
    width: 12%; /* Datos del visitante */
}

table th:nth-child(3),
table td:nth-child(3) {
    width: 8%; /* DNI */
}

table th:nth-child(4),
table td:nth-child(4) {
    width: 10%; /* Funcionario visitado */
}

table th:nth-child(5),
table td:nth-child(5) {
    width: 10%; /* Área Visitada */
}

table th:nth-child(6),
table td:nth-child(6) {
    width: 8%; /* Cargo */
}

table th:nth-child(7),
table td:nth-child(7) {
    width: 10%; /* Lugar de reunión */
}

table th:nth-child(8),
table td:nth-child(8) {
    width: 7%; /* Fecha */
}

table th:nth-child(9),
table td:nth-child(9) {
    width: 7%; /* Hora de entrada */
}

table th:nth-child(10),
table td:nth-child(10) {
    width: 7%; /* Hora de Salida */
}

table th:nth-child(11),
table td:nth-child(11) {
    width: 5%; /* Pase */
}

table th:nth-child(12),
table td:nth-child(12) {
    width: 10%; /* Motivo */
}

tbody tr:hover {
    background-color: #f5f5f5;
    transition: background-color 0.3s ease;
}

tbody tr:nth-of-type(even) {
    background-color: #f8f9fa;
}

tbody tr:last-of-type {
    border-bottom: none;
}

.header {
    padding-right: 0;
    width: 100%;
    box-sizing: border-box;
}

.mensaje-error {
    color: #dc3545;
    font-weight: 600;
    margin-top: 10px;
    padding: 10px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
}

@media (max-width: 768px) {
    .header-content {
        padding: 10px 20px;
        text-align: center;
    }

    .header-content h1 {
        font-size: 1.4rem;
        margin-top: 10px;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 1.2rem;
    }

    .table-responsive {
        padding: 0 5px;
    }

    table {
        font-size: 0.8rem;
    }

    th, td {
        padding: 6px;
    }
}
