/* ─── Auth zone ────────────────────────────────────────────────────────────
 * Loaded by App.razor unconditionally. Only takes effect when an auth page
 * (using AuthLayout) is rendered — every rule is scoped to .auth-* classes
 * that AuthLayout produces.
 *
 * The auth zone is archetype-neutral: same dark glassmorphic look across
 * every realm, with --realm-hue / --realm-hue-2 set on .auth-page providing
 * the brand-tinted backdrop wash and accent.
 * ─────────────────────────────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #0a0a0f;
  color: oklch(0.97 0.005 var(--realm-hue));
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  position: relative;
  overflow: hidden;
}

.auth-backdrop {
  position: fixed;
  inset: -10%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 50% 40% at 50% 0%,
      oklch(0.40 0.16 var(--realm-hue) / 0.22), transparent 65%),
    radial-gradient(ellipse 40% 30% at 50% 100%,
      oklch(0.35 0.14 var(--realm-hue-2) / 0.16), transparent 60%);
  filter: blur(40px);
}

.auth-topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.auth-brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg,
    oklch(0.70 0.22 var(--realm-hue)),
    oklch(0.78 0.22 var(--realm-hue-2)));
  box-shadow: 0 0 18px oklch(0.65 0.22 var(--realm-hue) / 0.45);
}
.auth-brand-name {
  background: linear-gradient(135deg,
    oklch(0.85 0.18 var(--realm-hue)),
    oklch(0.92 0.18 var(--realm-hue-2)));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.auth-back-link {
  font-size: 13px;
  color: oklch(0.97 0.005 var(--realm-hue) / 0.55);
  text-decoration: none;
  transition: color 200ms ease;
}
.auth-back-link:hover {
  color: oklch(0.97 0.005 var(--realm-hue));
}

.auth-main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 32px;
  background: oklch(0.13 0.02 var(--realm-hue) / 0.55);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid oklch(1 0 0 / 0.08);
  border-radius: 12px;
  box-shadow: 0 30px 60px -20px oklch(0 0 0 / 0.5);
}

.auth-card-head {
  text-align: center;
  margin-bottom: 28px;
}
.auth-card-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: oklch(0.97 0.005 var(--realm-hue));
}
.auth-card-desc {
  font-size: 14px;
  color: oklch(0.97 0.005 var(--realm-hue) / 0.65);
  margin: 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.auth-label {
  font-size: 13px;
  font-weight: 500;
  color: oklch(0.97 0.005 var(--realm-hue) / 0.85);
}
.auth-input {
  background: oklch(0.10 0.015 var(--realm-hue) / 0.7);
  border: 1px solid oklch(1 0 0 / 0.10);
  border-radius: 6px;
  color: oklch(0.97 0.005 var(--realm-hue));
  font-size: 14px;
  padding: 9px 12px;
  font-family: inherit;
  transition: border-color 200ms ease, box-shadow 200ms ease;
  width: 100%;
  box-sizing: border-box;
}
.auth-input::placeholder {
  color: oklch(0.97 0.005 var(--realm-hue) / 0.35);
}
.auth-input:focus {
  outline: none;
  border-color: oklch(0.65 0.20 var(--realm-hue) / 0.6);
  box-shadow: 0 0 0 3px oklch(0.65 0.20 var(--realm-hue) / 0.15);
}

.auth-submit {
  background: linear-gradient(135deg,
    oklch(0.70 0.22 var(--realm-hue)),
    oklch(0.78 0.22 var(--realm-hue-2)));
  color: oklch(0.10 0.02 var(--realm-hue));
  border: none;
  border-radius: 6px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: filter 200ms ease, box-shadow 200ms ease;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 18px oklch(0.55 0.22 var(--realm-hue) / 0.35);
}
.auth-submit:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 26px oklch(0.55 0.22 var(--realm-hue) / 0.5);
}

.auth-alert {
  background: oklch(0.20 0.10 25 / 0.5);
  border: 1px solid oklch(0.45 0.15 25 / 0.6);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: oklch(0.92 0.05 25);
}

.auth-card-foot {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid oklch(1 0 0 / 0.06);
  text-align: center;
  font-size: 13px;
  color: oklch(0.97 0.005 var(--realm-hue) / 0.6);
}
.auth-card-foot a {
  color: oklch(0.97 0.005 var(--realm-hue));
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-card-foot a:hover {
  text-decoration: none;
}

.auth-footer {
  position: relative;
  z-index: 1;
  padding: 22px 32px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: oklch(0.97 0.005 var(--realm-hue) / 0.35);
}

/* ─── Mobile (≤768px) ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .auth-topbar {
    padding: 18px 20px;
  }
  .auth-back-link {
    font-size: 12px;
  }
  .auth-main {
    padding: 16px 16px;
  }
  .auth-card {
    padding: 28px 24px;
  }
  .auth-card-title {
    font-size: 20px;
  }
  .auth-footer {
    padding: 18px 20px;
  }
}
