:root {
  --bg: #eff1f5;
  --s1: #fff;
  --s2: #f5f6fa;
  --s3: #e5e8ee;
  --s4: #d5dae3;
  --ink: #0b1a2b;
  --ink2: #4a576a;
  --ink3: #5a687b;
  --accent: #2a5fe8;
  --accent-bg: #e6edff;
  --lime: #b9ff3d;
  --good: #0e6b35;
  --good-bg: #dff6e7;
  --bad: #b8232a;
  --bad-bg: #fde1e2;
  --font:
    -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter Tight",
    sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e15;
    --s1: #141a24;
    --s2: #1b2330;
    --s3: #252f3f;
    --s4: #344156;
    --ink: #eef2f7;
    --ink2: #a0adbd;
    --ink3: #8d9bae;
    --accent: #7aa2ff;
    --accent-bg: #1a2750;
    --good: #58d489;
    --good-bg: #113522;
    --bad: #ff8589;
    --bad-bg: #451e25;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0e15;
  --s1: #141a24;
  --s2: #1b2330;
  --s3: #252f3f;
  --s4: #344156;
  --ink: #eef2f7;
  --ink2: #a0adbd;
  --ink3: #8d9bae;
  --accent: #7aa2ff;
  --accent-bg: #1a2750;
  --good: #58d489;
  --good-bg: #113522;
  --bad: #ff8589;
  --bad-bg: #451e25;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font: 500 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button,
input {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(0, 1fr);
  padding: 18px;
  gap: 18px;
}
.auth-main,
.auth-art {
  border-radius: 24px;
  min-width: 0;
}
.auth-main {
  background: var(--s1);
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 5vw, 64px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  font: 800 20px/1 var(--font);
  letter-spacing: -0.04em;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
}
.brand-mark img {
  display: none;
}
.brand-mark::before {
  content: "";
  width: 21px;
  height: 21px;
  background: var(--s1);
  mask: url("/assets/fortless-icon.svg") center/contain no-repeat;
  -webkit-mask: url("/assets/fortless-icon.svg") center/contain no-repeat;
}
.auth-card {
  width: 100%;
  max-width: 390px;
  margin: auto;
}
.eyebrow {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 99px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
h1 {
  margin: 0 0 8px;
  font: 800 clamp(27px, 4vw, 36px)/1.08 var(--font);
  letter-spacing: -0.045em;
}
.sub {
  color: var(--ink2);
  margin: 0 0 26px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 15px;
}
.field > label {
  font-weight: 700;
  font-size: 13px;
}
.inp {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  background: var(--s2);
}
.inp:focus-within {
  outline: 2px solid var(--accent);
  background: var(--s1);
}
.inp input {
  width: 100%;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: 0;
  background: none;
  font-size: 16px;
}
.otp {
  display: flex;
  gap: 8px;
  width: 100%;
}
.otp input {
  flex: 1 1 46px;
  width: 46px;
  min-width: 0;
  max-width: 46px;
  height: 56px;
  border: 0;
  border-radius: 14px;
  background: var(--s2);
  text-align: center;
  font: 700 22px/1 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  outline: 0;
}
.otp input:focus {
  outline: 2px solid var(--accent);
  background: var(--s1);
}
.auth-mode-toggle {
  display: block;
  margin: -2px 0 16px auto;
  padding: 0;
  border: 0;
  background: none;
}
.inp[hidden], .field[hidden] {
  display: none;
}
.inp input:-webkit-autofill,
.inp input:-webkit-autofill:hover,
.inp input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: 0 0 0 1000px var(--s2) inset;
  caret-color: var(--ink);
  transition: background-color 9999s ease-out;
}
.inp button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink2);
}
.inp button:hover {
  background: var(--s3);
  color: var(--ink);
}
.ic {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint {
  font-size: 12px;
  color: var(--ink3);
}
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 14px;
}
.text-link {
  color: var(--accent);
  font-weight: 700;
}
.btn {
  min-height: 46px;
  border: 0;
  border-radius: 99px;
  padding: 0 20px;
  background: var(--accent);
  color: #fff;
  font-weight: 750;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}
.btn:hover {
  filter: brightness(1.08);
}
.btn:active {
  transform: scale(0.97);
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  margin: 0 0 16px;
  background: var(--bad-bg);
  color: var(--bad);
}
.alert.good {
  background: var(--good-bg);
  color: var(--good);
}
.alert[hidden] {
  display: none;
}
.foot {
  text-align: center;
  color: var(--ink2);
  font-size: 13px;
  margin-top: 22px;
}
.auth-art {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #081522;
  color: #fff;
  padding: clamp(28px, 5vw, 72px);
  display: flex;
  align-items: flex-end;
}
.art-copy {
  position: relative;
  z-index: 2;
  max-width: 590px;
}
.art-copy h2 {
  font: 800 clamp(38px, 6vw, 76px)/0.96 var(--font);
  letter-spacing: -0.06em;
  margin: 0 0 18px;
}
.art-copy p {
  font-size: clamp(15px, 2vw, 19px);
  color: #c8d0dc;
  max-width: 520px;
}
.art-grid {
  position: absolute;
  inset: -10%;
  z-index: -3;
  opacity: 0.08;
  background-image: url("/assets/fortless-icon.svg");
  background-size: 104px 104px;
  transform: rotate(-9deg) scale(1.15);
}
.auth-art::before,
.auth-art::after {
  content: "";
  position: absolute;
  z-index: -2;
  width: min(55vw, 720px);
  aspect-ratio: 1;
  mask: url("/assets/fortless-icon.svg") center/contain no-repeat;
  -webkit-mask: url("/assets/fortless-icon.svg") center/contain no-repeat;
  transform: rotate(-11deg);
}
.auth-art::before {
  right: -12%;
  top: -22%;
  background: var(--lime);
  filter: drop-shadow(0 24px 80px rgba(185, 255, 61, 0.16));
}
.auth-art::after {
  right: 28%;
  top: 12%;
  width: min(36vw, 470px);
  background: #2a5fe8;
  opacity: 0.76;
  transform: rotate(10deg);
}
.art-copy::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(42vw, 560px);
  aspect-ratio: 1;
  left: -18%;
  bottom: -42%;
  background: #0b1a2b;
  mask: url("/assets/fortless-icon.svg") center/contain no-repeat;
  -webkit-mask: url("/assets/fortless-icon.svg") center/contain no-repeat;
  transform: rotate(8deg);
  opacity: 0.9;
}
.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 28px;
  color: var(--ink3);
  font-size: 12px;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lime);
}
@media (max-width: 780px) {
  .auth-shell {
    display: block;
    padding: 0;
  }
  .auth-main {
    min-height: 100dvh;
    border-radius: 0;
    padding: calc(22px + env(safe-area-inset-top))
      max(20px, env(safe-area-inset-right))
      calc(22px + env(safe-area-inset-bottom))
      max(20px, env(safe-area-inset-left));
  }
  .auth-card {
    margin: clamp(42px, 10vh, 92px) auto auto;
  }
  .auth-art {
    display: none;
  }
  .status-line {
    margin-top: 42px;
  }
}
@media (max-width: 780px) and (orientation: landscape) and (max-height: 520px) {
  .auth-main {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 180px minmax(300px, 430px);
    column-gap: 28px;
    align-items: start;
    justify-content: center;
    padding: 18px max(22px, env(safe-area-inset-right));
  }
  .brand {
    grid-column: 1;
    margin-top: 4px;
  }
  .status-line {
    grid-column: 1;
    align-self: end;
    margin: 0;
  }
  .auth-card {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin: 0;
    max-width: 430px;
  }
  .auth-card h1 {
    font-size: 26px;
  }
  .sub {
    margin-bottom: 15px;
  }
  .field {
    margin-bottom: 10px;
  }
  .inp {
    min-height: 44px;
  }
  .inp input {
    height: 42px;
  }
  .foot {
    margin-top: 12px;
  }
}
@media (max-width: 380px) {
  .auth-main {
    padding-left: 16px;
    padding-right: 16px;
  }
  .auth-card {
    margin-top: 34px;
  }
  h1 {
    font-size: 26px;
  }
  .otp {
    gap: 6px;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .auth-main {
    background: #111925;
  }
  :root:not([data-theme="light"]) .inp {
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  }
}
:root[data-theme="dark"] .auth-main {
  background: #111925;
}
:root[data-theme="dark"] .inp {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.035);
}
@media (prefers-reduced-motion: no-preference) {
  .auth-card {
    animation: auth-in 0.38s ease both;
  }
  @keyframes auth-in {
    from {
      opacity: 0;
      transform: translateY(8px);
    }
  }
}
