/**
 * Estilos Principales - Sistema de Credencialización
 */

:root {
    --navy-primary: #1e3a8a;
    --navy-dark: #0f172a;
    --navy-light: #eff6ff;
    --gold-accent: #f59e0b;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: #f8fafc;
    min-height: 100vh;
}

/* Navbar */
.bg-navy {
    background-color: var(--navy-dark) !important;
}

.bg-navy-light {
    background-color: var(--navy-light) !important;
}

.navbar-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.brand-title {
    font-size: 1.05rem;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.brand-subtitle {
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    font-weight: 700;
}

/* Pantalla de Login */
.login-body {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #0284c7 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-wrapper {
    width: 100%;
    max-width: 480px;
}

.login-card {
    border-radius: 20px;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: white;
    padding: 35px 25px 25px 25px;
    border-bottom: 3px solid var(--gold-accent);
}

.login-logo {
    width: 80px;
    height: 80px;
    background: #ffffff;
    border-radius: 50%;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.title-text {
    font-size: 1.25rem;
    letter-spacing: -0.3px;
}

.subtitle-text {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.btn-login {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    padding: 12px;
}

.btn-login:hover {
    background: linear-gradient(135deg, #172554 0%, #1d4ed8 100%);
}

/* Tarjetas de Métricas */
.stat-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.06) !important;
}

.stat-icon {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Barra de Filtros */
.filter-bar {
    background-color: #ffffff;
}

/* Acordeón / Tarjetas de Grupos */
.group-card {
    border: 1px solid #e2e8f0 !important;
}

.group-header {
    border-bottom: 1px solid #e2e8f0;
}

.group-title {
    font-size: 1.2rem;
    letter-spacing: -0.3px;
}

.group-badge-icon {
    box-shadow: 0 2px 6px rgba(30, 58, 138, 0.25);
}

/* Tabla de Alumnos */
.student-table th {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.student-table td {
    padding-top: 10px;
    padding-bottom: 10px;
}

.student-name {
    font-size: 0.95rem;
}

.curp-badge {
    font-size: 0.75rem;
    font-family: monospace;
}

/* Celda y Miniatura de Foto */
.avatar-cell {
    width: 48px;
    height: 60px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.student-thumb {
    width: 48px;
    height: 60px;
    object-fit: cover;
    display: block;
    transition: transform 0.2s ease;
}

.avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.avatar-cell:hover .avatar-overlay {
    opacity: 1;
}

.avatar-cell:hover .student-thumb {
    transform: scale(1.05);
}

/* Vista previa de foto en Modal */
.photo-preview-wrapper {
    width: 140px;
    height: 175px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px dashed #94a3b8;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
    border-radius: 10px;
}

/* Sombras suaves */
.shadow-xs {
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* Visor de Cámara Web en Vivo */
.webcam-viewport {
    width: 100%;
    max-width: 380px;
    height: 320px;
    background-color: #020617;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.webcam-viewport video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* Efecto espejo natural para cámara frontal */
}

/* Guía de encuadre facial ovalada */
.camera-face-guide {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.guide-oval {
    width: 170px;
    height: 220px;
    border: 2px dashed rgba(255, 255, 255, 0.75);
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.35);
}

.guide-label {
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.75);
    color: #f8fafc;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

