﻿/* Reset and base styles */
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	/*font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;*/
	font-family: 'USegoe I', fangsong;
	color: #0f172a;
	background: #F3F3F9;
	min-height: 100vh;
}

/* Layout */
.page-container {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.login-container {
	width: 100%;
	max-width: 28rem;
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

/* Header */
.header {
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.logo {
	margin: 0 auto 0.5rem;
}

.logo-icon {
	width: 3rem;
	height: 3rem;
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	border-radius: 0.75rem;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
}

.title {
	font-size: 1.875rem;
	font-weight: 700;
	letter-spacing: -0.025em;
	color: #111827;
}

.subtitle {
	color: #6b7280;
	font-size: 0.875rem;
}

/* Login Card */
.login-card {
	background: white;
	border-radius: 0.75rem;
	box-shadow: 0 25px 50px -12px rgba(139, 92, 246, 0.1);
	border: 1px solid #f1f5f9;
}

.card-header {
	padding: 2rem 2rem 0;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.card-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: #111827;
}

.card-description {
	color: #6b7280;
	font-size: 0.875rem;
}

.card-content {
	padding: 2rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Alert */
.alert {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: 0.5rem;
	border-left: 4px solid;
	background: #fef2f2;
	border-color: #fca5a5;
	color: #dc2626;
}

	.alert.warning {
		background: #fffbeb;
		border-color: #fbbf24;
		color: #d97706;
	}

	.alert.success {
		background: #f0fdf4;
		border-color: #22c55e;
		color: #16a34a;
	}

.alert-icon {
	flex-shrink: 0;
	margin-top: 0.125rem;
}

.hidden {
	display: none;
}

/* Security Status */
.security-status {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem;
	background: #f8fafc;
	border-radius: 0.5rem;
	border: 1px solid #e2e8f0;
}

.security-icon {
	color: #7c3aed;
	flex-shrink: 0;
}

.security-info {
	flex: 1;
}

.security-title {
	font-size: 0.875rem;
	font-weight: 500;
	color: #111827;
}

.security-detail {
	font-size: 0.75rem;
	color: #6b7280;
}

.security-indicator {
	width: 0.5rem;
	height: 0.5rem;
	border-radius: 50%;
	background: #22c55e;
}

	.security-indicator.warning {
		background: #eab308;
	}

	.security-indicator.danger {
		background: #ef4444;
	}

/* Form */
.login-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-label {
	font-size: 0.875rem;
	font-weight: 500;
	color: #111827;
}

.form-input {
	height: 2.75rem;
	width: 100%;
	border-radius: 0.375rem;
	border: 1px solid #d1d5db;
	background: white;
	padding: 0 0.75rem;
	font-size: 0.875rem;
	transition: all 0.2s;
}

	.form-input:focus {
		outline: none;
		border-color: #8b5cf6;
		box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
	}

	.form-input:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}

	.form-input::placeholder {
		color: #9ca3af;
	}

/* Password Container */
.password-container {
	position: relative;
}

.password-input {
	padding-right: 2.5rem;
}

.password-toggle {
	position: absolute;
	top: 0;
	height: 2.75rem;
	width: 2.5rem;
	background: none;
	border: none;
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.2s;
}

	.password-toggle:hover {
		color: #374151;
	}

	.password-toggle:disabled {
		opacity: 0.5;
		cursor: not-allowed;
	}
html[dir="rtl"] .password-toggle {
	right: auto;
	left: 0;
}
html[dir="rtl"] .password-input {
	padding-right: 0.75rem !important;
}
html[dir="ltr"] .password-toggle {
	right: 0;
	left: auto;
}
/* Submit Button */
.submit-btn {
	height: 2.75rem;
	width: 100%;
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	color: white;
	border: none;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	box-shadow: 0 4px 14px 0 rgba(139, 92, 246, 0.25);
}

	.submit-btn:hover:not(:disabled) {
		background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
		transform: translateY(-1px);
		box-shadow: 0 6px 20px 0 rgba(139, 92, 246, 0.35);
	}

	.submit-btn:disabled {
		opacity: 0.5;
		cursor: not-allowed;
		transform: none;
	}

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

/* Demo Credentials */
.demo-credentials {
	padding-top: 1rem;
	border-top: 1px solid #e2e8f0;
}

.demo-title {
	font-size: 0.75rem;
	color: #6b7280;
	text-align: center;
	margin-bottom: 0.5rem;
}

.demo-items {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	text-align: center;
}

.demo-item {
	font-family: 'Courier New', monospace;
	font-size: 0.75rem;
	background: #f8fafc;
	padding: 0.25rem 0.5rem;
	border-radius: 0.25rem;
	color: #374151;
}

/* Footer */
.footer-text {
	text-align: center;
	font-size: 0.875rem;
	color: #6b7280;
}

/* Loading state */
.loading .submit-btn {
	position: relative;
	color: transparent;
}

	.loading .submit-btn::after {
		content: '';
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		width: 1rem;
		height: 1rem;
		border: 2px solid transparent;
		border-top: 2px solid white;
		border-radius: 50%;
		animation: spin 1s linear infinite;
	}

@keyframes spin {
	to {
		transform: translate(-50%, -50%) rotate(360deg);
	}
}

/* Responsive */
@media (max-width: 640px) {
	.page-container {
		padding: 0.5rem;
	}

	.card-content {
		padding: 1.5rem;
	}

	.card-header {
		padding: 1.5rem 1.5rem 0;
	}
}

html[dir="rtl"] [direction="rtl"] .password-input {
	padding-right:0;
}