/* ===== VARIABLES CSS ===== */
:root {
	--primary-color: #a8e6cf;
	--secondary-color: #ffd3a5;
	--accent-color: #ffaaa5;
	--text-color: #2c3e50;
	--text-light: #7f8c8d;
	--white: #ffffff;
	--light-gray: #f8f9fa;
	--border-color: #e9ecef;
	--shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	--shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
	--gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
	--gradient-accent: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
	--border-radius: 15px;
	--transition: all 0.3s ease;
}

/* ===== RESET Y BASE ===== */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	background: var(--gradient-primary);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-color);
	overflow-x: hidden;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.login-container {
	position: relative;
	width: 100%;
	max-width: 900px;
	padding: 20px;
	z-index: 10;
}

.login-card {
	background: var(--white);
	border-radius: var(--border-radius);
	box-shadow: var(--shadow);
	padding: 40px;
	position: relative;
	overflow: hidden;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 5px;
	background: var(--gradient-primary);
}

/* ===== HEADER ===== */
.login-header {
	text-align: center;
	margin-bottom: 40px;
}

.logo {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 15px;
	margin-bottom: 10px;
}

.tooth-icon {
	font-size: 3rem;
	animation: bounce 2s infinite;
}

.login-header h1 {
	font-size: 2.5rem;
	color: var(--text-color);
	font-weight: 700;
}

.subtitle {
	color: var(--text-light);
	font-size: 1.1rem;
	margin-top: 5px;
}

/* ===== SELECCIÓN DE PERFIL ===== */
.profile-selection h2 {
	text-align: center;
	margin-bottom: 30px;
	color: var(--text-color);
	font-size: 1.5rem;
}

.profile-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
	margin-bottom: 40px;
}

.profile-option {
	cursor: pointer;
	position: relative;
}

.profile-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.profile-card {
	background: var(--light-gray);
	border: 2px solid var(--border-color);
	border-radius: var(--border-radius);
	padding: 25px;
	text-align: center;
	transition: var(--transition);
	height: 100%;
	position: relative;
	overflow: hidden;
}

.profile-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
	transition: left 0.5s;
}

.profile-option:hover .profile-card::before {
	left: 100%;
}

.profile-option input[type="radio"]:checked + .profile-card {
	border-color: var(--primary-color);
	background: linear-gradient(135deg, rgba(168, 230, 207, 0.1), rgba(255, 211, 165, 0.1));
	transform: translateY(-5px);
	box-shadow: var(--shadow-hover);
}

.profile-icon {
	font-size: 3rem;
	margin-bottom: 15px;
	animation: float 3s ease-in-out infinite;
}

.profile-card h3 {
	color: var(--text-color);
	margin-bottom: 10px;
	font-size: 1.3rem;
}

.profile-card p {
	color: var(--text-light);
	margin-bottom: 15px;
	font-size: 0.9rem;
}

.profile-card ul {
	list-style: none;
	text-align: left;
}

.profile-card li {
	color: var(--text-light);
	font-size: 0.85rem;
	margin-bottom: 5px;
	position: relative;
	padding-left: 20px;
}

.profile-card li::before {
	content: '✓';
	position: absolute;
	left: 0;
	color: var(--primary-color);
	font-weight: bold;
}

/* ===== CAMPOS DEL FORMULARIO ===== */
.form-fields {
	margin-bottom: 30px;
}

.input-group {
	margin-bottom: 25px;
	position: relative;
}

.input-group label {
	display: block;
	margin-bottom: 8px;
	color: var(--text-color);
	font-weight: 500;
	font-size: 0.95rem;
}

.input-group input {
	width: 100%;
	padding: 15px 20px;
	border: 2px solid var(--border-color);
	border-radius: var(--border-radius);
	font-size: 1rem;
	transition: var(--transition);
	background: var(--white);
}

.input-group input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(168, 230, 207, 0.2);
}

.password-toggle {
	position: absolute;
	right: 15px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	font-size: 1.2rem;
	color: var(--text-light);
	transition: var(--transition);
}

.password-toggle:hover {
	color: var(--text-color);
}

/* ===== OPCIONES DEL FORMULARIO ===== */
.form-options {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
}

.remember-me {
	display: flex;
	align-items: center;
	cursor: pointer;
	font-size: 0.9rem;
	color: var(--text-color);
}

.remember-me input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.checkmark {
	width: 20px;
	height: 20px;
	border: 2px solid var(--border-color);
	border-radius: 4px;
	margin-right: 10px;
	position: relative;
	transition: var(--transition);
}

.remember-me input[type="checkbox"]:checked + .checkmark {
	background: var(--primary-color);
	border-color: var(--primary-color);
}

.remember-me input[type="checkbox"]:checked + .checkmark::after {
	content: '✓';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: var(--white);
	font-weight: bold;
	font-size: 0.8rem;
}

.forgot-password {
	color: var(--primary-color);
	text-decoration: none;
	font-size: 0.9rem;
	transition: var(--transition);
}

.forgot-password:hover {
	text-decoration: underline;
	color: var(--accent-color);
}

/* ===== BOTÓN DE LOGIN ===== */
.login-button {
	width: 100%;
	padding: 18px;
	background: var(--gradient-primary);
	border: none;
	border-radius: var(--border-radius);
	color: var(--text-color);
	font-size: 1.1rem;
	font-weight: 600;
	cursor: pointer;
	transition: var(--transition);
	position: relative;
	overflow: hidden;
}

.login-button::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	transition: left 0.5s;
}

.login-button:hover::before {
	left: 100%;
}

.login-button:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
}

.login-button:active {
	transform: translateY(0);
}

.button-loader {
	font-size: 1.2rem;
}

/* ===== FOOTER ===== */
.login-footer {
	text-align: center;
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid var(--border-color);
}

.login-footer p {
	color: var(--text-light);
	font-size: 0.9rem;
	margin-bottom: 20px;
}

.login-footer a {
	color: var(--primary-color);
	text-decoration: none;
}

.login-footer a:hover {
	text-decoration: underline;
}

.demo-credentials {
	background: var(--light-gray);
	border-radius: var(--border-radius);
	padding: 20px;
	margin-top: 20px;
}

.demo-credentials h4 {
	color: var(--text-color);
	margin-bottom: 15px;
	font-size: 1rem;
}

.demo-users {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.demo-user {
	background: var(--white);
	padding: 15px;
	border-radius: 10px;
	border: 1px solid var(--border-color);
}

.demo-user strong {
	display: block;
	color: var(--text-color);
	margin-bottom: 5px;
	font-size: 0.9rem;
}

.demo-user span {
	color: var(--text-light);
	font-family: 'Courier New', monospace;
	font-size: 0.85rem;
}

/* ===== DECORACIÓN DE FONDO ===== */
.background-decoration {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 1;
}

.floating-tooth {
	position: absolute;
	font-size: 2rem;
	opacity: 0.1;
	animation: float 6s ease-in-out infinite;
}

.tooth-1 {
	top: 10%;
	left: 10%;
	animation-delay: 0s;
}

.tooth-2 {
	top: 20%;
	right: 15%;
	animation-delay: 1s;
}

.tooth-3 {
	bottom: 30%;
	left: 20%;
	animation-delay: 2s;
}

.tooth-4 {
	bottom: 20%;
	right: 10%;
	animation-delay: 3s;
}

.tooth-5 {
	top: 50%;
	left: 5%;
	animation-delay: 4s;
}

/* ===== NOTIFICACIONES ===== */
.notification {
	position: fixed;
	top: 20px;
	right: 20px;
	padding: 15px 25px;
	border-radius: var(--border-radius);
	color: var(--white);
	font-weight: 500;
	z-index: 1000;
	transform: translateX(400px);
	transition: var(--transition);
}

.notification.show {
	transform: translateX(0);
}

.notification.success {
	background: linear-gradient(135deg, #4CAF50, #45a049);
}

.notification.error {
	background: linear-gradient(135deg, #f44336, #da190b);
}

.notification.info {
	background: linear-gradient(135deg, #2196F3, #0b7dda);
}

/* ===== VOLVER AL SITIO ===== */
.back-to-site {
	position: fixed;
	top: 20px;
	left: 20px;
	background: var(--white);
	color: var(--text-color);
	padding: 12px 20px;
	border-radius: 25px;
	text-decoration: none;
	font-weight: 500;
	box-shadow: var(--shadow);
	transition: var(--transition);
	z-index: 100;
}

.back-to-site:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-hover);
	background: var(--light-gray);
}

/* ===== ANIMACIONES ===== */
@keyframes bounce {
	0%, 20%, 50%, 80%, 100% {
		transform: translateY(0);
	}
	40% {
		transform: translateY(-10px);
	}
	60% {
		transform: translateY(-5px);
	}
}

@keyframes float {
	0%, 100% {
		transform: translateY(0px) rotate(0deg);
	}
	50% {
		transform: translateY(-20px) rotate(5deg);
	}
}

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

.login-card {
	animation: fadeIn 0.6s ease-out;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
	.login-container {
		padding: 10px;
	}
	
	.login-card {
		padding: 30px 20px;
	}
	
	.profile-options {
		grid-template-columns: 1fr;
		gap: 15px;
	}
	
	.demo-users {
		grid-template-columns: 1fr;
		gap: 10px;
	}
	
	.form-options {
		flex-direction: column;
		gap: 15px;
		align-items: flex-start;
	}
	
	.login-header h1 {
		font-size: 2rem;
	}
	
	.tooth-icon {
		font-size: 2.5rem;
	}
	
	.back-to-site {
		position: static;
		display: inline-block;
		margin: 20px auto;
		text-align: center;
	}
}

@media (max-width: 480px) {
	.profile-card {
		padding: 20px 15px;
	}
	
	.profile-card ul {
		font-size: 0.8rem;
	}
	
	.input-group input {
		padding: 12px 15px;
	}
	
	.login-button {
		padding: 15px;
	}
}