.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 48px 24px;
  background: #f5f3ff;
  color: #18181b;
  transition: background-color 180ms, color 180ms;
}

.auth-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(64px);
  pointer-events: none;
}

.auth-glow-violet {
  width: 320px;
  height: 320px;
  left: -96px;
  top: -128px;
  background: rgb(196 181 253 / 50%);
}

.auth-glow-sky {
  width: 384px;
  height: 384px;
  right: -96px;
  bottom: -112px;
  background: rgb(125 211 252 / 40%);
}

.auth-card {
  position: relative;
  width: min(448px, 100%);
  padding: 40px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 32px;
  background: rgb(255 255 255 / 80%);
  box-shadow: 0 25px 50px -12px rgb(46 16 101 / 10%);
  backdrop-filter: blur(24px);
}

.auth-logo {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 10px 18px -8px rgb(124 58 237 / 65%);
}

.auth-logo svg,
.auth-field svg,
.auth-theme-toggle svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-logo svg {
  width: 25px;
  height: 25px;
}

.auth-card h1 {
  margin: 28px 0 0;
  font-size: 30px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.025em;
}

.auth-intro {
  margin: 8px 0 0;
  color: #71717a;
  font-size: 14px;
  line-height: 24px;
}

.auth-form {
  display: grid;
  gap: 20px;
  margin-top: 32px;
}

.auth-form label {
  display: grid;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
}

.auth-field {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  transition: border-color 180ms, box-shadow 180ms;
}

.auth-field:focus-within {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 3px rgb(139 92 246 / 15%);
}

.auth-field svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #71717a;
}

.auth-field input {
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
}

.auth-field input:focus {
  border: 0;
  box-shadow: none;
}

.auth-field input::placeholder {
  color: #a1a1aa;
}

.auth-password-toggle {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #71717a;
}

.auth-password-toggle:hover {
  background: #f4f4f5;
}

.auth-password-toggle:hover svg {
  color: #7c3aed;
}

.auth-password-toggle:focus-visible {
  outline: 2px solid #8b5cf6;
  outline-offset: 1px;
}

.auth-password-toggle svg {
  width: 19px;
  height: 19px;
}

.auth-password-toggle svg[hidden] {
  display: none;
}

.auth-submit {
  height: 48px;
  border: 0;
  border-radius: 12px;
  background: #7c3aed;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 8px 18px -10px rgb(124 58 237 / 80%);
  transition: opacity 180ms, transform 180ms;
}

.auth-submit:hover { opacity: .9; }
.auth-submit:active { transform: translateY(1px); }

.auth-note {
  margin: 28px 0 0;
  text-align: center;
  color: #71717a;
  font-size: 12px;
}

.auth-theme-toggle {
  position: absolute;
  z-index: 2;
  top: 24px;
  right: 24px;
  display: flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 12px;
  background: rgb(255 255 255 / 75%);
  color: #52525b;
  box-shadow: 0 8px 24px rgb(46 16 101 / 8%);
  backdrop-filter: blur(12px);
}

.auth-theme-toggle svg {
  width: 18px;
  height: 18px;
}

.theme-icon-moon { display: none; }
.auth-page.is-dark { background: #070b18; color: #f8fafc; }
.auth-page.is-dark .auth-glow-violet { background: rgb(109 40 217 / 20%); }
.auth-page.is-dark .auth-glow-sky { background: rgb(29 78 216 / 15%); }
.auth-page.is-dark .auth-card { border-color: rgb(167 139 250 / 20%); background: rgb(13 20 40 / 85%); box-shadow: 0 25px 50px -12px rgb(46 16 101 / 40%); }
.auth-page.is-dark .auth-logo { background: linear-gradient(145deg, #8b5cf6, #2563eb); }
.auth-page.is-dark .auth-intro,
.auth-page.is-dark .auth-note { color: #94a3b8; }
.auth-page.is-dark .auth-field { border-color: rgb(148 163 184 / 22%); background: #0f172a; }
.auth-page.is-dark .auth-field svg { color: #94a3b8; }
.auth-page.is-dark .auth-field input::placeholder { color: #64748b; }
.auth-page.is-dark .auth-password-toggle:hover { background: #1e293b; }
.auth-page.is-dark .auth-password-toggle:hover svg { color: #c4b5fd; }
.auth-page.is-dark .auth-theme-toggle { border-color: rgb(167 139 250 / 20%); background: rgb(13 20 40 / 80%); color: #cbd5e1; }
.auth-page.is-dark .theme-icon-sun { display: none; }
.auth-page.is-dark .theme-icon-moon { display: block; }

@media (max-width: 600px) {
  .auth-page { padding: 72px 20px 32px; }
  .auth-card { padding: 32px 24px; }
  .auth-theme-toggle { top: 18px; right: 18px; }
  .auth-glow-violet { left: -190px; }
  .auth-glow-sky { right: -220px; }
}
