/* Auth pages — centered card on paper canvas. */

.auth-page {
  min-height: 100vh;
}

.auth-main {
  max-width: none;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  padding: 40px 20px;
  display: flex;
  justify-content: center;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 28px;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 8px;
}

.auth-brand .brand-glyph {
  width: 32px;
  height: 32px;
}

.auth-brand-name {
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-strong);
  letter-spacing: -0.03em;
}

.auth-tagline {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.auth-heading {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 12px 0 6px;
}

.auth-subheading {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 28px;
}

.auth-form .field {
  margin-bottom: 16px;
}

.auth-form-error {
  background: var(--danger-soft);
  border: 1px solid #f0cdc9;
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
}

.input-with-icon {
  position: relative;
}

.input-with-icon .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  pointer-events: none;
}

.input-with-icon .input {
  padding-left: 42px;
}

.input-with-icon.has-toggle .input {
  padding-right: 44px;
}

.input-error {
  border-color: var(--danger) !important;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: none;
  background: none;
  color: var(--text-faint);
  cursor: pointer;
  border-radius: 8px;
  padding: 0;
}

.password-toggle:hover {
  color: var(--text-muted);
  background: var(--surface-soft);
}

/* The `hidden` attribute doesn't hide SVG-namespace elements. */
.password-toggle svg[hidden] {
  display: none;
}

.auth-submit {
  width: 100%;
  margin-top: 8px;
}

.auth-footer {
  text-align: center;
  margin: 22px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.auth-footer a {
  font-weight: 600;
  color: var(--primary);
}

/* Decorative amber sparkles */
.auth-sparkle {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--amber);
  opacity: 0.85;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  pointer-events: none;
  z-index: 0;
}

.auth-sparkle-1 {
  top: 12%;
  right: 8%;
  width: 16px;
  height: 16px;
}

.auth-sparkle-2 {
  bottom: 22%;
  left: 4%;
  width: 10px;
  height: 10px;
  opacity: 0.55;
}

.auth-sparkle-3 {
  top: 38%;
  left: 2%;
  width: 8px;
  height: 8px;
  opacity: 0.4;
}

.auth-deco-right {
  position: absolute;
  right: -20px;
  top: 18%;
  width: 72px;
  height: 96px;
  border-radius: 16px;
  background: linear-gradient(160deg, var(--primary-strong) 0%, var(--primary) 100%);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px 22px;
  }

  .auth-deco-right {
    display: none;
  }
}
