/* ================================================================
   AUTH DESIGN SYSTEM - Đăng nhập / Đăng ký / Xác minh 2FA / Quên mật khẩu /
   Đặt lại mật khẩu. Phong cách Black & White tối giản, premium - KHÔNG
   gradient xanh/tím, không glow, không glassmorphism.

   Toàn bộ selector bắt đầu bằng "authpage_" (tên gốc đã có sẵn, giữ nguyên
   để không phải sửa JS đang dùng querySelectorAll/getElementById theo các
   class/id này) - chỉ dùng riêng cho 3 trang auth, không ảnh hưởng
   header/footer/product/account/admin. ================================================================ */

.authpage_wrap {
	max-width: 1020px;
	margin: 40px auto;
	display: grid;
	grid-template-columns: 1fr 1.05fr;
	min-height: 600px;
	border-radius: 18px;
	overflow: hidden;
	border: 1px solid #ececec;
	box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 16px 40px rgba(0,0,0,0.06);
	background: #fff;
}

/* ===== LEFT PANEL - branding, nền đen gần tuyệt đối ===== */
.authpage_brand {
	position: relative;
	background: #0a0a0a;
	color: #fff;
	padding: 52px 48px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
}
.authpage_brand:before {
	content: '';
	position: absolute;
	width: 380px; height: 380px;
	border: 1px solid rgba(255,255,255,0.08);
	border-radius: 50%;
	top: -160px; right: -140px;
}
.authpage_brand:after {
	content: '';
	position: absolute;
	width: 260px; height: 260px;
	border: 1px solid rgba(255,255,255,0.06);
	border-radius: 50%;
	bottom: -110px; left: -90px;
}
.authpage_brand > * { position: relative; z-index: 1; }
/* Wordmark dạng chữ thay cho ảnh logo (ảnh logo đen phải invert nên bị bệt,
   không đẹp trên nền đen). */
.authpage_brand_mark {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: #fff;
}
.authpage_brand_main { margin: auto 0; padding: 56px 0; }
.authpage_brand h1 {
	font-size: 30px;
	font-weight: 800;
	line-height: 1.32;
	margin: 0 0 14px;
	letter-spacing: -0.015em;
	color: #fff;
}
.authpage_brand p { font-size: 14px; color: #a3a3a3; line-height: 1.7; margin: 0; max-width: 360px; }
.authpage_brand_list { list-style: none; padding: 0; margin: 34px 0 0; }
.authpage_brand_list li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13.5px;
	color: #e5e5e5;
	margin-bottom: 15px;
}
.authpage_brand_list li i {
	width: 26px; height: 26px;
	border-radius: 50%;
	border: 1px solid rgba(255,255,255,0.18);
	display: flex; align-items: center; justify-content: center;
	font-size: 11px;
	color: #fff;
	flex-shrink: 0;
}
.authpage_brand_foot { font-size: 12px; color: #6b6b6b; }

/* ===== RIGHT PANEL - form ===== */
.authpage_form_side {
	background: #fff;
	padding: 52px 46px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.authpage_form_inner { max-width: 420px; width: 100%; margin: 0 auto; }

.authpage_form_mark { display: none; }

.authpage_top_heading { margin-bottom: 24px; }
.authpage_form_side h2 { font-size: 22px; font-weight: 800; margin: 0 0 6px; color: #0a0a0a; letter-spacing: -0.01em; }
.authpage_form_side_sub { font-size: 13.5px; color: #808080; margin: 0; line-height: 1.55; }

/* ===== Segmented switch [ Đăng nhập ] [ Đăng ký ] - giữ nguyên class/JS,
   chỉ đổi giao diện sang black & white. ===== */
.authpage_tabs {
	display: flex;
	background: #f2f2f2;
	border-radius: 11px;
	padding: 4px;
	margin-bottom: 28px;
}
.authpage_tab_btn {
	flex: 1;
	text-align: center;
	padding: 11px;
	border: none;
	background: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #737373;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.authpage_tab_btn.active {
	background: #0a0a0a;
	color: #fff;
}

.authpage_panel { display: none; animation: authpage_fade 0.22s ease; }
.authpage_panel.active { display: block; }
@keyframes authpage_fade {
	from { opacity: 0; transform: translateY(4px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ===== Input ===== */
.authpage_input_wrap { position: relative; margin-bottom: 17px; }
.authpage_input_wrap label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	color: #262626;
	margin-bottom: 7px;
}
.authpage_input_wrap .authpage_hint {
	font-size: 11.5px;
	color: #a3a3a3;
	font-weight: 400;
	margin-left: 4px;
}
.authpage_input_box { position: relative; }
.authpage_input_box i.authpage_icon {
	position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
	color: #a3a3a3; font-size: 14.5px;
	transition: color 0.15s ease;
	pointer-events: none;
}
.authpage_input_box input {
	width: 100%;
	height: 52px;
	padding: 0 16px 0 44px;
	border: 1.5px solid #e2e2e2;
	border-radius: 11px;
	font-size: 14.5px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	background: #fafafa;
	color: #0a0a0a;
	font-family: inherit;
}
.authpage_input_box input:focus {
	outline: none;
	border-color: #0a0a0a;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}
.authpage_input_box:focus-within i.authpage_icon { color: #0a0a0a; }
.authpage_toggle_pw {
	position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
	background: none; border: none; color: #a3a3a3; cursor: pointer; font-size: 14.5px; padding: 6px;
	transition: color 0.15s ease;
	line-height: 1;
}
.authpage_toggle_pw:hover { color: #0a0a0a; }

/* ===== Button =====
   Theme gốc có rule .woocommerce button / input[type=submit] dùng
   var(--color-content-primary-grad) (gradient xanh -> hồng) với specificity
   cao hơn class đơn, nên phải !important ở đây mới ghi đè được. */
.authpage_wrap .authpage_submit_btn {
	width: 100%;
	height: 52px;
	background: #0a0a0a !important;
	background-image: none !important;
	color: #fff !important;
	border: none !important;
	border-radius: 11px !important;
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1;
	text-shadow: none;
	box-shadow: none !important;
	cursor: pointer;
	margin-top: 8px;
	padding: 0;
	transition: background 0.18s ease, transform 0.1s ease, opacity 0.18s ease;
}
.authpage_wrap .authpage_submit_btn:hover { background: #000 !important; background-image: none !important; }
.authpage_wrap .authpage_submit_btn:active { transform: scale(0.98); background: #000 !important; }
.authpage_wrap .authpage_submit_btn:focus { background: #0a0a0a !important; color: #fff !important; }
.authpage_wrap .authpage_submit_btn:disabled { opacity: 0.45; cursor: not-allowed; }

.authpage_footer_link { text-align: center; margin-top: 18px; font-size: 13.5px; color: #737373; }
.authpage_footer_link a { color: #0a0a0a; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.authpage_privacy_text { font-size: 11.5px; color: #a3a3a3; margin: 15px 0; line-height: 1.6; }
.authpage_privacy_text a { color: #0a0a0a; font-weight: 600; }

/* ===== Checkbox "Ghi nhớ thiết bị này 30 ngày" ===== */
.authpage_checkbox_row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	color: #4d4d4d;
	cursor: pointer;
	margin: 4px 0 20px;
	line-height: 1.5;
}
.authpage_checkbox_row input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	width: 19px; height: 19px;
	border: 1.5px solid #d4d4d4;
	border-radius: 5px;
	flex-shrink: 0;
	margin-top: 1px;
	cursor: pointer;
	position: relative;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.authpage_checkbox_row input[type="checkbox"]:checked {
	background: #0a0a0a;
	border-color: #0a0a0a;
}
.authpage_checkbox_row input[type="checkbox"]:checked:after {
	content: '';
	position: absolute;
	left: 6px; top: 2px;
	width: 5px; height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* ===== OTP 6 ô (Xác minh 2FA) - #tfa_code gốc chuyển thành input ẩn để
   giữ nguyên contract với verify2FA(), 6 ô dưới đây chỉ là lớp UI, tự
   đồng bộ giá trị vào #tfa_code qua JS (không đụng endpoint/logic). ===== */
.authpage_otp_group { display: flex; gap: 10px; justify-content: space-between; margin-bottom: 6px; }
.authpage_otp_box {
	width: 100%;
	aspect-ratio: 1 / 1;
	max-width: 54px;
	text-align: center;
	font-size: 20px;
	font-weight: 700;
	border: 1.5px solid #e2e2e2;
	border-radius: 11px;
	background: #fafafa;
	color: #0a0a0a;
	box-sizing: border-box;
	font-family: inherit;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.authpage_otp_box:focus {
	outline: none;
	border-color: #0a0a0a;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(10,10,10,0.06);
}
.authpage_otp_expiry {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: #a3a3a3;
	margin: 10px 0 4px;
}
.authpage_otp_expiry i { font-size: 11px; }

/* ===== Message box (link hết hạn/không hợp lệ ở đặt lại mật khẩu...) -
   chỉ dùng màu status khi thật sự cần. ===== */
.authpage_message_box {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 15px 16px;
	border-radius: 11px;
	font-size: 13.5px;
	line-height: 1.55;
	margin-bottom: 18px;
}
.authpage_message_box i { margin-top: 2px; flex-shrink: 0; }
.authpage_message_box--error { background: #fbf4f4; color: #8a1f1f; border: 1px solid #f0d9d9; }
.authpage_message_box--warning { background: #fbf8f1; color: #7a5211; border: 1px solid #efe1c4; }

@media (max-width: 782px) {
	.authpage_wrap { grid-template-columns: 1fr; margin: 0; border-radius: 0; border: none; box-shadow: none; min-height: 0; }
	.authpage_brand { display: none; }
	.authpage_form_side { padding: 24px 20px 32px; }
	.authpage_form_inner { max-width: 100%; }
	.authpage_form_mark {
		display: block;
		font-size: 12.5px;
		font-weight: 800;
		letter-spacing: 0.16em;
		text-transform: uppercase;
		color: #0a0a0a;
		margin: 0 0 20px;
	}
	.authpage_otp_box { max-width: none; font-size: 18px; }
	.authpage_otp_group { gap: 7px; }
	.authpage_input_box input,
	.authpage_submit_btn { height: 50px; }
}
