/* ══════════════════════════════════════════════
   auth.css — login, register, verify-email, set-password
   Extracted from style.css (auth section only) + Google button,
   "or" separator, name row, referral field.
   ══════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&family=Source+Serif+4:opsz,wght@8..60,400;8..60,600;8..60,700;8..60,900&display=swap');

:root {
  --navy:        #003366;
  --navy-mid:    #00254d;
  --blue:        #005ea2;
  --blue-light:  #1a7abf;
  --red:         #46abf3;
  --red-dark:    #4d98cd;
  --white:       #ffffff;
  --gray-50:     #f5f6f7;
  --gray-100:    #e8eaed;
  --gray-200:    #d0d3da;
  --gray-400:    #8a91a8;
  --gray-600:    #4a5168;
  --gray-800:    #1e2438;

  --font-display: 'Source Serif 4', Georgia, serif;
  --font-body:    'Public Sans', 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* ─── PAGE SHELL ─── */
.auth-body {
  background: #dce4ef;   /* login.gov light blue-gray */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
}

/* ─── BRAND HEADER ─── */
.auth-header {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
/* ─── MAIN AREA ─── */
.auth-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 32px 20px 48px;
}

/* ─── CARD ─── */
.auth-card {
  background: var(--white);
  border-radius: 6px;
  padding: 44px 48px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ─── TAB SWITCHER (Sign in / Create account) ─── */
.auth-tabs {
  display: flex;
  margin-bottom: 32px;
  background: var(--gray-100);
  border-radius: 40px;
  padding: 4px;
  gap: 4px;
}
.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 16px;
  border-radius: 36px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.auth-tab:hover { color: var(--navy); }
.auth-tab--active {
  background: var(--white);
  color: var(--navy);
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  font-weight: 700;
}

/* ─── HEADINGS ─── */
.auth-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  color: var(--gray-800);
  margin-bottom: 20px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.auth-subtitle {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 16px;
}
.auth-body-text {
  font-size: 16px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* ─── FORM FIELDS ─── */
.auth-field {
  margin-bottom: 22px;
}
.auth-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 6px;
}
.auth-label-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
}
.auth-label-link:hover { text-decoration: underline; }
.auth-input {
  display: block;
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-400);
  border-radius: 4px;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}
.auth-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,94,162,0.2);
}
.auth-input.is-invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(204,0,0,0.15);
}

/* ─── CHECKBOX ─── */
.auth-check-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 24px;
}
.auth-checkbox {
  width: 18px; height: 18px;
  min-width: 18px;
  margin-top: 2px;
  border: 2px solid var(--gray-400);
  border-radius: 3px;
  cursor: pointer;
  accent-color: var(--blue);
}
.auth-check-label {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.5;
  cursor: pointer;
}
.auth-check-label a {
  color: var(--blue);
  font-weight: 600;
}
.auth-check-label a:hover { text-decoration: underline; }

/* ─── RED DIVIDER (login.gov style) ─── */
.auth-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 24px 0;
}
.auth-divider--red {
  width: 80px;
  height: 4px;
  background: var(--red);
  border-radius: 2px;
  margin: 28px 0;
}

/* ─── SUBMIT BUTTON ─── */
.auth-btn-submit {
  display: block;
  width: 100%;
  padding: 14px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 700;
  color: var(--white);
  background: var(--blue);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}
.auth-btn-submit:hover { background: var(--blue-light); }
.auth-btn-submit:active { background: var(--navy); }

/* ─── SECONDARY LINKS ─── */
.auth-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--gray-100);
  margin-top: 8px;
}
.auth-links a {
  font-size: 14px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  padding: 4px 0;
}
.auth-links a:hover { text-decoration: underline; }

/* ─── ACTION LIST (verify email page) ─── */
.auth-action-list {
  display: flex;
  flex-direction: column;
}
.auth-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
  font-size: 15px;
  font-weight: 500;
  color: var(--blue);
  text-decoration: none;
  transition: color 0.15s;
  gap: 12px;
}
.auth-action-row:last-child { border-bottom: none; }
.auth-action-row:hover { color: var(--navy); }
.auth-action-row svg { flex-shrink: 0; }

/* ─── ALERTS ─── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert svg { flex-shrink: 0; margin-top: 1px; }
.auth-alert--error {
  background: #fef2f2;
  border-left: 4px solid var(--red);
  color: var(--red-dark);
}
.auth-alert--success {
  background: #f0faf0;
  border-left: 4px solid #1a7a1a;
  color: #1a5c1a;
}
.auth-alert--info {
  background: #e8f0f8;
  border-left: 4px solid var(--blue);
  color: var(--navy);
}

/* ─── PASSWORD TIPS TOGGLE ─── */
.auth-tips-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
  margin-bottom: 0;
  user-select: none;
  transition: background 0.15s;
}
.auth-tips-toggle:hover { background: var(--gray-50); }
.auth-tips-icon {
  transition: transform 0.2s;
}
.auth-tips-toggle.open .auth-tips-icon {
  transform: rotate(180deg);
}
.auth-tips-body {
  display: none;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 4px 4px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.auth-tips-toggle.open + .auth-tips-body { display: block; }
.auth-tips-body ul {
  padding-left: 18px;
  margin: 0;
}
.auth-tips-body li {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 4px;
}

/* ─── FOOTER ─── */
.auth-footer {
  background: var(--navy-mid);
  padding: 18px 20px;
}
.auth-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
}
/* the app-name link inside the copyright line (was default browser blue on navy) */
.auth-footer-inner a {
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-inner a:hover { text-decoration: underline; }
.auth-footer-links {
  display: flex;
  gap: 20px;
}
.auth-footer-links a {
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.15s;
}
.auth-footer-links a:hover { color: var(--white); text-decoration: underline; }

/* ─── RESPONSIVE ─── */
@media (max-width: 640px) {
  .auth-card {
    padding: 28px 22px;
    border-radius: 0;
    box-shadow: none;
  }
  .auth-main {
    padding: 0 0 40px;
    align-items: flex-start;
  }
  .auth-tabs { border-radius: 8px; }
  .auth-footer-inner { flex-direction: column; align-items: center; text-align: center; }
  .auth-footer-links { justify-content: center; flex-wrap: wrap; }
}

/* ══════════════════════════════════════════════
   ADDITIONS
   ══════════════════════════════════════════════ */

/* ─── BRAND LOGO (replaces boxed icon) ─── */
.auth-brand-logo {
  display: block;
  height: 56px;
  width: auto;
  max-width: 100%;
}

/* ─── GOOGLE BUTTON ─── */
.auth-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  background: var(--white);
  border: 2px solid var(--gray-400);
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.auth-btn-google:hover { background: var(--gray-50); border-color: var(--gray-600); }
.auth-btn-google svg { flex-shrink: 0; }

/* ─── "or" SEPARATOR ─── */
.auth-sep {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-600);
}
.auth-sep::before,
.auth-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ─── FIELD EXTRAS ─── */
.auth-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.auth-label-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
}
.auth-hint {
  font-size: 13px;
  color: var(--gray-600);
  line-height: 1.5;
  margin-top: 6px;
}
.auth-input--code {
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ─── BUTTON STATES ─── */
.auth-btn-submit:disabled,
.auth-btn-submit:disabled:hover {
  background: var(--gray-400);
  cursor: not-allowed;
}
.auth-btn-submit:focus-visible,
.auth-btn-google:focus-visible,
.auth-tab:focus-visible {
  outline: 3px solid rgba(0,94,162,0.35);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .auth-row { grid-template-columns: 1fr; gap: 0; }
}