/* ---------- Auth shell: branding/mascot trái, form card phải ---------- */
.auth {
  position: relative; min-height: 100vh; overflow: hidden;
  display: grid; grid-template-columns: 1fr minmax(0, 660px); gap: 40px; align-items: center;
  padding: 40px 56px 40px 40px;
  background:
    radial-gradient(900px 600px at 25% 60%, #E6F3FF 0%, transparent 60%),
    linear-gradient(180deg, #F8FCFF 0%, #EEF7FF 100%);
}
.auth__wave { position: absolute; left: 0; right: 0; bottom: 0; height: 260px; pointer-events: none; z-index: 0; }
.auth__wave svg { width: 100%; height: 100%; display: block; }

.auth-brand { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; min-width: 0; }
.auth-brand__logo { width: min(520px, 100%); aspect-ratio: 2171 / 724; object-fit: contain; mix-blend-mode: multiply; }
.auth-brand__quote { font-size: 34px; line-height: 1.25; transform: rotate(-5deg); margin: 4px 0 -10px; }
.auth-brand__quote svg { display: inline-block; width: 38px; height: 38px; vertical-align: -6px; margin-left: 10px; }
.auth-brand__mascot { position: relative; width: min(560px, 100%); aspect-ratio: 1536 / 1024; }
.auth-brand__mascot > img { width: 100%; height: 100%; object-fit: contain; position: relative; z-index: 1; }
.auth-brand__features { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; margin-top: 12px; color: var(--navy); font-size: 17px; }
.auth-brand__features span { display: inline-flex; align-items: center; gap: 10px; }
.auth-brand__features svg { width: 28px; height: 28px; color: var(--blue-600); }
.auth-brand__features i { width: 1px; height: 24px; background: #BFD6EE; }

.bubble { position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 32% 28%, rgba(255,255,255,.95) 0 12%, rgba(214,236,255,.55) 34%, rgba(160,205,245,.35) 70%, rgba(130,190,240,.55) 100%);
  box-shadow: inset -4px -6px 12px rgba(120,180,235,.35), 0 4px 14px rgba(120,180,235,.2); }

.auth-side { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 16px; align-items: stretch; min-width: 0; }
.lang { align-self: flex-end; position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 0 16px; height: 50px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); color: var(--navy); font-weight: 600; }
.lang svg { width: 24px; height: 24px; color: var(--blue-600); }
.lang select { appearance: none; -webkit-appearance: none; border: 0; background: transparent; font-weight: 600; color: var(--navy); padding-right: 24px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23073B8C' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right center; background-size: 18px; }
.lang select:focus { outline: none; }
.lang:focus-within { box-shadow: var(--shadow), var(--focus); }

.auth-card { background: #fff; border: 1px solid #E4EEF8; border-radius: 26px; box-shadow: 0 20px 60px rgba(34, 93, 150, .10); padding: 44px 52px 40px; display: flex; flex-direction: column; gap: 18px; }
.auth-card__title { font-size: 44px; font-weight: 800; color: #0A3AB5; text-align: center; letter-spacing: -.01em; line-height: 1.15; }
.auth-card__sub { text-align: center; color: var(--text-2); font-size: 18px; margin-top: -6px; margin-bottom: 8px; }
.auth-back { display: inline-flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 18px; background: none; border: 0; padding: 4px 0; align-self: flex-start; }
.auth-back svg { width: 24px; height: 24px; color: var(--blue-600); }
.auth-back:hover { color: var(--blue-600); }

/* Auth field: icon + label trong box */
.afield-wrap { display: flex; flex-direction: column; gap: 6px; }
.afield { display: flex; align-items: center; gap: 18px; min-height: 76px; padding: 10px 18px; border: 1.5px solid #D8E5F3; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.afield:hover { border-color: var(--border-strong); }
.afield:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.afield.is-invalid { border-color: var(--red); }
.afield__icon { width: 34px; height: 34px; color: var(--blue-600); flex-shrink: 0; }
.afield__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.afield__body label { font-size: 17px; font-weight: 600; color: var(--blue-700); }
.afield__body input { border: 0; outline: none; padding: 0; background: transparent; font-size: 17px; color: var(--text); width: 100%; min-height: 28px; }
.afield__body input:focus-visible { box-shadow: none; }
.afield__body input::placeholder { color: #7D8FA8; }
.afield__eye { width: 44px; height: 44px; border-radius: 10px; border: 0; background: transparent; color: var(--blue-700); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.afield__eye:hover { background: var(--blue-50); }
.afield__eye svg { width: 28px; height: 28px; }
.afield-error { color: var(--red); font-size: 14px; padding-left: 4px; }

.auth-row-end { display: flex; justify-content: flex-end; margin-top: -6px; }
.auth-link { font-weight: 700; color: var(--blue-600); font-size: 17px; background: none; border: 0; padding: 0; }
.auth-link:hover { text-decoration: underline; }

.btn--auth { min-height: 70px; font-size: 20px; font-weight: 600; border-radius: 12px; position: relative; }
.btn--auth .btn__arrow { position: absolute; right: 22px; width: 30px; height: 30px; }

.divider { display: flex; align-items: center; gap: 18px; color: var(--text-2); font-size: 17px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #D9E4F0; }

.btn--google { min-height: 66px; width: 100%; border: 1.5px solid #D8E5F3; background: #fff; color: #1646B8; font-size: 20px; font-weight: 700; border-radius: 12px; }
.btn--google:hover:not(:disabled) { background: #F6FAFE; }
.btn--google svg { width: 36px; height: 36px; }

.auth-switch { text-align: center; color: var(--text-2); font-size: 18px; }
.auth-switch a { font-weight: 700; color: #1646B8; }
.auth-switch a:hover { text-decoration: underline; }

.terms { display: flex; gap: 14px; align-items: flex-start; font-size: 16.5px; color: var(--text-2); }
.terms .checkbox { width: 26px; height: 26px; margin-top: 1px; }
.terms button { color: #1646B8; font-weight: 500; }

/* OTP */
.otp-email { align-self: center; padding: 6px 18px; border-radius: 10px; background: #EAF3FF; color: #0A3AB5; font-weight: 700; font-size: 18px; word-break: break-all; text-align: center; }
.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.otp input { width: 100%; aspect-ratio: 78 / 92; min-height: 56px; text-align: center; font-size: 34px; font-weight: 700; color: var(--navy); border: 1.5px solid #D8E5F3; border-radius: 12px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.otp input:focus { outline: none; border-color: #1646B8; box-shadow: var(--focus); }
.otp.is-invalid input { border-color: var(--red); }
.otp-timer { text-align: center; color: var(--text-2); font-size: 17px; }
.otp-timer strong { color: #0A3AB5; }
.otp-timer.is-expired strong { color: var(--red); }
.otp-resend { text-align: center; color: var(--text-2); font-size: 17px; border-top: 1px solid #E1EAF4; padding-top: 22px; margin-top: 8px; }
.otp-resend .link-btn { font-size: 17px; margin-left: 8px; }
.demo-note { font-size: 14px; }

/* Stepper */
.stepper { display: flex; align-items: flex-start; justify-content: center; gap: 0; margin-bottom: 6px; }
.stepper__step { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 116px; text-align: center; font-size: 14.5px; color: var(--text-3); font-weight: 500; }
.stepper__dot { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #CFE0F2; background: #fff; color: var(--text-3); }
.stepper__dot svg { width: 20px; height: 20px; }
.stepper__step.is-done { color: var(--green-700); }
.stepper__step.is-done .stepper__dot { background: var(--green); border-color: var(--green); color: #fff; }
.stepper__step.is-active { color: var(--blue-600); font-weight: 700; }
.stepper__step.is-active .stepper__dot { background: var(--blue); border-color: var(--blue); color: #fff; }
.stepper__line { flex: 0 0 48px; height: 2px; margin-top: 17px; background: #CFE0F2; }
.stepper__line.is-done { background: var(--green); }

.success-art { position: relative; width: 230px; margin: 0 auto; aspect-ratio: 1536 / 1024; }
.success-art img { width: 100%; height: 100%; object-fit: contain; }
.success-art__badge { position: absolute; right: 18px; bottom: 6px; width: 58px; height: 58px; border-radius: 50%; background: var(--green); color: #fff; display: flex; align-items: center; justify-content: center; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(22, 201, 141, .35); }
.success-art__badge svg { width: 30px; height: 30px; }
.success-icon { width: 92px; height: 92px; margin: 4px auto 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--blue-50); color: var(--blue-600); }
.success-icon svg { width: 44px; height: 44px; }
.auth-center-text { text-align: center; color: var(--text-2); font-size: 17px; line-height: 1.6; }
.auth-center-text strong { color: var(--navy); }

/* ---------- Responsive auth ---------- */
@media (max-width: 1279px) {
  .auth { grid-template-columns: 1fr minmax(0, 560px); padding: 32px; gap: 28px; }
  .auth-card { padding: 36px 36px 32px; }
  .auth-card__title { font-size: 38px; }
  .auth-brand__quote { font-size: 28px; }
}
@media (max-width: 1023px) {
  .auth { grid-template-columns: minmax(0, 1fr); justify-items: center; padding: 24px 24px 40px; gap: 12px; align-content: start; }
  .auth-side { width: 100%; max-width: 600px; order: 2; }
  .auth-brand { order: 1; gap: 0; }
  .auth-brand__logo { width: min(340px, 90%); }
  .auth-brand__quote, .auth-brand__mascot, .auth-brand__features { display: none; }
  .lang { position: absolute; top: 14px; right: 16px; height: 42px; }
  .auth-side { position: static; }
  .auth { padding-top: 68px; }
}
@media (max-width: 767px) {
  .auth { padding: 64px 16px 32px; }
  .auth-brand__logo { width: min(260px, 80%); }
  .auth-card { padding: 26px 20px 24px; border-radius: 20px; gap: 16px; }
  .auth-card__title { font-size: 30px; }
  .auth-card__sub { font-size: 15.5px; }
  .afield { min-height: 66px; gap: 12px; padding: 8px 12px; }
  .afield__icon { width: 26px; height: 26px; }
  .afield__body label { font-size: 15px; }
  .afield__body input { font-size: 16px; }
  .btn--auth { min-height: 56px; font-size: 17px; }
  .btn--google { min-height: 54px; font-size: 16.5px; }
  .btn--google svg { width: 26px; height: 26px; }
  .divider, .auth-switch, .auth-link, .auth-back, .otp-timer, .otp-resend, .otp-resend .link-btn { font-size: 15.5px; }
  .terms { font-size: 14.5px; }
  .otp { gap: 8px; }
  .otp input { font-size: 26px; }
  .stepper__step { width: 88px; font-size: 13px; }
  .stepper__line { flex-basis: 20px; }
}
