.auth-page-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-page);
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: var(--text-primary);
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
}

.auth-page-body--signup {
  padding: 30px 16px;
}

.auth-card {
  background: var(--auth-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--auth-card-border);
  border-radius: 20px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--auth-card-shadow);
  color: var(--text-primary);
}

.auth-card--wide {
  max-width: 480px;
}

.auth-card--center {
  text-align: center;
}

.auth-logo-block {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-block .eureka-brand--auth {
  margin: 0 auto 10px;
}

.auth-logo-block--compact {
  margin-bottom: 24px;
}

.auth-logo-block p,
.auth-lead {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  line-height: 1.45;
}

.auth-brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 8px 0 0;
}

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

.auth-form-group--tight {
  margin-bottom: 14px;
}

.auth-label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  touch-action: manipulation;
}

.auth-input::placeholder {
  color: var(--auth-input-placeholder);
}

.auth-input:focus {
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.18);
}

.auth-input--otp {
  letter-spacing: 0.35em;
  font-size: 1.25rem;
  text-align: center;
  font-weight: 700;
}

.auth-input--spaced {
  margin-bottom: 16px;
}

.auth-forgot {
  text-align: right;
  margin-top: -8px;
  margin-bottom: 16px;
}

.auth-forgot a,
.auth-link,
.auth-legal a,
.auth-bottom-link a {
  color: var(--auth-link);
  text-decoration: none;
  font-weight: 600;
}

.auth-forgot a:hover,
.auth-link:hover,
.auth-legal a:hover,
.auth-bottom-link a:hover {
  color: var(--auth-link-hover);
  text-decoration: underline;
}

.auth-btn-main {
  width: 100%;
  min-height: 44px;
  padding: 13px;
  background: linear-gradient(135deg, #a78bfa, #60a5fa);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 4px;
  touch-action: manipulation;
}

.auth-btn-main:hover {
  opacity: 0.9;
}

.auth-btn-main:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-btn-secondary {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
}

.auth-btn-secondary:disabled {
  opacity: 0.5;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--auth-divider);
}

.auth-social-btns {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-btn-social {
  width: 100%;
  min-height: 44px;
  padding: 11px;
  background: var(--auth-social-bg);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.2s;
  touch-action: manipulation;
}

.auth-btn-social:hover {
  background: var(--auth-social-hover);
}

.auth-bottom-link {
  text-align: center;
  margin-top: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.auth-legal {
  margin-top: 14px;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.auth-legal--form {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 0.8rem;
  text-align: left;
}

.auth-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 14px;
}

.auth-hint code {
  color: var(--auth-link);
}

.auth-bonus-hint {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--auth-hint-bg);
  border: 1px solid var(--auth-hint-border);
  color: var(--auth-hint-text);
  font-size: 0.85rem;
  line-height: 1.45;
}

.auth-device-hint {
  display: none;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
  text-align: center;
}

.auth-status-text {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
  color: #b91c1c;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: none;
}

[data-theme="dark"] .auth-error {
  color: #fca5a5;
}

.auth-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 8px;
  padding: 10px 14px;
  color: #15803d;
  font-size: 0.85rem;
  margin-bottom: 14px;
  display: none;
}

[data-theme="dark"] .auth-success {
  color: #86efac;
}

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

  .auth-card--wide {
    max-width: 100%;
  }

  .auth-page-body--signup {
    align-items: flex-start;
    padding-top: max(16px, env(safe-area-inset-top));
  }
}
