/*
 * NNVPS public authentication family (V3)
 * Presentation-only adapter over the legacy login/register/recovery DOM.
 */

.page-auth-v3 {
  --auth-header-height: max(72px, 0.8rem);
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ui-color-text);
  background:
    radial-gradient(circle at 12% 18%, rgba(56, 214, 232, 0.13), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(22, 119, 255, 0.16), transparent 32%),
    linear-gradient(145deg, #eef6ff 0%, #f7faff 48%, #edf4ff 100%);
  font-family: var(--ui-font-sans);
}

.page-auth-v3::before,
.page-auth-v3::after {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  content: "";
  pointer-events: none;
  filter: blur(2px);
}

.page-auth-v3::before {
  top: 120px;
  left: -110px;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(22, 119, 255, 0.12);
  box-shadow: 0 0 0 48px rgba(22, 119, 255, 0.025), 0 0 0 96px rgba(22, 119, 255, 0.018);
}

.page-auth-v3::after {
  right: -90px;
  bottom: -120px;
  width: 320px;
  height: 320px;
  background: linear-gradient(135deg, rgba(22, 119, 255, 0.07), rgba(56, 214, 232, 0.08));
}

.page-auth-v3 :where(a, input) {
  transition: color var(--ui-duration-fast) var(--ui-ease-standard),
    border-color var(--ui-duration-fast) var(--ui-ease-standard),
    background-color var(--ui-duration-fast) var(--ui-ease-standard),
    box-shadow var(--ui-duration-fast) var(--ui-ease-standard),
    transform var(--ui-duration-fast) var(--ui-ease-standard);
}

.page-auth-v3 .qg-hide {
  display: none !important;
}

/* Compact authentication shell */
.page-auth-v3 #header.auth-header {
  position: sticky;
  z-index: 120;
  top: 0;
  width: 100%;
  min-width: 0;
  height: var(--auth-header-height);
  min-height: var(--auth-header-height);
  padding: 0 var(--ui-page-gutter);
  border: 0;
  background: linear-gradient(105deg, var(--ui-color-navy-950), var(--ui-color-navy-800) 64%, #0d5ea9);
  box-shadow: 0 12px 34px rgba(3, 17, 38, 0.16);
}

.page-auth-v3 #header.auth-header .header-outer {
  width: 100%;
  max-width: var(--ui-shell-width);
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.page-auth-v3 #header.auth-header .header-outer::after {
  display: none;
}

.page-auth-v3 #header.auth-header .head-left,
.page-auth-v3 #header.auth-header .head-right,
.page-auth-v3 #header.auth-header .user,
.page-auth-v3 #header.auth-header .to-log-in {
  height: 100%;
}

.page-auth-v3 #header.auth-header .head-left,
.page-auth-v3 #header.auth-header .head-right {
  float: none;
  display: flex;
  align-items: center;
}

.page-auth-v3 #header.auth-header .head-right {
  margin-left: auto;
}

.page-auth-v3 #header.auth-header .head-logo {
  width: 132px;
  height: 46px;
  flex: 0 0 132px;
}

.page-auth-v3 #header.auth-header .head-logo a {
  width: 100%;
  height: 100%;
  display: block;
  transform: none;
}

.page-auth-v3 #header.auth-header .to-log-in {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-auth-v3 #header.auth-header .login,
.page-auth-v3 #header.auth-header .register {
  float: none;
  height: 100%;
  margin: 0 !important;
  display: flex !important;
  align-items: center;
}

.page-auth-v3 #header.auth-header :where(.login-btn, .register-btn) {
  min-width: 88px;
  height: 38px;
  padding: 0 16px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  font-size: 14px;
  line-height: 1 !important;
  box-sizing: border-box;
  cursor: pointer;
}

.page-auth-v3 #header.auth-header .register-btn-wrap {
  height: 100%;
  display: flex !important;
  align-items: center;
}

.page-auth-v3 #header.auth-header .login-btn > span {
  padding: 0 !important;
  display: block;
  line-height: 1 !important;
}

.page-auth-v3 #header.auth-header :where(.login-btn, .register-btn):hover {
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

/* Full-page canvas */
.page-auth-v3 #section.auth-main {
  position: relative !important;
  z-index: 1;
  inset: auto !important;
  width: 100%;
  min-height: calc(100vh - var(--auth-header-height));
  margin: 0 !important;
  padding: clamp(34px, 6vh, 72px) var(--ui-page-gutter);
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-auth-v3 #section.auth-main :where(.login-wrap, .register-wrap) {
  position: static;
  inset: auto;
  width: min(100%, 1080px);
  height: auto;
  min-height: 0;
  padding: 0;
  margin: 0 auto;
  box-sizing: border-box;
}

.page-auth-v3 #section.auth-main .login-wrap {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(390px, 480px);
  align-items: center;
  gap: clamp(42px, 7vw, 96px);
}

.page-auth-v3 #section.auth-main .register-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-auth-v3 #section.auth-main .login-logo {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: auto;
  aspect-ratio: 1.3;
  margin: 0;
  border-radius: var(--ui-radius-xl);
  background-position: center;
  filter: drop-shadow(0 26px 44px rgba(13, 59, 116, 0.16));
}

.page-auth-v3 .auth-card {
  position: relative;
  width: min(100%, 560px) !important;
  height: auto;
  min-width: 0;
  margin: 0 !important;
  padding: clamp(30px, 4vw, 46px) !important;
  border: 1px solid rgba(105, 137, 181, 0.18);
  border-radius: var(--ui-radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 70px rgba(20, 57, 105, 0.15), 0 3px 12px rgba(20, 57, 105, 0.06);
  backdrop-filter: blur(14px);
}

.page-auth-v3 .auth-card::before {
  position: absolute;
  top: 0;
  left: 42px;
  width: 68px;
  height: 4px;
  border-radius: 0 0 6px 6px;
  background: linear-gradient(90deg, var(--ui-color-primary-500), var(--ui-color-cyan-400));
  content: "";
}

.page-auth-v3 .auth-card > .line {
  display: none;
}

.page-auth-v3 .auth-card > .title,
.page-auth-v3 .auth-card > p.title {
  margin: 0 0 28px !important;
  color: var(--ui-color-text) !important;
  font-size: clamp(25px, 2.3vw, 32px) !important;
  font-weight: 700 !important;
  line-height: 1.25;
  letter-spacing: 0.02em;
  text-align: left !important;
}

.page-auth-v3 .auth-card > .title::after,
.page-auth-v3 .auth-card > p.title::after {
  display: block;
  margin-top: 10px;
  color: var(--ui-color-text-muted);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
  content: "安全、稳定地访问您的云服务";
}

.auth-register-page .auth-card > .title::after,
.auth-register-page .auth-card > p.title::after {
  content: "创建您的云服务账号";
}

.auth-password-page .auth-card > .title::after {
  content: "通过安全验证重新设置登录凭证";
}

.auth-profile-page .auth-card > .title::after,
.auth-third-register-page .auth-card > .title::after {
  content: "补充必要信息，完成账号配置";
}

.auth-success-page .auth-card > .title::after,
.auth-password-result-page .auth-card > .title::after {
  content: "操作已完成，您可以继续使用云服务";
}

.auth-bind-page .auth-card > .title::after {
  content: "关联已有账号以统一管理云资源";
}

.auth-choice-page .auth-card > p.title::after {
  content: "选择适合您的账号使用方式";
}

.auth-verify-email-page .auth-card > .title::after {
  content: "完成邮箱验证后即可正常使用账号";
}

/* Form rhythm and controls */
.page-auth-v3 .auth-card :where(ul, form) {
  max-width: 100%;
}

.page-auth-v3 .auth-card > ul,
.page-auth-v3 .auth-card > form > ul,
.page-auth-v3 .auth-card .verify-account > ul,
.page-auth-v3 .auth-card .reset-password > ul {
  width: 100% !important;
  margin: 0 !important;
}

.page-auth-v3 .auth-card ul > li {
  min-width: 0;
  height: auto !important;
  min-height: 48px;
  margin-top: 14px !important;
  gap: 12px;
}

.page-auth-v3 .auth-card ul > li:first-child {
  margin-top: 0 !important;
}

.page-auth-v3 .auth-card :where(.text-input, .code-input, .answer) {
  min-width: 0;
  height: 48px !important;
  border: 1px solid var(--ui-color-border-strong);
  border-radius: 9px !important;
  background: var(--ui-color-surface) !important;
  overflow: hidden;
}

.page-auth-v3 .auth-card :where(.text-input, .code-input, .answer):hover {
  border-color: rgba(22, 119, 255, 0.5);
}

.page-auth-v3 .auth-card :where(.text-input, .code-input, .answer):focus-within,
.page-auth-v3 .auth-card :where(.text-input, .code-input, .answer).active-box {
  border-color: var(--ui-color-primary-500) !important;
  background: #fff !important;
  box-shadow: var(--ui-shadow-focus);
}

.page-auth-v3 .auth-card :where(.text-input, .code-input) > .wrap {
  flex: 0 0 46px;
  width: 46px !important;
  height: 100% !important;
  justify-content: center !important;
  color: var(--ui-color-primary-600);
  background: var(--ui-color-primary-50);
}

.page-auth-v3 .auth-card :where(.text-input, .code-input) > .wrap .icon {
  font-size: 19px !important;
}

.page-auth-v3 .auth-card :where(input[type="text"], input[type="password"], input[type="email"], input[type="number"]) {
  min-width: 0;
  height: 100% !important;
  padding: 0 14px;
  border: 0;
  color: var(--ui-color-text);
  background: transparent;
  font-size: 15px !important;
  line-height: 48px;
  text-indent: 0 !important;
  outline: 0;
}

.page-auth-v3 .auth-card input::placeholder {
  color: var(--ui-color-text-subtle);
}

.page-auth-v3 .auth-card input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: var(--ui-color-text);
}

.page-auth-v3 .auth-card :where(.code-input) {
  width: calc(100% - 132px) !important;
}

.page-auth-v3 .auth-card :where(.code-img, .btn-send, .send-code) {
  flex: 0 0 120px;
  width: 120px !important;
  height: 48px !important;
}

.page-auth-v3 .auth-card :where(.code-img, .btn-send) img {
  width: 100% !important;
  height: 48px !important;
  border: 1px solid var(--ui-color-border);
  border-radius: 9px !important;
  object-fit: cover;
}

.page-auth-v3 .auth-card :where(.btn-send, .send-code) a {
  width: 100% !important;
  height: 48px !important;
  min-height: 48px;
  padding: 0 12px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 9px !important;
  color: #fff;
  background: var(--ui-color-primary-500);
  font-size: 14px !important;
  line-height: 1.2 !important;
  text-align: center;
}

.page-auth-v3 .auth-card :where(.qg-disabled, [disabled]) {
  cursor: not-allowed !important;
  opacity: 0.58;
}

.page-auth-v3 .auth-card ul > li.tip {
  min-height: 0;
  margin: 6px 0 0 !important;
}

.page-auth-v3 .auth-card ul > li.tip p {
  margin: 0 !important;
  color: #d9363e !important;
  font-size: 13px !important;
  line-height: 1.45;
}

body.auth-register-page:not(.auth-third-register-page):not(.auth-bind-page):not(.auth-verify-email-page):not(.auth-choice-page) #section .register-wrap .register-list ul > li.tip {
  display: none;
}

.page-auth-v3 .auth-card .protocol {
  margin-top: 20px !important;
}

.page-auth-v3 .auth-card .protocol h4 {
  align-items: flex-start !important;
  color: var(--ui-color-text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.page-auth-v3 .auth-card .protocol input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--ui-color-primary-500);
}

.page-auth-v3 .auth-card .protocol h4 :where(span, a) {
  font-size: 13px !important;
}

.page-auth-v3 .auth-card :where(.btn-login, .btn-reg),
.page-auth-v3 .auth-card :where(.verify-account, .reset-password, .auth-info, .encrypted-problem) > .btn-verify {
  width: 100% !important;
  margin: 24px auto 0 !important;
}

.page-auth-v3 .auth-card :where(.btn-login, .btn-reg, .btn-verify) > a {
  width: 100% !important;
  min-height: 48px;
  padding: 11px 20px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px !important;
  color: #fff !important;
  background: linear-gradient(100deg, var(--ui-color-primary-500), #0a69e8) !important;
  box-shadow: 0 10px 24px rgba(22, 119, 255, 0.24);
  font-size: 16px !important;
  font-weight: 600;
  line-height: 1.4 !important;
  text-align: center;
}

.page-auth-v3 .auth-card :where(.btn-login, .btn-reg, .btn-verify) > a:hover {
  background: linear-gradient(100deg, var(--ui-color-primary-600), var(--ui-color-primary-700)) !important;
  box-shadow: 0 12px 28px rgba(22, 119, 255, 0.3);
  transform: translateY(-1px);
}

.page-auth-v3 .auth-card .already {
  margin-top: 16px !important;
  color: var(--ui-color-text-muted) !important;
  font-size: 13px;
  line-height: 1.7;
}

.page-auth-v3 .auth-card :where(.already, .prompt, .msg) a,
.page-auth-v3 .auth-card .whole-font-color {
  color: var(--ui-color-primary-600) !important;
}

.page-auth-v3 .auth-card :where(.already, .prompt, .msg) a:hover {
  color: var(--ui-color-primary-700) !important;
}

.page-auth-v3 .auth-card .prompt {
  margin-top: 16px !important;
  padding: 12px 14px;
  border: 1px solid rgba(217, 54, 62, 0.15);
  border-radius: 9px;
  color: #a61d24 !important;
  background: #fff7f7 !important;
  font-size: 13px !important;
}

/* Login-specific presentation */
.auth-login-page .auth-card {
  max-width: 480px;
}

.auth-login-page .auth-card .third-party {
  margin-top: 30px !important;
  padding-top: 22px;
  border-top: 1px solid var(--ui-color-border);
}

.auth-login-page .auth-card .third-party .title {
  margin: 0 !important;
  color: var(--ui-color-text-muted);
}

.auth-login-page .auth-card .third-party .title span strong {
  border-color: var(--ui-color-border) !important;
}

.auth-login-page .auth-card .third-party .title em {
  font-size: 13px !important;
}

.auth-login-page .auth-card .third-party .btn {
  margin-top: 18px !important;
  gap: 16px;
}

.auth-login-page .auth-card .third-party .btn a {
  width: 42px !important;
  height: 42px !important;
  margin: 0 !important;
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(22, 45, 82, 0.12);
}

/* Registration choice and success states */
.auth-choice-page .auth-card .avatar,
.auth-choice-page .auth-card .avatar img {
  width: 72px !important;
  height: 72px !important;
}

.auth-choice-page .auth-card .avatar {
  margin: 0 0 20px !important;
  padding: 8px;
  border-radius: 18px;
  background: var(--ui-color-primary-50);
}

.auth-choice-page .auth-card .select-box {
  margin: 12px 0 0 !important;
  border: 1px solid var(--ui-color-border-strong) !important;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
}

.auth-choice-page .auth-card .select-box:hover,
.auth-choice-page .auth-card .select-box.active {
  border-color: var(--ui-color-primary-500) !important;
  background: var(--ui-color-primary-50);
  box-shadow: 0 8px 20px rgba(22, 119, 255, 0.1);
}

.auth-choice-page .auth-card .select-box a {
  display: block;
  color: var(--ui-color-text-secondary);
  line-height: 1.65;
}

.auth-choice-page .auth-card .select-box a > div:first-child {
  color: var(--ui-color-text);
  font-size: 16px;
  font-weight: 600;
}

.auth-success-page .auth-card {
  text-align: left;
}

.auth-success-page .auth-card .prompt {
  border-color: rgba(23, 145, 86, 0.18);
  color: #116b43 !important;
  background: #f3fff8 !important;
}

.auth-success-page .auth-card form {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--ui-color-border);
  border-radius: 12px;
  background: var(--ui-color-surface-soft);
}

.auth-success-page .auth-card form ul > li {
  min-height: 30px;
  margin-top: 8px !important;
  color: var(--ui-color-text-secondary);
}

.auth-success-page .auth-card .already {
  padding: 12px 14px;
  border-radius: 9px;
  background: var(--ui-color-surface-soft);
}

/* Recovery steps */
.auth-password-page .auth-card {
  max-width: 680px;
}

.page-auth-v3 .processing-flow {
  margin: 0 0 28px;
  padding: 0 0 24px !important;
  border-bottom: 1px solid var(--ui-color-border) !important;
}

.page-auth-v3 .processing-flow ul {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 !important;
}

.page-auth-v3 .processing-flow ul > li {
  min-height: 42px !important;
  margin: 0 !important;
  padding: 8px 12px;
  border: 1px solid var(--ui-color-border);
  border-radius: 8px;
  color: var(--ui-color-text-muted);
  background: var(--ui-color-surface-soft) !important;
}

.page-auth-v3 .processing-flow ul > li.whole-bg-color-priority {
  border-color: rgba(22, 119, 255, 0.24);
  color: var(--ui-color-primary-700);
  background: var(--ui-color-primary-50) !important;
}

.page-auth-v3 .processing-flow .wrap-txt {
  justify-content: center;
  min-width: 0;
}

.page-auth-v3 .processing-flow .wrap-txt :where(span, .active-span) {
  margin-left: 6px !important;
  color: inherit !important;
  font-size: 13px !important;
}

.page-auth-v3 .processing-flow :where(.left-triangle, .right-triangle) {
  display: none;
}

.page-auth-v3 .type-nav {
  width: 100%;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border-radius: 9px;
  background: var(--ui-color-surface-muted);
}

.page-auth-v3 .type-nav a {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--ui-color-text-muted);
  font-size: 14px;
}

.page-auth-v3 .type-nav a.active {
  color: var(--ui-color-primary-700);
  background: #fff;
  box-shadow: var(--ui-shadow-xs);
}

.auth-password-result-page .reset-password > ul > li {
  min-height: 96px !important;
  margin: 0 !important;
  border: 1px solid rgba(23, 145, 86, 0.18);
  border-radius: 12px;
  color: #116b43;
  background: #f3fff8;
}

.auth-password-result-page .reset-password > ul > li .wrap {
  justify-content: center;
}

/* Email activation keeps its live status controls but removes legacy negative positioning. */
.auth-verify-email-page #section.auth-main {
  margin: 0 !important;
}

.auth-verify-email-page .auth-card {
  max-width: 680px;
  align-items: stretch !important;
  font-size: 15px !important;
}

.auth-verify-email-page .auth-card form > ul {
  margin-top: 0 !important;
  padding: 18px;
  border: 1px solid var(--ui-color-border);
  border-radius: 12px;
  background: var(--ui-color-surface-soft);
}

.auth-verify-email-page .auth-card form > ul > li {
  justify-content: flex-start !important;
}

.auth-verify-email-page .auth-card .msg {
  margin: 22px 0 12px;
  color: var(--ui-color-text-muted);
  font-size: 14px;
  white-space: normal;
}

.auth-verify-email-page .auth-card .dflex {
  height: auto;
  min-height: 42px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Embedded frame is intentionally independent from the full-page header shell. */
.auth-frame-page {
  width: 100%;
  min-height: 0;
  box-sizing: border-box;
  padding: 18px 22px 14px;
  overflow-x: hidden;
  background: #fff;
}

.auth-frame-page::before,
.auth-frame-page::after {
  display: none;
}

.auth-frame-page .auth-frame-card {
  width: 100%;
  margin: 0 auto;
  padding: 4px;
  box-sizing: border-box;
  color: var(--ui-color-text);
}

.auth-frame-page #frameLogin ul {
  margin: 0;
  padding: 0 0 18px;
  border-bottom: 0;
}

.auth-frame-page .login-tip {
  margin-bottom: 18px;
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  border: 1px solid rgba(22, 119, 255, 0.16);
  border-radius: 9px;
  color: var(--ui-color-text-secondary);
  background: var(--ui-color-primary-50);
}

.auth-frame-page #frameLogin ul > li {
  min-height: 44px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 10px;
}

.auth-frame-page #frameLogin ul > li > span {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  color: var(--ui-color-text-secondary);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.auth-frame-page #frameLogin .input-box {
  min-width: 0;
  margin-left: 0;
  height: 44px;
  border: 1px solid var(--ui-color-border-strong);
  border-radius: 8px;
  background: #fff;
}

.auth-frame-page #frameLogin .input-box:focus-within {
  border-color: var(--ui-color-primary-500);
  box-shadow: var(--ui-shadow-focus);
}

.auth-frame-page #frameLogin .input-box input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 12px;
  border: 0;
  background: transparent;
  outline: 0;
}

.auth-frame-page #frameLogin .tip a {
  color: var(--ui-color-primary-600);
  font-size: 13px;
}

.auth-frame-page #frameLogin .tip {
  margin-left: 0;
}

.auth-frame-page #frameLogin .code {
  width: 144px;
  min-width: 0;
  height: 44px;
  margin-left: 0;
  overflow: hidden;
  border-radius: 8px;
}

.auth-frame-page #frameLogin ul > li:nth-child(3) {
  grid-template-columns: 62px minmax(110px, 150px) 144px;
}

.auth-frame-page #frameLogin ul > li:nth-child(3) .input-box,
.auth-frame-page #frameLogin ul > li:nth-child(3) .code-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.auth-frame-page #frameLogin .code img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-frame-page .other-login {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--ui-color-border);
}

.auth-frame-page .other-login h3 {
  color: var(--ui-color-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}

.auth-frame-page .ten_login {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

@media (max-width: 1080px) {
  .page-auth-v3 {
    --auth-header-height: var(--ui-mobile-header-height);
  }

  .page-auth-v3 #header.auth-header {
    padding-left: max(var(--ui-mobile-header-gutter), env(safe-area-inset-left));
    padding-right: max(var(--ui-mobile-header-gutter), env(safe-area-inset-right));
  }

  .page-auth-v3 #header.auth-header .head-logo {
    width: var(--ui-mobile-logo-width);
    height: var(--ui-mobile-logo-height);
    flex-basis: var(--ui-mobile-logo-width);
  }
}

@media (max-width: 900px) {
  .page-auth-v3 #section.auth-main .login-wrap {
    grid-template-columns: 1fr;
    max-width: 560px;
  }

  .page-auth-v3 #section.auth-main .login-logo {
    display: none;
  }
}

@media (max-width: 640px) {
  .page-auth-v3 #header.auth-header .head-logo {
    margin: 0 !important;
  }

  .page-auth-v3 #header.auth-header .login {
    display: flex !important;
  }

  .page-auth-v3 #header.auth-header .head-left,
  .page-auth-v3 #header.auth-header .head-right,
  .page-auth-v3 #header.auth-header .user,
  .page-auth-v3 #header.auth-header .to-log-in {
    width: auto !important;
    margin: 0 !important;
    float: none !important;
  }

  .page-auth-v3 #header.auth-header .head-right {
    margin-left: auto !important;
  }

  .page-auth-v3 #header.auth-header :where(.login-btn, .register-btn) {
    min-width: 78px;
    height: 36px;
    padding: 0 10px !important;
    font-size: 13px;
  }

  .page-auth-v3 #section.auth-main {
    min-height: calc(100vh - var(--auth-header-height));
    padding: 22px 14px 34px;
    align-items: flex-start;
  }

  .page-auth-v3 .auth-card {
    padding: 28px 20px !important;
    border-radius: 16px;
  }

  .page-auth-v3 .auth-card::before {
    left: 20px;
    width: 54px;
  }

  .page-auth-v3 .auth-card > .title,
  .page-auth-v3 .auth-card > p.title {
    margin-bottom: 22px !important;
    font-size: 24px !important;
  }

  .page-auth-v3 .auth-card ul > li {
    gap: 8px;
  }

  .page-auth-v3 .auth-card :where(.code-input) {
    width: calc(100% - 108px) !important;
  }

  .page-auth-v3 .auth-card :where(.code-img, .btn-send, .send-code) {
    flex-basis: 100px;
    width: 100px !important;
  }

  .page-auth-v3 .processing-flow ul {
    gap: 4px;
  }

  .page-auth-v3 .processing-flow ul > li {
    min-height: 56px !important;
    padding: 7px 4px;
  }

  .page-auth-v3 .processing-flow .wrap-txt {
    flex-direction: column;
    gap: 3px;
  }

  .page-auth-v3 .processing-flow .wrap-txt :where(span, .active-span) {
    margin: 0 !important;
    font-size: 12px !important;
    white-space: nowrap;
  }

  .auth-success-page .auth-card form {
    padding: 14px;
  }

}

@media (max-width: 420px) {
  .page-auth-v3 #header.auth-header {
    padding-left: max(var(--ui-mobile-header-gutter), env(safe-area-inset-left));
    padding-right: max(var(--ui-mobile-header-gutter), env(safe-area-inset-right));
  }

  .page-auth-v3 #header.auth-header .head-logo {
    width: var(--ui-mobile-logo-width);
    height: var(--ui-mobile-logo-height);
    flex-basis: var(--ui-mobile-logo-width);
  }

  .page-auth-v3 #header.auth-header .to-log-in {
    gap: 6px;
  }

  .page-auth-v3 #header.auth-header :where(.login-btn, .register-btn) {
    min-width: 72px;
    height: 34px;
    padding-inline: 8px !important;
    font-size: 12px;
  }

  .page-auth-v3 #section.auth-main {
    padding: 16px 10px 28px;
  }

  .page-auth-v3 .auth-card {
    padding: 24px 16px !important;
  }

  .page-auth-v3 .auth-card::before {
    left: 16px;
  }

  .page-auth-v3 .auth-card > .title,
  .page-auth-v3 .auth-card > p.title {
    margin-bottom: 20px !important;
    font-size: 22px !important;
  }

  .page-auth-v3 .auth-card :where(.code-input) {
    width: calc(100% - 98px) !important;
  }

  .page-auth-v3 .auth-card :where(.code-img, .btn-send, .send-code) {
    width: 90px !important;
    flex-basis: 90px;
  }

  .auth-frame-page {
    padding: 14px 12px 10px;
  }

  .auth-frame-page #frameLogin ul > li {
    grid-template-columns: minmax(0, 1fr) 88px;
    column-gap: 10px;
    row-gap: 7px;
  }

  .auth-frame-page #frameLogin ul > li:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) 120px;
  }

  .auth-frame-page #frameLogin ul > li > span {
    width: 62px;
    grid-column: 1 / -1;
    justify-self: start;
  }

  .auth-frame-page #frameLogin .tip {
    text-align: right;
  }

  .auth-frame-page #frameLogin .code {
    width: 120px;
  }

  .auth-frame-page .other-login {
    margin-top: 16px;
    padding-top: 14px;
  }
}

@media (max-width: 360px) {
  .auth-frame-page #frameLogin ul > li:nth-child(3) {
    grid-template-columns: minmax(0, 1fr) 112px;
  }

  .auth-frame-page #frameLogin .code {
    width: 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-auth-v3 *,
  .page-auth-v3 *::before,
  .page-auth-v3 *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
