/* Estilos del sistema de reconocimiento facial */
.facial-system-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.facial-header {
    background: linear-gradient(135deg, #1565c0, #1976d2);
    color: white;
    padding: 25px 30px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.facial-header h1 {
    margin: 0 0 10px 0;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.facial-header p {
    margin: 5px 0;
    opacity: 0.9;
    font-size: 16px;
}

.facial-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e0e0e0;
}

/* Formularios */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #1976d2;
    box-shadow: 0 0 0 3px rgba(25, 118, 210, 0.1);
}

/* Cámara */
.camera-container {
    margin: 30px 0;
}

.camera-wrapper {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
    border-radius: 12px;
    overflow: hidden;
    border: 3px solid #1976d2;
    background: #000;
}

#facial-video,
#attendance-video {
    width: 100%;
    height: auto;
    display: block;
}

.camera-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

/* Vista previa del rostro */
.face-preview-container {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-top: 20px;
    border: 2px dashed #1976d2;
}

.face-preview-img {
    max-width: 300px;
    width: 100%;
    border-radius: 8px;
    margin: 15px 0;
    border: 2px solid #1976d2;
}

.face-preview-note {
    color: #666;
    font-style: italic;
    margin: 10px 0 0;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #1976d2;
    color: white;
}

.btn-primary:hover {
    background: #1565c0;
}

.btn-success {
    background: #4caf50;
    color: white;
}

.btn-success:hover {
    background: #388e3c;
}

.btn-warning {
    background: #ff9800;
    color: white;
}

.btn-warning:hover {
    background: #f57c00;
}

.btn-danger {
    background: #f44336;
    color: white;
}

.btn-danger:hover {
    background: #d32f2f;
}

.btn-secondary {
    background: #757575;
    color: white;
}

.btn-secondary:hover {
    background: #616161;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
}

/* Resultados */
.result-container {
    margin: 20px 0;
    min-height: 60px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid;
}

.alert-success {
    background: #e8f5e9;
    border-left-color: #4caf50;
    color: #2e7d32;
}

.alert-danger {
    background: #ffebee;
    border-left-color: #f44336;
    color: #c62828;
}

.alert-warning {
    background: #fff3e0;
    border-left-color: #ff9800;
    color: #ef6c00;
}

.alert-info {
    background: #e3f2fd;
    border-left-color: #2196f3;
    color: #1565c0;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-entrada {
    background: #c8e6c9;
    color: #2e7d32;
}

.badge-salida {
    background: #ffe0b2;
    color: #ef6c00;
}

/* Información de persona */
.person-info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    border: 2px solid #1976d2;
}

.person-info-card h3 {
    margin-top: 0;
    color: #1976d2;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.person-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.person-details p {
    margin: 5px 0;
}

.person-details strong {
    color: #333;
    min-width: 120px;
    display: inline-block;
}

.attendance-action {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    justify-content: center;
}

/* Tabla de reportes */
.report-table-container {
    margin-top: 30px;
}

.facial-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.facial-table th,
.facial-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.facial-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #1976d2;
}

.facial-table tbody tr:hover {
    background: #f9f9f9;
}

/* Paginación */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.pagination-info {
    color: #666;
    font-size: 14px;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pagination-controls span {
    font-weight: 600;
    color: #333;
}

/* Filtros */
.filter-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* Spinner */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .facial-system-container {
        padding: 10px;
    }
    
    .facial-header {
        padding: 15px;
        text-align: center;
    }
    
    .facial-header h1 {
        font-size: 1.4rem;
        flex-direction: column;
        gap: 10px;
    }
    
    .facial-card {
        padding: 15px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .camera-wrapper {
        max-width: 100%;
    }
    
    .camera-controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        margin: 5px 0;
    }
    
    .attendance-action {
        flex-direction: column;
    }
    
    .person-details {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .pagination-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}
/* ESTILOS PARA GUIAS DE ENCUADRE FACIAL */
.camera-frame-container {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.face-guide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.face-guide {
    position: relative;
    width: 70%;
    height: 80%;
    max-width: 400px;
    max-height: 500px;
}

.guide-point {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(76, 175, 80, 0.8);
    border-radius: 50%;
    background-color: rgba(76, 175, 80, 0.2);
    animation: pulse 2s infinite;
}

.guide-point.left-eye {
    top: 30%;
    left: 30%;
}

.guide-point.right-eye {
    top: 30%;
    right: 30%;
}

.guide-point.nose {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 152, 0, 0.3);
    border-color: rgba(255, 152, 0, 0.8);
}

.guide-point.mouth {
    top: 65%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(244, 67, 54, 0.3);
    border-color: rgba(244, 67, 54, 0.8);
}

.guide-line {
    position: absolute;
    background-color: rgba(255, 255, 255, 0.3);
}

.guide-line.horizontal {
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
}

.guide-line.vertical {
    left: 50%;
    top: 0;
    width: 1px;
    height: 100%;
}

.face-outline {
    position: absolute;
    top: 10%;
    left: 15%;
    width: 70%;
    height: 80%;
    border: 3px dashed rgba(33, 150, 243, 0.6);
    border-radius: 20px;
    animation: borderPulse 3s infinite;
}

.guide-instructions {
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
    background-color: rgba(0,0,0,0.5);
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
}

.guide-instructions p {
    margin: 5px 0;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes borderPulse {
    0% { border-color: rgba(33, 150, 243, 0.6); }
    50% { border-color: rgba(33, 150, 243, 0.9); }
    100% { border-color: rgba(33, 150, 243, 0.6); }
}