:root {
  color-scheme: dark;
  --auth-bg: #070812;
  --auth-panel: rgba(16, 18, 34, .88);
  --auth-panel-strong: #111326;
  --auth-line: rgba(159, 169, 255, .17);
  --auth-text: #f7f7ff;
  --auth-muted: #a7abc8;
  --auth-primary: #7777ff;
  --auth-primary-2: #9d6cff;
  --auth-focus: #8fdcff;
  --auth-danger: #ff9baf;
  --auth-success: #80e1bd;
  --auth-shadow: 0 36px 100px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--auth-bg); }

body.auth-page {
  min-height: 100vh;
  margin: 0;
  color: var(--auth-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 13% 12%, rgba(76, 103, 255, .22), transparent 30rem),
    radial-gradient(circle at 88% 78%, rgba(169, 78, 255, .17), transparent 31rem),
    linear-gradient(145deg, #070812 0%, #090b18 48%, #070912 100%);
  overflow-x: hidden;
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 90%);
}

a { color: #b9bdff; text-underline-offset: 3px; }
a:hover { color: #fff; }

button, input { font: inherit; }
button { cursor: pointer; }

.auth-skip {
  position: fixed;
  left: 1rem;
  top: -5rem;
  z-index: 50;
  padding: .72rem 1rem;
  color: #090a14;
  background: #fff;
  border-radius: .65rem;
}
.auth-skip:focus { top: 1rem; }

.auth-nav {
  position: relative;
  z-index: 5;
  width: min(1180px, calc(100% - 40px));
  min-height: 80px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: .72rem;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -.025em;
  text-decoration: none;
}

.auth-brand img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  box-shadow: 0 0 28px rgba(101, 102, 255, .35);
}

.auth-nav-action {
  display: flex;
  align-items: center;
  gap: .7rem;
  color: var(--auth-muted);
  font-size: .9rem;
}

.auth-nav-action a {
  padding: .62rem .9rem;
  color: #fff;
  border: 1px solid var(--auth-line);
  border-radius: .75rem;
  text-decoration: none;
  background: rgba(255,255,255,.035);
}

.auth-layout {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 40px));
  min-height: calc(100vh - 148px);
  margin: 0 auto;
  padding: 1.5rem 0 4rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(400px, 500px);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
}

.auth-story { max-width: 610px; padding: 2rem 0; }

.auth-eyebrow {
  margin: 0 0 1rem;
  color: #abb0ff;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.auth-story h1 {
  max-width: 690px;
  margin: 0;
  font-size: clamp(2.7rem, 5vw, 5rem);
  line-height: .98;
  letter-spacing: -.065em;
}

.auth-gradient-text {
  color: transparent;
  background: linear-gradient(100deg, #fff 8%, #aeb8ff 48%, #c68cff 96%);
  -webkit-background-clip: text;
  background-clip: text;
}

.auth-story > p:not(.auth-eyebrow) {
  max-width: 560px;
  margin: 1.5rem 0 0;
  color: var(--auth-muted);
  font-size: clamp(1rem, 1.5vw, 1.16rem);
  line-height: 1.75;
}

.auth-points {
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  list-style: none;
}

.auth-points li {
  min-height: 100px;
  padding: 1rem;
  border: 1px solid rgba(168, 174, 255, .12);
  border-radius: 1rem;
  color: #c2c6df;
  background: rgba(255,255,255,.025);
  font-size: .83rem;
  line-height: 1.45;
}

.auth-points strong { display: block; margin-bottom: .35rem; color: #fff; font-size: .9rem; }

.auth-point-icon {
  width: 28px;
  height: 28px;
  margin-bottom: .8rem;
  display: grid;
  place-items: center;
  border-radius: .55rem;
  color: #c9cbff;
  background: rgba(121, 122, 255, .16);
  font-weight: 800;
}

.auth-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2.35rem);
  border: 1px solid var(--auth-line);
  border-radius: 1.4rem;
  background: linear-gradient(155deg, rgba(20, 22, 42, .96), rgba(13, 15, 29, .96));
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(18px);
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(157, 168, 255, .2), transparent 36%, rgba(186, 111, 255, .15));
}

.auth-card-header { margin-bottom: 1.45rem; }
.auth-card-header h1 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.15rem); letter-spacing: -.04em; }
.auth-card-header p { margin: .55rem 0 0; color: var(--auth-muted); font-size: .93rem; line-height: 1.55; }

.social-stack { display: grid; gap: .7rem; }

.social-button {
  width: 100%;
  min-height: 48px;
  padding: .7rem 1rem;
  display: grid;
  grid-template-columns: 25px 1fr 25px;
  align-items: center;
  border: 1px solid rgba(179, 184, 226, .18);
  border-radius: .8rem;
  color: #f9f9ff;
  background: rgba(255,255,255,.045);
  font-weight: 650;
  transition: border-color .18s ease, transform .18s ease, background .18s ease;
}
.social-button:hover { transform: translateY(-1px); border-color: rgba(172, 178, 255, .42); background: rgba(255,255,255,.075); }
.social-button:disabled { cursor: wait; opacity: .68; transform: none; }

.provider-icon { width: 22px; height: 22px; display: grid; place-items: center; }
.provider-google { font-family: Arial, sans-serif; color: #fff; font-size: 1.15rem; font-weight: 800; }
.provider-microsoft { display: grid; grid-template-columns: repeat(2, 9px); grid-template-rows: repeat(2, 9px); gap: 2px; }
.provider-microsoft i { display: block; width: 9px; height: 9px; }
.provider-microsoft i:nth-child(1) { background:#f35325; }
.provider-microsoft i:nth-child(2) { background:#81bc06; }
.provider-microsoft i:nth-child(3) { background:#05a6f0; }
.provider-microsoft i:nth-child(4) { background:#ffba08; }

.auth-divider { margin: 1.35rem 0; display: flex; align-items: center; gap: 1rem; color: #747997; font-size: .76rem; text-transform: uppercase; letter-spacing: .09em; }
.auth-divider::before, .auth-divider::after { content:""; height: 1px; flex: 1; background: var(--auth-line); }

.auth-form { display: grid; gap: 1rem; }
.auth-field { display: grid; gap: .44rem; }
.auth-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.auth-label-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.auth-label-row a, .auth-label-row button { color: #b5b8ff; font-size: .8rem; }

.auth-field label { color: #d8daec; font-size: .81rem; font-weight: 650; }
.auth-field small { color: #858aa9; line-height: 1.4; }

.auth-input-wrap { position: relative; }
.auth-field input {
  width: 100%;
  min-height: 48px;
  padding: .75rem .9rem;
  border: 1px solid rgba(172, 179, 224, .17);
  border-radius: .75rem;
  outline: none;
  color: #fff;
  background: rgba(5, 7, 18, .58);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-field input::placeholder { color: #666b87; }
.auth-field input:hover { border-color: rgba(172, 179, 224, .32); }
.auth-field input:focus { border-color: var(--auth-focus); box-shadow: 0 0 0 3px rgba(78, 177, 237, .14); background: rgba(5, 7, 18, .82); }

.password-toggle {
  position: absolute;
  right: .5rem;
  top: 50%;
  min-width: 38px;
  min-height: 36px;
  transform: translateY(-50%);
  border: 0;
  border-radius: .55rem;
  color: #a7abc6;
  background: transparent;
}
.password-toggle:hover { color: #fff; background: rgba(255,255,255,.06); }

.auth-checkbox { display: flex; align-items: flex-start; gap: .65rem; color: var(--auth-muted); font-size: .82rem; line-height: 1.5; }
.auth-checkbox input { width: 17px; height: 17px; margin: .15rem 0 0; accent-color: var(--auth-primary); }

.auth-primary-button {
  width: 100%;
  min-height: 50px;
  padding: .75rem 1rem;
  border: 0;
  border-radius: .8rem;
  color: #fff;
  background: linear-gradient(115deg, #646af5, #945be9);
  box-shadow: 0 14px 34px rgba(92, 81, 223, .27);
  font-weight: 750;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: transform .18s ease, filter .18s ease;
}
.auth-primary-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.auth-primary-button:disabled { cursor: wait; opacity: .62; transform: none; filter: none; }

.auth-secondary-button {
  min-height: 44px;
  padding: .65rem 1rem;
  border: 1px solid var(--auth-line);
  border-radius: .75rem;
  color: #fff;
  background: rgba(255,255,255,.04);
  font-weight: 650;
  display: grid;
  place-items: center;
  text-decoration: none;
}

.auth-text-button { padding: 0; border: 0; color: #b9bdff; background: none; text-decoration: underline; text-underline-offset: 3px; }

.auth-status {
  min-height: 0;
  padding: 0;
  border-radius: .7rem;
  color: var(--auth-muted);
  font-size: .84rem;
  line-height: 1.45;
}
.auth-status:not(:empty) { min-height: 42px; padding: .7rem .8rem; border: 1px solid var(--auth-line); background: rgba(255,255,255,.035); }
.auth-status[data-kind="error"] { color: #ffd1da; border-color: rgba(255,111,139,.26); background: rgba(147,28,55,.13); }
.auth-status[data-kind="success"] { color: #b8f2dc; border-color: rgba(91,212,169,.25); background: rgba(18,112,80,.12); }

.auth-footnote { margin: 1.25rem 0 0; color: #797e9b; font-size: .76rem; line-height: 1.55; text-align: center; }
.auth-footnote a { color: #aeb2d8; }

.auth-view[hidden] { display: none !important; }

.turnstile-slot { min-height: 0; }
.turnstile-slot:not(:empty) { min-height: 65px; }

.auth-simple-layout { width: min(660px, calc(100% - 32px)); min-height: calc(100vh - 150px); margin: 0 auto; padding: 2rem 0 5rem; display: grid; place-items: center; position: relative; z-index: 1; }
.auth-simple-card { width: 100%; padding: clamp(1.5rem, 5vw, 3rem); text-align: center; }
.auth-simple-icon { width: 72px; height: 72px; margin: 0 auto 1.4rem; display: grid; place-items: center; border: 1px solid rgba(167,174,255,.2); border-radius: 1.25rem; background: rgba(112,104,255,.13); box-shadow: 0 16px 50px rgba(69,65,204,.22); font-size: 2rem; }
.auth-simple-card h1 { margin: 0; font-size: clamp(2rem, 6vw, 3rem); letter-spacing: -.05em; }
.auth-simple-card > p { max-width: 500px; margin: 1rem auto 0; color: var(--auth-muted); line-height: 1.7; }

.email-address { margin: 1.25rem auto 0; padding: .72rem 1rem; width: fit-content; max-width: 100%; border: 1px solid var(--auth-line); border-radius: 999px; color: #e7e8ff; background: rgba(255,255,255,.04); overflow-wrap: anywhere; }
.verify-steps { margin: 1.7rem 0; padding: 0; display: grid; gap: .8rem; list-style: none; text-align: left; counter-reset: verify; }
.verify-steps li { display: grid; grid-template-columns: 30px 1fr; gap: .75rem; align-items: start; color: #c4c7df; line-height: 1.5; }
.verify-steps li::before { counter-increment: verify; content: counter(verify); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #dfe0ff; background: rgba(119,119,255,.16); font-size: .77rem; font-weight: 800; }
.verify-actions { display: grid; gap: .75rem; margin-top: 1.4rem; }
.verify-links { margin-top: 1.4rem; display: flex; justify-content: center; flex-wrap: wrap; gap: 1rem; font-size: .84rem; }

.callback-spinner { width: 42px; height: 42px; margin: 0 auto 1.3rem; border: 3px solid rgba(255,255,255,.12); border-top-color: #8f91ff; border-radius: 50%; animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-footer { position: relative; z-index: 2; width: min(1180px, calc(100% - 40px)); margin: -2.5rem auto 0; padding: 0 0 1.7rem; display: flex; justify-content: space-between; gap: 1rem; color: #686d88; font-size: .75rem; }
.auth-footer div { display: flex; gap: 1rem; }

:focus-visible { outline: 3px solid rgba(143, 220, 255, .65); outline-offset: 3px; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; gap: 1.5rem; width: min(560px, calc(100% - 32px)); padding-top: .5rem; }
  .auth-story { padding: .5rem 0; text-align: center; }
  .auth-story h1 { font-size: clamp(2.35rem, 10vw, 4rem); }
  .auth-story > p:not(.auth-eyebrow) { margin-left: auto; margin-right: auto; }
  .auth-points { display: none; }
  .auth-footer { width: min(560px, calc(100% - 32px)); margin-top: -2rem; }
}

@media (max-width: 560px) {
  .auth-nav { width: calc(100% - 28px); min-height: 70px; }
  .auth-nav-action span { display: none; }
  .auth-layout { width: calc(100% - 24px); padding-bottom: 3.5rem; }
  .auth-story h1 { font-size: 2.5rem; }
  .auth-story > p:not(.auth-eyebrow) { font-size: .95rem; }
  .auth-card { padding: 1.25rem; border-radius: 1.1rem; }
  .auth-field-row { grid-template-columns: 1fr; }
  .auth-footer { width: calc(100% - 28px); flex-direction: column; align-items: center; 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; }
}
