.registros-content {
    padding-top: 30px;
}
.registros-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.section-label {
    display: block;
    color: #a0a3aa;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    margin-bottom: 6px;
}
.registros-header h2 {
    font-size: 21px;
    margin-bottom: 6px;
}
.registros-header p {
    color: #777b85;
    font-size: 12px;
}
.registros-total {
    min-width: 110px;
    padding: 13px 17px;
    background: #ffffff;
    border: 1px solid #e9eaee;
    border-radius: 11px;
    text-align: right;
}
.registros-total span {
    display: block;
    color: #a0a3aa;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}
.registros-total strong {
    font-size: 19px;
}
.filtros-panel {
    background: #ffffff;
    border: 1px solid #e9eaee;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
}
.filtros-form {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.8fr)
        minmax(135px, 1fr)
        minmax(135px, 1fr)
        minmax(135px, 1fr)
        minmax(135px, 1fr)
        auto;
    align-items: end;
    gap: 12px;
}
.filtros-form label {
    display: block;
    color: #777b85;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 7px;
}
.filtros-form input,
.filtros-form select {
    width: 100%;
    height: 40px;
    padding: 0 11px;
    border: 1px solid #e2e4e8;
    border-radius: 8px;
    background: #ffffff;
    color: #17181c;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    outline: none;
    transition: 0.2s ease;
}
.filtros-form input:focus,
.filtros-form select:focus {
    border-color: #b7bbc2;
    box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.04);
}
.input-icon {
    position: relative;
}
.input-icon svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9da1a9;
    pointer-events: none;
}
.input-icon input {
    padding-left: 36px;
}
.btn-filtrar {
    height: 40px;
    border: 0;
    border-radius: 8px;
    background: #111111;
    color: #ffffff;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}
.btn-filtrar:hover {
    background: #292929;
}
.btn-limpiar {
    display: block;
    margin-top: 6px;
    text-align: center;
    color: #777b85;
    font-size: 9px;
    text-decoration: none;
}
.btn-limpiar:hover {
    color: #17181c;
}
.tabla-panel {
    background: #ffffff;
    border: 1px solid #e9eaee;
    border-radius: 14px;
    overflow: hidden;
}
.tabla-header {
    min-height: 76px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eef0f2;
}
.tabla-header h3 {
    font-size: 15px;
}
.tabla-info {
    color: #a0a3aa;
    font-size: 10px;
}
.tabla-info strong {
    color: #555b65;
}
.tabla-contenedor {
    width: 100%;
    overflow-x: auto;
}
.tabla-contenedor table {
    width: 100%;
    min-width: 1050px;
    border-collapse: collapse;
}
.tabla-contenedor th {
    height: 44px;
    padding: 0 17px;
    background: #fafafa;
    color: #9da1a9;
    border-bottom: 1px solid #e9eaee;
    font-size: 10px;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.8px;
    white-space: nowrap;
}
.tabla-contenedor td {
    height: 65px;
    padding: 8px 17px;
    border-bottom: 1px solid #f0f1f3;
    color: #555b65;
    font-size: 12px;
    white-space: nowrap;
}
.tabla-contenedor tbody tr {
    transition: 0.15s ease;
}
.tabla-contenedor tbody tr:hover {
    background: #fafafa;
}
.tabla-contenedor tbody tr:last-child td {
    border-bottom: 0;
}
.persona {
    display: flex;
    align-items: center;
    gap: 10px;
}
.persona-avatar {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f1f2f4;
    color: #333840;
    font-size: 11px;
    font-weight: 700;
}
.persona strong {
    display: block;
    color: #17181c;
    font-size: 13px;
    margin-bottom: 3px;
}
.persona span {
    display: block;
    color: #a0a3aa;
    font-size: 13px;
}
.tipo-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 8px;
    font-weight: 700;
}
.tipo-badge.residente {
    background: #eff6ff;
    color: #2563eb;
}
.tipo-badge.visitante {
    background: #fff7ed;
    color: #ea580c;
}
.tipo-badge.personal {
    background: #f5f3ff;
    color: #7c3aed;
}
.acceso {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 9px;
    font-weight: 600;
}
.acceso span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.acceso.entrada {
    color: #16a34a;
}
.acceso.entrada span {
    background: #16a34a;
}
.acceso.salida {
    color: #dc2626;
}
.acceso.salida span {
    background: #dc2626;
}
.metodo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #555b65;
    font-size: 9px;
    font-weight: 600;
}
.estado {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 8px;
    font-weight: 700;
}
.estado span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.estado.dentro {
    color: #16a34a;
    background: #ecfdf3;
}
.estado.dentro span {
    background: #16a34a;
}
.estado.fuera {
    color: #dc2626;
    background: #fef2f2;
}
.estado.fuera span {
    background: #dc2626;
}
.estado.finalizado {
    color: #6b7280;
    background: #f3f4f6;
}
.estado.finalizado span {
    background: #9ca3af;
}
.sin-registros {
    height: 280px !important;
    text-align: center;
}
.sin-registros > div {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}
.sin-registros-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    border-radius: 12px;
    background: #f5f6f8;
    color: #969ba4;
}
.sin-registros strong {
    display: block;
    color: #555b65;
    font-size: 12px;
    margin-bottom: 5px;
}
.sin-registros p {
    color: #a0a3aa;
    font-size: 10px;
}
.paginacion {
    min-height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 10px 20px;
    border-top: 1px solid #eef0f2;
}
.pagina-btn,
.pagina-numero {
    width: 31px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    text-decoration: none;
    color: #777b85;
    font-size: 10px;
    transition: 0.2s ease;
}
.pagina-numero:hover,
.pagina-btn:hover {
    background: #f1f2f4;
    color: #17181c;
}
.pagina-numero.active {
    background: #111111;
    color: #ffffff;
}
.pagina-btn.disabled {
    pointer-events: none;
    opacity: 0.35;
}
@media (max-width: 1200px) {
    .filtros-form {
        grid-template-columns:
            repeat(3, 1fr);
    }
    .filtro-boton {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    .btn-limpiar {
        margin-top: 0;
        min-width: 60px;
    }
}
@media (max-width: 768px) {
    .registros-header {
        align-items: flex-start;
        flex-direction: column;
    }
    .registros-total {
        width: 100%;
        text-align: left;
    }
    .filtros-form {
        grid-template-columns: 1fr;
    }
    .filtro-boton {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .btn-filtrar {
        width: 100%;
    }
    .btn-limpiar {
        margin-top: 8px;
    }
    .tabla-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
    .tabla-info {
        font-size: 9px;
    }
}
.btn-ver-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 72px;
    padding: 7px 11px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}
.btn-ver-qr svg {
    flex-shrink: 0;
}
.btn-ver-qr:hover {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1e40af;
    transform: translateY(-1px);
}
.btn-ver-qr:active {
    transform: translateY(0);
}
.metodo-manual {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.modal-qr {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    visibility: hidden;
    opacity: 0;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}
.modal-qr.mostrar {
    visibility: visible;
    opacity: 1;
}
.modal-qr-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.modal-qr-contenido {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 430px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    box-shadow:
        0 25px 60px rgba(15, 23, 42, 0.25);
    transform: translateY(20px) scale(0.97);
    transition:
        transform 0.25s ease;
}
.modal-qr.mostrar .modal-qr-contenido {
    transform: translateY(0) scale(1);
}
.modal-qr-cerrar {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 8px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}
.modal-qr-cerrar:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.modal-qr-header {
    text-align: center;
    padding-right: 25px;
    padding-left: 25px;
}
.modal-qr-label {
    display: inline-block;
    margin-bottom: 7px;
    color: #2563eb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.2px;
}
.modal-qr-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 23px;
    font-weight: 750;
}
.modal-qr-header p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
}
.modal-qr-persona {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}
.modal-qr-avatar {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 16px;
    font-weight: 800;
}
.modal-qr-datos {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.modal-qr-datos strong {
    overflow: hidden;
    color: #0f172a;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.modal-qr-datos span {
    color: #64748b;
    font-size: 12px;
}
.qr-imagen-contenedor {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
}
.qr-imagen-contenedor img {
    display: block;
    width: 260px;
    height: 260px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 5px;
}
.qr-codigo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    margin-top: 15px;
    padding: 12px;
    border-radius: 9px;
    background: #f8fafc;
    text-align: center;
}
.qr-codigo span {
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}
.qr-codigo strong {
    max-width: 100%;
    overflow: hidden;
    color: #0f172a;
    font-family: monospace;
    font-size: 13px;
    text-overflow: ellipsis;
    word-break: break-all;
}
.btn-cerrar-qr {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
    padding: 11px 16px;
    border: 1px solid #dbe3ef;
    border-radius: 9px;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease;
}
.btn-cerrar-qr:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
body.modal-qr-abierto {
    overflow: hidden;
}
.profile-menu {
    position: relative;
    display: flex;
    align-items: center;
}
.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    text-align: left;
}
.profile-trigger:hover,
.profile-trigger:focus,
.profile-trigger:active {
    border: 0;
    outline: none;
    background: transparent;
}
.profile-avatar {
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.profile-info {
    min-width: 75px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}
.profile-info strong {
    display: block;
    margin: 0;
    color: #17181c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}
.profile-info span {
    display: block;
    margin: 0;
    color: #8b9099;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
}
.profile-arrow {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 3px;
    color: #777b85;
    transition: transform .2s ease;
}
.profile-arrow svg {
    display: block;
}
.profile-menu.active .profile-arrow {
    transform: rotate(180deg);
}
.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 260px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e7e8ec;
    border-radius: 12px;
    box-shadow: 0 14px 35px rgba(0,0,0,.10);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    z-index: 2000;
}
.profile-menu.active .profile-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.profile-dropdown-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 9px 12px;
}
.dropdown-avatar {
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 50%;
    background: #111111;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}
.dropdown-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}
.profile-dropdown-header > div:last-child {
    min-width: 0;
}
.profile-dropdown-header strong {
    display: block;
    overflow: hidden;
    color: #17181c;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.profile-dropdown-header span {
    display: block;
    margin-top: 3px;
    color: #777b85;
    font-size: 10px;
}
.profile-dropdown-divider {
    width: 100%;
    height: 1px;
    margin: 3px 0;
    background: #e9eaee;
}
.profile-dropdown-item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 7px;
    border-radius: 7px;
    color: #4f535b;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
    box-sizing: border-box;
}
.profile-dropdown-item:hover {
    background: #f4f6f8;
    color: #021b44;
}
.dropdown-icon {
    width: 29px;
    height: 29px;
    flex: 0 0 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #f1f3f5;
    color: #68707a;
}
.dropdown-icon svg {
    display: block;
}
.profile-dropdown-item:hover .dropdown-icon {
    background: #eaf0f7;
    color: #021b44;
}
.profile-dropdown-item.logout-item {
    color: #b42318;
}
.profile-dropdown-item.logout-item:hover {
    background: #fff4f2;
    color: #b42318;
}
.profile-dropdown-item.logout-item .dropdown-icon {
    background: #fff4f2;
    color: #b42318;
}
@media (max-width: 768px) {
    .profile-info,
    .profile-arrow {
        display: none;
    }
    .profile-trigger {
        gap: 0;
    }
    .profile-avatar {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
    .profile-dropdown {
        right: 0;
        width: 245px;
    }
}
@media (max-width: 480px) {
    .profile-dropdown {
        right: -5px;
        width: 235px;
    }
}




/* =========================================
   ENTRADA TEMPRANA: ANTES DE LAS 22:10
========================================= */
.hora-temprana {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 6px;
    background-color: #F0FDF4;
    color: #15803D !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
}

/* =========================================
   ENTRADA TARDÍA: DESDE LAS 22:16
========================================= */
.hora-tardia {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 6px;
    background-color: #FEF2F2;
    color: #B91C1C !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-sizing: border-box;
}

/* =========================================
   ENTRADA DENTRO DEL HORARIO DE TOLERANCIA
========================================= */
.hora-puntual {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #555B65;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}


.salida-vacia {
    display: inline-block;
    width: 30px;
    text-align: center;
    margin: 0;
    padding: 0;
    position: relative;
    left: 0;
    transform: translateX(10px);
}

/* Mover solamente el texto DNI */
.tabla-contenedor th:nth-child(2) {
    text-align: center !important;
    position: relative;
}

.tabla-contenedor th:nth-child(2) {
    text-indent: -105px;
}

/* Mover solamente el texto NOMBRE Y APELLIDOS */
.tabla-contenedor th:nth-child(1) {
    text-align: center !important;
    position: relative;
}

.tabla-contenedor th:nth-child(1) {
    text-indent: -335px;
}

/* LOGO */
.logo {
    width: 100%;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    margin-bottom: 25px;
    flex-shrink: 0;
    overflow: hidden;
}
.logo-image {
    display: block;
    width: 115px;
    height: 115px;
    max-width: 100%;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}