@import url("/css/public-tokens.css");
@import url("/css/components.css");
@import url("/css/public-shell.css");
@import url("/css/auth-oauth.css?v=3");

body.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: Inter, system-ui, sans-serif;
  background: transparent;
  color: var(--color-text-primary, #f8fafc);
}

.auth-shell {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: var(--space-8, 2rem) max(1.25rem, env(safe-area-inset-right, 0px))
    max(var(--space-8, 2rem), env(safe-area-inset-bottom, 0px))
    max(1.25rem, env(safe-area-inset-left, 0px));
  box-sizing: border-box;
}

.auth-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-6, 1.5rem);
}

.auth-brand a {
  display: inline-flex;
  line-height: 0;
  text-decoration: none;
}

.auth-brand .brand-mark {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 8px 24px rgba(123, 66, 246, 0.25));
}


html[data-auth-view="login"] [data-auth-panel="register"],
html[data-auth-view="login"] [data-auth-panel="forgot"],
html[data-auth-view="login"] [data-auth-panel="reset"],
html[data-auth-view="register"] [data-auth-panel="login"],
html[data-auth-view="register"] [data-auth-panel="forgot"],
html[data-auth-view="register"] [data-auth-panel="reset"],
html[data-auth-view="forgot"] [data-auth-panel="login"],
html[data-auth-view="forgot"] [data-auth-panel="register"],
html[data-auth-view="forgot"] [data-auth-panel="reset"],
html[data-auth-view="reset"] [data-auth-panel="login"],
html[data-auth-view="reset"] [data-auth-panel="register"],
html[data-auth-view="reset"] [data-auth-panel="forgot"] {
  display: none !important;
}

.auth-forgot-row {
  margin: -0.25rem 0 0.35rem;
  text-align: right;
  font-size: var(--text-sm, 0.875rem);
}

.auth-forgot-row a {
  color: #a5b4fc;
  text-decoration: none;
}

.auth-forgot-row a:hover {
  color: #c4b5fd;
  text-decoration: none;
}

.auth-view--enter {
  animation: auth-view-in 0.16s ease;
}

@keyframes auth-view-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-view--enter {
    animation: none;
  }
}

.auth-card {
  padding: var(--space-8, 2rem);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: var(--text-2xl, 1.5rem);
  letter-spacing: -0.02em;
}

.auth-card .auth-lead {
  margin: 0 0 var(--space-6, 1.5rem);
  color: var(--color-text-secondary);
  font-size: var(--text-sm, 0.875rem);
}

.auth-lead__line {
  display: block;
}

.auth-lead__line a {
  margin-left: 0.28em;
  white-space: nowrap;
}

.auth-card form {
  display: grid;
  gap: var(--space-4, 1rem);
}

.auth-card input {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--color-border-subtle);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font: inherit;
}

html[data-theme="light"] .auth-card input {
  background: var(--color-bg-elevated, #f8fafc);
}

.auth-card input:focus {
  outline: none;
  border-color: var(--color-accent-primary);
  box-shadow: 0 0 0 3px rgba(123, 66, 246, 0.2);
}

.auth-card button[type="submit"] {
  width: 100%;
  margin-top: var(--space-2, 0.5rem);
}

.auth-links {
  margin-top: var(--space-5, 1.25rem);
  font-size: var(--text-sm, 0.875rem);
  color: var(--color-text-secondary);
  text-align: center;
}

.auth-links a,
.auth-card .auth-lead a {
  color: #a5b4fc;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--duration-fast, 150ms) ease;
}

.auth-links a:hover,
.auth-card .auth-lead a:hover {
  color: #c4b5fd;
  text-decoration: none;
}

html[data-theme="light"] .auth-links a,
html[data-theme="light"] .auth-card .auth-lead a {
  color: #6d28d9;
}

html[data-theme="light"] .auth-links a:hover,
html[data-theme="light"] .auth-card .auth-lead a:hover {
  color: #5b21b6;
}

.auth-trust {
  margin-top: var(--space-6, 1.5rem);
  padding-top: var(--space-4, 1rem);
  border-top: 1px solid var(--color-border-subtle);
  font-size: var(--text-xs, 0.75rem);
  color: var(--color-text-secondary);
  text-align: center;
}

.auth-err {
  margin-top: var(--space-3, 0.75rem);
}

.auth-ok {
  font-size: var(--text-sm, 0.875rem);
  margin-top: var(--space-3, 0.75rem);
  color: var(--color-text-secondary);
}

.auth-captcha {
  margin: 0.35rem 0 0;
  padding: 0.45rem 0.55rem;
  border-radius: 8px;
  border: 1px solid var(--border, rgba(148, 163, 184, 0.18));
  background: rgba(123, 66, 246, 0.04);
}

.auth-captcha__label {
  display: inline;
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--color-text-secondary, #94a3b8);
  line-height: 1.3;
}

.auth-captcha__question {
  display: inline;
  margin: 0 0 0 0.4rem;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.35;
  color: var(--color-text-primary, #f8fafc);
}

.auth-captcha__question--error {
  display: block;
  margin: 0.25rem 0 0;
  color: #f87171;
  font-weight: 500;
  font-size: 0.75rem;
}

.auth-field-hint {
  margin: -0.35rem 0 0.65rem;
}

.auth-captcha__row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.35rem;
}

.auth-captcha__row input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.38rem 0.55rem;
  min-height: 2rem;
  font-size: 0.875rem;
  line-height: 1.25;
  border-radius: 8px;
}

.auth-captcha__row .btn {
  flex-shrink: 0;
  margin: 0;
  padding: 0.32rem 0.5rem;
  font-size: 0.6875rem;
  line-height: 1.2;
  white-space: nowrap;
}

.auth-lead--verify {
  font-size: var(--text-sm, 0.875rem);
  color: var(--muted, #94a3b8);
}

.verify-gate {
  max-width: 32rem;
  margin: 2rem auto;
  padding: 2rem;
  text-align: left;
}

.verify-gate h1 {
  margin: 0 0 1rem;
  font-size: 1.35rem;
}

.verify-result-page .auth-lang-bar {
  display: none !important;
}

.verify-result-page .home-nav + .auth-shell {
  padding-top: var(--space-4, 1rem);
}

.verify-result {
  text-align: center;
}

.verify-result__icon {
  margin: 0 0 1rem;
  font-size: 2.5rem;
  line-height: 1;
  color: #6ee7b7;
}

.verify-result--fail .verify-result__icon {
  color: #fca5a5;
}

.verify-result__countdown {
  margin: 1rem 0 1.25rem;
  min-height: 1.25rem;
}

.verify-result .btn-primary {
  width: 100%;
  margin-top: 0.5rem;
}
