/* Sign-in pages (layouts/auth.php): login, forgot / reset password. Standalone: no Bootstrap. */
:root {
  --au-brand: #125123;
  --au-brand-600: #0e3f1c;
  --au-brand-400: #2f7a43;
  --au-gold: #d9a441;
  --au-text: #14201a;
  --au-muted: #5d6b63;
  --au-line: #dfe6e1;
  --au-field: #f6f8f7;
  --au-danger: #b42318;
  --au-radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
.auth-body {
  font-family: "Figtree", "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--au-text);
  background: #f3f5f4;
  -webkit-font-smoothing: antialiased;
}

/* ---------- layout: photo | form ---------- */
.auth { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr); min-height: 100vh; min-height: 100dvh; }

.auth__hero { position: relative; overflow: hidden; background: var(--au-brand-600); }
.auth__hero-img {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.04);
  animation: auHero 18s ease-out both;
}
.auth__hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 26, 13, .15) 0%, rgba(6, 26, 13, .05) 35%, rgba(6, 26, 13, .78) 100%),
    linear-gradient(90deg, rgba(14, 63, 28, .35), rgba(14, 63, 28, 0) 60%);
}
.auth__hero-content {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(28px, 4vw, 56px);
  color: #fff;
}
.auth__hero-logo {
  width: 150px; height: auto;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35));
  background: rgba(255, 255, 255, .92); border-radius: 16px; padding: 10px 14px;
  align-self: flex-start;
}
.auth__hero-kicker {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--au-gold);
}
.auth__hero-title {
  margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.auth__hero-text { margin: 14px 0 0; max-width: 440px; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .86); }

.auth__panel {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px 24px 24px;
  background:
    radial-gradient(1200px 500px at 100% 0%, rgba(18, 81, 35, .07), transparent 60%),
    #f7f9f8;
}
.auth__card {
  width: 100%; max-width: 400px;
  background: #fff;
  border: 1px solid rgba(18, 81, 35, .08);
  border-radius: 22px;
  padding: 36px 32px 32px;
  box-shadow: 0 1px 2px rgba(16, 24, 20, .04), 0 24px 60px -24px rgba(14, 63, 28, .28);
  animation: auRise .5s cubic-bezier(.2, .8, .2, 1) both;
}
.auth__card-logo { display: none; width: 132px; height: auto; margin: 0 auto 18px; }
.auth__foot { margin: 22px 0 0; font-size: 12px; color: var(--au-muted); }

/* ---------- heading ---------- */
.auth__head { margin-bottom: 26px; }
.auth__title { margin: 0; font-size: 28px; line-height: 1.15; font-weight: 800; letter-spacing: -.02em; color: var(--au-text); }
.auth__sub { margin: 6px 0 0; color: var(--au-muted); font-size: 15px; }

/* ---------- fields ---------- */
.auth__form { display: grid; gap: 18px; }
.auth__field { display: grid; gap: 7px; }
.auth__label { font-size: 13.5px; font-weight: 600; color: #2b3a31; }
.auth__control { position: relative; }
.auth__icon {
  position: absolute; left: 14px; top: 50%; width: 19px; height: 19px; transform: translateY(-50%);
  fill: #8a978f; pointer-events: none; transition: fill .2s;
}
.auth__input {
  width: 100%; height: 50px;
  padding: 0 14px 0 44px;
  font: inherit; font-size: 16px; /* 16px: no zoom on iOS focus */
  color: var(--au-text);
  background: var(--au-field);
  border: 1.5px solid transparent;
  border-radius: var(--au-radius);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.auth__input--pw { padding-right: 50px; }
.auth__input::placeholder { color: #9aa69f; }
.auth__input:hover { background: #f1f4f2; }
.auth__input:focus { background: #fff; border-color: var(--au-brand-400); box-shadow: 0 0 0 4px rgba(47, 122, 67, .14); }
.auth__control:focus-within .auth__icon { fill: var(--au-brand); }

.auth__eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; cursor: pointer;
  display: grid; place-items: center;
}
.auth__eye:hover { background: rgba(18, 81, 35, .07); }
.auth__eye:focus-visible { outline: 2px solid var(--au-brand-400); outline-offset: 1px; }
.auth__eye svg { width: 20px; height: 20px; fill: #6f7d75; }
.auth__eye-off, .auth__eye[aria-pressed="true"] .auth__eye-on { display: none; }
.auth__eye[aria-pressed="true"] .auth__eye-off { display: block; }

.auth__caps { margin: 0; font-size: 12.5px; color: #9a6700; }
.auth__error {
  margin: -4px 0 0; padding: 10px 12px; border-radius: 10px;
  background: #fef3f2; color: var(--au-danger); font-size: 13.5px;
}

/* ---------- submit ---------- */
.auth__submit {
  position: relative; height: 52px; margin-top: 4px;
  border: 0; border-radius: var(--au-radius); cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .01em; color: #fff;
  background: linear-gradient(180deg, var(--au-brand-400), var(--au-brand));
  box-shadow: 0 12px 26px -12px rgba(18, 81, 35, .7), inset 0 1px 0 rgba(255, 255, 255, .15);
  transition: transform .15s, box-shadow .2s, filter .2s;
}
.auth__submit:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(18, 81, 35, .75); }
.auth__submit:active { transform: translateY(0); }
.auth__submit:focus-visible { outline: 3px solid rgba(47, 122, 67, .35); outline-offset: 2px; }
.auth__submit:disabled { cursor: progress; }
.auth__spinner {
  display: none; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%;
  animation: auSpin .7s linear infinite;
}
.auth__submit.is-loading .auth__submit-text { visibility: hidden; }
.auth__submit.is-loading .auth__spinner { display: block; }

/* ---------- other auth pages (forgot / reset): their Bootstrap-style markup ---------- */
.auth__card h2 { margin: 0 0 22px; font-size: 24px; font-weight: 800; text-align: center; letter-spacing: -.01em; }
.auth__card .mb-3 { margin-bottom: 16px; }
.auth__card .mb-0 { margin-bottom: 0; }
.auth__card label:not(.auth__label) { display: block; margin-bottom: 6px; font-size: 13.5px; font-weight: 600; }
.auth__card .form-control {
  width: 100%; height: 48px; padding: 0 14px; font: inherit; font-size: 16px;
  background: var(--au-field); border: 1.5px solid transparent; border-radius: var(--au-radius); outline: none;
}
.auth__card .form-control:focus { background: #fff; border-color: var(--au-brand-400); box-shadow: 0 0 0 4px rgba(47, 122, 67, .14); }
.auth__card .d-grid { display: grid; }
.auth__card .btn {
  height: 50px; border: 0; border-radius: var(--au-radius); font: inherit; font-weight: 700; color: #fff; cursor: pointer;
  background: linear-gradient(180deg, var(--au-brand-400), var(--au-brand));
}
.auth__card .text-center { text-align: center; }
.auth__card .text-danger { color: var(--au-danger); font-size: 13px; }
.auth__card hr { border: 0; border-top: 1px solid var(--au-line); margin: 22px 0 14px; }
.auth__card a { color: var(--au-brand); font-weight: 600; text-decoration: none; }
.auth__card a:hover { text-decoration: underline; }
.auth__card .alert { padding: 14px 16px; border-radius: 12px; }
.auth__card .alert-danger { background: #fef3f2; color: var(--au-danger); }

/* ---------- tablet / phone ---------- */
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .auth__hero { height: 40vh; min-height: 230px; max-height: 380px; }
  .auth__hero-content { justify-content: flex-end; padding: 24px 22px 56px; }
  .auth__hero-logo { position: absolute; top: max(18px, env(safe-area-inset-top)); left: 20px; width: 112px; padding: 7px 10px; border-radius: 12px; }
  .auth__hero-text { display: none; }
  .auth__hero-kicker { margin-bottom: 6px; font-size: 11px; }
  .auth__hero-title { font-size: 26px; }
  .auth__panel {
    justify-content: flex-start;
    padding: 0 16px max(20px, env(safe-area-inset-bottom));
    background: #f7f9f8;
  }
  .auth__card {
    margin-top: -36px; position: relative; z-index: 2;
    padding: 28px 22px 24px; border-radius: 24px;
    max-width: 480px;
  }
  .auth__title { font-size: 24px; }
  .auth__head { margin-bottom: 22px; }
}
@media (max-width: 360px) {
  .auth__card { padding: 24px 18px 20px; }
  .auth__hero-title { font-size: 22px; }
}
/* Short landscape phones: the form first, no photo. */
@media (max-height: 520px) and (max-width: 900px) {
  .auth__hero { display: none; }
  .auth__card { margin-top: 20px; }
  .auth__card-logo { display: block; }
}

@keyframes auRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes auHero { from { transform: scale(1.12); } to { transform: scale(1.04); } }
@keyframes auSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .auth__hero-img, .auth__card { animation: none; }
  .auth__submit, .auth__input { transition: none; }
}
