.registro-directo-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #1a1f25 0%, #2b323a 100%);
    padding: 1rem;
}

.registro-panel {
    width: 100%;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    aspect-ratio: 16/9;
    border-radius: 15px;
    overflow: hidden;
}

#videoElement {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.face-outline {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.face-outline .circle {
    width: 250px;
    height: 250px;
    border: 4px solid #ffffff50;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.face-outline.detected .circle {
    border-color: #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.5);
}

.info-panel {
    width: 100%;
    text-align: center;
    color: white;
}

.usuario-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease-in-out;
}

.usuario-info img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4CAF50;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.3);
    animation: scaleIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.5);
    }
    to {
        transform: scale(1);
    }
}

.instrucciones {
    padding: 1rem;
}

.mensaje-confirmacion {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 1rem 2rem;
    border-radius: 10px;
    color: white;
    animation: slideUp 0.3s ease;
    max-width: 90%;
    text-align: center;
    z-index: 1000;
}

.mensaje-confirmacion.success {
    background: #4CAF50;
}

.mensaje-confirmacion.error {
    background: #f44336;
}

.mensaje-confirmacion.warning {
    background: #ff9800;
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

/* ===== 24-nov-2026: barra superior (Volver + reloj), estado y marco de cámara ===== */
.registro-directo-container { width: 100%; box-sizing: border-box; }
.registro-panel { gap: 1.1rem; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.rd-barra { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #fff; }
.rd-titulo { font-size: 1.15rem; font-weight: 600; letter-spacing: .02em; opacity: .9; flex: 1; text-align: center; }
.rd-volver, .rd-volver-grande {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    min-height: 48px; padding: .5rem 1.1rem; border-radius: 12px; font-size: 1.05rem; font-weight: 600;
    color: #fff; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.35); cursor: pointer;
    transition: background .2s;
}
.rd-volver:hover, .rd-volver-grande:hover { background: rgba(255,255,255,.26); }
.rd-volver:focus-visible, .rd-volver-grande:focus-visible { outline: 3px solid #ffd54f; outline-offset: 2px; }
.rd-volver-grande { width: 100%; max-width: 420px; min-height: 56px; font-size: 1.15rem; }
.rd-reloj { text-align: right; line-height: 1.1; min-width: 150px; }
.rd-hora { font-size: 2.2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rd-fecha { font-size: .85rem; opacity: .8; text-transform: capitalize; }
.rd-estado {
    display: inline-flex; align-items: center; gap: .6rem; padding: .6rem 1.4rem; border-radius: 999px;
    font-size: 1.15rem; font-weight: 600; color: #fff; background: #37474f; border: 1px solid rgba(255,255,255,.25);
    transition: background .25s;
}
.rd-estado.buscando { background: #455a64; }
.rd-estado.detectado { background: #1565c0; }
.rd-estado.ok { background: #2e7d32; }
.rd-estado.error { background: #c62828; }
.camera-container { border: 3px solid rgba(255,255,255,.35); box-shadow: 0 10px 30px rgba(0,0,0,.4); background: #000; }
.rd-esquinas i { position: absolute; width: 36px; height: 36px; border: 4px solid #fff; opacity: .85; pointer-events: none; }
.rd-esquinas i:nth-child(1) { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-top-left-radius: 10px; }
.rd-esquinas i:nth-child(2) { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-top-right-radius: 10px; }
.rd-esquinas i:nth-child(3) { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-bottom-left-radius: 10px; }
.rd-esquinas i:nth-child(4) { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-bottom-right-radius: 10px; }
.rd-resultado { font-size: 1.5rem; font-weight: 700; padding: .35rem 1.2rem; border-radius: 999px; color: #fff; }
.rd-resultado.entrada { background: #2e7d32; }
.rd-resultado.salida { background: #ef6c00; }
.mensaje-confirmacion h3 { margin: 0; font-size: 1.25rem; }
@media (max-width: 600px) {
    .registro-panel { width: 100%; padding: 1rem; border-radius: 14px; }
    .rd-barra { flex-wrap: wrap; }
    .rd-titulo { order: 3; flex-basis: 100%; font-size: 1rem; }
    .rd-hora { font-size: 1.6rem; }
    .rd-volver span { display: inline; }
    .face-outline .circle { width: 150px; height: 150px; }
    .camera-container { aspect-ratio: 4/3; }
    .usuario-info img { width: 100px; height: 100px; }
}
.mensaje-confirmacion { max-height: 40vh; overflow-y: auto; font-size: 1rem; }
.mensaje-confirmacion { overflow-wrap: anywhere; box-sizing: border-box; width: max-content; }
@media (max-width: 600px) { .mensaje-confirmacion { width: calc(100% - 1.5rem); bottom: 4.5rem; padding: .75rem 1rem; } }
