.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: var(--nl-theme-bg, #0f0f0f);
  color: var(--nl-theme-text, #d9d9d9);
}

.auth-shell { width: 100%; max-width: 440px; }

.auth-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.auth-card {
  background: var(--nl-theme-surface, #151515);
  border: 1px solid var(--nl-theme-border, rgba(0, 255, 150, 0.35));
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 255, 136, 0.12);
  text-align: center;
}

.auth-logo {
  width: clamp(120px, 32vw, 160px);
  margin: 0 auto 0.5rem;
  display: block;
}

.auth-card h1 {
  font-size: clamp(1.35rem, 4vw, 1.75rem);
  font-weight: 800;
  color: var(--nl-theme-accent, #00ff88);
  margin-bottom: 0.35rem;
}

.auth-subtitle {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--nl-theme-muted, #9cb8ad);
  margin-bottom: 1.1rem;
}

.auth-oauth-btn {
  width: 100%;
  min-height: 48px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--nl-theme-border);
  background: rgba(0, 255, 157, 0.06);
  color: var(--nl-theme-muted);
  font-weight: 600;
  cursor: not-allowed;
  opacity: 0.8;
}

.auth-google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 48px;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--nl-theme-border);
  background: var(--nl-theme-surface, #151515);
  color: var(--nl-theme-text, #eafff5);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  touch-action: manipulation;
}

.auth-google-btn-compact {
  width: auto;
  min-height: 40px;
  margin: 0;
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
}

.auth-google-icon {
  flex-shrink: 0;
}

.site-nav .auth-google-btn-compact {
  margin: 0.25rem 0;
}

.auth-google-btn:hover {
  border-color: var(--nl-theme-accent, #00ff9d);
  color: var(--nl-theme-accent, #00ff9d);
}

.auth-flash-messages {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 120, 100, 0.45);
  background: rgba(255, 80, 60, 0.1);
  color: #ffb4a8;
  font-size: 0.88rem;
  line-height: 1.45;
  text-align: left;
}

.auth-flash-messages p { margin: 0; }

.auth-oauth-hint {
  margin: -0.35rem 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #f0b429;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0 1rem;
  color: var(--nl-theme-muted);
  font-size: 0.8rem;
}

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

.auth-card .form-group { margin-bottom: 0.85rem; text-align: left; }

.auth-card label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--nl-theme-accent, #00ff88);
}

.auth-card .neon-input,
.auth-card .form-control {
  box-sizing: border-box;
  width: 100% !important;
  min-height: 48px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--nl-theme-border);
  background: var(--nl-theme-surface, #151515);
  color: var(--nl-theme-accent, #00ff88);
  font-size: 1rem;
}

.auth-btn-primary {
  width: 100%;
  min-height: 50px;
  margin-top: 0.5rem;
  border: none;
  border-radius: 12px;
  background: var(--nl-theme-accent, #00ff88);
  color: #000;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  touch-action: manipulation;
}

html[data-theme="light"] .auth-btn-primary { color: #fff; }

.auth-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin-top: 0.75rem;
  border-radius: 12px;
  border: 1px solid var(--nl-theme-border);
  color: var(--nl-theme-accent);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer-links {
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--nl-theme-muted);
}

.auth-footer-links a {
  color: var(--nl-theme-accent);
  font-weight: 700;
  text-decoration: none;
}

.auth-quick-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--nl-theme-border);
}

.auth-quick-links a {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--nl-theme-border);
  color: var(--nl-theme-muted);
  text-decoration: none;
}

.auth-steps {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nl-theme-muted);
}

.auth-steps span {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--nl-theme-border);
}

.auth-steps .is-active {
  background: var(--nl-theme-accent);
  color: #000;
  border-color: transparent;
}

html[data-theme="light"] .auth-steps .is-active { color: #fff; }

.signup-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 520px) {
  .signup-grid-2 { grid-template-columns: 1fr; }
}

.auth-toggle-manual {
  display: block;
  width: 100%;
  margin: 0.5rem 0 0.25rem;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px dashed var(--nl-theme-border, rgba(0, 255, 157, 0.35));
  background: transparent;
  color: var(--nl-theme-muted, #9cb8ad);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}

.auth-toggle-manual:hover {
  border-color: var(--nl-theme-accent, #00ff9d);
  color: var(--nl-theme-accent, #00ff9d);
}

.auth-manual-panel {
  display: none;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--nl-theme-border);
  text-align: left;
}

.auth-manual-panel.is-open {
  display: block;
}

html[dir="rtl"] .auth-manual-panel,
html[dir="rtl"] .auth-card .form-group {
  text-align: right;
}

html[data-theme="light"] .auth-toggle-manual {
  color: var(--nl-text-muted, #3d5348);
  border-color: var(--nl-border, rgba(0, 90, 60, 0.25));
}

html[data-theme="light"] .auth-toggle-manual:hover {
  color: var(--nl-accent, #007a4d);
  border-color: var(--nl-accent, #007a4d);
}
