/* ============================================================
   Geovatra · Auth pages shared base
   Signup, login, activation, password reset, and rate-limit/error
   pages all load this file (before their own page-specific CSS)
   so they share one consistent look, built on the tokens already
   defined in variables.css (radii, shadows, accent colors, fonts).

   Note: variables.css's --text-muted/--text-secondary are tuned for
   the dark dashboard theme and read too light on a white card, so
   this file defines its own neutral text grays instead of reusing
   those two tokens — everything else (accent, danger/warn/info,
   radius, shadow, transition, fonts) is reused as-is.
   ============================================================ */

:root {
  --auth-page-bg: #f8fafc;
  --auth-card-bg: #ffffff;
  --auth-card-border: rgba(15, 23, 42, 0.07);
  --auth-ink: #111318;
  --auth-ink-secondary: #4b5563;
  --auth-ink-muted: #6b7280;
  --auth-border: #e5e8ec;
  --auth-field-bg: #fafbfc;
  --auth-button-bg: var(--bg-raised);
  --auth-button-hover: var(--bg-overlay);
  --auth-focus-ring: rgba(52, 152, 219, 0.15);

  /* variables.css's --shadow-panel/--shadow-card are calibrated for the
     dark dashboard theme (heavy black shadow meant to pop off a near-black
     page) — far too heavy on a white card on a light page, so this file
     defines its own light-appropriate shadow scale instead. */
  --auth-shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 20px 40px -12px rgba(15, 23, 42, 0.12);
  --auth-shadow-hover: 0 8px 20px -6px rgba(15, 23, 42, 0.18);
}

/* ── Page shell ── */
.login-section,
section.login,
section.signup {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 140px 20px 80px;
  background: var(--auth-page-bg);
  position: relative;
  overflow: hidden;
}

/* subtle technical grid, echoing the homepage hero */
.login-section::before,
section.login::before,
section.signup::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

/* ── Card ── */
.login-part {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--auth-shadow-card);
  padding: 2.75rem 2.4rem;
  animation: auth-card-in 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Heading ── */
.login-part .title_style,
.login-part h2 {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.01em;
  color: var(--auth-ink);
  margin-bottom: 0.5rem;
}

.login-part .title_style i {
  color: var(--accent);
  font-size: 0.85em;
}

/* body copy inside the card */
.login-part > p,
.login-part p {
  font-family: 'Inter', sans-serif;
  color: var(--auth-ink-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 0.9rem;
}

.login-part p:last-of-type {
  margin-bottom: 0;
}

/* ── Form ── */
.contact-form.login-form,
.login-form {
  margin-top: 1.5rem;
}

.login-form .form-group {
  margin-bottom: 1.15rem;
  text-align: left;
}

.login-form label {
  position: static !important;
  display: block;
  margin-bottom: 0.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--auth-ink-secondary);
}

.login-form input,
.login-form select,
.login-form textarea,
.login-form .form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--auth-border);
  background: var(--auth-field-bg);
  color: var(--auth-ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.login-form input::placeholder {
  color: #a1a8b3;
}

.login-form input:focus,
.login-form select:focus,
.login-form textarea:focus,
.login-form .form-control:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px var(--auth-focus-ring);
}

/* ── Buttons ── */
.login-part .btn,
.login-part .btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 0.8rem;
  border: none;
  border-radius: var(--radius-md);
  background: var(--auth-button-bg);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.3rem;
}

.login-part .btn:hover,
.login-part .btn-primary:hover {
  background: var(--auth-button-hover);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--auth-shadow-hover);
}

.login-part .btn:disabled,
.login-part .btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Links ── */
.login-part a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.88rem;
}

.login-part a:hover {
  text-decoration: underline;
}

/* ── Field-level error ── */
.field-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--danger);
  background: rgba(239, 68, 68, 0.07);
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid var(--danger);
}

/* ── Toast alert banners (signup / login messages) ── */
.alert-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: calc(100% - 40px);
}

.alert-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--auth-card-bg);
  box-shadow: var(--auth-shadow-card);
  animation: auth-alert-in 0.25s ease;
}

@keyframes auth-alert-in {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

.alert-error   { border-left: 4px solid var(--danger); }
.alert-error .alert-icon   { color: var(--danger); }

.alert-success { border-left: 4px solid var(--accent-secondary); }
.alert-success .alert-icon { color: var(--accent-secondary); }

.alert-warning { border-left: 4px solid var(--warn); }
.alert-warning .alert-icon { color: var(--warn); }

.alert-info    { border-left: 4px solid var(--info); }
.alert-info .alert-icon    { color: var(--info); }

.alert-icon {
  font-size: 17px;
  margin-top: 1px;
  min-width: 20px;
}

.alert-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.alert-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--auth-ink);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.alert-message {
  font-size: 13px;
  color: var(--auth-ink-secondary);
  line-height: 1.5;
}

.alert-close {
  background: none;
  border: none;
  color: #b0b6bf;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  margin-top: 1px;
  transition: color 0.2s;
}

.alert-close:hover {
  color: var(--auth-ink-secondary);
}

/* ── Icons used on the confirmation-style pages ── */
.login-part .email-icon,
.login-part .success-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1.1rem;
  display: block;
  color: var(--accent);
}

.login-part .success-icon {
  color: var(--accent-secondary);
}

/* highlighted email address on the "check your inbox" screen */
.login-part p strong {
  display: inline-block;
  background: var(--auth-field-bg);
  color: var(--auth-ink);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--auth-border);
  margin: 4px 0 10px;
  font-size: 0.9rem;
  word-break: break-word;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .login-section,
  section.login,
  section.signup {
    padding: 110px 16px 60px;
  }

  .login-part {
    padding: 2rem 1.6rem;
    border-radius: var(--radius-lg);
  }

  .login-part .title_style,
  .login-part h2 {
    font-size: 1.35rem;
  }
}
