/**
 * Login — style Sellora: form trái, promo + mockup phải
 */

.auth-page {
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
}

body.auth-page {
	background: #f3f4f8;
}

body.auth-page::before {
	display: none;
}

/* ---- Shell & card ---- */
.auth-shell {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}

.auth-card {
	display: flex;
	width: 100%;
	max-width: 1060px;
	min-height: 620px;
	background: #fff;
	border-radius: 20px;
	box-shadow:
		0 4px 6px -1px rgb(0 0 0 / 0.05),
		0 24px 48px -12px rgb(37 99 235 / 0.1);
	overflow: hidden;
}

/* ---- Form side (trái) ---- */
.auth-form-side {
	flex: 1 1 52%;
	display: flex;
	flex-direction: column;
	padding: 2.5rem 2.75rem 1.5rem;
	min-width: 0;
}

.auth-brand {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
	color: #111827;
	font-weight: 700;
	font-size: 1.125rem;
	margin-bottom: 2.5rem;
	width: fit-content;
}

.auth-brand img {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	object-fit: contain;
}

.auth-intro {
	margin-bottom: 1.75rem;
}

.auth-heading {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	font-weight: 700;
	color: #111827;
	letter-spacing: -0.03em;
	line-height: 1.2;
}

.auth-sub {
	margin: 0;
	font-size: 0.9375rem;
	color: #6b7280;
	line-height: 1.55;
	max-width: 360px;
}

/* Alerts */
.auth-alert {
	padding: 0.75rem 1rem;
	border-radius: 10px;
	font-size: 0.875rem;
	margin-bottom: 1.25rem;
	line-height: 1.45;
}

.auth-alert--error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
}

.auth-alert--success {
	background: #f0fdf4;
	color: #15803d;
	border: 1px solid #bbf7d0;
}

.auth-panes {
	flex: 1;
}

.auth-pane {
	display: none;
	animation: paneIn 0.25s ease;
}

.auth-pane.active {
	display: block;
}

.auth-pane[hidden] {
	display: none !important;
}

@keyframes paneIn {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

/* Fields */
.auth-form .field {
	margin-bottom: 1.25rem;
}

.auth-form .field label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
}

.auth-form .field input {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 1rem;
	font-size: 0.9375rem;
	font-family: inherit;
	color: #111827;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	min-height: 48px;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-form .field input:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.field-mono {
	font-family: ui-monospace, monospace;
	letter-spacing: 0.05em;
}

.field-password {
	position: relative;
}

.field-password input {
	padding-right: 2.75rem;
}

.field-password-toggle {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: none;
	color: #9ca3af;
	cursor: pointer;
	border-radius: 8px;
	padding: 0;
}

.field-password-toggle:hover {
	color: #4b5563;
}

.auth-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.25rem;
}

.auth-check {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: #4b5563;
	cursor: pointer;
	user-select: none;
}

.auth-check input {
	width: 16px;
	height: 16px;
	accent-color: #3b82f6;
}

.auth-submit {
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.875rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	font-family: inherit;
	color: #fff;
	background: #3b82f6;
	border: none;
	border-radius: 10px;
	min-height: 48px;
	cursor: pointer;
	transition: background 0.15s;
}

.auth-submit:hover {
	background: #2563eb;
}

.auth-submit:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.auth-switch {
	margin: 1.25rem 0 0;
	text-align: center;
	font-size: 0.875rem;
	color: #6b7280;
}

.auth-switch--muted {
	margin-top: 0.5rem;
}

.auth-link {
	background: none;
	border: none;
	padding: 0;
	font: inherit;
	font-weight: 600;
	color: #2563eb;
	cursor: pointer;
	text-decoration: none;
}

.auth-link:hover {
	text-decoration: underline;
}

.auth-form-footer {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: auto;
	padding-top: 2rem;
	font-size: 0.75rem;
	color: #9ca3af;
	gap: 1rem;
	flex-wrap: wrap;
}

/* ---- Promo side (phải) — palette đồng bộ app #3b82f6 ---- */
.auth-promo {
	flex: 0 0 48%;
	position: relative;
	background: linear-gradient(160deg, #1d4ed8 0%, #2563eb 42%, #3b82f6 100%);
	color: #fff;
	display: flex;
	align-items: center;
	padding: 2.5rem 2rem;
	overflow: hidden;
}

.auth-promo-bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background:
		radial-gradient(ellipse 70% 55% at 100% 0%, rgba(147, 197, 253, 0.35) 0%, transparent 55%),
		radial-gradient(ellipse 50% 40% at 0% 100%, rgba(30, 64, 175, 0.5) 0%, transparent 50%);
}

.auth-promo-bg::before,
.auth-promo-bg::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.auth-promo-bg::before {
	width: 320px;
	height: 320px;
	top: -120px;
	right: -100px;
	border: 1px solid rgba(255, 255, 255, 0.12);
	background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
}

.auth-promo-bg::after {
	width: 240px;
	height: 240px;
	bottom: -60px;
	left: -80px;
	border: 1px solid rgba(255, 255, 255, 0.08);
	background: radial-gradient(circle, rgba(0, 0, 0, 0.08) 0%, transparent 70%);
}

.auth-promo-content {
	position: relative;
	z-index: 1;
	width: 100%;
}

/* Ghi đè base.css h2 { color: dark } */
.auth-promo .auth-promo-title {
	margin: 0 0 0.625rem;
	padding: 0;
	font-size: 1.375rem;
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.auth-promo .auth-promo-text {
	margin: 0 0 1.5rem;
	font-size: 0.875rem;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.78);
	max-width: 300px;
}

/* Mockup — glass nhẹ, không xoay 3D */
.auth-mockup {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

.mockup-card {
	background: rgba(255, 255, 255, 0.94);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.65);
	border-radius: 14px;
	padding: 0.875rem 1rem;
	color: #1e293b;
	box-shadow:
		0 4px 24px rgba(15, 23, 42, 0.12),
		0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.mockup-card--wide {
	padding-bottom: 1rem;
}

.mockup-label {
	display: block;
	font-size: 0.625rem;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	margin-bottom: 0.2rem;
}

.mockup-value {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.mockup-value--sm {
	font-size: 1.125rem;
	color: #1e40af;
}

.mockup-bars {
	display: flex;
	align-items: flex-end;
	gap: 5px;
	height: 44px;
	margin-top: 0.625rem;
	padding-top: 2px;
}

.mockup-bars span {
	flex: 1;
	height: var(--h, 50%);
	background: linear-gradient(180deg, #93c5fd 0%, #3b82f6 100%);
	border-radius: 4px 4px 2px 2px;
	opacity: 0.9;
}

.mockup-bars span:nth-child(even) {
	opacity: 0.65;
}

.mockup-row {
	display: flex;
	gap: 0.625rem;
}

.mockup-row .mockup-card {
	flex: 1;
	padding: 0.75rem 1rem;
}

.mockup-card--list {
	padding: 0.35rem 0;
	background: rgba(255, 255, 255, 0.9);
}

.mockup-list-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 0.75rem;
	padding: 0.45rem 1rem;
	font-size: 0.75rem;
	border-bottom: 1px solid #e2e8f0;
}

.mockup-list-item:last-child {
	border-bottom: none;
}

.mockup-list-item span {
	color: #475569;
	font-weight: 500;
}

.mockup-list-item em {
	font-style: normal;
	font-weight: 600;
	font-size: 0.6875rem;
	color: #2563eb;
	white-space: nowrap;
}

/* Mobile */
@media (max-width: 900px) {
	.auth-card {
		flex-direction: column;
		min-height: auto;
		max-width: 440px;
	}

	.auth-promo {
		display: none;
	}

	.auth-form-side {
		padding: 2rem 1.5rem 1.25rem;
	}

	.auth-brand {
		margin-bottom: 1.75rem;
	}

	.auth-heading {
		font-size: 1.5rem;
	}
}

@media (max-width: 400px) {
	.auth-shell {
		padding: 0.75rem;
	}

	.auth-card {
		border-radius: 16px;
	}

	.auth-form-side {
		padding: 1.5rem 1.25rem 1rem;
	}
}

/* Override legacy */
.auth-page .auth-form {
	background: none;
	border: none;
	box-shadow: none;
	padding: 0;
}
