:root {
  --bg: #07070c;
  --ink: #f7f7f8;
  --muted: rgba(255, 255, 255, 0.52);
  --line: rgba(255, 255, 255, 0.1);
  --red: #ff2a38;
  --red-deep: #c81020;
  --field: rgba(16, 16, 20, 0.72);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

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

body {
  min-height: 100dvh;
  color: var(--ink);
  background: #030306;
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; color: inherit; }

.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(100%, 440px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--bg);
}

.hero {
  position: absolute;
  inset: 0 0 auto 0;
  height: min(52vh, 460px);
  pointer-events: none;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.02) 28%, rgba(7, 7, 12, 0.45) 62%, var(--bg) 100%),
    radial-gradient(ellipse 80% 50% at 50% 18%, transparent 0%, rgba(0, 0, 0, 0.28) 100%);
}

.auth {
  position: relative;
  z-index: 2;
  flex: 1;
  padding:
    calc(168px + env(safe-area-inset-top))
    22px
    calc(18px + env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 18px;
}

.brand__mark {
  width: 86px;
  height: 68px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
}

.brand__word {
  margin: -2px 0 0;
  font-family: Oswald, sans-serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-indent: 0.34em;
  line-height: 1;
}

.auth h1 {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lede {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

.alerts { margin: 0 0 12px; }

.alert {
  margin: 0 0 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 42, 56, 0.12);
  border: 1px solid rgba(255, 42, 56, 0.35);
  color: #ffd0d4;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
}

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

.field {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: end;
  gap: 10px 12px;
  padding: 14px 2px 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
  transition: border-color 0.2s var(--ease);
}

.field:focus-within {
  border-bottom-color: var(--red);
  box-shadow: none;
}

.field__icon {
  width: 20px;
  height: 20px;
  color: rgba(255, 255, 255, 0.62);
}

.field__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 2px;
}

.field__label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.2;
}

.field__line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.dial {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
}

.field input {
  width: 100%;
  min-width: 0;
  padding: 0 0 2px;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  border-bottom: 1px solid transparent;
}

.field input::placeholder { color: rgba(255, 255, 255, 0.34); }

.field input[readonly] { color: rgba(255, 255, 255, 0.7); }

.eye {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.eye svg { width: 20px; height: 20px; }
.eye .eye-off { display: none; }
.eye.is-on .eye-on { display: none; }
.eye.is-on .eye-off { display: block; }

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  margin-top: 6px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background:
    linear-gradient(#0b0b10, #0b0b10) padding-box,
    linear-gradient(90deg, rgba(90, 0, 12, 0.35), #ff2436 16%, #ff7a84 50%, #ff2436 84%, rgba(90, 0, 12, 0.35)) border-box;
  box-shadow:
    0 0 0 1px rgba(255, 40, 56, 0.15),
    0 0 24px rgba(255, 32, 48, 0.38),
    0 12px 28px rgba(0, 0, 0, 0.45);
  transition: transform 0.12s var(--ease), filter 0.12s var(--ease);
}

.cta:active { transform: translateY(1px); }
.cta:disabled { opacity: 0.7; cursor: wait; }

.cta svg { width: 18px; height: 18px; }

.switch {
  margin: 16px 0 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13.5px;
  font-weight: 500;
}

.switch a {
  color: var(--red);
  font-weight: 700;
  text-decoration: none;
}

.tagline {
  margin: 36px 0 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.46);
}

.tagline i {
  display: block;
  width: 28px;
  height: 2px;
  margin: 10px auto 0;
  border-radius: 2px;
  background: var(--red);
  box-shadow: 0 0 12px var(--red);
  font-style: normal;
}

.chev {
  position: relative;
  z-index: 2;
  display: block;
  width: min(72vw, 260px);
  height: 72px;
  margin: auto auto calc(4px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  pointer-events: none;
}

@media (max-height: 740px) {
  .hero { height: 300px; }
  .auth { padding-top: calc(132px + env(safe-area-inset-top)); }
  .brand__mark { width: 72px; height: 58px; }
  .brand__word { font-size: 26px; }
  .auth h1 { font-size: 22px; }
}

@media (min-width: 480px) {
  .stage {
    min-height: 100dvh;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04);
  }
}
