/* Forza rendering chiaro negli elementi UA */
:root {
	color-scheme: light;
}

/* CSS spostato da resources/views/layout/auth/auth.blade.php */
:root {
	--primary-color: #0d6efd;
	--primary-dark: #0b5ed7;
	--text-dark: #1a1a1a;
	--text-muted: #666;
	--border-color: #e1e1e1;
	--background-light: #f5f7fb;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	background-color: var(--background-light);
	color: var(--text-dark);
	line-height: 1.5;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	transform: scale(0.85);
	transform-origin: center center;
}

input, button {
	font-family: inherit;
}

/* Login Container */
.login-container {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
}

.login-wrapper {
	display: flex;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

/* Form Container */
.form-container {
	flex: 1;
	padding: 3rem;
	background: #fff;
}

.form-header {
	text-align: center;
	margin-bottom: 2rem;
}

.form-header h2 {
	font-size: 1.75rem;
	font-weight: 700;
	color: #1a1a1a;
	margin: 2rem 0 0.5rem;
}

.form-header p {
	color: #666;
	font-size: 1.1rem;
}

.app-brand {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1rem;
}

.app-name {
	font-size: 2rem;
	font-weight: 700;
	color: var(--text-dark);
	margin: 0;
}

.app-badge {
	background: var(--primary-color);
	color: #fff;
	padding: 0.25rem 0.75rem;
	border-radius: 20px;
	font-size: 0.875rem;
	font-weight: 600;
}

/* Form Elements */
.login-form {
	max-width: 400px;
	margin: 0 auto;
}

.form-group {
	margin-bottom: 1.5rem;
	position: relative;
}

.form-group label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.75rem;
	color: #1a1a1a;
	font-size: 1rem;
}

.input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.input-wrapper i {
	position: absolute;
	left: 1.25rem;
	color: var(--primary-color);
	font-size: 1.2rem;
	transition: all 0.3s ease;
	z-index: 1;
}

.input-wrapper input {
	width: 100%;
	padding: 1rem 3.5rem 1rem 3.5rem;
	border: 2px solid var(--border-color);
	border-radius: 12px;
	font-size: 1rem;
	transition: all 0.3s ease;
	background-color: #fff;
}

.input-wrapper input:focus {
	border-color: var(--primary-color);
	outline: none;
	box-shadow: 0 0 0 4px rgba(13,110,253,0.1);
}

.toggle-password {
	position: absolute;
	right: 1.25rem;
	background: none;
	border: none;
	color: #666;
	cursor: pointer;
	padding: 0.5rem;
	font-size: 1.1rem;
	transition: all 0.3s ease;
	border-radius: 50%;
	width: 2.5rem;
	height: 2.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
}

.toggle-password:hover {
	color: var(--primary-color);
	background-color: rgba(13,110,253,0.1);
}

.toggle-password:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(13,110,253,0.25);
}

.error-message {
	color: #dc3545;
	font-size: 0.875rem;
	margin-top: 0.5rem;
	display: block;
}

/* Buttons */
.login-button {
	width: 100%;
	padding: 1rem;
	background: var(--primary-color);
	color: #fff;
	border: none;
	border-radius: 12px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
}

.login-button:hover {
	background: var(--primary-dark);
	transform: translateY(-2px);
}

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

/* Welcome Container */
.welcome-container {
	flex: 1;
	background-size: cover;
	background-position: center;
	position: relative;
	padding: 3rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}

.welcome-container::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(13, 110, 253, 0.9), rgba(0, 0, 0, 0.7));
}

.welcome-content {
	position: relative;
	z-index: 1;
	text-align: center;
	max-width: 400px;
}

.welcome-content h2 {
	font-size: 2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	line-height: 1.2;
}

.welcome-content p {
	font-size: 1.1rem;
	opacity: 0.9;
	margin-bottom: 2rem;
}

.welcome-icon {
	font-size: 3rem;
	margin-bottom: 1.5rem;
}

.feature-list {
	margin-top: 2rem;
	text-align: left;
}

.feature-item {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin-bottom: 1rem;
}

.feature-item i {
	color: rgba(255,255,255,0.9);
}

.feature-item span {
	font-size: 0.95rem;
}

/* Alert Box */
.alert-box {
	padding: 0.75rem;
	border-radius: 8px;
	margin-bottom: 1rem;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.8rem;
}

.alert-box.success {
	background: #d1e7dd;
	color: #0f5132;
}

.close-btn {
	margin-left: auto;
	background: none;
	border: none;
	color: inherit;
	cursor: pointer;
	font-size: 1.25rem;
	opacity: 0.7;
	transition: opacity 0.3s ease;
}

.close-btn:hover {
	opacity: 1;
}

/* Responsive */
@media (max-width: 992px) {
	body {
		transform: scale(1);
	}

	.login-wrapper {
		flex-direction: column;
	}

	.welcome-container {
		display: none;
	}

	.form-container {
		padding: 2rem;
	}
}

@media (max-width: 576px) {
	body {
		padding: 1rem;
	}

	.form-container {
		padding: 1.5rem;
	}

	.app-name {
		font-size: 1.75rem;
	}
}

/* Animazioni */
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.auth-animation {
	animation: fadeIn 0.5s ease-out;
}

/* Override totale anche se il sistema è in dark */
@media (prefers-color-scheme: dark) {
	:root { color-scheme: light; }

	body { background-color: var(--background-light); color: var(--text-dark); }

	/* Scrollbar */
	* { scrollbar-width: thin; scrollbar-color: #c7c7c7 #f2f2f2; }
	*::-webkit-scrollbar { width: 10px; height: 10px; }
	*::-webkit-scrollbar-track { background: #f2f2f2; }
	*::-webkit-scrollbar-thumb { background-color: #c7c7c7; border-radius: 8px; border: 2px solid #f2f2f2; }

	/* Autofill (WebKit) */
	input:-webkit-autofill,
	textarea:-webkit-autofill,
	select:-webkit-autofill {
		-webkit-text-fill-color: #1a1a1a;
		-webkit-box-shadow: 0 0 0px 1000px #ffffff inset;
		box-shadow: 0 0 0px 1000px #ffffff inset;
	}
}

