/* Login page - split panel design (Crextio-style) */
:root {
	--login-accent: #f5d547;
	--login-accent-dark: #e6c63d;
	--login-bg-start: #fefce8;
	--login-bg-end: #fffef5;
	--login-text: #1f2937;
	--login-text-muted: #6b7280;
	--login-input-bg: #ffffff;
	--login-input-border: #e5e7eb;
	--login-panel-radius: 24px;
	--login-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.login-page-body {
	margin: 0;
	min-height: 100vh;
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
	background: #f3f4f6;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
}

.login-page-wrapper {
	display: flex;
	width: 100%;
	max-width: 1000px;
	min-height: 620px;
	background: #fff;
	border-radius: var(--login-panel-radius);
	box-shadow: var(--login-shadow);
	overflow: hidden;
}

/* Left panel - form */
.login-form-panel {
	flex: 1;
	min-width: 0;
	background: linear-gradient(135deg, var(--login-bg-start) 0%, var(--login-bg-end) 100%);
	border-radius: var(--login-panel-radius) 0 0 var(--login-panel-radius);
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.login-brand {
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	width: auto;
	max-width: 220px;
	height: auto;
	background: transparent;
	border: none;
	border-radius: 0;
	font-weight: 700;
	font-size: 1rem;
	color: var(--login-text);
	margin-bottom: 40px;
}

.login-brand-logo {
	display: block;
	max-width: 200px;
	max-height: 56px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.login-form-panel h1 {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--login-text);
	margin: 0 0 8px 0;
	line-height: 1.25;
}

.login-form-panel .login-subtitle {
	font-size: 0.9375rem;
	color: var(--login-text-muted);
	margin: 0 0 32px 0;
}

.login-form .form-group {
	margin-bottom: 20px;
}

.login-form label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--login-text-muted);
	margin-bottom: 8px;
}

.login-form .form-control {
	width: 100%;
	height: 48px;
	padding: 0 16px;
	font-size: 0.9375rem;
	color: var(--login-text);
	background: var(--login-input-bg);
	border: 1px solid var(--login-input-border);
	border-radius: 12px;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form .form-control:focus {
	border-color: var(--login-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba(245, 213, 71, 0.25);
}

.login-form .form-control::placeholder {
	color: #9ca3af;
}

.login-form .input-group-password {
	position: relative;
}

.login-form .input-group-password .form-control {
	padding-right: 48px;
}

.login-form .password-toggle {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--login-text-muted);
	cursor: pointer;
	padding: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.login-form .password-toggle:hover {
	color: var(--login-text);
}

.login-form .btn-submit {
	width: 100%;
	height: 48px;
	background: var(--login-accent);
	color: #1f2937;
	font-size: 1rem;
	font-weight: 600;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	margin-top: 8px;
	transition: background 0.2s, transform 0.1s;
}

.login-form .btn-submit:hover {
	background: var(--login-accent-dark);
	color: #1f2937;
}

.login-form .btn-submit:active {
	transform: scale(0.98);
}

.login-divider {
	display: flex;
	align-items: center;
	margin: 24px 0;
	gap: 12px;
}

.login-divider::before,
.login-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--login-input-border);
}

.login-divider span {
	font-size: 0.8125rem;
	color: var(--login-text-muted);
}

.login-social {
	display: flex;
	gap: 12px;
}

.login-social .btn-social {
	flex: 1;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #fff;
	border: 1px solid var(--login-input-border);
	border-radius: 12px;
	font-size: 0.9375rem;
	font-weight: 500;
	color: var(--login-text);
	text-decoration: none;
	transition: border-color 0.2s, background 0.2s;
}

.login-social .btn-social:hover {
	background: #f9fafb;
	border-color: #d1d5db;
	color: var(--login-text);
}

.login-social-icon {
	font-size: 1.25rem;
}

/* Right panel - visual */
.login-visual-panel {
	flex: 1;
	min-width: 0;
	min-height: 520px;
	border-radius: 0 var(--login-panel-radius) var(--login-panel-radius) 0;
	position: relative;
	overflow: hidden;
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 50%, #fcd34d 100%);
}

.login-visual-panel .login-visual-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: 0.85;
}

.login-visual-bg-team {
	background-image: url('https://images.unsplash.com/photo-1522071820081-009f0129c71c?w=800');
}

.login-visual-panel .login-visual-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, rgba(0,0,0,0.15) 100%);
}

.login-close-btn {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 36px;
	height: 36px;
	background: var(--login-accent);
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #1f2937;
	cursor: pointer;
	z-index: 2;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.login-widgets {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
}

.login-widget-task {
	position: absolute;
	top: 18%;
	left: 50%;
	transform: translateX(-50%);
	width: 80%;
	max-width: 220px;
}

.login-widget-task .task-title {
	background: var(--login-accent);
	color: #1f2937;
	padding: 10px 14px;
	border-radius: 12px 12px 0 0;
	font-size: 0.8125rem;
	font-weight: 600;
}

.login-widget-task .task-time {
	background: rgba(31, 41, 55, 0.85);
	color: #fff;
	padding: 8px 14px;
	border-radius: 0 0 12px 12px;
	font-size: 0.75rem;
}

.login-widget-avatars {
	position: absolute;
	top: 42%;
	right: 15%;
	display: flex;
}

.login-widget-avatars .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: linear-gradient(135deg, #a78bfa, #c4b5fd);
	border: 2px solid rgba(255,255,255,0.9);
	margin-left: -10px;
}

.login-widget-avatars .avatar:nth-child(2) {
	background: linear-gradient(135deg, #f472b6, #f9a8d4);
}

.login-widget-avatars .avatar:nth-child(3) {
	background: linear-gradient(135deg, #34d399, #6ee7b7);
}

.login-widget-calendar {
	position: absolute;
	bottom: 28%;
	left: 12%;
	background: rgba(255, 255, 255, 0.9);
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 0.6875rem;
	color: var(--login-text);
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.login-widget-calendar .cal-days {
	display: flex;
	gap: 4px;
	margin-bottom: 6px;
	color: var(--login-text-muted);
}

.login-widget-calendar .cal-dates {
	display: flex;
	gap: 6px;
}

.login-widget-calendar .cal-dates span {
	width: 20px;
	text-align: center;
}

.login-widget-calendar .cal-dates span.highlight {
	background: var(--login-accent);
	border-radius: 6px;
	font-weight: 600;
}

.login-widget-meeting {
	position: absolute;
	bottom: 12%;
	left: 50%;
	transform: translateX(-50%);
	background: #fff;
	padding: 14px 18px;
	border-radius: 14px;
	box-shadow: 0 4px 16px rgba(0,0,0,0.1);
	max-width: 200px;
}

.login-widget-meeting .meeting-title {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--login-text);
	margin: 0 0 4px 0;
}

.login-widget-meeting .meeting-time {
	font-size: 0.75rem;
	color: var(--login-text-muted);
	margin: 0 0 10px 0;
}

.login-widget-meeting .meeting-avatars {
	display: flex;
	gap: -6px;
}

.login-widget-meeting .meeting-avatars .dot {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, #93c5fd, #60a5fa);
	border: 2px solid #fff;
	margin-left: -8px;
}

.login-widget-meeting .meeting-avatars .dot:nth-child(2) { background: linear-gradient(135deg, #fcd34d, #fbbf24); }
.login-widget-meeting .meeting-avatars .dot:nth-child(3) { background: linear-gradient(135deg, #34d399, #10b981); }
.login-widget-meeting .meeting-avatars .dot:nth-child(4) { background: linear-gradient(135deg, #f472b6, #ec4899); }

/* Alerts */
.login-alert {
	padding: 12px 16px;
	border-radius: 12px;
	margin-bottom: 20px;
	font-size: 0.875rem;
}

.login-alert-danger {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.login-alert-success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.login-form .invalid-feedback {
	font-size: 0.8125rem;
	margin-top: 4px;
}

.login-form .form-control.is-invalid {
	border-color: #dc2626;
}

/* Customer support portal login */
.customer-portal-login {
	--login-accent: #0ea5e9;
	--login-accent-dark: #0284c7;
	--login-bg-start: #f0f9ff;
	--login-bg-end: #e0f2fe;
}

.customer-portal-login .login-form .btn-submit {
	color: #fff;
}

.customer-portal-login .login-form .btn-submit:hover {
	color: #fff;
}

.customer-portal-login .login-form .form-control:focus {
	box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.22);
}

.customer-portal-login-branding {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin-bottom: 32px;
}

.customer-portal-login-logo {
	display: block;
	height: 44px;
	width: auto;
	max-width: 220px;
	object-fit: contain;
	object-position: left center;
	flex-shrink: 0;
}

.customer-portal-login-branding .login-brand {
	margin-bottom: 0;
}

.customer-portal-brand {
	width: auto;
	min-width: 0;
	height: auto;
	padding: 8px 16px;
	gap: 8px;
	border-radius: 999px;
	font-size: 0.875rem;
}

.customer-portal-brand i {
	font-size: 1.125rem;
	color: var(--login-accent-dark);
}

.customer-portal-visual-logo {
	position: absolute;
	top: 24px;
	left: 24px;
	right: 24px;
	z-index: 2;
	pointer-events: none;
}

.customer-portal-visual-logo img {
	height: 32px;
	width: auto;
	max-width: min(160px, 42vw);
	object-fit: contain;
	object-position: left center;
	opacity: 0.92;
	filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.customer-portal-footnote {
	margin: 28px 0 0 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--login-text-muted);
}

.login-visual-panel.login-visual-customer {
	background: linear-gradient(145deg, #0c4a6e 0%, #0369a1 45%, #0ea5e9 100%);
}

.login-visual-bg-customer {
	background-image: url('https://images.unsplash.com/photo-1556761175-5973dc0f32e7?w=900');
	opacity: 0.35;
}

.customer-portal-widgets .customer-widget-ticket {
	position: absolute;
	top: 16%;
	left: 50%;
	transform: translateX(-50%);
	width: 82%;
	max-width: 240px;
	background: rgba(255, 255, 255, 0.95);
	border-radius: 14px;
	padding: 14px 16px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.customer-widget-ticket-label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--login-text);
	display: flex;
	align-items: center;
	gap: 8px;
}

.customer-widget-ticket-label i {
	color: #0284c7;
	font-size: 1rem;
}

.customer-widget-ticket-meta {
	margin-top: 6px;
	font-size: 0.75rem;
	color: var(--login-text-muted);
}

.customer-portal-widgets .customer-widget-stats {
	position: absolute;
	top: 38%;
	right: 10%;
	display: flex;
	gap: 10px;
}

.customer-widget-stat {
	background: rgba(255, 255, 255, 0.92);
	border-radius: 12px;
	padding: 12px 16px;
	min-width: 72px;
	text-align: center;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.customer-widget-stat-value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0369a1;
	line-height: 1.2;
}

.customer-widget-stat-label {
	font-size: 0.6875rem;
	color: var(--login-text-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.customer-portal-widgets .customer-widget-message {
	position: absolute;
	bottom: 14%;
	left: 50%;
	transform: translateX(-50%);
	width: 88%;
	max-width: 260px;
	display: flex;
	gap: 12px;
	align-items: flex-start;
	background: rgba(15, 23, 42, 0.88);
	backdrop-filter: blur(8px);
	border-radius: 14px;
	padding: 14px 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.customer-widget-message-avatar {
	width: 40px;
	height: 40px;
	flex-shrink: 0;
	border-radius: 10px;
	background: linear-gradient(135deg, #38bdf8, #0ea5e9);
}

.customer-widget-message-name {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #f8fafc;
	margin-bottom: 4px;
}

.customer-widget-message-text {
	font-size: 0.75rem;
	color: #94a3b8;
	line-height: 1.4;
	margin: 0;
}

@media (max-width: 768px) {
	.customer-portal-widgets .customer-widget-stats {
		top: 32%;
		right: 6%;
	}
}

/* Responsive */
@media (max-width: 768px) {
	.login-page-wrapper {
		flex-direction: column;
		min-height: auto;
	}

	.login-form-panel {
		border-radius: var(--login-panel-radius) var(--login-panel-radius) 0 0;
		padding: 32px 24px;
	}

	.login-visual-panel {
		min-height: 280px;
		border-radius: 0 0 var(--login-panel-radius) var(--login-panel-radius);
	}

	.login-widgets {
		display: none;
	}
}

/* Login theme: SajiloCRM vs Ticketing System (appsettings LoginPage:Theme) */
.login-theme-sajilocrm {
	--login-bg-start: #eff6ff;
	--login-bg-end: #f5f3ff;
}

.login-theme-ticketingsystem {
	--login-bg-start: #ecfdf5;
	--login-bg-end: #f0fdf4;
}

.login-theme-ticketingsystem .login-visual-panel {
	background: linear-gradient(135deg, #a7f3d0 0%, #34d399 50%, #059669 100%);
}

.login-visual-bg-ticketing {
	background-image: url('https://images.unsplash.com/photo-1551434678-e076c223a692?w=800');
}

.login-visual-brand-mark {
	position: absolute;
	top: 24px;
	left: 24px;
	z-index: 2;
	max-width: 160px;
	opacity: 0.95;
}

.login-visual-brand-mark img {
	max-height: 40px;
	width: auto;
}

.login-widgets-ticketing {
	position: relative;
	z-index: 2;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	height: 100%;
	justify-content: center;
}

.login-widget-ticket {
	background: rgba(255, 255, 255, 0.92);
	border-radius: 16px;
	padding: 16px 18px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.login-widget-ticket .ticket-label {
	font-weight: 700;
	color: #064e3b;
	font-size: 0.95rem;
	display: flex;
	align-items: center;
	gap: 8px;
}

.login-widget-ticket .ticket-meta {
	font-size: 0.8rem;
	color: #047857;
	margin-top: 6px;
}

.login-widget-stats {
	display: flex;
	gap: 10px;
}

.login-widget-stat {
	flex: 1;
	background: rgba(255, 255, 255, 0.88);
	border-radius: 14px;
	padding: 14px 10px;
	text-align: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.login-widget-stat .stat-num {
	display: block;
	font-size: 1.35rem;
	font-weight: 700;
	color: #065f46;
	line-height: 1.1;
}

.login-widget-stat .stat-lbl {
	display: block;
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #047857;
	margin-top: 4px;
}

.login-widget-queue {
	background: rgba(255, 255, 255, 0.88);
	border-radius: 16px;
	padding: 16px 18px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.login-widget-queue .queue-title {
	font-weight: 700;
	color: #064e3b;
	margin-bottom: 10px;
	font-size: 0.9rem;
}

.login-widget-queue .queue-item {
	font-size: 0.82rem;
	color: #334155;
	padding: 6px 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.login-widget-queue .dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	flex-shrink: 0;
}

.login-widget-queue .dot-open { background: #f59e0b; }
.login-widget-queue .dot-progress { background: #3b82f6; }
.login-widget-queue .dot-new { background: #10b981; }
