/* ── Auth pages (login / register) ───────────────────────────── */

.auth-body {
  min-height: 100vh;
  /* 100dvh dodges the iOS Safari URL-bar jump that 100vh causes */
  min-height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Respect iPhone notch / home indicator. max() keeps desktop intact. */
  padding-top:    max(24px, env(safe-area-inset-top));
  padding-right:  max(16px, env(safe-area-inset-right));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-left:   max(16px, env(safe-area-inset-left));
  background: linear-gradient(140deg, #0b1220 0%, #111b2f 50%, #0f1728 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  color: #e7ecf5;
  /* Auth pages are intentionally dark, override the global light scheme. */
  color-scheme: dark;
}

/* On very narrow phones the 32px inner card padding eats too much space. */
@media (max-width: 380px) {
  .auth-card { padding: 24px 20px 20px; }
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 24, 39, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  padding: 32px 32px 28px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 24px;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  color: white;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}
.auth-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.auth-sub {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 2px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-heading {
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 2px;
  letter-spacing: -0.01em;
}
.auth-para {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 4px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #cbd5e1;
}
.auth-field > span {
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}
.auth-field > span em {
  font-style: normal;
  text-transform: none;
  letter-spacing: normal;
  color: #64748b;
  font-weight: 400;
  margin-left: 4px;
}
.auth-field input,
.auth-field textarea {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 11px 12px;
  font-size: 14px;
  color: #e7ecf5;
  font-family: inherit;
  transition: border-color 120ms, background 120ms;
}
.auth-field input:focus,
.auth-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: rgba(15, 23, 42, 0.95);
}
.auth-field textarea {
  resize: vertical;
  min-height: 60px;
}
.auth-hint {
  font-size: 11px;
  color: #64748b;
  font-style: normal;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
}

.auth-btn {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms, transform 80ms;
}
.auth-btn.primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
}
.auth-btn.primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.auth-btn.primary:disabled {
  background: #475569;
  cursor: not-allowed;
}
.auth-btn:active { transform: translateY(1px); }

.auth-error,
.auth-success {
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.45;
}
.auth-error {
  background: rgba(220, 38, 38, 0.12);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #fecaca;
}
.auth-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #bbf7d0;
}
.auth-success strong { color: #86efac; }

.auth-links {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-top: 4px;
}
.auth-links a {
  color: #60a5fa;
  text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

.auth-footnote {
  text-align: center;
  font-size: 11px;
  color: #475569;
  margin-top: 8px;
  line-height: 1.5;
}
