:root {
	--color-primary: #5a8fd4;
	--color-primary-light: #8cb8e8;
	--color-primary-dark: #2d5a9e;
	--color-secondary: #1a3360;
	--color-accent: #1e3a6e;

	--color-bg: #FFFFFF;
	--color-bg-alt: #e8edf4;
	--color-text: #1a2a4a;
	--color-text-light: #6b7a94;

	--border-radius-sm: 8px;
	--border-radius: 14px;
	--border-radius-lg: 20px;
	--box-shadow: 0 4px 16px rgba(26, 51, 96, 0.10);
	--box-shadow-hover: 0 8px 28px rgba(26, 51, 96, 0.18);
	--transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
	background: linear-gradient(135deg, #e8edf4 0%, #d8e2f0 50%, #e4ecf5 100%);
	font-family: 'Montserrat', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	position: relative;
	overflow-x: hidden;
	color: var(--color-text);
}

body::before,
body::after {
	content: '';
	position: fixed;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(90, 143, 212, 0.08) 0%, transparent 70%);
	animation: float 20s infinite ease-in-out;
	pointer-events: none;
}

body::before {
	width: 400px;
	height: 400px;
	top: -200px;
	right: -100px;
	animation-delay: 0s;
}

body::after {
	width: 600px;
	height: 600px;
	bottom: -300px;
	left: -200px;
	animation-delay: 10s;
}

.container {
	width: 100%;
	max-width: 600px;
	z-index: 1;
	position: relative;
}

.login-container {
	background: rgba(255, 255, 255, 0.98);
	backdrop-filter: blur(20px);
	padding: 40px;
	border-radius: var(--border-radius-xl, 1.5rem);
	box-shadow:
		0 20px 60px rgba(26, 51, 96, 0.12),
		0 0 0 1px rgba(30, 58, 110, 0.10);
	transition: var(--transition);
	transform: translateY(0);
}

.login-container:hover {
	transform: translateY(-5px);
	box-shadow:
		0 30px 80px rgba(26, 51, 96, 0.18),
		0 0 0 1px rgba(30, 58, 110, 0.18);
}

.logo {
	text-align: center;
	margin-bottom: 40px;
	position: relative;
}

.logo-image {
	height: 120px;
	margin: 0 auto 20px;
	display: block;
}

.logo h2 {
	font-size: 1.75rem;
	font-weight: 700;
	background: linear-gradient(135deg, #5a8fd4, #1a3360);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 8px;
}

.logo p {
	color: var(--color-text-light);
	font-size: 1rem;
	font-weight: 400;
}

.form-label {
	font-weight: 400;
	color: var(--color-secondary);
	margin-bottom: 10px;
	font-size: 0.95rem;
	display: block;
}

.input-group {
	position: relative;
	margin-bottom: 24px;
}

.form-control {
	padding: 14px 16px;
	padding-left: 45px;
	border-radius: 12px !important;
	border: 2px solid #e0e0e0;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-size: 1rem;
	background: white;
	width: 100%;
}

.form-control:focus {
	border-color: #5a8fd4;
	box-shadow: 0 0 0 4px rgba(90, 143, 212, 0.15);
	outline: none;
	background: #f4f7fc;
}

.input-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #8a9ab8;
	font-size: 1.1rem;
	pointer-events: none;
	transition: color 0.3s ease;
	z-index: 1;
}

.form-control:focus ~ .input-icon {
	color: #5a8fd4;
}

.btn {
	padding: 14px 24px;
	font-weight: 400;
	border-radius: 12px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	font-size: 1rem;
	border: none;
	position: relative;
	overflow: hidden;
	text-transform: none;
	letter-spacing: 0.3px;
}

.btn::before {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 0;
	height: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.3);
	transform: translate(-50%, -50%);
	transition: width 0.6s, height 0.6s;
}

.btn:active::before {
	width: 300px;
	height: 300px;
}

.btn-primary {
	background: linear-gradient(180deg, #5a8fd4 0%, #2d5a9e 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(45, 90, 158, 0.30);
}

.btn-primary:hover {
	background: linear-gradient(180deg, #4a7fc4 0%, #1e4a8e 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(45, 90, 158, 0.45);
}

.btn-success {
	background: linear-gradient(180deg, #5a8fd4 0%, #2d5a9e 100%);
	color: white;
	box-shadow: 0 2px 8px rgba(45, 90, 158, 0.30);
}

.btn-success:hover:not(:disabled) {
	background: linear-gradient(180deg, #4a7fc4 0%, #1e4a8e 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(45, 90, 158, 0.45);
}

.btn-outline-secondary {
	background: white;
	color: #6c757d;
	border: 2px solid #e0e0e0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.btn-outline-secondary:hover {
	background: #f5f5f5;
	border-color: #bdbdbd;
	color: #495057;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none !important;
	background: #e0e0e0 !important;
}

.windows-container {
	margin-top: 30px;
	animation: slideUp 0.5s ease-out;
}

.windows-container h4 {
	font-size: 1.25rem;
	font-weight: 600;
	color: #1a2a4a;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 12px;
	border-bottom: 2px solid #d0d9e8;
}

.windows-container h4 i {
	color: #5a8fd4;
}

.window-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
	max-height: 320px;
	overflow-y: auto;
	padding: 4px;
}

.window-list::-webkit-scrollbar {
	width: 10px;
}

.window-list::-webkit-scrollbar-track {
	background: #e8edf4;
	border-radius: 12px;
}

.window-list::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, #8cb8e8 0%, #5a8fd4 100%);
	border-radius: 12px;
	border: 2px solid #e8edf4;
}

.window-list::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, #5a8fd4 0%, #2d5a9e 100%);
}

.window-item {
	padding: 16px 12px;
	border: 2px solid #e9ecef;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	background: white;
	text-align: center;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	min-height: 85px;
	position: relative;
	overflow: hidden;
}

.window-item::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, #5a8fd4, #8cb8e8);
	transform: translateX(-100%);
	transition: transform 0.3s ease;
}

.window-item:hover {
	background: linear-gradient(135deg, #f4f7fc 0%, #eaf0f8 100%);
	border-color: #5a8fd4;
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(45, 90, 158, 0.18);
}

.window-item:hover::before {
	transform: translateX(0);
}

.window-item.selected {
	background: linear-gradient(135deg, #e4ecf5 0%, #ccdaee 100%);
	border-color: #5a8fd4;
	box-shadow: 0 4px 16px rgba(45, 90, 158, 0.28);
	transform: translateY(-2px);
}

.window-item.selected::before {
	transform: translateX(0);
}

.window-item.selected::after {
	content: '\f00c';
	font-weight: 900;
	position: absolute;
	top: 8px;
	right: 8px;
	color: #5a8fd4;
	font-size: 18px;
	animation: checkmark 0.3s ease;
}

@keyframes checkmark {
	0% {
		transform: scale(0) rotate(-45deg);
		opacity: 0;
	}
	50% {
		transform: scale(1.2) rotate(0deg);
	}
	100% {
		transform: scale(1) rotate(0deg);
		opacity: 1;
	}
}

.window-item strong,
.window-item .window-description {
	color: #1a2a4a;
	font-size: 1rem;
	font-weight: 500;
	display: block;
	margin-bottom: 4px;
}

.window-item.selected strong,
.window-item.selected .window-description {
	color: #1a3360;
}

.window-item .text-muted,
.window-item .window-number {
	font-size: 0.85rem;
	color: #6b7a94;
}

.window-item.selected .window-number {
	color: #2d5a9e;
	font-weight: 500;
}

.window-occupied {
	border-color: #ffe0b2;
	background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
}

.window-occupied:hover {
	background: linear-gradient(135deg, #ffecb3 0%, #ffd54f 100%);
	border-color: #ffa726;
	box-shadow: 0 4px 12px rgba(255, 152, 0, 0.2);
}

.window-item.selected.window-occupied {
	background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
	border-color: #ff9800;
	box-shadow: 0 4px 16px rgba(255, 152, 0, 0.3);
}

.flash-messages {
	margin-bottom: 24px;
}

.alert {
	border-radius: 12px;
	padding: 16px 20px;
	border: 2px solid transparent;
	display: flex;
	align-items: center;
	gap: 12px;
	animation: slideDown 0.3s ease-out forwards;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.alert i {
	font-size: 1.2rem;
	flex-shrink: 0;
}

.alert-success {
	background: linear-gradient(135deg, #d4edda, #b8ddc6);
	color: #1b4a30;
	border-color: #2e7d52;
}

.alert-success i {
	color: #2e7d52;
}

.alert-danger {
	background: linear-gradient(135deg, #ffebee, #ffcdd2);
	color: #c62828;
	border-color: #f44336;
}

.alert-danger i {
	color: #f44336;
}

.alert-warning {
	background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
	color: #856404;
	border-color: #ffc107;
}

.alert-warning i {
	color: #ffc107;
}

.login-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(5px);
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-overlay.active {
	opacity: 1;
	visibility: visible;
}

.login-spinner-container {
	background: rgba(255, 255, 255, 0.98);
	padding: 40px;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(26, 51, 96, 0.20);
	border: 2px solid #d0d9e8;
	text-align: center;
	max-width: 320px;
	width: 90%;
	animation: scaleIn 0.3s ease-out;
}

.login-spinner {
	width: 60px;
	height: 60px;
	border: 4px solid rgba(90, 143, 212, 0.2);
	border-top: 4px solid #5a8fd4;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 0 auto 20px;
}

.login-spinner-text {
	font-size: 1.1rem;
	font-weight: 500;
	color: #1a2a4a;
	margin-bottom: 8px;
}

.login-spinner-subtext {
	font-size: 0.9rem;
	color: #5a8fd4;
}

@keyframes float {
	0%, 100% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(30px, -30px) scale(1.05); }
	50% { transform: translate(-20px, 20px) scale(0.95); }
	75% { transform: translate(-30px, -10px) scale(1.02); }
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes scaleIn {
	from {
		transform: scale(0.9);
		opacity: 0;
	}
	to {
		transform: scale(1);
		opacity: 1;
	}
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.fade-in {
	animation: fadeIn 0.5s ease-out;
}

.mb-3 {
	animation: fadeIn 0.5s ease-out backwards;
}

.mb-3:nth-child(1) { animation-delay: 0.1s; }
.mb-3:nth-child(2) { animation-delay: 0.2s; }
.d-grid { animation-delay: 0.3s; }

@media (max-width: 576px) {
	.login-container {
		padding: 30px 20px;
	}
	
	.logo h2 {
		font-size: 1.5rem;
	}
	
	.window-list {
		grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
		gap: 8px;
	}
	
	.window-item {
		padding: 12px 8px;
		min-height: 75px;
	}
}

.confirm-container {
	max-width: 500px;
	margin: 0 auto;
	padding: 30px;
	border-radius: var(--border-radius-lg);
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
	background-color: var(--color-bg);
	transition: var(--transition);
}

.confirm-container:hover {
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.warning-box {
	background-color: #fff3cd;
	border-left: 5px solid #ffc107;
	padding: 20px;
	margin-bottom: 25px;
	border-radius: var(--border-radius);
}

.warning-box h4 {
	color: #856404;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
}

.warning-box h4 i {
	margin-right: 10px;
}

.warning-box p {
	color: #856404;
	margin-bottom: 0;
}