/* ========== Auth Page (login / register / forgot) ========== */

.auth-page-main {
  background: #f4f6f0;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.09);
  padding: 40px 44px;
  width: 100%;
  max-width: 420px;
}

/* ── Header (dark green banner, logo sits here) ── */
.auth-card-header {
  background: #2d3d1a;
  margin: -40px -44px 28px;
  padding: 28px 44px 22px;
  border-radius: 14px 14px 0 0;
  text-align: center;
}

.auth-logo {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ── Sub-header (title + subtitle, white background) ── */
.auth-card-body {
  text-align: center;
  margin-bottom: 24px;
}

.auth-card-body h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #1c2b0e;
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 0.9rem;
  color: #7a8c5a;
  margin: 0;
}

/* ── Flash messages ── */
.flash {
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.45;
}

.flash a {
  font-weight: 600;
  text-decoration: underline;
}

.flash-success {
  background: #e8f5e9;
  color: #2e6b35;
  border: 1px solid #b6d9ba;
}

.flash-success a { color: #2e6b35; }

.flash-error {
  background: #fdf0f0;
  color: #9b2c2c;
  border: 1px solid #f5c6c6;
}

.flash-error a { color: #9b2c2c; }

/* ── Form ── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a4a25;
}

.form-group input {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid #d4dfc0;
  border-radius: 8px;
  font-size: 0.95rem;
  color: #1c2b0e;
  background: #fafcf7;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-group input:focus {
  border-color: #556B2F;
  box-shadow: 0 0 0 3px rgba(85,107,47,0.15);
  background: #fff;
}

/* Label row with "Forgot password?" link inline */
.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.forgot-link {
  font-size: 0.82rem;
  color: #556B2F;
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Password show/hide toggle */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 42px;
}

.toggle-password {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #8a9e5a;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  color: #556B2F;
}

.eye-icon {
  width: 18px;
  height: 18px;
}

/* ── Password strength bar ── */
.strength-bar-wrap {
  margin-top: 6px;
}

#strength-bar {
  height: 6px;
  width: 0;
  border-radius: 4px;
  background: #e8eedd;
  transition: width 0.3s ease, background 0.3s ease;
}

#strength-text {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6b7c4a;
  margin-top: 6px;
  min-height: 1em;
}

#strength-bar.weak     { width: 33%; background: #e05252; }
#strength-bar.moderate { width: 66%; background: #e0a020; }
#strength-bar.strong   { width: 100%; background: #4a8c3f; }

/* ── Confirm password match hint ── */
.match-hint {
  font-size: 0.78rem;
  margin: 4px 0 0;
  min-height: 1em;
}

.match-ok   { color: #4a8c3f; }
.match-fail { color: #c0392b; }

.input-match    { border-color: #4a8c3f !important; }
.input-mismatch { border-color: #c0392b !important; }

/* ── Primary Button ── */
.btn-primary {
  width: 100%;
  padding: 12px;
  background: #556B2F;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 4px;
}

.btn-primary:hover {
  background: #3f5222;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* ── Footer link ── */
.auth-footer-text {
  text-align: center;
  font-size: 0.88rem;
  color: #6b7c4a;
  margin: 22px 0 0;
}

.auth-footer-text a {
  color: #556B2F;
  font-weight: 600;
  text-decoration: none;
}

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

/* ── reCAPTCHA ── */
.recaptcha-wrap {
  display: flex;
  justify-content: center;
}

@media (max-width: 380px) {
  .recaptcha-wrap .g-recaptcha {
    transform: scale(0.88);
    transform-origin: left center;
  }
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .auth-card {
    padding: 30px 22px;
    border-radius: 10px;
  }

  .auth-card-header {
    margin: -30px -22px 24px;
    padding: 22px 22px 18px;
    border-radius: 10px 10px 0 0;
  }
}
