/* Hộp đăng nhập kiểu Medium. Dùng màu/font của theme FixBox, có giá trị dự phòng nếu đổi theme. */
.fxauth {
	--a-paper: var(--c-paper, #F3EDE0);
	--a-card: var(--c-card, #FBF7EE);
	--a-field: var(--c-field, #FFFDF8);
	--a-ink: var(--c-ink, #26221E);
	--a-muted: var(--c-muted, #625A50);
	--a-line: var(--c-line, #CFC5B2);
	--a-line-strong: var(--c-line-strong, #A89E8A);
	--a-accent: var(--c-accent, #A6402A);
	--a-serif: var(--f-serif, Lora, Georgia, serif);
	--a-sans: var(--f-sans, 'Be Vietnam Pro', system-ui, sans-serif);
	position: fixed; inset: 0; z-index: 1000;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--a-sans); color: var(--a-ink);
}
.fxauth[hidden] { display: none; }
.fxauth .fx-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.fxauth__backdrop { position: absolute; inset: 0; background: color-mix(in srgb, var(--a-paper) 92%, transparent); }
.fxauth__card {
	position: relative; box-sizing: border-box; width: 100%; height: 100%; overflow-y: auto;
	display: flex; flex-direction: column;
	padding: 56px 24px 32px; background: var(--a-card); text-align: center;
}
@media (min-width: 728px) {
	.fxauth__card { width: 460px; height: auto; min-height: 560px; max-height: calc(100vh - 32px); padding: 48px 52px 36px; border-radius: 16px; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 12px 40px rgba(0, 0, 0, .14); }
}
.fxauth__x { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--a-muted); cursor: pointer; }
.fxauth__x:hover { color: var(--a-ink); }

/* Chế độ join/signin: ẩn hiện câu chữ tương ứng */
.fxauth[data-mode="join"] [data-mode="signin"],
.fxauth[data-mode="signin"] [data-mode="join"] { display: none; }

.fxauth__view[hidden] { display: none; }
/* Căn giữa dọc bằng margin auto (không dùng justify-content): nội dung cao hơn hộp vẫn cuộn tới được phần đầu. */
.fxauth__view { margin-block: auto; }
.fxauth__title { margin: 0 0 32px; font-family: var(--a-serif); font-size: 30px; font-weight: 500; line-height: 1.2; letter-spacing: -.015em; }
.fxauth__sub { margin: -24px auto 28px; max-width: 340px; font-size: 15px; line-height: 1.5; color: var(--a-muted); }
.fxauth__lead { max-width: 360px; margin: -20px auto 28px; font-size: 16px; line-height: 1.55; color: var(--a-muted); }
.fxauth__list { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fxauth__btn {
	position: relative; box-sizing: border-box; width: 100%; max-width: 340px; min-height: 44px;
	display: flex; align-items: center; justify-content: center; padding: 8px 44px;
	border: 1px solid var(--a-ink); border-radius: 22px; background: transparent;
	font-size: 15px; font-weight: 500; line-height: 1.3; color: var(--a-ink); text-decoration: none; cursor: pointer;
	transition: background-color .15s, border-color .15s;
}
.fxauth__btn:hover { background: color-mix(in srgb, var(--a-ink) 6%, transparent); color: var(--a-ink); }
.fxauth__btn svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }
.fxauth__tag { position: absolute; right: -8px; top: -9px; padding: 2px 7px; border-radius: 9px; background: var(--a-paper); border: 1px solid var(--a-line); font-size: 11px; font-weight: 500; color: var(--a-muted); }
.fxauth__switch { margin: 40px 0 0; font-size: 16px; }
.fxauth__switch button { padding: 4px; border: 0; background: none; font: inherit; font-weight: 700; color: var(--a-accent); cursor: pointer; }
.fxauth__legal { max-width: 420px; margin: 32px auto 0; font-size: 13px; line-height: 1.55; color: var(--a-muted); }
.fxauth__legal a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Form email */
.fxauth__form { display: flex; flex-direction: column; align-items: stretch; width: 100%; max-width: 340px; margin: 0 auto; text-align: left; }
.fxauth__form[hidden] { display: none; }
.fxauth__form label { margin: 0 0 6px 2px; font-size: 13px; font-weight: 600; letter-spacing: .01em; color: var(--a-ink); }
.fxauth__form input:not(.fx-hp) {
	box-sizing: border-box; width: 100%; height: 48px; padding: 0 14px;
	border: 1px solid var(--a-line); border-radius: 12px; background: var(--a-field);
	font: inherit; font-size: 16px; color: var(--a-ink);
	transition: border-color .15s, box-shadow .15s;
}
.fxauth__form input:not(.fx-hp):hover { border-color: var(--a-line-strong); }
.fxauth__form input:focus { outline: none; border-color: var(--a-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a-accent) 16%, transparent); }
.fxauth__form input[name="code"] { font-size: 22px; letter-spacing: .4em; text-align: center; font-variant-numeric: tabular-nums; }
.fxauth__primary {
	display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
	min-width: 200px; height: 44px; margin-top: 28px; padding: 0 24px;
	border: 0; border-radius: 22px; background: var(--a-ink); color: var(--a-card);
	font: inherit; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer;
}
.fxauth__primary:hover { background: var(--a-accent); color: var(--a-card); }
.fxauth__primary.is-loading { opacity: .6; pointer-events: none; }
.fxauth__back { margin-top: 32px; padding: 8px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--a-muted); cursor: pointer; }
.fxauth__back:hover { color: var(--a-ink); }
.fxauth__msg { margin: 16px auto 0; max-width: 360px; font-size: 14px; line-height: 1.5; color: var(--a-muted); }
.fxauth__msg.is-error { color: var(--a-accent); }
.fxauth__dev { margin: 0 0 8px; padding: 10px 14px; border: 1px dashed var(--a-line-strong); font-size: 13px; }
.fxauth__dev a { color: var(--a-accent); font-weight: 600; }

/* Form mật khẩu: nhiều ô xếp dọc */
.fxauth__form input:not(.fx-hp) + label { margin-top: 16px; }
.fxauth__form .fxauth__primary { width: 100%; margin-top: 22px; }
.fxauth__form .fxauth__msg { text-align: center; }
.fxauth__form[data-fxauth-login] .fxauth__link { align-self: flex-end; margin-top: 8px; margin-bottom: -6px; }

.fxauth__opt { font-weight: 400; color: var(--a-muted); }
.fxauth__hint { margin: 6px 0 0 2px; font-size: 12px; color: var(--a-muted); }
.fxauth__link { align-self: center; margin-top: 10px; padding: 4px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--a-accent); cursor: pointer; }
.fxauth__link:hover { text-decoration: underline; }
.fxauth__or { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 340px; margin: 28px auto 20px; font-size: 13px; color: var(--a-muted); }
.fxauth__or::before, .fxauth__or::after { content: ""; flex: 1; border-top: 1px solid var(--a-line); }
.fxauth__switch { margin-top: 28px; }
.fxauth__legal { margin-top: 20px; }

/* Trang thông báo (hết hạn link, lỗi, xác nhận email) */
.fxauth-notice { box-sizing: border-box; max-width: 520px; min-height: 100vh; margin: 0 auto; padding: 80px 24px; display: flex; flex-direction: column; justify-content: center; text-align: center; font-family: var(--f-sans, system-ui, sans-serif); color: var(--c-ink, #26221E); }
.fxauth-notice__brand { align-self: center; margin-bottom: 40px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; color: inherit; text-decoration: none; }
.fxauth-notice h1 { margin: 0 0 16px; font-family: var(--f-serif, Georgia, serif); font-size: 32px; font-weight: 400; line-height: 1.25; }
.fxauth-notice p { font-size: 17px; line-height: 1.6; color: var(--c-muted, #625A50); }
.fxauth-notice .fxauth__primary { color: var(--c-card, #FBF7EE); background: var(--c-ink, #26221E); }
body.fxauth-page { background: var(--c-paper, #F3EDE0); }
