/* login.php — centered auth layout (no sidebar) */

body.auth-page {
	--primary-color: var(--color-primary);
	--primary-dark: #244a40;
	--primary-light: var(--color-primary-light);
	--secondary-color: #E6B38A;
	--text-dark: var(--color-text);
	--text-muted: var(--color-text-muted);
	--white: #ffffff;
	--border-gray: var(--color-border);
	--error-red: #dc3545;
	--error-red-light: #f8d7da;

	/* Spacing */
	--space-xs: 0.25rem;
	--space-sm: 0.5rem;
	--space-md: 1rem;
	--space-lg: 1.5rem;
	--space-xl: 2rem;
	--space-2xl: 3rem;
	
	/* Typography */
	--font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-size-sm: 0.875rem;
	--font-size-base: 1rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.25rem;
	--font-size-2xl: 1.5rem;
	--font-size-3xl: 1.875rem;
	
	/* Shadows */
	--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	--shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
	
	/* Border Radius */
	--radius-sm: 0.375rem;
	--radius-md: 0.5rem;
	--radius-lg: 0.75rem;
	--radius-xl: 1rem;
	
	/* Transitions */
	--transition-fast: 150ms ease-in-out;
	--transition-normal: 300ms ease-in-out;
	--transition-slow: 500ms ease-in-out;

	font-family: var(--font-family, 'Inter', sans-serif);
	background: linear-gradient(135deg, var(--color-primary) 0%, #244a40 100%);
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	justify-content: flex-start;
	padding: var(--space-md) var(--space-md) 0;
	color: var(--text-dark);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	margin: 0;
}

.login-main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

/* Main Container */
.login-container {
	background: var(--white);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-xl);
	border: 1px solid rgba(255, 255, 255, 0.85);
	padding: var(--space-2xl);
	width: 100%;
	max-width: 420px;
	position: relative;
	overflow: hidden;
}

.login-container.auth-card--wide {
	max-width: 480px;
}

.login-brand {
	flex-shrink: 0;
	margin: 0;
	padding: 0.15rem 1rem 0.85rem;
	text-align: center;
	background: transparent;
}

.login-brand__mascot {
	display: block;
	margin: 0 auto;
	height: 88px;
	width: auto;
	background: transparent;
}

.login-brand__link {
	display: inline-block;
	line-height: 0;
}

.login-brand__link:hover .login-brand__mascot {
	opacity: 0.88;
}

.login-brand__credit {
	margin: 0.35rem 0 0;
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: rgba(255, 255, 255, 0.72);
}

/* Header */
.login-header {
	text-align: center;
	margin-bottom: var(--space-xl);
}

.logo {
	width: 120px;
	height: auto;
	margin-bottom: var(--space-lg);
	filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.1));
}

.login-title {
	font-size: var(--font-size-3xl);
	font-weight: 700;
	color: var(--text-dark);
	margin-bottom: var(--space-sm);
	letter-spacing: -0.025em;
}

.login-subtitle {
	font-size: var(--font-size-base);
	color: var(--text-muted);
	font-weight: 500;
}

/* Alert Styles */
.alert {
	padding: var(--space-md);
	border-radius: var(--radius-lg);
	margin-bottom: var(--space-lg);
	display: flex;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--font-size-sm);
	font-weight: 500;
	transition: var(--transition-normal);
}

.alert-error,
.alert-danger {
	background: var(--error-red-light);
	color: var(--error-red);
	border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
	background: #e8f3ef;
	color: var(--color-primary);
	border: 1px solid rgba(45, 90, 78, 0.2);
}

.form-help {
	font-size: var(--font-size-sm);
	color: var(--text-muted);
	line-height: 1.4;
}

.form-control:disabled {
	background: #f3f4f6;
	color: var(--text-muted);
	cursor: not-allowed;
}

/* Form Styles */
.login-form {
	display: flex;
	flex-direction: column;
	gap: var(--space-lg);
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.form-group label {
	font-size: var(--font-size-sm);
	font-weight: 600;
	color: var(--text-dark);
	letter-spacing: 0.025em;
}

.input-group {
	position: relative;
	transition: var(--transition-fast);
}

.form-control {
	width: 100%;
	padding: var(--space-md) var(--space-md) var(--space-md) 2.75rem;
	border: 2px solid var(--border-gray);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-base);
	font-family: inherit;
	background: var(--white);
	color: var(--text-dark);
	transition: var(--transition-fast);
	outline: none;
}

.form-control:focus {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(87, 138, 131, 0.1);
}

.form-control::placeholder {
	color: var(--text-muted);
	opacity: 1;
}

.input-icon {
	position: absolute;
	left: var(--space-md);
	top: 50%;
	transform: translateY(-50%);
	color: var(--text-muted);
	font-size: var(--font-size-lg);
	pointer-events: none;
	transition: var(--transition-fast);
}

.input-group:focus-within .input-icon {
	color: var(--primary-color);
}

/* Password Toggle */
.password-group {
	position: relative;
}

.password-toggle {
	position: absolute;
	right: var(--space-md);
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: var(--space-sm);
	border-radius: var(--radius-sm);
	transition: var(--transition-fast);
	display: flex;
	align-items: center;
	justify-content: center;
}

.password-toggle:hover {
	color: var(--primary-color);
	background: rgba(87, 138, 131, 0.1);
}

.password-toggle:focus {
	outline: none;
	color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(87, 138, 131, 0.2);
}

/* Button Styles */
.button-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	margin-top: var(--space-md);
}

.btn {
	padding: var(--space-md) var(--space-lg);
	border: 2px solid transparent;
	border-radius: var(--radius-lg);
	font-size: var(--font-size-base);
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	transition: var(--transition-fast);
	text-decoration: none;
	outline: none;
	position: relative;
	overflow: hidden;
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-primary {
	background: var(--primary-color);
	color: var(--white);
	border-color: var(--primary-color);
}

.btn-primary:hover:not(:disabled) {
	background: var(--primary-dark);
	border-color: var(--primary-dark);
	transform: translateY(-1px);
	box-shadow: var(--shadow-lg);
}

.btn-primary:focus {
	box-shadow: 0 0 0 3px rgba(87, 138, 131, 0.3);
}

.btn-primary:active:not(:disabled) {
	transform: translateY(0);
}

.btn-cancel {
	background: var(--white);
	color: var(--text-muted);
	border-color: var(--border-gray);
}

.btn-cancel:hover:not(:disabled) {
	background: var(--secondary-color);
	border-color: var(--secondary-color);
	color: var(--text-dark);
}

.btn-cancel:focus {
	box-shadow: 0 0 0 3px rgba(255, 196, 162, 0.3);
}

.btn-secondary {
	background: var(--white);
	color: var(--text-muted);
	border: 2px solid var(--border-gray);
	padding: var(--space-md) var(--space-lg);
	border-radius: var(--radius-lg);
	font-size: var(--font-size-base);
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-sm);
	text-decoration: none;
	transition: var(--transition-fast);
}

.btn-secondary:hover {
	background: var(--secondary-color);
	border-color: var(--secondary-color);
	color: var(--text-dark);
}

.form-actions,
.button-group {
	display: flex;
	flex-direction: column;
	gap: var(--space-md);
	margin-top: var(--space-md);
}

/* Loading Animation */
.btn.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid transparent;
	border-top: 2px solid currentColor;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

.btn.loading > * {
	opacity: 0;
}

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

/* Spinner for FA icons */
.fa-spinner {
	animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 480px) {
	body {
		padding: var(--space-sm);
	}
	
	.login-container {
		padding: var(--space-xl);
	}
	
	.login-title {
		font-size: var(--font-size-2xl);
	}
	
	.logo {
		width: 100px;
	}
	
	.form-control {
		padding-left: 2.5rem;
	}
	
	.input-icon {
		font-size: var(--font-size-base);
	}
}

/* Focus and Accessibility */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* High contrast mode */
@media (prefers-contrast: high) {
	.form-control {
		border-width: 2px;
	}
	
	.btn {
		border-width: 2px;
	}
}

/* Print styles */
@media print {
	body {
		background: var(--white);
	}
	
	.login-container {
		box-shadow: none;
		border: 1px solid var(--border-gray);
	}
	
	.btn {
		border: 1px solid var(--text-dark);
	}
}

