:root {
  color: #203047;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-synthesis: none;
  color-scheme: light;
  background: #cad9e8;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.6;
}

a {
  color: #1672bd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgb(25 130 107 / 32%);
  outline-offset: 2px;
}

svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-color: #031023;
  background:
    linear-gradient(rgb(7 12 20 / 10%), rgb(7 12 20 / 10%)),
    url("./assets/beauty-register-mobile-v3.webp") center top / 100% auto
      no-repeat,
    linear-gradient(180deg, #030914 0%, #071a31 55%, #031023 100%);
}

.registration-page {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: 32px 20px;
  isolation: isolate;
}

.registration-card {
  width: min(460px, 100%);
  padding: 28px 34px 22px;
  background: rgb(255 255 255 / 88%);
  border: 1px solid rgb(255 255 255 / 82%);
  border-radius: 20px;
  box-shadow:
    0 22px 70px rgb(8 30 52 / 28%),
    inset 0 1px 0 rgb(255 255 255 / 92%);
  backdrop-filter: blur(16px) saturate(125%);
}

.registration-heading {
  margin: 2px 0 22px;
  text-align: center;
}

.eyebrow {
  display: block;
  margin-bottom: 9px;
  font-size: 10px;
  font-weight: 600;
  color: #1672bd;
  letter-spacing: 0.06em;
}

.registration-heading h1,
.success-card h2 {
  margin: 0 0 8px;
  font-size: 29px;
  line-height: 1.3;
  color: #17243a;
}

.registration-heading p,
.success-copy {
  margin: 0;
  font-size: 12px;
  color: #687b91;
}

.field {
  display: block;
  margin-bottom: 16px;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
  font-weight: 600;
  color: #34465d;
}

.input-wrap {
  display: flex;
  min-width: 0;
  height: 48px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  background: rgb(255 255 255 / 64%);
  border: 1px solid #d3dfec;
  border-radius: 8px;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.input-wrap:focus-within {
  border-color: #258575;
  box-shadow: 0 0 0 3px rgb(37 133 117 / 10%);
}

.input-wrap > svg {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
  color: #8a9bac;
}

.input-wrap input {
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0;
  font-size: 14px;
  color: #263b52;
  background: transparent;
  border: 0;
  outline: 0;
}

.input-wrap input::placeholder {
  font-size: 12px;
  color: #9aa7b6;
}

.eye {
  display: grid;
  width: 30px;
  height: 38px;
  flex: 0 0 30px;
  padding: 0;
  color: #7f91a5;
  background: transparent;
  border: 0;
  place-items: center;
}

.eye svg {
  width: 17px;
  height: 17px;
}

.eye.on {
  color: #1672bd;
}

.slider-field {
  margin-bottom: 15px;
}

.slider-track {
  position: relative;
  display: flex;
  height: 48px;
  align-items: center;
  overflow: hidden;
  background: #eef3f8;
  border: 1px solid #d3dfec;
  border-radius: 8px;
  user-select: none;
  touch-action: none;
}

.slider-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgb(47 127 199 / 12%);
}

.slider-text {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 52px;
  font-size: 12px;
  color: #7b8ca0;
  text-align: center;
  pointer-events: none;
}

.slider-handle {
  position: absolute;
  top: 2px;
  left: 2px;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  color: #fff;
  cursor: grab;
  background: #2f7fc7;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 4px 10px rgb(31 85 135 / 20%);
  place-items: center;
  touch-action: none;
}

.slider-handle:active {
  cursor: grabbing;
}

.slider-handle svg {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}

.slider-track.verified {
  background: #ebf7f3;
  border-color: #9bcfc1;
}

.slider-track.verified .slider-fill {
  background: rgb(37 141 116 / 14%);
}

.slider-track.verified .slider-text {
  color: #23846f;
  font-weight: 600;
}

.slider-track.verified .slider-handle {
  cursor: default;
  background: #23846f;
}

.slider-track.resetting .slider-handle {
  transition: transform 0.18s ease;
}

.form-hint {
  margin: -2px 0 14px;
  font-size: 10px;
  color: #7a8da3;
}

.form-error {
  padding: 9px 11px;
  margin-bottom: 14px;
  font-size: 12px;
  line-height: 1.6;
  color: #a5570c;
  overflow-wrap: anywhere;
  background: #fff5e8;
  border-left: 3px solid #df831e;
}

.submit {
  display: flex;
  width: 100%;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: #2f7fc7;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 7px 18px rgb(47 127 199 / 16%);
}

.submit:hover {
  text-decoration: none;
  background: #246faf;
}

.submit svg {
  width: 17px;
  height: 17px;
  flex-basis: 17px;
}

.submit.loading svg {
  animation: spin 0.9s linear infinite;
}

.submit:disabled {
  cursor: not-allowed;
  background: #6d9cc7;
  box-shadow: none;
}

.login-link {
  margin: 20px 0 0;
  font-size: 12px;
  color: #65788f;
  text-align: center;
}

.login-link a {
  margin-left: 4px;
  font-weight: 600;
}

.registration-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding-top: 16px;
  margin-top: 20px;
  font-size: 10px;
  color: #75869a;
  border-top: 1px solid rgb(65 92 123 / 13%);
}

.registration-footer svg {
  width: 14px;
  height: 14px;
  flex-basis: 14px;
}

.success-card {
  text-align: center;
}

.success-icon {
  display: grid;
  width: 62px;
  height: 62px;
  margin: 10px auto 24px;
  color: #24816f;
  background: rgb(36 129 111 / 10%);
  border-radius: 50%;
  place-items: center;
}

.success-icon svg {
  width: 34px;
  height: 34px;
}

.success-card dl {
  margin: 24px 0;
  text-align: left;
  border-top: 1px solid #d9e4ef;
}

.success-card dl > div {
  display: grid;
  padding: 12px 2px;
  grid-template-columns: 100px minmax(0, 1fr);
  border-bottom: 1px solid #d9e4ef;
}

.success-card dt {
  font-size: 12px;
  color: #7a8ca1;
}

.success-card dd {
  margin: 0;
  overflow-wrap: anywhere;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}

.success-action {
  max-width: 100%;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 10px 14px;
  font-size: 12px;
  color: #fff;
  background: #1a2b3e;
  border-radius: 7px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 900px) {
  .backdrop {
    background: url("./assets/beauty-register-wide-v2.webp") center / cover
      no-repeat;
  }
}

@media (max-width: 740px) {
  .registration-page {
    align-items: end;
    justify-items: center;
    padding:
      max(132px, 22svh)
      12px
      max(18px, env(safe-area-inset-bottom));
  }

  .registration-card {
    padding: 23px 20px 20px;
    border-radius: 16px;
  }

  .success-card {
    align-self: center;
  }

  .registration-heading {
    margin: 0 0 20px;
  }

  .registration-heading h1,
  .success-card h2 {
    font-size: 25px;
  }

  .input-wrap input {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
