/* Khối đăng ký/đăng nhập bên phải hero — bo góc chỉ ở cạnh phải vì nó dính
   liền với banner bên trái thành 1 khối duy nhất (xem .hero trong home.css). */
.hero-auth {
	background: #fff;
	padding: 16px 22px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border-radius: 0 var(--r-lg, 12px) var(--r-lg, 12px) 0;
	/* Khối có chiều cao cố định (xem .hero trong home.css) — form đăng ký đã
	   được nén vừa khung ở kích thước chữ mặc định của trình duyệt, cuộn chỉ
	   còn là lưới an toàn cho trường hợp hiếm: cỡ chữ phóng to hoặc thông báo
	   lỗi dài hơn bình thường. */
	overflow-y: auto;
}

.hero-auth__title {
	text-align: center;
	color: var(--ink, #1f2a37);
	font-size: 17px;
	font-weight: 700;
	margin: 0 0 8px;
}

/* 2 tab pill nằm trong 1 khung viền chung */
.hero-auth__tabs {
	display: flex;
	border: 1px solid var(--line, #d8dee5);
	border-radius: var(--r-md, 8px);
	padding: 3px;
	margin-bottom: 8px;
}

.hero-auth__tab {
	flex: 1;
	background: none;
	border: 0;
	padding: 6px 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--muted, #6b7785);
	cursor: pointer;
	border-radius: 6px;
	font-family: inherit;
}

.hero-auth__tab.is-active {
	background: var(--blue-700, #0f43a3);
	color: #fff;
}

.hero-auth__msg {
	font-size: 12.5px;
	padding: 7px 12px;
	border-radius: var(--r-md, 8px);
	margin-bottom: 10px;
}

.hero-auth__msg.is-error {
	background: #fdeceb;
	color: #b3261e;
}

.hero-auth__msg.is-success {
	background: #e8f6ee;
	color: #1a7a43;
}

.hero-auth__form {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Thuộc tính HTML `hidden` mặc định là display:none, nhưng display:flex ở trên
   cùng độ ưu tiên và đứng sau nên sẽ đè mất — phải khai báo lại tường minh,
   nếu không cả 2 form hiện cùng lúc và kéo méo chiều cao cả hàng. */
.hero-auth__form[hidden] {
	display: none;
}

.hero-auth__field {
	position: relative;
	display: flex;
	align-items: center;
}

.hero-auth__icon {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	display: flex;
	color: var(--muted, #6b7785);
	pointer-events: none;
}

.hero-auth__icon svg {
	width: 17px;
	height: 17px;
}

/* Ô chọn "Hình thức kinh doanh" dùng chung một kiểu với các ô nhập để cả biểu
   mẫu nhìn thống nhất — chỉ khác ở mũi tên bên phải. */
.hero-auth__field input,
.hero-auth__field select {
	height: 38px;
	padding: 0 14px 0 38px;
	border: 1px solid var(--line, #d8dee5);
	border-radius: var(--r-md, 8px);
	font-size: 14px;
	color: var(--ink, #1f2a37);
	background: #fff;
	width: 100%;
	box-sizing: border-box;
	font-family: inherit;
}

.hero-auth__field select {
	appearance: none;
	padding-right: 34px;
	cursor: pointer;
	/* Mũi tên vẽ bằng SVG nhúng sẵn, không phải tải thêm tệp ảnh */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	background-size: 16px 16px;
}
/* Khi chưa chọn gì, chữ mờ như chữ gợi ý của ô nhập */
.hero-auth__field select:invalid,
.hero-auth__field select option[value=""] {
	color: var(--muted-2, #8b95a3);
}

.hero-auth__field input::placeholder {
	color: var(--muted-2, #8b95a3);
}

.hero-auth__field input:focus,
.hero-auth__field select:focus {
	outline: none;
	border-color: var(--blue-400, #3f7bee);
	box-shadow: 0 0 0 3px var(--blue-50, #eef4ff);
}

/* Nút con mắt hiện/ẩn mật khẩu */
.hero-auth__eye {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: 0;
	padding: 4px;
	cursor: pointer;
	color: var(--muted, #6b7785);
	display: flex;
	align-items: center;
}

.hero-auth__eye svg {
	width: 17px;
	height: 17px;
}

.hero-auth__eye:hover,
.hero-auth__eye.is-showing {
	color: var(--blue-600, #1454c8);
}

.hero-auth__field input[type="password"],
.hero-auth__field:has(.hero-auth__eye) input {
	padding-right: 40px;
}

.hero-auth__error:empty {
	display: none;
}

.hero-auth__error {
	display: block;
	font-size: 11.5px;
	line-height: 1.3;
	color: #b3261e;
	margin: -4px 0 0 4px;
}

/* Ô đồng ý điều khoản */
.hero-auth__terms {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	font-size: 12px;
	line-height: 1.4;
	color: var(--ink-2, #3c4856);
	margin: 0;
	cursor: pointer;
}

.hero-auth__terms input[type="checkbox"] {
	width: 15px;
	height: 15px;
	margin: 2px 0 0;
	flex: none;
	accent-color: var(--blue-600, #1454c8);
	cursor: pointer;
}

.hero-auth__terms a {
	color: var(--blue-600, #1454c8);
	text-decoration: none;
}

.hero-auth__terms a:hover {
	text-decoration: underline;
}

.hero-auth__submit {
	margin-top: 0;
	height: 40px;
	border: 0;
	border-radius: var(--r-md, 8px);
	background: var(--blue-700, #0f43a3);
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	font-family: inherit;
	transition: background .18s ease;
}

.hero-auth__submit:hover {
	background: var(--blue-800, #0a3380);
}

.hero-auth__submit:disabled {
	opacity: .65;
	cursor: default;
}

.hero-auth__switch {
	text-align: center;
	font-size: 12.5px;
	color: var(--muted, #6b7785);
	margin: 8px 0 0;
}

.hero-auth__switch a {
	color: var(--blue-600, #1454c8);
	font-weight: 600;
	text-decoration: none;
}

.hero-auth__switch a:hover {
	text-decoration: underline;
}

/* ---- Trạng thái đã đăng nhập ---- */
.hero-auth--welcome {
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: 8px;
}

.hero-auth__hi {
	color: var(--muted, #6b7785);
	font-size: 13px;
	margin: 0;
}

.hero-auth__name {
	color: var(--ink, #1f2a37);
	font-size: 18px;
	margin: 0 0 10px;
}

.hero-auth--welcome .btn {
	width: 100%;
	max-width: 220px;
	height: 42px;
	margin-bottom: 8px;
}

.hero-auth__logout {
	font-size: 12.5px;
	color: var(--muted, #6b7785);
	text-decoration: underline;
}

@media (max-width: 900px) {
	.hero-auth {
		height: auto;
		border-radius: 0 0 var(--r-lg, 12px) var(--r-lg, 12px);
	}
}
