/* ==========================================================================
   Member account forms — login, forgot password, set password
   ==========================================================================

   Loaded via _Layout's "head" section by LoginPage.cshtml and
   SetPasswordPage.cshtml, NOT through the pageStylesheet switch. That switch
   picks exactly one stylesheet, and these pages still need index.css for the
   base styles and the nav/footer chrome — so this is additive rather than a
   replacement. It relies on the design tokens index.css declares on :root.

   Deliberately plain. A man who has just paid for a workbook and wants to get
   into it should meet as little as possible between the email and the page.
   ========================================================================== */

.member-form-page {
  padding: clamp(56px, 9vw, 104px) var(--pad);
  display: flex;
  justify-content: center;
}

.member-card {
  width: 100%;
  max-width: 440px;
}

.member-card h1 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.15;
  margin: 0 0 12px;
}

.member-card .member-intro {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 32px;
}

.member-field { margin-bottom: 20px; }

.member-field label {
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.member-field input {
  display: block;
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--fg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  outline: none;
}

.member-field input:focus {
  border-color: var(--accent);
}

.member-submit {
  display: block;
  width: 100%;
  padding: 16px 24px;
  margin-top: 28px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: var(--accent);
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.member-submit:hover { background: var(--accent-hover); }

/* The account page uses .member-submit on an <a> — signed out, "Sign in" is a link
   to /login/, not a form. Buttons centre their own text; anchors do not. */
a.member-submit {
  text-align: center;
  text-decoration: none;
}

/* ==========================================================================
   Account page — what this member has bought
   ========================================================================== */

.member-products {
  list-style: none;
  margin: 0;
  padding: 0;
}

.member-products li + li { margin-top: 12px; }

.member-products a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg);
  text-decoration: none;
}

.member-products a:hover { border-color: var(--accent); }

.member-product-name { font-weight: 600; }

.member-product-go {
  color: var(--accent);
  font-size: 0.9rem;
  white-space: nowrap;
}

/* Sign out is a real action, so it is a real button — but a quiet one. Nobody
   arrives at the members area wanting to leave it. */
.member-signout {
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--muted);
  background: none;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}

.member-signout:hover { color: var(--fg); }

/* Validation and status messages. .member-message--error is also what the
   controller's single "that email and password don't match" lands in — it is
   deliberately the same wording for a wrong password and an unknown address,
   so this must not be styled to imply which. */
.member-message {
  padding: 14px 16px;
  border-radius: 6px;
  margin-bottom: 24px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.member-message--error {
  background: oklch(45% 0.15 25 / 0.18);
  border: 1px solid oklch(60% 0.16 25 / 0.45);
}

.member-message--ok {
  background: oklch(60% 0.11 155 / 0.15);
  border: 1px solid oklch(65% 0.12 155 / 0.42);
}

.member-message ul { margin: 0; padding-left: 20px; }

.member-alt {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

.member-alt a { color: var(--accent); }

/* The forgot-password form sits inside a <details> so the login page opens as
   one field pair, not two competing forms. */
.member-alt summary {
  cursor: pointer;
  color: var(--accent);
  margin-bottom: 16px;
}
