/* ════════════════════════════════════════════════════════════════════════
   member-auth.css
   Shared styling for login.html, profile.html, and admin-invite.html.
   SH core system tokens (styles.css) — same visual language as
   contact.html's form and auth.js's login-gate card, not Human Hand
   editorial. Max 4px radius, hairline borders, no shadows except hover.
   ════════════════════════════════════════════════════════════════════════ */

/* ── Form fields — same visual language as contact.html's .contact-form__input ── */
.member-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.member-form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.member-form__label {
  font-size: .78rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--navy);
}
.member-form__label span { color: var(--gold); }
.member-form__hint { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.member-form__input {
  font-family: var(--font-sans); font-size: .92rem; color: var(--text);
  background: var(--cream); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: .65rem .9rem;
  transition: border-color .15s, box-shadow .15s; outline: none; width: 100%;
}
.member-form__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.member-form__input.input-error { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.1); }
.member-form__textarea { min-height: 100px; resize: vertical; }
.member-form__error { font-size: .78rem; color: #c0392b; margin-top: 4px; display: none; }
.member-form__error.visible { display: block; }
.member-form__warning { font-size: .78rem; color: #8a6d1a; margin-top: 4px; display: none; }
.member-form__warning.visible { display: block; }

.member-form__submit {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .78rem 2rem; background: var(--navy); color: #fff;
  border: none; border-radius: var(--radius); font-family: var(--font-sans);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  transition: background .15s ease; width: 100%;
}
.member-form__submit:hover { background: var(--navy2); }
.member-form__submit:disabled { background: var(--muted); cursor: not-allowed; }

.member-form__link {
  font-size: .82rem; color: var(--muted); text-decoration: none; cursor: pointer;
  border: none; background: none; padding: 0; font-family: var(--font-sans);
}
.member-form__link:hover { color: var(--navy); text-decoration: underline; }

@media (max-width: 700px) {
  .member-form__row { grid-template-columns: 1fr; }
}

/* ── "Sign in with Google" button + divider — login.html ────────────────
   Same button language auth.js's .sh-gate-signin-btn already establishes
   for the nav's own Google sign-in card, so the two don't look designed
   by different hands even though they're separate implementations. */
.member-google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: .78rem 1.4rem;
  background: #fff; color: var(--navy);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: .92rem; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.member-google-btn:hover { border-color: var(--navy); background: var(--cream); }

.member-auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 1.2rem 0; color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em;
}
.member-auth-divider::before, .member-auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ── Auth card — login / set-password / reset panel ─────────────────────
   A single hairline-bordered card, centered — the one place a "box" makes
   sense here, since it's a standalone action panel, not page content. */
.member-auth-wrap {
  max-width: 440px;
  margin: 3.5rem auto;
  padding: 0 24px;
}
.member-auth-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.2rem 2rem;
  background: #fff;
}
.member-auth-card h2 {
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: normal;
  color: var(--navy); margin-bottom: .4rem;
}
.member-auth-card .member-auth-sub {
  font-size: .85rem; color: var(--muted); margin-bottom: 1.6rem; line-height: 1.5;
}
.member-auth-footer {
  margin-top: 1.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.member-auth-status {
  font-size: .85rem; padding: .8rem 1rem; border-radius: var(--radius);
  border: 1px solid var(--border); margin-bottom: 1.4rem; display: none;
}
.member-auth-status.visible { display: block; }
.member-auth-status--success { border-color: #2a6b5f; color: #1c4a41; background: rgba(42,107,95,.06); }
.member-auth-status--error { border-color: #c0392b; color: #8a2b21; background: rgba(192,57,43,.06); }

/* ── Membership badge — rectangular hairline tag, never a pill ──────────── */
.member-badge {
  display: inline-block;
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--navy); border: 1px solid var(--gold); border-radius: var(--radius-xs);
  padding: 4px 10px; background: var(--gold-dim);
}

/* ── Avatar — same circle/initials-fallback pattern as auth.js's nav widget ── */
.member-avatar {
  width: 96px; height: 96px; border-radius: 50%;
  border: 2px solid var(--gold); object-fit: cover; display: block;
}
.member-avatar-placeholder {
  width: 96px; height: 96px; border-radius: 50%;
  background: var(--gold-dim); border: 2px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif); font-size: 2.1rem; font-weight: 700; color: var(--navy);
  text-transform: uppercase;
}

/* ── Profile page — asymmetric view layout ───────────────────────────────
   Narrow left rail (photo/identity), wide right column (bio/contact),
   hairline divider — not a centered generic form, not boxed cards. */
.profile-layout {
  display: grid;
  grid-template-columns: 30% 1fr;
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 3.5rem 48px 4.5rem;
}
.profile-identity {
  padding-right: 2.5rem;
  border-right: 1px solid var(--border);
  text-align: left;
}
.profile-identity h1 {
  font-family: var(--font-serif); font-size: 1.6rem; font-weight: normal;
  color: var(--navy); margin: 1rem 0 .2rem; line-height: 1.25;
}
.profile-identity .profile-title { font-size: .92rem; color: var(--text); }
.profile-identity .profile-org { font-size: .85rem; color: var(--muted); margin-bottom: .9rem; }
.profile-identity .member-badge { margin-top: .6rem; }
.profile-identity .profile-edit-toggle {
  margin-top: 1.6rem; font-size: .78rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--navy); background: none; border: 1px solid var(--border);
  border-radius: var(--radius); padding: .55rem 1.1rem; cursor: pointer; transition: border-color .15s, color .15s;
}
.profile-edit-toggle:hover { border-color: var(--gold); color: var(--gold-lt); }

.profile-detail { display: flex; flex-direction: column; }
.profile-detail__row {
  padding: .85rem 0; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: 140px 1fr; gap: 1rem;
}
.profile-detail__row:first-child { border-top: none; padding-top: 0; }
.profile-detail__label {
  font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.profile-detail__value { font-size: .92rem; color: var(--text); line-height: 1.6; }
.profile-detail__value a { color: var(--navy); }
.profile-detail__value.empty { color: var(--muted); font-style: italic; }

.profile-edit-form { display: flex; flex-direction: column; }
.profile-edit-actions { display: flex; gap: 12px; margin-top: .4rem; }
.profile-edit-actions .member-form__submit { width: auto; padding: .7rem 1.8rem; }
.profile-edit-actions .member-form__cancel {
  padding: .7rem 1.4rem; background: none; border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--muted); font-family: var(--font-sans);
  font-size: .92rem; cursor: pointer;
}
.profile-edit-actions .member-form__cancel:hover { border-color: var(--navy); color: var(--navy); }

.profile-logout {
  font-size: .78rem; color: var(--muted); text-decoration: none; cursor: pointer;
  border: none; background: none; padding: 0; font-family: var(--font-sans); margin-top: 1.2rem;
}
.profile-logout:hover { color: #c0392b; }

@media (max-width: 820px) {
  .profile-layout { grid-template-columns: 1fr; padding: 2.5rem 24px 3rem; gap: 2rem; }
  .profile-identity { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border); padding-bottom: 2rem; }
  .profile-detail__row { grid-template-columns: 1fr; gap: .3rem; }
}
