@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@700;800;900&display=swap');

:root {
  --st-font: 'Nunito', system-ui, sans-serif;
  --st-ink: #243044;
  --st-muted: #8d99a8;
  --st-ph: #a3b0c2;
  --st-dial: #7d8da3;
  --st-field: #eef4ff;
  --st-line: #d5e4f6;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body.st-auth {
  min-height: 100dvh;
  font-family: var(--st-font);
  color: var(--st-ink);
  background: #fff;
}

.st-phone {
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    calc(6px + var(--safe-top))
    22px
    calc(12px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  background: #fff;
  position: relative;
  overflow: hidden;
}

.st-hero {
  width: calc(100% + 36px);
  height: clamp(214px, 36vh, 292px);
  margin: 0 -18px -6px;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  pointer-events: none;
  user-select: none;
}

.st-mode {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: -2px;
}

.st-pill {
  margin: 0;
  min-width: 168px;
  height: 48px;
  padding: 0 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1;
  background: linear-gradient(100deg, #8eb4ff 0%, #5d82ff 42%, #3d5cf2 100%);
  box-shadow:
    0 8px 16px rgba(61, 92, 242, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.st-sparks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 18px;
}

.st-sparks i {
  display: block;
  height: 4px;
  border-radius: 999px;
}

.st-sparks--l i:nth-child(1) {
  width: 16px;
  margin-left: 2px;
  transform: rotate(-38deg);
  background: #ffc83d;
}
.st-sparks--l i:nth-child(2) {
  width: 12px;
  transform: rotate(-38deg);
  background: #5aa7ff;
}
.st-sparks--r i:nth-child(1) {
  width: 14px;
  transform: rotate(38deg);
  background: #4d8dff;
}
.st-sparks--r i:nth-child(2) {
  width: 16px;
  margin-left: 2px;
  transform: rotate(38deg);
  background: #ffb020;
}

.st-sub {
  margin: 10px 0 16px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--st-muted);
}

.st-alert {
  margin: -6px 0 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #fff1f1;
  color: #d14343;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  line-height: 1.35;
}

.st-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.st-field {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  border: 1.5px solid var(--st-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.st-field:focus-within {
  border-color: #9eb6ef;
  box-shadow: 0 0 0 3px rgba(93, 130, 255, 0.12);
}

.st-ico {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  object-fit: contain;
  display: block;
}

.st-dial {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--st-dial);
}

.st-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--st-ink);
}

.st-field input::placeholder {
  color: var(--st-ph);
  font-weight: 700;
}

/* One visibility control — hide browser/password-manager reveal icons */
.st-field input[type="password"]::-ms-reveal,
.st-field input[type="password"]::-ms-clear {
  display: none !important;
  width: 0;
  height: 0;
}

.st-field input[type="password"]::-webkit-textfield-decoration-container,
.st-field input[type="password"]::-webkit-credentials-auto-fill-button,
.st-field input[type="password"]::-webkit-strong-password-auto-fill-button {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.st-eye {
  flex: 0 0 28px;
  width: 28px;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #3d74e6;
}

.st-eye svg {
  width: 22px;
  height: 22px;
}

.st-eye .is-off { display: block; }
.st-eye .is-on { display: none; }
.st-eye.is-open .is-off { display: none; }
.st-eye.is-open .is-on { display: block; }

.st-btn {
  margin-top: 6px;
  height: 54px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, #ffc44d 0%, #ff9a2a 46%, #ff7a12 100%);
  box-shadow:
    0 10px 18px rgba(255, 138, 26, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.st-btn:active {
  transform: translateY(1px);
}

.st-btn span {
  margin-left: 8px;
  font-weight: 800;
}

.st-switch {
  margin: 14px 0 0;
  text-align: center;
}

.st-switch a {
  color: var(--st-muted);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
}

.st-foot {
  margin-top: auto;
  height: 78px;
  position: relative;
  pointer-events: none;
}

.st-foot svg {
  position: absolute;
  left: -22px;
  right: -22px;
  bottom: -12px;
  width: calc(100% + 44px);
  height: 92px;
}

@media (max-height: 740px) {
  .st-hero { height: 188px; }
  .st-sub { margin: 8px 0 12px; }
  .st-field { height: 48px; }
  .st-form { gap: 10px; }
  .st-btn { height: 50px; }
  .st-foot { height: 56px; }
}

@media (min-width: 480px) {
  body.st-auth {
    background: #fff;
  }
  .st-phone {
    box-shadow: 0 18px 50px rgba(20, 40, 80, 0.16);
  }
}
