/* Sign-in and sign-up pages (templates/login.html, templates/register.html).
   Loaded after customer.css; reuses its colour tokens, so light and dark mode follow the rest of the site. */
body.auth-page {
  background:
    radial-gradient(1100px 560px at 0% -10%, var(--tint) 0%, transparent 62%),
    radial-gradient(900px 520px at 100% 110%, var(--tint) 0%, transparent 60%),
    var(--bg);
}

.auth-shell {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 16px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 24px;
}

.auth-aside { display: none; }

.auth-card {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 28px 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.auth-card.wide { max-width: 480px; }

.auth-card .auth-mark {
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(21, 128, 61, .28);
}
.auth-card .auth-head h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .auth-head p { font-size: 14px; }

/* Larger touch targets and 16px text (stops iPhones zooming in on focus) */
.auth-card input:not([type="checkbox"]):not([type="radio"]),
.auth-card select,
.auth-card textarea {
  min-height: 50px;
  font-size: 16px;
  border-radius: 12px;
}
.auth-card .btn {
  min-height: 52px;
  font-size: 15px;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(21, 128, 61, .22);
}
.auth-card .btn.secondary { box-shadow: none; }
.auth-card .social-btn { min-height: 48px; font-weight: 600; border-radius: 14px; }
.auth-card .social-separator { display: flex; align-items: center; gap: 10px; }
.auth-card .social-separator::before,
.auth-card .social-separator::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* One-tap sign-in / sign-up: a row of round provider buttons above the email form */
.social-lead { text-align: center; font-weight: 700; font-size: 15px; margin: 4px 0 12px; color: var(--ink); }
.social-hint { text-align: center; font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.social-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.social-icon-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(15, 42, 29, .08);
  transition: transform .12s ease, box-shadow .15s ease;
  text-decoration: none;
}
.social-icon-btn svg { width: 22px; height: 22px; display: block; }
.social-icon-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 42, 29, .14); text-decoration: none; }
.social-icon-btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
.social-icon-btn.is-off { opacity: .38; cursor: not-allowed; box-shadow: none; }
.social-icon-btn.is-off:hover { transform: none; box-shadow: none; }

/* Live password checklist on sign-up (rules match passwords.py: 8 to 128 characters) */
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.pw-rules li { display: flex; align-items: center; gap: 8px; }
.pw-rules li::before { content: '○'; color: var(--muted); }
.pw-rules li.ok { color: var(--ok-text); }
.pw-rules li.ok::before { content: '●'; color: var(--brand-text); }

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 440px);
    gap: 56px;
    padding: 48px 32px;
  }
  .auth-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 22px;
    min-height: 480px;
    padding: 48px;
    border-radius: 28px;
    color: #fff;
    background: linear-gradient(150deg, #22C55E 0%, #15803D 50%, #065F46 100%);
    box-shadow: 0 20px 50px rgba(6, 95, 70, .35);
  }
  .auth-aside::after {
    content: '';
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    pointer-events: none;
  }
  .auth-aside h2 { color: #fff; font-size: 34px; line-height: 1.15; margin: 0; }
  .auth-aside p { margin: 0; color: rgba(255, 255, 255, .88); font-size: 16px; }
  .auth-aside ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
  .auth-aside li { display: flex; align-items: flex-start; gap: 12px; font-weight: 600; }
  .auth-aside li::before {
    content: '✓';
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .2);
    font-size: 13px;
  }
}
