:root {
  color-scheme: light;
  --canvas: #f4f4ef;
  --surface: rgba(255, 255, 255, .72);
  --text: #171918;
  --text-soft: #6b716d;
  --line: rgba(23, 25, 24, .13);
  --accent: #5b5bd6;
  --accent-strong: #4b4bc5;
  --lime: #c8f35b;
  --danger: #a92f3d;
  --danger-soft: #fff0f1;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--canvas);
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; background: var(--canvas); }
body { min-height: 100vh; margin: 0; background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  overflow: hidden;
}

.auth-form-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(520px, 1fr) auto;
  padding: clamp(26px, 4vw, 58px);
  background:
    radial-gradient(circle at 8% 4%, rgba(200, 243, 91, .14), transparent 26%),
    var(--canvas);
}

.auth-brand {
  width: max-content;
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.auth-brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: #171918;
  background: var(--lime);
  box-shadow: inset 0 0 0 1px rgba(23, 25, 24, .08), 0 8px 22px rgba(94, 111, 49, .12);
  font: 800 17px/1 Manrope, sans-serif;
}

.auth-brand > span:last-child { display: grid; gap: 2px; }
.auth-brand b { font: 800 16px/1.1 Manrope, sans-serif; letter-spacing: -.03em; }
.auth-brand small { color: var(--text-soft); font-size: 10px; }

.auth-form-wrap {
  width: min(100%, 458px);
  align-self: center;
  justify-self: center;
  padding: 48px 0;
}

.auth-copy { margin-bottom: 34px; }
.auth-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 0;
  font: 800 clamp(40px, 5vw, 62px)/.98 Manrope, sans-serif;
  letter-spacing: -.065em;
}

.auth-subtitle {
  max-width: 410px;
  margin: 17px 0 0;
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.6;
}

.auth-form { display: grid; gap: 18px; }
.auth-field { display: grid; gap: 8px; }
.auth-field label { color: #4f5551; font-size: 12px; font-weight: 700; }

.auth-input-shell {
  min-height: 54px;
  display: flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), 0 7px 26px rgba(23, 25, 24, .035);
  backdrop-filter: blur(18px);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-input-shell:focus-within {
  border-color: rgba(91, 91, 214, .7);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 0 0 4px rgba(91, 91, 214, .11), 0 10px 28px rgba(23, 25, 24, .05);
}

.auth-input-shell input {
  min-width: 0;
  width: 100%;
  min-height: 52px;
  border: 0;
  outline: 0;
  padding: 0 16px;
  color: var(--text);
  background: transparent;
  font-size: 14px;
}

.auth-input-shell input::placeholder { color: #a0a5a1; }
.auth-input-shell:has(input[aria-invalid="true"]) { border-color: rgba(169, 47, 61, .58); }
.auth-password-shell { position: relative; }
.auth-password-shell input { padding-right: 90px; }

.auth-password-toggle {
  position: absolute;
  right: 8px;
  min-width: 72px;
  min-height: 38px;
  border: 0;
  border-radius: 11px;
  padding: 0 10px;
  color: var(--text-soft);
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  transition: color 160ms ease, background 160ms ease;
}

.auth-password-toggle:hover { color: var(--text); background: rgba(23, 25, 24, .055); }

.auth-submit {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 13px 28px rgba(91, 91, 214, .2);
  cursor: pointer;
  font-weight: 800;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-submit:hover { transform: translateY(-1px); background: var(--accent-strong); box-shadow: 0 16px 34px rgba(91, 91, 214, .27); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { cursor: wait; opacity: .72; transform: none; }
.auth-submit-spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.38); border-top-color: #fff; border-radius: 50%; animation: auth-spin .7s linear infinite; }
.auth-submit[aria-busy="true"] .auth-submit-spinner { display: block; }

.auth-error {
  margin: -2px 0 0;
  padding: 12px 13px;
  border: 1px solid rgba(169, 47, 61, .16);
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 12px;
  line-height: 1.45;
}

.auth-switch {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 24px;
  color: var(--text-soft);
  font-size: 12px;
}

.auth-switch button {
  min-height: 32px;
  border: 0;
  padding: 0 4px;
  color: var(--accent);
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.auth-footnote { align-self: end; margin: 0; color: #919792; font-size: 10px; }

.auth-password-toggle:focus-visible,
.auth-submit:focus-visible,
.auth-switch button:focus-visible,
.auth-brand:focus-visible {
  outline: 3px solid rgba(91, 91, 214, .28);
  outline-offset: 3px;
}

.auth-visual {
  position: relative;
  min-width: 0;
  min-height: calc(100dvh - 28px);
  overflow: hidden;
  margin: 14px 14px 14px 0;
  border-radius: 30px;
  color: #f5f6f4;
  background:
    radial-gradient(circle at 18% 20%, rgba(148, 119, 255, .48), transparent 26%),
    radial-gradient(circle at 86% 22%, rgba(200, 243, 91, .18), transparent 24%),
    radial-gradient(circle at 60% 96%, rgba(74, 90, 206, .45), transparent 38%),
    linear-gradient(145deg, #171817 0%, #202226 48%, #141517 100%);
  box-shadow: 0 20px 60px rgba(23, 25, 24, .18);
  isolation: isolate;
  animation: auth-panel-in .8s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 30%, rgba(6, 7, 7, .72) 100%);
}

.auth-visual-grid {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image:
    linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

.auth-orb { position: absolute; border-radius: 50%; filter: blur(2px); }
.auth-orb-one { top: 10%; right: 8%; width: 170px; height: 170px; border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 0 55px rgba(200,243,91,.08); animation: auth-float 7s ease-in-out infinite; }
.auth-orb-two { top: 24%; left: 12%; width: 74px; height: 74px; background: rgba(200,243,91,.88); box-shadow: 0 0 60px rgba(200,243,91,.24); animation: auth-float 5.5s 1s ease-in-out infinite reverse; }

.auth-visual-copy {
  position: absolute;
  z-index: 2;
  top: clamp(44px, 7vw, 94px);
  left: clamp(36px, 6vw, 88px);
  width: min(590px, calc(100% - 72px));
}

.auth-visual-copy > span { color: var(--lime); font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.auth-visual-copy h2 { max-width: 560px; margin: 15px 0 0; font: 700 clamp(42px, 5.3vw, 76px)/.98 Manrope, sans-serif; letter-spacing: -.065em; }
.auth-visual-copy p { max-width: 470px; margin: 21px 0 0; color: #b5bab6; font-size: 15px; line-height: 1.6; }

.auth-feature-stack { position: absolute; z-index: 3; right: clamp(26px, 4vw, 62px); bottom: clamp(70px, 9vw, 126px); left: clamp(26px, 4vw, 62px); min-height: 210px; }
.auth-feature-card {
  position: absolute;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(36, 38, 38, .58);
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
  backdrop-filter: blur(22px);
  animation: auth-rise .72s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-feature-card small, .auth-feature-card strong, .auth-feature-card span { display: block; }
.auth-feature-card small { color: #aeb4af; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.auth-feature-card strong { margin-top: 4px; font: 700 14px/1.2 Manrope, sans-serif; }
.auth-feature-card div > span { margin-top: 6px; color: #969d97; font-size: 10px; }

.auth-feature-main { inset: 44px auto auto 0; width: min(370px, 62%); min-height: 116px; gap: 14px; padding: 19px; border-radius: 24px; animation-delay: .48s; }
.auth-feature-main > b { margin-left: auto; color: rgba(255,255,255,.18); font: 800 34px/1 Manrope, sans-serif; }
.auth-feature-icon { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 14px; color: #171918; background: var(--lime); font-size: 18px; font-weight: 900; }

.auth-feature-small { top: 0; right: 0; width: min(278px, 46%); min-height: 84px; gap: 12px; padding: 16px; border-radius: 21px; animation-delay: .64s; }
.auth-feature-last { top: 104px; right: 7%; animation-delay: .8s; }
.auth-feature-dot { width: 11px; height: 11px; flex: none; border-radius: 50%; background: #8e7cff; box-shadow: 0 0 0 5px rgba(142,124,255,.13); }
.auth-feature-date { width: 38px; height: 38px; flex: none; display: grid !important; place-items: center; border-radius: 12px; color: #171918; background: #f5f6f2; font: 800 13px/1 Manrope, sans-serif; }

.auth-visual-status { position: absolute; bottom: 34px; left: clamp(28px, 4vw, 62px); display: flex; align-items: center; gap: 8px; color: #8f9690; font-size: 10px; }
.auth-visual-status span { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(200,243,91,.11); }

.auth-animate { animation: auth-rise .58s cubic-bezier(.2, .8, .2, 1) both; }
.auth-delay-1 { animation-delay: .06s; }
.auth-delay-2 { animation-delay: .12s; }
.auth-delay-3 { animation-delay: .18s; }
.auth-delay-4 { animation-delay: .24s; }
.auth-delay-5 { animation-delay: .30s; }
.auth-delay-6 { animation-delay: .36s; }
.auth-delay-7 { animation-delay: .42s; }

@keyframes auth-rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes auth-panel-in { from { opacity: 0; transform: translateX(18px) scale(.99); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes auth-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 1080px) {
  .auth-form-panel { padding: 32px; }
  .auth-feature-main { width: 68%; }
  .auth-feature-small { width: 50%; }
}

@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .auth-form-panel { min-height: 100vh; min-height: 100dvh; grid-template-rows: auto minmax(0, 1fr) auto; }
  .auth-form-wrap { padding: 58px 0 42px; }
  .auth-visual { display: none; }
}

@media (max-width: 520px) {
  .auth-form-panel { padding: max(22px, env(safe-area-inset-top)) 20px max(22px, env(safe-area-inset-bottom)); }
  .auth-form-wrap { padding: 48px 0 32px; }
  .auth-copy { margin-bottom: 28px; }
  .auth-copy h1 { font-size: clamp(38px, 12vw, 49px); }
  .auth-subtitle { margin-top: 14px; font-size: 14px; }
  .auth-form { gap: 15px; }
  .auth-footnote { text-align: center; }
}

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