/* ============================================================
   GEOX — Auth pages (login / signup / reset)
   Sits on top of styles.css
   ============================================================ */
body.auth-page {
  background: linear-gradient(135deg, var(--cream) 0%, var(--cream-2) 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.auth-shell {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 40px 20px 60px;
}
.auth-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 36px 32px;
  width: 100%;
  max-width: 420px;
  border: 1px solid var(--line);
}
.auth-card h1 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}
.auth-card p.lead {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
}
.auth-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  margin: 12px 0 6px;
}
.auth-card input[type="email"],
.auth-card input[type="password"],
.auth-card input[type="text"] {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.auth-card input:focus { border-color: var(--red); }
.auth-card .btn-primary {
  width: 100%;
  margin-top: 18px;
  padding: 12px 20px;
  background: var(--grad-red);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
}
.auth-card .btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.auth-card .btn-primary[disabled] { opacity: .55; cursor: wait; }
.auth-card .btn-oauth {
  width: 100%;
  margin-top: 10px;
  padding: 11px 14px;
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.auth-card .btn-oauth:hover { background: var(--cream); }
.auth-card .btn-link {
  background: transparent;
  border: none;
  color: var(--red);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.auth-card .btn-link:hover { text-decoration: underline; }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 18px 0 8px;
  font-size: 12px;
  color: var(--muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.auth-foot {
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
}
.auth-foot a { color: var(--red); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }
.auth-error {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--red-soft);
  color: var(--red-dark);
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.auth-ok {
  margin-top: 14px;
  padding: 10px 12px;
  background: #E8F7EE;
  color: #1F6B3E;
  border-radius: 8px;
  font-size: 13px;
  display: none;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
  text-decoration: none;
}
.auth-logo .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--grad-red);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
}
.auth-logo .name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}

/* A11y: give every interactive control a visible focus ring.
   The brand red is used so keyboard users see where they are without
   relying on the subtle border-color change alone. */
.auth-card input:focus-visible,
.auth-card .btn-primary:focus-visible,
.auth-card .btn-oauth:focus-visible,
.auth-card .btn-link:focus-visible,
.auth-foot a:focus-visible,
.auth-logo:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

/* Bigger tap targets + iOS-safe 16px inputs on narrow screens.
   iOS Safari auto-zooms inputs with font-size < 16px, which breaks
   the signup flow on phones — bump inputs to 16px below 480px wide. */
@media (max-width: 480px) {
  .auth-shell { padding: 20px 14px 48px; }
  .auth-card  { padding: 24px 20px; border-radius: 14px; }
  .auth-card h1 { font-size: 22px; }
  .auth-card input[type="email"],
  .auth-card input[type="password"],
  .auth-card input[type="text"] { font-size: 16px; padding: 12px 14px; }
  .auth-card .btn-primary,
  .auth-card .btn-oauth { padding: 14px 16px; font-size: 15px; min-height: 44px; }
}

/* Respect users who ask for reduced motion — the hover lift on the
   primary button can be disorienting on slow/vestibular setups. */
@media (prefers-reduced-motion: reduce) {
  .auth-card .btn-primary,
  .auth-card .btn-primary:hover { transform: none; transition: none; }
}
