/* =====================================================================
   ReEMS - Auth pages (signup, login)
   Palette sampled directly from the ReEMS logo: navy, shield green,
   and a cool neutral gray. No gradients anywhere, solid colors only.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --navy: #0B2A5B;
  --navy-deep: #071C3E;
  --green: #1E6339;
  --green-deep: #164A2B;
  --page-bg: #EEF1F5;
  --card-bg: #FFFFFF;
  --text-dark: #1B2431;
  --text-muted: #5B6672;
  --text-on-navy: #F2F5F9;
  --text-on-navy-muted: #A9B7CC;
  --border: rgba(27, 36, 49, 0.14);
  --brick: #B3392B;
  --radius: 6px;
  --shadow-card: 0 24px 60px -24px rgba(11, 42, 91, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-dark);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }
}

/* ---------- Left / intake panel ---------- */

.auth-intake {
  background: var(--navy);
  color: var(--text-on-navy);
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 860px) {
  .auth-intake { padding: 36px 28px; }
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  padding: 10px 16px 10px 10px;
  border-radius: 8px;
}

.brand-badge img {
  display: block;
  height: 44px;
  width: auto;
}

.auth-intake-copy {
  max-width: 420px;
  margin-top: 36px;
}

.auth-intake-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-on-navy-muted);
  margin: 0 0 18px;
}

.auth-intake-copy h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  margin: 0;
  color: var(--text-on-navy);
}

/* ---------- Right / working panel ---------- */

.auth-work {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 40px 36px;
}

@media (max-width: 480px) {
  .auth-card { padding: 32px 22px; box-shadow: none; }
  .auth-work { padding: 28px 16px; }
}

/* Step indicator - a genuine two-step sequence, so numbering earns its keep */
.auth-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.auth-step {
  display: flex;
  align-items: center;
  gap: 6px;
}

.auth-step-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.35;
}

.auth-step.is-active { color: var(--navy); }
.auth-step.is-active .auth-step-dot { background: var(--green); opacity: 1; }
.auth-step.is-done { color: var(--green); }
.auth-step.is-done .auth-step-dot { background: var(--green); opacity: 1; }

.auth-step-rule {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-card h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--text-dark);
}

.auth-card > p.auth-lede {
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.auth-lede strong { color: var(--text-dark); }

/* ---------- Form ---------- */

.field-group { margin-bottom: 18px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 480px) {
  .field-row { grid-template-columns: 1fr; }
}

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 6px;
}

label .optional {
  font-weight: 400;
  color: var(--text-muted);
}

.field-icon label i {
  color: var(--green);
  width: 14px;
  text-align: center;
  margin-right: 2px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
  width: 100%;
  padding: 11px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-dark);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder { color: #A6ACA3; }

input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 99, 57, 0.16);
}

input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 1px;
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}

.field-foot-link {
  text-align: right;
  margin-top: -10px;
  margin-bottom: 18px;
}

.field-foot-link a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Honeypot - off-screen, not display:none, so simple bots that skip
   display:none checks still get caught. */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- OTP entry ---------- */

.otp-input {
  width: 100%;
  padding: 16px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: 0.6em;
  text-indent: 0.6em;
  text-align: center;
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.otp-input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 99, 57, 0.16);
}

.otp-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  font-size: 13px;
}

.otp-resend-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--navy);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.otp-resend-btn:disabled {
  color: var(--text-muted);
  cursor: default;
  text-decoration: none;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.btn-primary {
  background: var(--navy);
  color: var(--text-on-navy);
}

.btn-primary:hover { background: var(--navy-deep); }
.btn-primary:active { transform: translateY(1px); }

.btn-link {
  background: none;
  color: var(--text-muted);
  font-weight: 500;
  width: auto;
  padding: 8px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-foot-link {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-foot-link a {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
}

.auth-foot-link a:hover { text-decoration: underline; }

/* ---------- Alerts ---------- */

.alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.5;
  display: flex;
  gap: 9px;
}

.alert::before {
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

.alert-error {
  background: rgba(179, 57, 43, 0.08);
  border: 1px solid rgba(179, 57, 43, 0.25);
  color: var(--brick);
}

.alert-error::before { content: "\f06a"; }

.alert-error ul { margin: 4px 0 0; padding-left: 18px; }

.alert-success {
  background: rgba(30, 99, 57, 0.08);
  border: 1px solid rgba(30, 99, 57, 0.28);
  color: var(--green-deep);
}

.alert-success::before { content: "\f058"; }

.alert-info {
  background: rgba(11, 42, 91, 0.06);
  border: 1px solid rgba(11, 42, 91, 0.2);
  color: var(--navy);
}

.alert-info::before { content: "\f05a"; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
