:root {
  color: #f6f8fc;
  background: #02060d;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  --orange: #ff430b;
  --gold: #ffd12b;
  --panel: #071321;
  --muted: #9aa8ba;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body { background: #02060d; }
button, input { font: inherit; }
button { color: inherit; }

.embedded-login[hidden] { display: none !important; }

.embedded-login {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: auto;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 25%, rgba(6, 100, 184, .35), transparent 32%),
    radial-gradient(circle at 80% 90%, rgba(180, 38, 4, .16), transparent 30%),
    linear-gradient(155deg, #06111f, #02060d 65%);
}

.embedded-login .login-card {
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}

.login-page {
  position: relative;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding: 22px;
  background:
    radial-gradient(circle at 50% 25%, rgba(6, 100, 184, .35), transparent 32%),
    radial-gradient(circle at 80% 90%, rgba(180, 38, 4, .16), transparent 30%),
    linear-gradient(155deg, #06111f, #02060d 65%);
}

.login-page::before {
  position: absolute;
  content: "";
  inset: 0;
  opacity: .16;
  background-image: repeating-linear-gradient(0deg, transparent 0 3px, rgba(255,255,255,.11) 4px);
  pointer-events: none;
}

.login-web {
  position: fixed;
  width: min(55vw, 520px);
  aspect-ratio: 1;
  opacity: .14;
  background: url("assets/cobweb.png") center / contain no-repeat;
  filter: drop-shadow(0 0 12px #2caaff);
  pointer-events: none;
}

.login-web-left { top: -17vw; left: -16vw; transform: rotate(-15deg); }
.login-web-right { right: -18vw; bottom: -18vw; transform: rotate(24deg); }

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 430px);
  padding: 26px 24px 20px;
  overflow: hidden;
  border: 1px solid rgba(113, 160, 209, .26);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(10, 25, 43, .97), rgba(2, 7, 15, .98));
  box-shadow: 0 35px 100px rgba(0,0,0,.75), inset 0 1px rgba(255,255,255,.05);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}

.login-card button,
.login-card input { font-family: "Plus Jakarta Sans", system-ui, sans-serif; }

.login-brand { position: relative; z-index: 2; text-align: center; }
.login-brand > span {
  display: block;
  margin-bottom: -4px;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: 19px;
  font-style: italic;
  transform: rotate(-2deg);
}

.login-brand h1 {
  margin: 0;
  transform: skewX(-8deg);
  color: #fff;
  font-family: Impact, sans-serif;
  font-size: 58px;
  font-style: italic;
  line-height: .95;
  -webkit-text-fill-color: #fff;
  -webkit-text-stroke: 2px #ed1423;
  paint-order: stroke fill;
  text-shadow: 0 0 18px rgba(255, 0, 18, .55), 5px 7px 14px #000;
}

.login-brand p { margin: 10px 0 0; color: #bbc5d2; font-size: 9px; letter-spacing: 4px; }

.login-paddle {
  position: absolute;
  top: 29px;
  right: -42px;
  width: 120px;
  height: 180px;
  opacity: .28;
  pointer-events: none;
}

.login-paddle div {
  position: absolute;
  inset: 20px;
  border-radius: 50%;
  background: #078cff;
  filter: blur(30px);
}
.login-paddle img { position: relative; height: 100%; transform: rotate(18deg); filter: drop-shadow(0 8px 12px #000); }

.login-step { display: none; }
.login-step.active { display: block; animation: step-in .28s ease both; }
@keyframes step-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.step-heading { margin: 28px 0 20px; }
.step-heading > span { color: var(--orange); font-size: 10px; font-weight: 900; letter-spacing: 1.5px; }
.step-heading h2 { margin: 5px 0 7px; font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-size: 27px; font-style: italic; font-weight: 800; letter-spacing: -.7px; }
.step-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.step-heading strong { color: #fff; }

form { display: grid; }
label { margin: 0 0 7px; color: #d8e2ef; font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
input {
  width: 100%;
  height: 51px;
  margin-bottom: 16px;
  padding: 0 14px;
  border: 1px solid rgba(102, 142, 188, .35);
  border-radius: 9px;
  outline: none;
  color: white;
  background: rgba(1, 7, 15, .78);
  transition: border-color .2s, box-shadow .2s;
}
input:focus { border-color: #278ee8; box-shadow: 0 0 0 3px rgba(39,142,232,.16); }
input::placeholder { color: #566478; }

.phone-input { position: relative; }
.phone-input > span {
  position: absolute;
  z-index: 1;
  top: 12px;
  left: 12px;
  display: grid;
  width: 30px;
  height: 27px;
  place-items: center;
  border-right: 1px solid rgba(255,255,255,.16);
  color: #ffbd27;
  font-size: 10px;
  font-weight: 900;
}
.phone-input input { padding-left: 54px; }
.field-note { margin: -7px 0 17px; color: #718095; font-size: 10px; line-height: 1.4; }

.login-primary, .login-secondary, .login-link {
  min-height: 49px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}
.login-primary {
  border: 0;
  background: linear-gradient(#ff5a16, #ed1e05);
  box-shadow: inset 0 1px rgba(255,255,255,.3), 0 8px 24px rgba(255,56,0,.23);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 16px;
  font-style: italic;
  font-weight: 800;
  letter-spacing: .5px;
}
.login-primary:disabled { opacity: .55; cursor: wait; }
.login-secondary { margin-top: 10px; border: 1px solid rgba(255,255,255,.32); background: transparent; }
.login-secondary:disabled { opacity: .4; cursor: not-allowed; }
.login-link { border: 0; background: transparent; color: #91a0b3; font-size: 11px; }

.otp-input {
  height: 66px;
  padding-left: 20px;
  font-size: 29px;
  font-weight: 900;
  letter-spacing: 12px;
  text-align: center;
}
.otp-timer { margin: -5px 0 16px; color: var(--muted); font-size: 11px; text-align: center; }
.otp-timer strong { color: var(--gold); }
.debug-code { margin: -4px 0 14px; padding: 8px; border: 1px dashed #ffbf24; border-radius: 6px; color: #ffcf45; font-size: 12px; text-align: center; }

.login-message { min-height: 19px; margin-top: 13px; color: #ff9e8b; font-size: 11px; text-align: center; }
.login-message.success { color: #72e7ac; }
.login-terms { margin: 7px 0 0; color: #566478; font-size: 9px; line-height: 1.4; text-align: center; }

@media (max-height: 720px) {
  .login-page { padding: 10px; }
  .login-card { padding-top: 18px; }
  .login-brand h1 { font-size: 46px; }
  .step-heading { margin: 18px 0 13px; }
  input { height: 46px; margin-bottom: 11px; }
}
