/* =========================================================================
   Auth pages — Forest & Gold design system (matches my-area.html reference)
   Relies on CSS variables declared in app.css (:root block).
   ========================================================================= */

/* ── Reset scoped to auth shell ─────────────────────────────────────────── */
body {
  font-family: var(--ff-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--pp-ink, #0F1B2D);
  background: var(--pp-cream, #F8FAFC);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
}

/* ── Announcement bar ───────────────────────────────────────────────────── */
.announce {
  background: var(--pp-forest, #003594);
  color: var(--pp-cream-warm, #EAF3FC);
  padding: 9px 24px;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.02em;
}
.announce strong {
  color: var(--pp-gold-soft, #FAE5AE);
  font-weight: 500;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.ma-header {
  background: white;
  border-bottom: 1px solid var(--pp-line, #E5DDD0);
  position: sticky;
  top: 0;
  z-index: 50;
}
.ma-header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.auth-logo { display:block; text-decoration:none; margin-bottom:8px; }
.auth-logo-img { height:52px; width:auto; display:block; }

.ma-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--ff-display, 'Libre Baskerville', Georgia, serif);
  font-size: 23px;
  font-weight: 500;
  color: var(--pp-forest, #003594);
  font-style: italic;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.ma-logo .logo-img {
  height: 68px;
  width: auto;
  display: block;
}
.ma-logo-mark {
  width: 32px;
  height: 32px;
  background: var(--pp-forest, #003594);
  color: var(--pp-gold, #F0B323);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display, 'Libre Baskerville', Georgia, serif);
  font-size: 15px;
  font-style: italic;
  font-weight: 600;
}
.ma-logo-tag {
  font-family: var(--ff-body, 'Inter', sans-serif);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pp-ink-muted, #8B7E70);
  font-style: normal;
  border-left: 1px solid var(--pp-line, #E5DDD0);
  padding-left: 9px;
  margin-left: 3px;
}
.ma-nav {
  display: flex;
  gap: 24px;
  justify-content: center;
}
.ma-nav a {
  font-size: 13.5px;
  color: var(--pp-ink-soft, #4A3F36);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.15s;
}
.ma-nav a:hover { color: var(--pp-forest, #003594); }
.ma-nav a.active {
  color: var(--pp-forest, #003594);
  position: relative;
}
.ma-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -22px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pp-gold, #F0B323);
}
.ma-header-cta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ma-btn-signin {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pp-forest, #003594);
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}
.ma-btn-signin:hover,
.ma-btn-signin.ma-btn-active { background: var(--pp-cream-warm, #EAF3FC); }
.ma-btn-register {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--pp-cream-warm, #EAF3FC);
  background: var(--pp-forest, #003594);
  padding: 9px 18px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s;
}
.ma-btn-register:hover { background: var(--pp-forest-soft, #1A4DB0); }

/* ── Auth shell (two-column grid) ───────────────────────────────────────── */
.auth-shell {
  max-width: 920px;
  margin: 24px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 30px;
}

/* ── Auth card ──────────────────────────────────────────────────────────── */
.auth-card-new {
  background: white;
  border: 1px solid var(--pp-line, #E5DDD0);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(0,53,148,0.04), 0 4px 16px rgba(0,53,148,0.04);
  overflow: hidden;
}

/* Tabs */
.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--pp-line-soft, #F0E9DC);
}
.auth-tab {
  flex: 1;
  padding: 16px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--pp-ink-muted, #8B7E70);
  background: var(--pp-cream-warm, #EAF3FC);
  text-align: center;
  text-decoration: none;
  display: block;
  position: relative;
  transition: all 0.15s;
  border: none;
}
.auth-tab:hover { color: var(--pp-forest, #003594); }
.auth-tab.active {
  background: white;
  color: var(--pp-forest, #003594);
}
.auth-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pp-gold, #F0B323);
}

/* Form wrapper */
.auth-form-wrap {
  padding: 28px 30px 30px;
}
.auth-title-new {
  font-family: var(--ff-display, 'Libre Baskerville', Georgia, serif);
  font-size: 26px;
  font-weight: 500;
  font-style: italic;
  color: var(--pp-forest, #003594);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}
.auth-sub-new {
  font-size: 13.5px;
  color: var(--pp-ink-muted, #8B7E70);
  margin-bottom: 22px;
  line-height: 1.5;
}

/* Fields */
.auth-field {
  display: flex;
  flex-direction: column;
  margin-bottom: 14px;
}
.auth-field-label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--pp-ink-muted, #8B7E70);
  margin-bottom: 6px;
}
.auth-field input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--pp-line, #E5DDD0);
  border-radius: 9px;
  background: var(--pp-cream-warm, #EAF3FC);
  font-family: var(--ff-body, 'Inter', sans-serif);
  font-size: 14px;
  color: var(--pp-ink, #0F1B2D);
  outline: none;
  transition: all 0.15s;
}
.auth-field input:focus {
  border-color: var(--pp-gold, #F0B323);
  background: white;
  box-shadow: 0 0 0 3px rgba(200,165,92,0.12);
}
.auth-field input::placeholder {
  color: var(--pp-ink-muted, #8B7E70);
}

/* Invalid / valid states — applied to inputs OR to .auth-pw-wrap for password fields */
.auth-field input.is-invalid,
.auth-pw-wrap.is-invalid {
  border-color: #c0392b !important;
  background: #fff8f7 !important;
  box-shadow: 0 0 0 3px rgba(192,57,43,0.10) !important;
}
.auth-field input.is-valid,
.auth-pw-wrap.is-valid {
  border-color: #2e7d52 !important;
  background: #f5fbf7 !important;
  box-shadow: 0 0 0 3px rgba(46,125,82,0.10) !important;
}

/* Inline error message */
.auth-field-error {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 5px;
  font-size: 12.5px;
  color: #c0392b !important;
  line-height: 1.4;
  font-family: var(--ff-body, 'Inter', sans-serif);
  min-height: 16px;
}
.auth-field-error:not(:empty)::before {
  content: '⚠';
  font-size: 11px;
  flex-shrink: 0;
}

/* Password wrapper styled as the input — border/bg live on the wrapper, not the input */
.auth-pw-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  border: 1px solid var(--pp-line, #E5DDD0);
  border-radius: 9px;
  background: var(--pp-cream-warm, #EAF3FC);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  overflow: hidden;
}
.auth-pw-wrap:focus-within {
  border-color: var(--pp-gold, #F0B323);
  background: white;
  box-shadow: 0 0 0 3px rgba(200,165,92,0.12);
}
/* The actual input inside the wrapper has NO border of its own */
.auth-pw-wrap input {
  flex: 1;
  min-width: 0;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 11px 6px 11px 14px !important;
  width: auto !important;
  outline: none !important;
}
.auth-pw-toggle {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0 12px;
  cursor: pointer;
  color: var(--pp-ink-muted, #8B7E70);
  display: flex;
  align-items: center;
  align-self: stretch;
  transition: color 0.15s;
  line-height: 0;
}
.auth-pw-toggle:hover { color: var(--pp-ink, #0F1B2D); }

/* Submit button */
.auth-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  background: var(--pp-forest, #003594);
  color: var(--pp-cream-warm, #EAF3FC);
  border: none;
  border-radius: 9px;
  font-family: var(--ff-body, 'Inter', sans-serif);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  margin-top: 8px;
}
.auth-submit-btn:hover {
  background: var(--pp-forest-soft, #1A4DB0);
  color: white;
}

/* Error / success alerts */
.auth-alert {
  border-radius: 10px;
  padding: 13px 16px;
  font-size: 13.5px;
  margin-bottom: 18px;
  line-height: 1.55;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.auth-alert__icon {
  flex-shrink: 0;
  margin-top: 1px;
}
.auth-alert--error {
  background: rgba(160,72,72,0.08);
  color: #A04848;
  border: 1px solid rgba(160,72,72,0.2);
}
.auth-alert--success {
  background: rgba(31,61,42,0.09);
  color: #003594;
  border: 1px solid rgba(31,61,42,0.22);
}
.auth-alert--success .auth-alert__icon { color: #2E6B42; }
.auth-alert--error   .auth-alert__icon { color: #A04848; }

/* Row that right-aligns the forgot-password link inside a field */
.auth-field-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 5px;
}
/* "Forgot password?" link — right-aligned below the password field */
.auth-forgot-link {
  font-size: 12.5px;
  color: var(--pp-forest, #003594);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  opacity: .8;
  transition: opacity .15s;
}
.auth-forgot-link:hover { opacity: 1; }

/* "Back to sign in" secondary link (used on forgot-pw & reset-pw pages) */
.auth-back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--pp-forest, #003594);
  text-decoration: none;
  opacity: .65;
  transition: opacity .15s, gap .15s;
}
.auth-back-link:hover { opacity: 1; gap: 9px; text-decoration: none; }

/* ── Benefits panel ─────────────────────────────────────────────────────── */
.auth-benefits {
  padding-top: 14px;
}
.auth-benefits-title {
  font-family: var(--ff-display, 'Libre Baskerville', Georgia, serif);
  font-size: 26px;
  font-weight: 500;
  font-style: italic;
  color: var(--pp-forest, #003594);
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.auth-benefits-sub {
  font-size: 14px;
  color: var(--pp-ink-soft, #4A3F36);
  margin-bottom: 22px;
  line-height: 1.55;
}
.benefit {
  display: flex;
  gap: 14px;
  padding: 16px 0;
  border-bottom: 1px solid var(--pp-line-soft, #F0E9DC);
}
.benefit:last-child { border-bottom: none; }
.benefit-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--pp-line, #E5DDD0);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pp-gold-deep, #A8862F);
  flex-shrink: 0;
}
.benefit-text strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--pp-ink, #0F1B2D);
  margin-bottom: 3px;
}
.benefit-text span {
  display: block;
  font-size: 12.5px;
  color: var(--pp-ink-muted, #8B7E70);
  line-height: 1.5;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.ma-footer {
  background: var(--pp-forest, #003594);
  color: var(--pp-cream-warm, #EAF3FC);
  padding: 36px 24px 22px;
}
.ma-footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  text-align: center;
}
.ma-footer-brand {
  font-family: var(--ff-display, 'Libre Baskerville', Georgia, serif);
  font-size: 22px;
  font-style: italic;
  color: var(--pp-gold-soft, #FAE5AE);
  margin-bottom: 10px;
}
.ma-footer-tagline {
  font-size: 13px;
  opacity: 0.8;
  margin-bottom: 16px;
}
.ma-footer-nav {
  display: flex;
  justify-content: center;
  gap: 22px;
  margin-bottom: 16px;
  font-size: 13px;
  flex-wrap: wrap;
}
.ma-footer-nav a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.ma-footer-nav a:hover { opacity: 1; color: var(--pp-gold-soft, #FAE5AE); }
.ma-footer-copy {
  font-size: 11.5px;
  opacity: 0.6;
  letter-spacing: 0.02em;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
    padding: 0 16px;
    gap: 18px;
    margin: 16px auto 40px;
  }
  .auth-benefits {
    padding-top: 0;
    padding-bottom: 14px;
  }
  .auth-benefits-title { font-size: 22px; }
}
@media (max-width: 640px) {
  .announce { padding: 7px 12px; font-size: 11px; }
  .header-inner { padding: 12px 14px; gap: 12px; }
  .auth-form-wrap { padding: 22px 22px 24px; }
  .auth-title-new { font-size: 22px; }
  .auth-field input { font-size: 16px; } /* prevent iOS zoom */
}
