/* =========================================================
   TRANS-NZOIA AHP — Login Page
   ========================================================= */

/* ----- Layout ----- */
.auth-wrap {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 100vh;
}

/* ----- Brand Panel (left) ----- */
.auth-brand {
  position: relative;
  background: var(--primary-700, #163300);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auth-brand-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.auth-brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(159,232,112,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(159,232,112,.06) 1px, transparent 1px);
  background-size: 40px 40px;
}
.auth-brand-glow {
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(159,232,112,.14) 0%, transparent 68%);
}
.auth-brand-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100vh;
  padding: 2.25rem 2.5rem;
}
.auth-brand-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: 3rem;
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
}
.auth-logo img { height: 42px; width: auto; }
.auth-logo-text {
  font-family: var(--font-heading, 'Space Grotesk', sans-serif);
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.45;
}
.auth-logo-text small { opacity: .55; font-weight: 400; }

.auth-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: .35em;
  padding: .3rem .85rem;
  background: rgba(159,232,112,.1);
  border: 1px solid rgba(159,232,112,.22);
  border-radius: 100px;
  font-size: .68rem;
  font-weight: 700;
  color: var(--lime, #9fe870);
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.auth-brand-body { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.auth-brand-title {
  font-family: var(--font-display, 'Syne', sans-serif) !important;
  font-size: clamp(2.4rem, 3.5vw, 3.2rem) !important;
  font-weight: 900 !important;
  color: #fff !important;
  line-height: 1.05 !important;
  letter-spacing: -.04em;
  margin-bottom: 1.2rem;
}
.auth-brand-sub {
  font-size: .88rem;
  color: rgba(255,255,255,.58);
  line-height: 1.72;
  max-width: 330px;
  margin-bottom: 2rem;
}
.auth-brand-stats {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 16px;
  padding: 1.1rem 1.3rem;
  backdrop-filter: blur(8px);
}
.auth-bs-item { display: flex; flex-direction: column; align-items: center; flex: 1; gap: .2rem; }
.auth-bs-div  { width: 1px; height: 34px; background: rgba(255,255,255,.1); flex-shrink: 0; }
.auth-bs-num {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--lime, #9fe870);
  line-height: 1;
  letter-spacing: -.02em;
}
.auth-bs-lbl {
  font-size: .6rem;
  color: rgba(255,255,255,.4);
  letter-spacing: .05em;
  text-align: center;
  text-transform: uppercase;
}

.auth-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  font-size: .78rem;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .2s;
}
.auth-back-link:hover { color: var(--lime, #9fe870); }
.auth-brand-copy { font-size: .68rem; color: rgba(255,255,255,.22); }

/* ----- Form Panel (right) ----- */
.auth-form-panel {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  min-height: 100vh;
}
.auth-form-inner { width: 100%; max-width: 420px; }

/* ----- Alerts ----- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
  border-radius: 12px;
  margin-bottom: 1.2rem;
  font-size: .84rem;
  line-height: 1.5;
}
.auth-alert > i:first-child { font-size: .95rem; flex-shrink: 0; margin-top: .15em; }
.auth-alert > div { flex: 1; }
.auth-alert > div strong { display: block; font-weight: 700; margin-bottom: .1rem; }
.auth-alert--warn  { background: #fefce8; border: 1px solid #fde047; color: #713f12; }
.auth-alert--warn  > i:first-child { color: #ca8a04; }
.auth-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.auth-alert--error > i:first-child { color: #dc2626; }
.auth-alert--success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.auth-alert--success > i:first-child { color: #16a34a; }
.auth-alert-close {
  background: none; border: none; color: inherit;
  opacity: .45; font-size: .78rem; padding: 0; flex-shrink: 0;
  margin-top: .1em; transition: opacity .2s;
}
.auth-alert-close:hover { opacity: 1; }

/* ----- Form Header ----- */
.auth-form-header { text-align: center; margin-bottom: 1.75rem; }
.auth-form-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--primary-50, #edfbd6);
  color: var(--primary-600, #1e4d00);
  border: 1.5px solid var(--primary-100, #c5f09a);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; margin: 0 auto 1rem;
}
.auth-form-title {
  font-family: var(--font-display, 'Syne', sans-serif) !important;
  font-size: 1.75rem !important;
  font-weight: 900 !important;
  color: var(--neutral-950, #050a02) !important;
  letter-spacing: -.03em;
  margin-bottom: .35rem;
}
.auth-form-sub { font-size: .87rem; color: var(--neutral-500, #5a7a48); line-height: 1.6; }

/* ----- Form ----- */
.auth-honeypot { position: absolute; opacity: 0; pointer-events: none; height: 0; width: 0; overflow: hidden; }
.auth-form { display: flex; flex-direction: column; gap: 1.1rem; }
.auth-field { display: flex; flex-direction: column; gap: .35rem; }
.auth-label { font-size: .82rem; font-weight: 600; color: var(--neutral-700, #2e4a1e); }
.auth-required { color: #dc2626; }
.auth-input-wrap { position: relative; }
.auth-input-icon {
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  color: var(--neutral-400, #7a9a65); font-size: .8rem; pointer-events: none; z-index: 1;
}
.auth-input {
  width: 100%; height: 48px; padding: 0 1rem 0 2.7rem;
  background: #fff; border: 1.5px solid var(--neutral-200, #ddeece);
  border-radius: 12px; font-size: .9rem; font-family: inherit;
  color: var(--neutral-900, #111); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-input::placeholder { color: var(--neutral-400, #7a9a65); }
.auth-input:focus { border-color: var(--primary-500, #3b8a00); box-shadow: 0 0 0 3px rgba(30,77,0,.1); }
.auth-input.is-error { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1); }
.auth-input.is-valid { border-color: #16a34a; }
.auth-input--pw { padding-right: 3rem; }
.auth-pwd-toggle {
  position: absolute; right: .8rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--neutral-400, #7a9a65);
  font-size: .88rem; padding: .25rem; transition: color .2s;
}
.auth-pwd-toggle:hover { color: var(--primary-600, #1e4d00); }
.auth-field-error { font-size: .75rem; color: #dc2626; font-weight: 500; min-height: .9em; }

/* ----- Remember + Forgot row ----- */
.auth-form-row {
  display: flex; align-items: center;
  justify-content: space-between; gap: .5rem; flex-wrap: wrap;
}
.auth-check-label {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; color: var(--neutral-700, #2e4a1e); user-select: none; cursor: pointer;
}
.auth-check-input { display: none; }
.auth-check-box {
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--neutral-300, #c2d6b0);
  background: #fff; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  transition: background .2s, border-color .2s;
}
.auth-check-input:checked + .auth-check-box { background: var(--primary-600, #1e4d00); border-color: var(--primary-600, #1e4d00); }
.auth-check-input:checked + .auth-check-box::after {
  content: ''; display: block; width: 5px; height: 9px;
  border: 2px solid #fff; border-top: none; border-left: none;
  transform: rotate(45deg) translateY(-1px);
}
.auth-forgot-link {
  font-size: .82rem; color: var(--primary-600, #1e4d00);
  font-weight: 600; text-decoration: none; transition: color .2s;
}
.auth-forgot-link:hover { color: var(--primary-400, #5aaa1a); text-decoration: underline; }

/* ----- Submit Button ----- */
.auth-submit {
  width: 100%; height: 50px; margin-top: .35rem;
  background: var(--primary-600, #1e4d00); color: var(--lime, #9fe870);
  border: none; border-radius: 14px; font-size: .92rem; font-weight: 700;
  font-family: inherit; display: flex; align-items: center; justify-content: center; gap: .5em;
  cursor: pointer; transition: background .2s, transform .2s, box-shadow .2s;
}
.auth-submit:hover:not(:disabled) {
  background: var(--primary-700, #163300);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(30,77,0,.25);
}
.auth-submit:active:not(:disabled) { transform: translateY(0); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.auth-submit-loading { display: none; align-items: center; gap: .4em; }
.auth-submit.is-loading .auth-submit-text { display: none; }
.auth-submit.is-loading .auth-submit-loading { display: flex; }

/* ----- Divider ----- */
.auth-divider {
  display: flex; align-items: center; gap: .75rem;
  margin: 1.5rem 0; color: var(--neutral-400, #7a9a65);
  font-size: .7rem; text-transform: uppercase; letter-spacing: .09em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--neutral-200, #ddeece);
}

/* ----- Help Links ----- */
.auth-help { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.5rem; }
.auth-help-link {
  display: flex; align-items: center; gap: .6em; padding: .65rem 1rem;
  border-radius: 10px; background: var(--neutral-50, #f6faf0);
  border: 1.5px solid var(--neutral-100, #eef7e6);
  font-size: .82rem; color: var(--neutral-700, #2e4a1e);
  font-weight: 500; text-decoration: none; transition: background .2s, border-color .2s;
}
.auth-help-link:hover {
  background: var(--primary-50, #edfbd6);
  border-color: var(--primary-100, #c5f09a);
  color: var(--primary-700, #163300);
}
.auth-help-link i { color: var(--primary-500, #3b8a00); font-size: .85rem; flex-shrink: 0; }
.auth-help-link--muted { background: transparent; border-color: transparent; }
.auth-help-link--muted:hover { background: var(--neutral-50, #f6faf0); border-color: var(--neutral-100, #eef7e6); }

/* ----- Legal ----- */
.auth-legal {
  font-size: .71rem; color: var(--neutral-400, #7a9a65);
  line-height: 1.6; text-align: center;
}
.auth-legal a { color: var(--primary-600, #1e4d00); text-decoration: underline; text-underline-offset: 2px; }

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-panel { padding: 4rem 1.5rem 2.5rem; align-items: flex-start; }
}
@media (max-width: 480px) {
  .auth-form-panel { padding: 2.5rem 1rem 2rem; }
  .auth-form-title { font-size: 1.5rem !important; }
}
