

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #121824;
    color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    /*min-height: 100vh;*/
    padding: 10px;
}

.reloj-container {
    background-color: #1a2332;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 95%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
	top: 0;
}

/* Header Reloj */
.reloj-header {
    text-align: center;
    border-bottom: 2px solid #2a364f;
    padding-bottom: 10px;
}

.fecha-display {
    font-size: 1.2rem;
    color: #94a3b8;
    text-transform: capitalize;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.reloj-display {
    font-size: 4rem;
    font-weight: 700;
    color: #38bdf8;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
    font-family: 'Courier New', Courier, monospace;
}

/* Sección principal de entrada */
.main-section {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.keypad-section {
    flex: 1;
    min-width: 280px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.pass-input {
    width: 100%;
    padding: 14px;
    font-size: 1.8rem;
    text-align: center;
    letter-spacing: 4px;
    background-color: #0f172a;
    border: 2px solid #334155;
    border-radius: 8px;
    color: #f8fafc;
    outline: none;
    transition: border-color 0.2s;
}

.pass-input:focus {
    border-color: #38bdf8;
}

/* Teclado numérico */
.teclado-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

.btn-key {
    background-color: #243044;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    font-weight: bold;
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    user-select: none;
}

.btn-key:hover {
    background-color: #334155;
}

.btn-key:active {
    transform: scale(0.96);
    background-color: #475569;
}

.btn-enter {
    grid-column: span 2;
    background-color: #0284c7;
}

.btn-enter:hover {
    background-color: #0369a1;
}

.btn-clear {
    background-color: #e11d48;
}

.btn-clear:hover {
    background-color: #be123c;
}

/* Panel de Información del Empleado */
.info-section {
    flex: 1;
    min-width: 280px;
    background-color: #0f172a;
    border-radius: 12px;
    border: 1px solid #1e293b;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

.placeholder-info {
    color: #64748b;
    font-size: 1.1rem;
    text-align: center;
}

.emp-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

.emp-foto {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #38bdf8;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.emp-nombre {
    font-size: 1.4rem;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 5px;
}

.emp-detalle {
    font-size: 0.95rem;
    color: #94a3b8;
    margin-bottom: 10px;
}

.checada-exito {
    background-color: #065f46;
    color: #34d399;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Reporte del día */
.reporte-container {
    background-color: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 10px;
    padding: 15px;
}

.reporte-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.reporte-titulo {
    font-size: 1.1rem;
    color: #38bdf8;
}

.esc-hint {
    font-size: 0.85rem;
    background-color: #334155;
    padding: 4px 8px;
    border-radius: 4px;
    color: #cbd5e1;
}

.tabla-wrapper {
    max-height: 180px;
    overflow-y: auto;
}

.tabla-reporte {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.tabla-reporte th, .tabla-reporte td {
    padding: 10px;
    border-bottom: 1px solid #1e293b;
}

.tabla-reporte th {
    background-color: #1a2332;
    color: #94a3b8;
    position: sticky;
    top: 0;
}

.tabla-reporte tr:hover {
    background-color: #162032;
}

.mensaje-error {
    background-color: #7f1d1d;
    color: #fca5a5;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

.oculto {
    display: none !important;
}

/* Estilos para el visor de la cámara en el checador */
.camera-preview-container {
    margin-bottom: 15px;
    width: 100%;
    max-width: 220px;
    height: 165px;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #3498db;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

#videoCamara {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Efecto espejo natural para la cámara frontal */
}


/* Contenedor principal que ajusta el video y la animación */
.contenedor-camara {
    position: relative;
    width: 100%;
    max-width: 350px; /* Ajusta al ancho de tu diseño */
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.contenedor-camara video {
    width: 100%;
    height: auto;
    display: block;
    /* Opcional: efecto espejo para que el usuario se vea natural */
    transform: scaleX(-1); 
}

/* Capa transparente encima del video (no bloquea clics) */
.overlay-escaner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* Sombra interna sutil para resaltar el centro */
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
}

/* Recuadro guía donde debe ir el rostro */
.marco-facial {
    position: relative;
    width: 65%;
    height: 75%;
    /* Retícula futurista muy tenue */
    background-image: 
        linear-gradient(rgba(0, 255, 102, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 102, 0.08) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Estilo de las 4 esquinas verde neón */
.esquina {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: #00ff66;
    border-style: solid;
    filter: drop-shadow(0 0 6px #00ff66);
    animation: pulsoEsquinas 2s infinite alternate;
}

.sup-izq { top: 0; left: 0; border-width: 3px 0 0 3px; border-top-left-radius: 6px; }
.sup-der { top: 0; right: 0; border-width: 3px 3px 0 0; border-top-right-radius: 6px; }
.inf-izq { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-bottom-left-radius: 6px; }
.inf-der { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-bottom-right-radius: 6px; }

/* Línea láser animada */
.linea-escaneo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00ff66, #ffffff, #00ff66, transparent);
    box-shadow: 0 0 12px 2px #00ff66;
    animation: escanear 2.4s ease-in-out infinite;
}

/* Etiqueta inferior estilo biométrico */
.texto-estado {
    margin-top: 12px;
    font-family: monospace;
    font-size: 11px;
    letter-spacing: 2px;
    color: #00ff66;
    background: rgba(0, 20, 10, 0.75);
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(0, 255, 102, 0.4);
    text-shadow: 0 0 5px #00ff66;
}

/* Animación de subida y bajada del láser */
@keyframes escanear {
    0% {
        top: 2%;
        opacity: 0.3;
    }
    50% {
        top: 96%;
        opacity: 1;
    }
    100% {
        top: 2%;
        opacity: 0.3;
    }
}

/* Animación sutil de brillo en las esquinas */
@keyframes pulsoEsquinas {
    from { opacity: 0.6; }
    to { opacity: 1; }
}