.auth-shell {
  min-height: 100svh;
  background:
    radial-gradient(circle at 70% 0%, rgba(59, 43, 164, .38), transparent 34%),
    radial-gradient(circle at 0 58%, rgba(0, 198, 241, .12), transparent 28%),
    linear-gradient(180deg, #040a18 0%, #020a17 58%, #010711 100%);
}

.auth-phone {
  min-height: 100svh;
  padding: 17px 16px 30px;
}

.auth-topbar { min-height: 34px; display: flex; align-items: center; justify-content: space-between; }

.auth-icon-button,
.auth-language-toggle,
.password-toggle,
.auth-options button,
.auth-submit,
.auth-switch button,
.agreement-option button {
  border: 0;
  color: inherit;
  font: inherit;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.auth-icon-button {
  width: 32px;
  height: 32px;
  position: relative;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(142,159,202,.18);
  border-radius: 11px;
  color: #c4cfe2;
  background: rgba(41,49,89,.38);
}

.auth-language-toggle {
  min-width: 42px;
  height: 28px;
  padding: 0 11px;
  border: 1px solid rgba(78, 226, 247, .32);
  border-radius: 999px;
  color: #8cecf8;
  background: rgba(9, 28, 52, .72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2px;
}

.auth-language-toggle:active { transform: scale(.97); }

.auth-back-glyph { width: 10px; height: 10px; position: relative; display: block; margin-left: 4px; border-bottom: 2px solid currentColor; border-left: 2px solid currentColor; transform: rotate(45deg); }
.auth-back-glyph::after { content: ""; width: 14px; height: 2px; position: absolute; left: -3px; bottom: -2px; border-radius: 99px; background: currentColor; transform: rotate(-45deg); transform-origin: left center; }

.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 42px; }
.auth-brand.compact { margin-top: 16px; }
.auth-brand-mark { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 17px; color: #08101f; background: linear-gradient(145deg, #ffcd56, #d99008); box-shadow: 0 13px 30px rgba(219,143,13,.22); font-size: 33px; font-weight: 900; line-height: 1; }
.auth-brand > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.auth-brand strong { font-size: 19px; letter-spacing: 2px; }
.auth-brand strong b { color: #ffc54d; }
.auth-brand small { color: #7d8ca8; font-size: 10px; letter-spacing: 1px; }

.auth-heading { margin-top: 42px; text-align: center; }
.auth-heading.compact { margin-top: 22px; }
.auth-heading > span { color: #4ae1f6; font-size: 10px; letter-spacing: 1.6px; }
.auth-heading h1 { margin: 8px 0 0; font-size: 27px; }
.auth-heading p { margin: 7px 0 0; color: #8293af; font-size: 12px; }

.auth-card {
  margin-top: 24px;
  padding: 19px 17px 17px;
  border: 1px solid rgba(91,139,198,.25);
  border-radius: 23px;
  background: linear-gradient(145deg, rgba(12,31,59,.98), rgba(8,22,45,.98));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025), 0 18px 40px rgba(0,0,0,.18);
}
.register-card { margin-top: 18px; }
.auth-field { display: block; }
.auth-field + .auth-field { margin-top: 14px; }
.auth-label { display: flex; align-items: center; gap: 5px; margin: 0 0 7px; color: #899ab7; font-size: 12px; }
.auth-label small { color: #667996; font-size: 9px; }
.auth-input-wrap { height: 47px; display: flex; align-items: center; gap: 10px; padding: 0 12px; border: 1px solid rgba(83,119,166,.22); border-radius: 14px; background: rgba(2,12,28,.76); transition: border-color .2s ease, box-shadow .2s ease; }
.auth-input-wrap:focus-within { border-color: rgba(62,219,246,.55); box-shadow: 0 0 0 3px rgba(46,213,241,.07); }
.auth-input-wrap.error { border-color: rgba(255,95,121,.58); box-shadow: 0 0 0 3px rgba(255,76,108,.06); }
.auth-input-wrap input { min-width: 0; flex: 1; padding: 0; border: 0; outline: 0; color: #edf3ff; background: transparent; font: 500 13px/1 Inter, "PingFang SC", "Microsoft YaHei", sans-serif; }
.auth-input-wrap input::placeholder { color: #667b9b; }
.auth-field-icon { width: 18px; height: 18px; position: relative; flex: 0 0 18px; display: grid; place-items: center; color: #50e4f9; font-style: normal; }
.user-field-icon::before { content: ""; width: 6px; height: 6px; position: absolute; top: 1px; border: 1.6px solid currentColor; border-radius: 50%; }
.user-field-icon::after { content: ""; width: 14px; height: 8px; position: absolute; bottom: 0; border: 1.6px solid currentColor; border-bottom: 0; border-radius: 10px 10px 0 0; }
.phone-field-icon::before { content: ""; width: 10px; height: 16px; position: absolute; top: 1px; left: 3px; border: 1.6px solid currentColor; border-radius: 3px; }
.phone-field-icon::after { content: ""; width: 3px; height: 1.5px; position: absolute; bottom: 3px; left: 7.5px; border-radius: 99px; background: currentColor; }
.lock-field-icon::before { content: ""; width: 13px; height: 11px; position: absolute; bottom: 1px; border: 1.6px solid currentColor; border-radius: 3px; }
.lock-field-icon::after { content: ""; width: 8px; height: 7px; position: absolute; top: 0; border: 1.6px solid currentColor; border-bottom: 0; border-radius: 7px 7px 0 0; }
.mail-field-icon { border: 1.6px solid currentColor; border-radius: 3px; }
.mail-field-icon::before,
.mail-field-icon::after { content: ""; width: 10px; height: 1.4px; position: absolute; top: 6px; background: currentColor; }
.mail-field-icon::before { left: 0; transform: rotate(32deg); }
.mail-field-icon::after { right: 0; transform: rotate(-32deg); }
.invite-field-icon::before,
.invite-field-icon::after { content: ""; width: 9px; height: 5px; position: absolute; border: 1.6px solid currentColor; border-radius: 6px; transform: rotate(-38deg); }
.invite-field-icon::before { top: 3px; right: 1px; }
.invite-field-icon::after { bottom: 3px; left: 1px; }
.password-toggle { width: 31px; height: 31px; position: relative; flex: 0 0 31px; display: grid; place-items: center; padding: 0; border-radius: 9px; color: #7f91af; }
.password-toggle:active { background: rgba(78,225,247,.08); transform: scale(.94); }
.eye-icon { width: 19px; height: 14px; position: relative; display: block; }
.eye-icon::before { content: ""; width: 15px; height: 10px; position: absolute; top: 1px; left: 2px; border: 1.6px solid currentColor; border-radius: 75% 18%; transform: rotate(45deg); }
.eye-icon::after { content: ""; width: 4px; height: 4px; position: absolute; top: 5px; left: 7px; border: 1.5px solid currentColor; border-radius: 50%; background: #061327; }
.password-toggle::after { content: ""; width: 22px; height: 1.6px; position: absolute; top: 15px; left: 4px; border-radius: 99px; background: currentColor; box-shadow: 0 0 0 2px #061327; transform: rotate(-45deg); transition: opacity .18s ease; }
.password-toggle.is-visible { color: #54e4f8; }
.password-toggle.is-visible::after { opacity: 0; }

.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.auth-options > button { padding: 4px 0 4px 8px; color: #51dff5; font-size: 10px; }
.remember-option,
.agreement-option { display: flex; align-items: center; color: #8192af; font-size: 10px; cursor: pointer; }
.remember-option input,
.agreement-option input { position: absolute; opacity: 0; pointer-events: none; }
.remember-option > span,
.agreement-option > span { width: 15px; height: 15px; position: relative; flex: 0 0 15px; margin-right: 7px; border: 1px solid rgba(91,142,187,.5); border-radius: 4px; background: rgba(3,15,31,.8); }
.remember-option input:checked + span,
.agreement-option input:checked + span { border-color: #43ddf3; background: #26b8d2; }
.remember-option input:checked + span::after,
.agreement-option input:checked + span::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #07152b; font-size: 11px; font-weight: 900; }
.agreement-option { flex-wrap: wrap; margin-top: 15px; line-height: 1.55; }
.agreement-option button { padding: 0 2px; color: #4edff5; font-size: 10px; }

.auth-submit { width: 100%; height: 47px; display: grid; place-items: center; margin-top: 20px; border-radius: 15px; color: #071226; background: linear-gradient(100deg, #3ee1ef, #6a9cfa 54%, #9d69f5); box-shadow: 0 12px 30px rgba(64,163,244,.17); font-size: 15px; font-weight: 900; letter-spacing: 2px; }
.auth-switch { margin: 16px 0 0; color: #8192af; text-align: center; font-size: 11px; }
.auth-switch button { padding: 4px; color: #4ee2f7; }
.auth-security { margin: 24px 0 0; color: #7183a0; text-align: center; font-size: 10px; }
.auth-security span { color: #38e5b4; }
.auth-submit:active,
.auth-icon-button:active { transform: scale(.97); }

@media (max-width: 355px) {
  .auth-phone { padding-inline: 10px; }
  .auth-brand { margin-top: 30px; }
  .auth-heading { margin-top: 30px; }
  .auth-card { padding-inline: 14px; }
  .register-phone .auth-brand { margin-top: 11px; }
  .register-phone .auth-heading { margin-top: 16px; }
}
