/* Sign-in pages — final round A (owner 2026-10-31): login, register, register/pending,
   forgot-password, reset-password, verify-email.

   One stylesheet for the six pages, in the kit look: a row-1 bar with the brand logo
   (DESIGN_MANIFEST v1.4) and the page's theme toggle, then the page's card (.rs-card),
   fields (.rs-field__label / .rs-input), buttons (.rs-btn) from static/css/runspec-ui.css.
   Tokens only (runspec-tokens.css), both themes through them; plain (manifest rule 7):
   no gradient, no glow, no noise layer. The pages' text, forms, ids and scripts are
   unchanged; this file replaces their own <style> blocks. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  min-height: 100vh;
  background: var(--rs-page); color: var(--rs-ink);
  font-family: var(--rs-font-sans); font-size: var(--rs-text-body); line-height: var(--rs-lh-body);
  font-weight: 400; -webkit-font-smoothing: antialiased;
}
body { display: flex; flex-direction: column; }

/* Row 1: logo left, theme toggle right — the public site's bar (preview_nav.html), without
   its links: these pages keep only the actions they had. */
.rs-auth-bar {
  display: flex; align-items: center; gap: var(--rs-space-3);
  height: var(--rs-public-header-h); padding: 0 var(--rs-space-6);
  background: var(--rs-surface); border-bottom: 1px solid var(--rs-border);
}
.rs-auth-bar .theme-toggle { margin-left: auto; }
@media (max-width: 700px) { .rs-auth-bar { padding: 0 var(--rs-space-4); } }

.wrap {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center;
  padding: var(--rs-space-6) var(--rs-space-4);
}
.login-card.rs-card, .card.rs-card {
  width: 100%; max-width: 400px; padding: var(--rs-space-6);
}
.card.rs-card { max-width: 440px; }

.invite-badge {
  display: flex; align-items: center; width: fit-content; height: calc(var(--rs-space-4) + var(--rs-space-1));
  margin: 0 auto var(--rs-space-3); padding: 0 var(--rs-space-2);
  border-radius: var(--rs-radius-pill); background: var(--rs-accent-tint); color: var(--rs-accent-deep);
  font-size: var(--rs-text-label); line-height: var(--rs-lh-label); font-weight: 500; letter-spacing: .5px; text-transform: uppercase;
}
.icon {
  display: flex; align-items: center; justify-content: center;
  width: calc(var(--rs-space-6) + var(--rs-space-4)); height: calc(var(--rs-space-6) + var(--rs-space-4));
  margin: 0 auto var(--rs-space-4); border-radius: var(--rs-radius-pill);
  background: var(--rs-accent-tint); color: var(--rs-accent-deep);
  font-size: var(--rs-text-title); line-height: 1;
}
.title {
  margin-bottom: var(--rs-space-2);
  font-size: var(--rs-text-title); line-height: var(--rs-lh-title); font-weight: 600; letter-spacing: -0.3px;
  text-align: center; color: var(--rs-ink);
}
.title em { font-style: normal; color: var(--rs-accent-deep); }
.subtitle, .body {
  margin-bottom: var(--rs-space-5);
  font-size: var(--rs-text-control); line-height: var(--rs-lh-body); text-align: center; color: var(--rs-ink-2);
}
.body strong { font-weight: 600; color: var(--rs-ink); }
.addr { font-family: var(--rs-font-mono); font-size: var(--rs-text-control); color: var(--rs-ink); word-break: break-all; }

.steps {
  margin-bottom: var(--rs-space-5); padding: var(--rs-space-2) var(--rs-space-3);
  background: var(--rs-surface-sunken); border: 1px solid var(--rs-border); border-radius: var(--rs-radius-sm);
  text-align: left;
}
.step {
  display: flex; align-items: flex-start; gap: var(--rs-space-3); padding: var(--rs-space-1) 0;
  font-size: var(--rs-text-caption); line-height: var(--rs-lh-caption); color: var(--rs-ink-2);
}
.step + .step { border-top: 1px solid var(--rs-border); }
.step-num { flex: none; font-family: var(--rs-font-mono); font-size: var(--rs-text-label); font-weight: 600; color: var(--rs-accent-deep); }

/* Fields: the kit's label and input, spaced for a stacked form. */
form label.rs-field__label { display: block; margin-bottom: var(--rs-space-1); }
form .rs-input { width: 100%; margin-bottom: var(--rs-space-3); }
input.input-error { border-color: var(--rs-danger); }
.field-error { margin-top: calc(-1 * var(--rs-space-2)); margin-bottom: var(--rs-space-2); font-size: var(--rs-text-caption); color: var(--rs-danger); }

/* The page's one main action, full width. */
form button[type="submit"].rs-btn, .card .rs-btn.btn { width: 100%; margin-top: var(--rs-space-1); }
.card a.rs-btn.btn { text-decoration: none; }

.error, .success, .notice {
  margin-bottom: var(--rs-space-3); padding: var(--rs-space-2) var(--rs-space-3);
  border: 1px solid var(--rs-border); border-radius: var(--rs-radius-sm);
  font-size: var(--rs-text-caption); line-height: var(--rs-lh-caption); text-align: center;
}
.error { background: var(--rs-danger-tint); color: var(--rs-danger); }
.success { background: var(--rs-ok-tint); color: var(--rs-ok); }
/* Why a reset link did not work: warn, not danger — nothing is wrong with the account. */
.notice { background: var(--rs-warn-tint); color: var(--rs-warn); }
.msg { min-height: var(--rs-space-4); margin-top: var(--rs-space-3); font-size: var(--rs-text-caption); color: var(--rs-ink-2); text-align: center; }
.msg.err { color: var(--rs-danger); }

.links { display: flex; flex-direction: column; gap: var(--rs-space-1); margin-top: var(--rs-space-5); text-align: center; }
.links a, .back-link { font-size: var(--rs-text-caption); line-height: var(--rs-lh-caption); color: var(--rs-ink-2); text-decoration: none; }
.back-link { display: block; margin-top: var(--rs-space-4); text-align: center; }
.links a:hover, .back-link:hover { color: var(--rs-ink); text-decoration: underline; }

/* The bar's theme toggle: the row-1 icon button rule in css/runspec-ui.css (login round 7). */

.site-legal-links { padding: var(--rs-space-5) var(--rs-space-4); text-align: center; font-size: var(--rs-text-caption); line-height: var(--rs-lh-caption); }
.site-legal-links a { margin: 0 var(--rs-space-2); color: var(--rs-ink-2); text-decoration: none; }
.site-legal-links a:hover { color: var(--rs-ink); text-decoration: underline; }

.rs-auth-bar a:focus-visible, .theme-toggle:focus-visible, .links a:focus-visible, .back-link:focus-visible,
.site-legal-links a:focus-visible { outline: 2px solid var(--rs-accent); outline-offset: 2px; }
