/* ==========================================================================
   CUSTOM ASISTENCIA STYLES - Sistema de Control de Asistencia
   Estilos personalizados para la vista pública de registro de asistencia
   Diseño con glassmorphism y gradientes
   ========================================================================== */

/* ==========================================================================
   FONDO ANIMADO CON GRADIENTE
   ========================================================================== */

body {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	padding-bottom: 70px; /* Espacio para el footer fijo */
}

body::before {
	content: '';
	position: fixed;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: 
		radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px),
		radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
	background-size: 50px 50px;
	background-position: 0 0, 25px 25px;
	animation: moveBackground 20s linear infinite;
	pointer-events: none;
}

@keyframes moveBackground {
	0% { transform: translate(0, 0); }
	100% { transform: translate(50px, 50px); }
}

/* ==========================================================================
   LAYOUT Y CONTENEDOR
   ========================================================================== */

.asistencia-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	position: relative;
	z-index: 1;
}

/* Layout de dos columnas */
.layout-wrapper {
	display: grid;
	grid-template-columns: 400px 1fr;
	gap: 30px;
	align-items: start;
}

/* ==========================================================================
   SECCIÓN DEL RELOJ (COLUMNA IZQUIERDA)
   ========================================================================== */

/* Sección del reloj sticky */
.clock-section {
	position: sticky;
	top: 20px;
}

/* Card del reloj más alto */
.clock-section .card {
	min-height: 300px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Reloj moderno con estilo glassmorphism */
.clock-section .card {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	box-shadow: 
		0 8px 32px rgba(31, 38, 135, 0.15),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
	border-radius: 24px;
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.clock-section .card:hover {
	transform: translateY(-5px);
	box-shadow: 
		0 12px 40px rgba(31, 38, 135, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.clock-section .card .card-body {
	padding: 2rem 1.5rem !important;
}

/* Logo con animación */
.clock-section img {
	animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
	0%, 100% { transform: scale(1); opacity: 1; }
	50% { transform: scale(1.05); opacity: 0.9; }
}

/* ==========================================================================
   RELOJ DIGITAL
   ========================================================================== */

#clock {
	font-size: clamp(3rem, 8vw, 4rem) !important;
	font-weight: 900 !important;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	-webkit-background-clip: text !important;
	-webkit-text-fill-color: transparent !important;
	background-clip: text !important;
	letter-spacing: 0.08em;
	font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
	filter: drop-shadow(0 4px 20px rgba(102, 126, 234, 0.4));
	line-height: 1.1;
	margin: 1rem 0;
	font-variant-numeric: tabular-nums;
}

#date {
	font-size: clamp(0.875rem, 2.2vw, 1.05rem) !important;
	color: #6c757d !important;
	font-weight: 600 !important;
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 1rem;
}

/* ==========================================================================
   LINK QR - Soporte para múltiples dispositivos
   ========================================================================== */

.qr-access-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 20px;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	border: 2px solid rgba(102, 126, 234, 0.3);
	border-radius: 12px;
	color: #667eea;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: all 0.3s ease;
	width: 100%;
	text-align: left;
}

.qr-access-link:hover {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-color: #667eea;
	transform: translateX(5px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	color: white;
	text-decoration: none;
}

.qr-access-link i {
	font-size: 1.2rem;
	flex-shrink: 0;
}

.qr-access-link span {
	flex: 1;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Contenedor de múltiples kiosks */
.d-flex.flex-column.gap-2 {
	max-height: 300px;
	overflow-y: auto;
	padding-right: 5px;
}

/* Scrollbar personalizado */
.d-flex.flex-column.gap-2::-webkit-scrollbar {
	width: 6px;
}

.d-flex.flex-column.gap-2::-webkit-scrollbar-track {
	background: rgba(102, 126, 234, 0.05);
	border-radius: 10px;
}

.d-flex.flex-column.gap-2::-webkit-scrollbar-thumb {
	background: rgba(102, 126, 234, 0.3);
	border-radius: 10px;
}

.d-flex.flex-column.gap-2::-webkit-scrollbar-thumb:hover {
	background: rgba(102, 126, 234, 0.5);
}

/* ==========================================================================
   CARD PRINCIPAL GLASSMORPHISM
   ========================================================================== */

.card.shadow-lg {
	background: rgba(255, 255, 255, 0.95) !important;
	backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.3) !important;
	box-shadow: 0 8px 32px rgba(31, 38, 135, 0.15) !important;
	border-radius: 24px;
	transition: all 0.3s ease;
}

.card.shadow-lg:hover {
	box-shadow: 0 12px 40px rgba(31, 38, 135, 0.25) !important;
}

/* ==========================================================================
   CARD HEADER CON GRADIENTE
   ========================================================================== */

.card-header.bg-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	border: none !important;
	padding: 1.75rem 1.5rem !important;
	position: relative;
	overflow: hidden;
	border-radius: 24px 24px 0 0 !important;
}

.card-header.bg-primary::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(circle at center, rgba(255,255,255,0.15) 0%, transparent 70%);
	animation: rotateGlow 10s linear infinite;
}

@keyframes rotateGlow {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.card-header h4 {
	position: relative;
	z-index: 1;
	font-size: 1.35rem;
	font-weight: 700;
}

/* ==========================================================================
   TABS MODERNOS
   ========================================================================== */

.nav-tabs-highlight {
	border: none !important;
	border-bottom: none !important;
	background: #f8f9fa;
	border-radius: 16px;
	padding: 6px;
	gap: 8px;
	margin-bottom: 2rem !important;
}

.nav-tabs-highlight .nav-link {
	border: none !important;
	border-bottom: none !important;
	border-top: none !important;
	border-left: none !important;
	border-right: none !important;
	border-radius: 12px;
	color: #6c757d;
	font-weight: 600;
	transition: all 0.3s ease;
	padding: 16px 24px;
	font-size: 1.05rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nav-tabs-highlight .nav-link i {
	font-size: 1.25rem;
}

.nav-tabs-highlight .nav-link:hover {
	background: rgba(102, 126, 234, 0.1);
	color: #667eea;
	transform: translateY(-1px);
	border: none !important;
}

.nav-tabs-highlight .nav-link.active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: white !important;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
	transform: translateY(-2px);
	border: none !important;
}

.nav-tabs-highlight .nav-link:focus,
.nav-tabs-highlight .nav-link:active {
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

/* Eliminar el :before que agrega la línea azul */
.nav-tabs-highlight .nav-link.active:before,
.nav-tabs-overline .nav-link.active:before,
.nav-tabs-underline .nav-link.active:before {
	display: none !important;
	content: none !important;
	border: none !important;
	background: none !important;
}

/* ==========================================================================
   INPUT GROUPS CON ICONOS
   ========================================================================== */

.input-group {
	position: relative;
}

.input-group-text {
	border: none !important;
	border-radius: 14px 0 0 14px !important;
	padding: 0 18px !important;
	min-width: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.25rem;
}

.input-group-text.bg-primary {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.input-group-text.bg-success {
	background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.form-control {
	border: 2px solid #e9ecef !important;
	border-left: 2px solid #e9ecef !important;
	border-radius: 0 14px 14px 0 !important;
	padding: 16px 20px !important;
	font-size: 1rem;
	transition: all 0.3s ease;
	background: white;
	height: auto;
}

.form-control:focus {
	border-color: #667eea !important;
	box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1) !important;
	background: white !important;
	outline: none;
}

.form-control::placeholder {
	color: #adb5bd;
	opacity: 1;
}

/* ==========================================================================
   BOTONES CON EFECTOS MODERNOS
   ========================================================================== */

.btn-primary.btn-lg, .btn-success.btn-lg {
	border-radius: 14px !important;
	padding: 16px 32px !important;
	font-weight: 700 !important;
	font-size: 1.1rem !important;
	box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4) !important;
	transition: all 0.3s ease;
	position: relative;
	overflow: hidden;
	border: none !important;
}

.btn-primary.btn-lg {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.btn-success.btn-lg {
	background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
	box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4) !important;
}

.btn-primary.btn-lg::before, .btn-success.btn-lg::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.25);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
	z-index: 0;
}

.btn-primary.btn-lg i, .btn-success.btn-lg i,
.btn-primary.btn-lg span, .btn-success.btn-lg span {
	position: relative;
	z-index: 1;
}

.btn-primary.btn-lg:hover::before, .btn-success.btn-lg:hover::before {
	width: 350px;
	height: 350px;
}

.btn-primary.btn-lg:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5) !important;
}

.btn-success.btn-lg:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 25px rgba(17, 153, 142, 0.5) !important;
}

.btn-primary.btn-lg:active, .btn-success.btn-lg:active {
	transform: translateY(-1px);
}

/* ==========================================================================
   ALERTS MODERNOS
   ========================================================================== */

.alert {
	border: none !important;
	border-radius: 14px !important;
	padding: 16px 20px !important;
	backdrop-filter: blur(10px);
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   CARD FOOTER
   ========================================================================== */

.card-footer {
	border-radius: 0 0 24px 24px !important;
}

/* ==========================================================================
   ANIMACIONES DE ENTRADA
   ========================================================================== */

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.clock-section,
.form-section {
	animation: fadeInUp 0.6s ease-out backwards;
}

.clock-section {
	animation-delay: 0.1s;
}

.form-section {
	animation-delay: 0.2s;
}

/* ==========================================================================
   LABELS Y FORMULARIOS
   ========================================================================== */

.form-label {
	font-weight: 600 !important;
	color: #495057 !important;
	margin-bottom: 0.75rem !important;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
}

.form-label i {
	font-size: 1.1rem;
}

/* ==========================================================================
   FOOTER GLOBAL FIJO
   ========================================================================== */

.global-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border-top: 1px solid rgba(102, 126, 234, 0.2);
	padding: 16px 20px;
	z-index: 1000;
	box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
}

.global-footer .container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: center;
	align-items: center;
}

.global-footer .admin-footer-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 20px;
	background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
	border: 1px solid rgba(102, 126, 234, 0.3);
	border-radius: 10px;
	color: #667eea;
	font-weight: 600;
	font-size: 0.9rem;
	text-decoration: none;
	transition: all 0.3s ease;
}

.global-footer .admin-footer-link:hover {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	border-color: transparent;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
	text-decoration: none;
}

.global-footer .admin-footer-link i {
	font-size: 1.1rem;
}

/* ==========================================================================
   ESPACIADOS
   ========================================================================== */

.card-body.p-4 {
	padding: 2rem !important;
}

.mb-4 {
	margin-bottom: 1.75rem !important;
}

/* ==========================================================================
   FIX PARA BORDERS
   ========================================================================== */

.input-group-text {
	border-right: none !important;
}

.form-control {
	border-left: none !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
	.layout-wrapper {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.asistencia-container {
		padding: 15px;
	}

	.clock-section {
		position: relative;
		top: auto;
	}
}

@media (max-width: 576px) {
	.asistencia-container {
		padding: 10px;
		max-width: 100%;
	}

	body {
		padding-bottom: 80px;
	}

	.global-footer {
		padding: 12px 15px;
	}

	.global-footer .admin-footer-link {
		font-size: 0.85rem;
		padding: 8px 16px;
	}

	.qr-access-link {
		font-size: 0.85rem;
		padding: 10px 18px;
	}

	.card.text-center.mb-4 .card-body {
		padding: 1.5rem 1rem !important;
	}

	.card-body.p-4 {
		padding: 1.5rem !important;
	}

	.card-header h4 {
		font-size: 1.1rem !important;
	}

	.nav-tabs-highlight {
		padding: 4px;
	}

	.nav-tabs-highlight .nav-link {
		padding: 12px 16px;
		font-size: 0.95rem;
	}

	.nav-tabs-highlight .nav-link i {
		font-size: 1.1rem;
	}

	.form-label {
		font-size: 0.875rem;
	}

	.form-control {
		padding: 12px 16px !important;
		font-size: 0.95rem !important;
	}

	.input-group-text {
		font-size: 1.1rem;
		padding: 0 14px !important;
	}

	.btn-primary.btn-lg, .btn-success.btn-lg {
		padding: 14px 20px !important;
		font-size: 1rem !important;
	}

	#clock {
		font-size: 2.5rem !important;
	}
}

@media (min-width: 577px) and (max-width: 768px) {
	.asistencia-container {
		max-width: 500px;
	}
}

/* ==========================================================================
   UTILIDADES ADICIONALES
   ========================================================================== */

.content {
	min-height: 100vh;
	padding: 20px 0;
}

/* Logo en el reloj */
.clock-section .img-fluid {
	max-height: 50px;
}

/* Icono de reloj por defecto */
.clock-icon {
	font-size: 3rem;
	color: #667eea;
}

/* Iconos en alertas */
.alert-icon-large {
	font-size: 1.5rem;
}
