/* =========================================================
   WILLIAM — Auth pages: glass card centered over 3D backdrop
   ========================================================= */
.w-auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}
.w-auth-card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  border-radius: var(--w-radius-lg);
  background: rgba(22, 22, 29, .72);
  border: 1px solid rgba(var(--w-ov), .1);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(var(--w-ov), .06);
  animation: w-auth-in .5s cubic-bezier(.2, .8, .2, 1) both;
}
.w-auth-logo { display: block; text-align: center; margin-bottom: 18px; }
.w-auth-logo img { height: 52px; width: auto; max-width: 100%; }
.w-auth-heading { text-align: center; margin-bottom: 24px; }
.w-auth-heading h1 { margin: 0 0 6px; font-size: 24px; font-weight: 800; color: var(--w-heading); letter-spacing: -.02em; }
.w-auth-heading p { margin: 0; font-size: 14px; color: var(--w-text-muted); }

.w-auth-alt { margin: 20px 0 0; text-align: center; font-size: 14px; color: var(--w-text-muted); }
.w-auth-alt a { color: var(--w-primary-light); font-weight: 600; }
.w-auth-alt a:hover { color: var(--w-heading); }
.w-auth-foot { margin: 22px 0 0; font-size: 13px; }
.w-auth-foot a { color: var(--w-text-muted); }
.w-auth-foot a:hover { color: var(--w-heading); }

/* Status icon (activation / success pages) */
.w-auth-status {
  width: 72px; height: 72px; margin: 0 auto 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: var(--w-ok-text);
  background: rgba(16, 185, 129, .14);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, .06);
}

/* Password strength meter */
.w-pw-meter { display: flex; gap: 4px; margin-top: 8px; }
.w-pw-meter i { flex: 1; height: 4px; border-radius: 2px; background: rgba(var(--w-ov), .1); transition: background .25s; }
.w-pw-meter[data-score="1"] i:nth-child(-n+1) { background: var(--w-danger); }
.w-pw-meter[data-score="2"] i:nth-child(-n+2) { background: var(--w-warning); }
.w-pw-meter[data-score="3"] i:nth-child(-n+3) { background: #22d3ee; }
.w-pw-meter[data-score="4"] i { background: var(--w-success); }
.w-pw-hint { display: block; margin-top: 6px; font-size: 12px; color: var(--w-text-faint); min-height: 1em; }

/* Inline alert: the single place where auth forms report results */
.w-auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 18px;
  padding: 12px 14px 12px 12px;
  border-radius: var(--w-radius-sm);
  border: 1px solid transparent;
  border-left-width: 3px;
  font-size: .9rem;
  line-height: 1.45;
  animation: w-alert-in .28s cubic-bezier(.2, .8, .2, 1) both;
}
.w-auth-alert[hidden] { display: none; }
.w-auth-alert > i { flex: 0 0 auto; margin-top: 2px; font-size: 16px; }
.w-auth-alert.is-error { color: #fecdd3; background: rgba(239, 68, 68, .1); border-color: rgba(239, 68, 68, .35); border-left-color: #ef4444; }
.w-auth-alert.is-error > i { color: var(--w-bad-text); }
.w-auth-alert.is-success { color: #bbf7d0; background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .35); border-left-color: #10b981; }
.w-auth-alert.is-success > i { color: var(--w-ok-text); }
.w-auth-alert.is-shaking { animation: w-alert-in .28s cubic-bezier(.2, .8, .2, 1) both, w-alert-shake .42s ease .05s; }
@keyframes w-alert-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes w-alert-shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.w-auth .g-recaptcha { display: flex; justify-content: center; }

@keyframes w-auth-in { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) {
  .w-auth { padding: 24px 12px; } /* stays vertically centered (owner request) */
  .w-auth-card { padding: 28px 20px; }
  .w-auth .g-recaptcha { transform: scale(.9); transform-origin: center; }
}
@media (prefers-reduced-motion: reduce) {
  .w-auth-card, .w-auth-alert, .w-auth-alert.is-shaking { animation: none; }
}

/* light theme */
html[data-theme="light"] .w-auth-card { background: rgba(255,255,255,.9); border-color: rgba(15,23,42,.08); box-shadow: 0 30px 80px rgba(15,23,42,.12), inset 0 1px 0 rgba(255,255,255,.6); }
html[data-theme="light"] .w-auth-alert.is-error { color: #991b1b; }
html[data-theme="light"] .w-auth-alert.is-success { color: #065f46; }
html[data-theme="light"] .w-pw-meter[data-score="3"] i:nth-child(-n+3) { background: #0891b2; }
