/* ============================================================
   AUTH (login)
============================================================ */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 50px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.auth-back {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; font-weight: 500; color: var(--t3);
  transition: var(--t);
}
.auth-back i { font-size: 14px; transition: var(--t); }
.auth-back:hover { color: var(--vx); }
.auth-back:hover i { transform: translateX(-3px); }

.auth-main {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 1;
  padding: calc(56px + 12px) 16px 24px;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
.auth-wrap { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-wrap--register { max-width: 720px; }

.auth-card {
  padding: 22px 22px 18px;
  border-radius: 18px;
  display: flex; flex-direction: column; gap: 16px;
  background: rgba(10, 16, 34, 0.96);
}
.auth-card:hover { transform: none; box-shadow: none; }
.auth-glow {
  position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(124,58,237,0.25) 0%, transparent 70%);
  pointer-events: none;
}

.auth-brand {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
}
.auth-lmark { width: 48px; height: 48px; border-radius: 12px; }
.auth-lmark i { font-size: 20px; }

.auth-intro { text-align: center; }
.auth-title {
  font-family: var(--fh); font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 700; letter-spacing: -.02em; color: var(--t1); line-height: 1.2;
}
.auth-desc {
  margin-top: 10px; font-size: 15px; color: var(--t3); line-height: 1.65;
}

.auth-form { display: flex; flex-direction: column; gap: 20px; }
.auth-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 14px;
}
.auth-field--full { grid-column: 1 / -1; }
.auth-field--recaptcha .auth-recaptcha-wrap {
  min-height: 78px;
  display: flex;
  align-items: flex-start;
}
.auth-recaptcha-placeholder {
  margin: 0;
  padding: 12px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--t4);
  background: rgba(7, 15, 34, 0.6);
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
@media (max-width: 600px) {
  .auth-form-grid { grid-template-columns: 1fr; }
  .auth-field--full { grid-column: auto; }
}
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-label {
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  color: var(--t2); margin-left: 2px;
}
.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -4px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--t3);
  cursor: pointer;
  user-select: none;
}
.auth-remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--v);
  flex-shrink: 0;
  cursor: pointer;
}
.auth-label-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-left: 2px;
}
.auth-label-row .auth-label { margin-left: 0; }
.auth-link-sm {
  font-size: 12px; font-weight: 500; color: var(--vx);
  transition: var(--t); white-space: nowrap;
}
.auth-link-sm:hover { color: var(--cyl); }

.auth-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  background: rgba(7, 15, 34, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  transition: border-color var(--t), box-shadow var(--t);
}
.auth-input-wrap:focus-within {
  border-color: rgba(139,92,246,0.45);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.auth-input-ico { color: var(--t4); font-size: 15px; flex-shrink: 0; }
.auth-input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  font-family: var(--fb); font-size: 15px; color: var(--t1);
}
.auth-input::placeholder { color: var(--t4); }
.auth-toggle-pw {
  display: flex; align-items: center; justify-content: center;
  padding: 4px; color: var(--t4); background: none;
  transition: color var(--t);
}
.auth-toggle-pw:hover { color: var(--t2); }

.auth-submit { width: 100%; margin-top: 4px; padding: 15px 26px; }

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 4px 0;
}
.auth-divider::before,
.auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: rgba(255,255,255,0.08);
}
.auth-divider span {
  font-size: 11px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--t4);
}

.auth-google { width: 100%; gap: 12px; }
.auth-google-ico { flex-shrink: 0; }

.auth-foot {
  display: flex; flex-direction: column; align-items: center;
  gap: 18px; padding-top: 4px;
}
.auth-register { font-size: 14px; color: var(--t3); text-align: center; }
.auth-link {
  color: var(--vx); font-weight: 600; margin-left: 4px;
  transition: var(--t);
}
.auth-link:hover { color: var(--cyl); text-decoration: underline; }

.auth-trust {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px;
  background: rgba(7,15,34,0.6);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 99px;
  font-size: 11px; font-weight: 500; color: var(--t3);
}
.auth-trust i { color: var(--eml); font-size: 13px; }
.auth-trust-row {
  gap: 14px; padding: 8px 18px;
}
.auth-trust-row span {
  display: inline-flex; align-items: center; gap: 6px;
}
.auth-trust-row i { font-size: 12px; }
.auth-trust-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--t5); flex-shrink: 0;
}

/* Custom select — tỉnh/huyện (scroll, chữ tối trên nền sáng) */
.auth-custom-select {
  position: relative;
  z-index: 1;
}
.auth-custom-select.is-open {
  z-index: 120;
}
.auth-custom-select-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  text-align: left;
  background: rgba(7, 15, 34, 0.85);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  font-family: var(--fb);
  font-size: 15px;
  color: var(--t1);
  transition: border-color var(--t), box-shadow var(--t);
}
.auth-custom-select-btn:hover:not(:disabled) {
  border-color: rgba(255,255,255,0.14);
}
.auth-custom-select.is-open .auth-custom-select-btn,
.auth-custom-select-btn:focus-visible {
  border-color: rgba(139,92,246,0.45);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
  outline: none;
}
.auth-custom-select.is-disabled .auth-custom-select-btn {
  opacity: 0.55;
  cursor: not-allowed;
}
.auth-custom-select-ico {
  color: var(--t4);
  font-size: 15px;
  flex-shrink: 0;
}
.auth-custom-select-value {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--t1);
}
.auth-custom-select-value.is-placeholder { color: var(--t4); }
.auth-custom-select-caret {
  color: var(--t4);
  font-size: 11px;
  flex-shrink: 0;
  transition: transform var(--t);
}
.auth-custom-select.is-open .auth-custom-select-caret {
  transform: rotate(180deg);
}
.auth-custom-select-menu {
  display: none;
  position: absolute;
  z-index: 200;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #f1f5f9;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}
.auth-custom-select.is-open .auth-custom-select-menu {
  display: block;
}
.auth-custom-select-menu.is-fixed {
  position: fixed;
  right: auto;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-custom-select-menu.is-fixed .auth-custom-select-options {
  flex: 1;
  min-height: 0;
}
.auth-custom-select-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}
.auth-custom-select-search-wrap i {
  color: #64748b;
  font-size: 13px;
}
.auth-custom-select-search {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--fb);
  font-size: 14px;
  color: #0f172a;
}
.auth-custom-select-search::placeholder { color: #94a3b8; }
.auth-custom-select-options {
  list-style: none;
  margin: 0;
  padding: 6px;
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.auth-custom-select-option {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #0f172a;
  cursor: pointer;
  line-height: 1.35;
  transition: background 0.15s ease, color 0.15s ease;
}
.auth-custom-select-option:hover {
  background: #e2e8f0;
}
.auth-custom-select-option.is-selected {
  background: #7c3aed;
  color: #fff;
}
.auth-custom-select-empty {
  padding: 14px 12px;
  font-size: 13px;
  color: #64748b;
  text-align: center;
}
.auth-page--register .auth-main {
  align-items: flex-start;
  padding-bottom: 24px;
}
.auth-page--register .auth-card {
  padding: 20px 22px 18px;
  gap: 14px;
  overflow: visible;
}
.auth-page--register .auth-form-grid {
  overflow: visible;
}

.auth-quote {
  margin-top: 24px; text-align: center;
  font-size: 11px; font-weight: 500; letter-spacing: .14em;
  text-transform: uppercase; color: var(--t5); line-height: 1.5;
}

.auth-page-foot {
  margin-top: 32px; text-align: center; opacity: 0.65;
}
.auth-page-links {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 20px;
  margin-bottom: 12px;
}
.auth-page-links a {
  font-size: 11px; font-weight: 500; letter-spacing: .04em;
  color: var(--t4); transition: var(--t);
}
.auth-page-links a:hover { color: var(--vx); }
.auth-page-foot p { font-size: 11px; color: var(--t4); }
