/* ==========================================================================
   CUSTOM AUTH STYLES - Sistema de Asistencia
   Estilos personalizados para vistas de autenticación
   ========================================================================== */

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

body.auth-layout {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	min-height: 100vh;
	position: relative;
	overflow-x: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Pattern de fondo animado */
body.auth-layout::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); }
}

/* ==========================================================================
   CARD DE LOGIN MEJORADO
   ========================================================================== */

.login-form {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	border-radius: 24px;
	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);
	overflow: visible;
	animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	max-width: 500px;
	margin: 0 auto;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.95);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.login-form: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);
}

/* Card header con gradiente (como /asistencia) */
.login-form .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;
}

.login-form .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); }
}

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

/* ==========================================================================
   LOGO ANIMADO
   ========================================================================== */

.brand-logo {
	max-height: 70px;
	animation: fadeInScale 0.8s cubic-bezier(0.4, 0, 0.2, 1);
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.1));
}

@keyframes fadeInScale {
	from { 
		opacity: 0;
		transform: scale(0.8);
	}
	to { 
		opacity: 1;
		transform: scale(1);
	}
}

/* Icon container alternativo */
.icon-container {
	padding-top: 1rem;
}

.icon-box {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	width: 90px;
	height: 90px;
	border-radius: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.icon-box i {
	font-size: 3rem;
	color: white;
}

/* Títulos de autenticación */
.auth-title {
	font-size: 1.75rem;
	color: #2d3748;
}

.auth-subtitle {
	font-size: 0.95rem;
	font-weight: 500;
}

/* ==========================================================================
   INPUTS MODERNOS
   ========================================================================== */

.form-control-modern {
	border: 2px solid #e9ecef;
	border-radius: 14px;
	padding: 14px 18px;
	font-size: 0.95rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: #fafbfc;
}

.form-control-modern:focus {
	border-color: #667eea;
	background: white;
	box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
	transform: translateY(-1px);
}

.form-control-modern::placeholder {
	color: #adb5bd;
	font-weight: 400;
}

/* Input Groups con iconos (estilo /asistencia) */
.input-group {
	margin-bottom: 1.5rem;
}

.input-group .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;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
	color: white;
}

.input-group .input-group-text i {
	font-size: 1.25rem;
}

.input-group .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;
}

.input-group .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;
}

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

/* ==========================================================================
   BOTÓN MODERNO CON GRADIENTE Y RIPPLE
   ========================================================================== */

.btn-modern {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 14px;
	padding: 16px;
	font-weight: 700;
	font-size: 1.05rem;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
	position: relative;
	overflow: hidden;
}

.btn-modern::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;
}

.btn-modern:hover::before {
	width: 300px;
	height: 300px;
}

.btn-modern:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(102, 126, 234, 0.5);
}

.btn-modern:active {
	transform: translateY(-1px);
}

.btn-modern span {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

/* ==========================================================================
   LINK DE VOLVER MEJORADO
   ========================================================================== */

.back-link {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
	padding: 12px 24px;
	border-radius: 50px;
	color: white;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 0.95rem;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.back-link:hover {
	background: rgba(255, 255, 255, 0.3);
	color: white;
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   LABELS MEJORADOS
   ========================================================================== */

.auth-layout .form-label {
	font-weight: 600;
	color: #2d3748;
	margin-bottom: 0.75rem;
	display: flex;
	align-items: center;
	font-size: 0.95rem;
}

.auth-layout .form-label i {
	color: #667eea;
	font-size: 1.1rem;
}

/* ==========================================================================
   CARD BODY Y FOOTER
   ========================================================================== */

.login-form .card-body {
	padding: 2rem !important;
	overflow: visible !important;
}

.login-form .card-footer {
	background: linear-gradient(to bottom, rgba(102, 126, 234, 0.05), rgba(102, 126, 234, 0.08)) !important;
	border-top: 1px solid rgba(102, 126, 234, 0.15) !important;
	border-radius: 0 0 24px 24px !important;
}

/* ==========================================================================
   CHECKBOX MEJORADO
   ========================================================================== */

.auth-layout .form-check-input {
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #dee2e6;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.auth-layout .form-check-input:checked {
	background-color: #667eea;
	border-color: #667eea;
}

.auth-layout .form-check-label {
	cursor: pointer;
	margin-left: 0.5rem;
	font-weight: 500;
}

/* ==========================================================================
   LINKS
   ========================================================================== */

.auth-layout .text-primary {
	color: #667eea !important;
	text-decoration: none;
	transition: all 0.2s ease;
}

.auth-layout .text-primary:hover {
	color: #764ba2 !important;
	text-decoration: underline;
}

/* ==========================================================================
   ALERT MEJORADO
   ========================================================================== */

.auth-layout .alert {
	border-radius: 14px !important;
	border: none !important;
	backdrop-filter: blur(10px);
}

/* ==========================================================================
   CONTAINER CENTRADO
   ========================================================================== */

.auth-container {
	width: 100%;
	max-width: 500px;
	margin: 0 auto;
	padding: 20px;
}

.page-content {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	width: 100%;
	padding: 0;
	margin: 0;
}

.auth-layout .content-wrapper {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.auth-layout .content-inner {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.auth-layout .content {
	width: 100%;
	padding: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
}

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

@media (max-width: 576px) {
	.login-form .card-body {
		padding: 2rem !important;
	}

	.brand-logo {
		max-height: 55px;
	}

	.btn-modern {
		padding: 14px;
		font-size: 1rem;
	}

	.form-control-modern {
		padding: 12px 16px;
	}

	.back-link {
		padding: 10px 20px;
		font-size: 0.9rem;
	}
}
