/* Login cleanup — RPM Car Club demo (2026-11-07, Lee's direction).
 *
 * The bundle ships NO styles for its sign-in gate (.auth-card), so the
 * sign-in rendered as loose text and full-width fields on the club theme
 * background. This sheet gives every gate screen (sign-in, set-password,
 * portal chooser — all rendered as .auth-card) the standard login look:
 * a centered white card on a quiet neutral page, the C3 logo on
 * top (inserted by login-cleanup.js), tidy fields and buttons.
 *
 * Scoped to .auth-card and to body.hatch root state .rpm-login-active
 * (added by login-cleanup.js only while a gate card is on screen), so
 * the signed-in app and the public site are untouched.
 */

/* --- Page while a gate card is showing ------------------------------- */
body.rpm-login-active {
  background: #e9edf2;
}

.hatch-space-root.rpm-login-active {
  background: linear-gradient(180deg, #f2f4f7 0%, #e3e8ef 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;
  box-sizing: border-box;
}

/* --- The card --------------------------------------------------------- */
.auth-card {
  background: #ffffff;
  color: #1c2733;
  color-scheme: light;
  width: min(404px, 100%);
  margin: 0 auto;
  padding: 30px 32px 28px;
  border: 1px solid #dde3ea;
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.07);
  box-sizing: border-box;
}

.auth-card .rpm-login-logo {
  display: block;
  /* 2026-11-10: the C3 lockup is wider and shorter than the old RPM logo,
     so the slot is a bit wider to keep the same presence on the card. */
  width: min(300px, 88%);
  height: auto;
  margin: 0 auto 16px;
}

/* Heading block: eyebrow, "Sign in", helper line — centered, readable */
.auth-card > div:first-of-type {
  text-align: center;
}

.auth-card .eyebrow {
  color: #b70f19;
  text-align: center;
  margin: 0 0 4px;
}

.auth-card h3 {
  color: #141c26;
  text-align: center;
  font-size: 24px;
  margin: 0 0 6px;
}

.auth-card > p {
  color: #5a6a7a;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 20px;
}

/* --- Form ------------------------------------------------------------- */
.auth-card .auth-form {
  display: grid;
  gap: 14px;
}

.auth-card label {
  color: #33465c;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.auth-card label input {
  display: block;
  width: 100%;
  margin-top: 6px;
  box-sizing: border-box;
  color: #141c26;
  background: #ffffff;
  border: 1px solid #bfcbd8;
  border-radius: 10px;
  min-height: 48px;
  padding: 11px 13px;
  font-size: 16px; /* 16px keeps iOS from zooming on focus */
}

.auth-card label input:focus {
  border-color: #b70f19;
  outline: 3px solid rgba(183, 15, 25, 0.22);
  outline-offset: 0;
}

.auth-card .login-submit {
  width: 100%;
  margin-top: 4px;
  min-height: 50px;
  font-size: 16px;
  cursor: pointer;
}

/* "Browse the public site" — quiet secondary action under the form */
.auth-card .public-browse-button {
  width: 100%;
  min-height: 46px;
  margin-top: 14px;
  color: #a50b14;
  background: #f5f7fa;
  border: 1px solid #d3dbe4;
  border-radius: 10px;
  font-weight: 800;
  cursor: pointer;
}

.auth-card .public-browse-button:hover {
  color: #ffffff;
  background: #b70f19;
  border-color: #b70f19;
}

/* Errors / status lines inside the card stay legible on white */
.auth-card [role="alert"],
.auth-card .form-error,
.auth-card .error {
  color: #a50b14;
  text-align: center;
  font-weight: 700;
}

/* Portal-chooser rows (persona screen) on the white card */
.auth-card .identity-grid label {
  color: #141c26;
}

/* --- Small screens ------------------------------------------------------ */
@media (max-width: 480px) {
  .hatch-space-root.rpm-login-active {
    padding: 14px 10px;
    align-items: flex-start;
  }

  .auth-card {
    padding: 24px 20px 22px;
    border-radius: 14px;
  }

  .auth-card .rpm-login-logo {
    width: min(240px, 84%);
  }
}
