/* ============================================================
   AUTH PAGES — sign-in, join, password-reset
   Add to bottom of global.css OR as separate auth.css
   loaded via header.php when $activePage is auth-related
   ============================================================ */

/* Page wrapper */
.auth-page {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--brand-bg);
}
.auth-page--wide {
  align-items: flex-start;
  padding-top: 60px;
}

/* Card */
.auth-card {
  background: var(--brand-surface);
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  padding: 36px 40px;
  width: 100%;
  max-width: 460px;
}
.auth-card--wide {
  max-width: 860px;
}

/* Logo */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  justify-content: center;
}
.auth-logo img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: contain;
}
.auth-logo__initial {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-gradient, var(--brand-primary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  font-family: 'Barlow Condensed', sans-serif;
}
.auth-logo__name {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

/* Headings */
.auth-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 28px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
  color: #fff;
  text-align: center;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* Alerts */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: 18px;
}
.auth-alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.auth-alert--error   { background: rgba(192,32,42,.12); border: 1px solid rgba(192,32,42,.35); color: #F09595; }
.auth-alert--success { background: rgba(39,80,10,.15);  border: 1px solid rgba(97,196,89,.35); color: #97C459; }

/* Success icon */
.auth-success-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(39,80,10,.2);
  border: 2px solid #97C459;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #97C459;
  margin: 0 auto 20px;
}

/* Form */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: rgba(255,255,255,.7);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-hint {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255,255,255,.35);
}
.form-forgot {
  font-size: 12px;
  color: var(--brand-primary);
  text-decoration: none;
  transition: opacity .15s ease;
}
.form-forgot:hover { opacity: .8; }

.form-input {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: #fff;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}
.form-input::placeholder { color: rgba(255,255,255,.25); }
.form-input:focus {
  border-color: var(--brand-primary);
  background: rgba(255,255,255,.08);
}
.form-input:invalid:not(:placeholder-shown) {
  border-color: rgba(192,32,42,.5);
}

.form-input-wrap {
  position: relative;
}
.form-input-wrap .form-input {
  padding-right: 44px;
}
.form-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.35);
  font-size: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  transition: color .15s ease;
}
.form-pw-toggle:hover { color: rgba(255,255,255,.7); }

/* Password strength */
.pw-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.pw-strength__bar {
  flex: 1;
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  overflow: hidden;
}
.pw-strength__fill {
  height: 4px;
  border-radius: 2px;
  width: 0;
  transition: width .25s ease, background .25s ease;
}
.pw-strength__label {
  font-size: 11px;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,.6);
  line-height: 1.5;
}
.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--brand-primary);
  flex-shrink: 0;
  cursor: pointer;
}
.form-check a { color: var(--brand-primary); text-decoration: none; }
.form-check a:hover { text-decoration: underline; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: rgba(255,255,255,.25);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,.1);
}

/* Terms note */
.auth-terms {
  font-size: 11px;
  color: rgba(255,255,255,.3);
  text-align: center;
  margin-top: 16px;
  line-height: 1.5;
}
.auth-terms a { color: rgba(255,255,255,.45); text-decoration: none; }
.auth-terms a:hover { color: var(--brand-primary); }

/* Join layout — two columns */
.join-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}
.join-benefits__title {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--brand-border);
}
.join-benefits {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
}
.join-benefit {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.join-benefit__icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--brand-primary);
  flex-shrink: 0;
}
.join-benefit strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.join-benefit p {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  line-height: 1.5;
  margin: 0;
}
.join-referral-note {
  margin-top: 20px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  color: rgba(255,255,255,.55);
  display: flex;
  gap: 8px;
  align-items: flex-start;
  line-height: 1.5;
}
.join-referral-note i { font-size: 15px; color: var(--brand-primary); flex-shrink: 0; margin-top: 1px; }

/* Responsive */
@media (max-width: 760px) {
  .auth-card { padding: 28px 20px; }
  .join-layout { grid-template-columns: 1fr; }
  .join-benefits-col { order: -1; }
  .form-row { grid-template-columns: 1fr; }
}
