/* =============================================================
   ESSENCE BY DEVONTEE — assets/css/auth.css
   Login, Signup, Forgot/Reset Password pages
   Palette matches style.css: --green-dark #0a1f0e, --green-accent,
   --green-light, gold #c9a84c accents, Playfair Display + Jost
   ============================================================= */

.auth-page {
  margin: 0; padding: 0;
  background: var(--off-white, #f5f2ee);
  min-height: 100vh;
  cursor: auto;
}
.auth-page * { cursor: auto; }

/* =============================================================
   TWO-COLUMN LAYOUT
   ============================================================= */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* =============================================================
   LEFT — BRAND PANEL
   ============================================================= */
.auth-brand {
  position: relative;
  background: linear-gradient(160deg, #071409 0%, var(--green-dark, #0a1f0e) 55%, #16331e 100%);
  padding: 56px 52px;
  display: flex; align-items: center;
  overflow: hidden;
}

.auth-kente {
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg,
    #c9a84c 0%, #e8d08a 25%,
    var(--green-light, #4caf63) 50%, #e8d08a 75%,
    #c9a84c 100%);
}

.auth-ring {
  position: absolute; border-radius: 50%;
  pointer-events: none;
  animation: authRing 5s ease-in-out infinite;
  border-color: rgba(201,168,76,0.12) !important;
}
.auth-ring--1 { width: 420px; height: 420px; bottom: -120px; right: -120px; border: 1.5px solid; animation-delay: 0s; }
.auth-ring--2 { width: 260px; height: 260px; bottom: -60px; right: -60px; border: 1px solid rgba(255,255,255,0.05); animation-delay: 1s; }
@keyframes authRing { 0%,100%{transform:scale(1)} 50%{transform:scale(1.04)} }

.auth-brand__inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 36px;
  width: 100%;
}

.auth-brand__logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.auth-brand__logo img { height: 48px; width: auto; object-fit: contain; }
.auth-brand__logo img.broken { display: none; }
.auth-brand__logo-fallback {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: 19px; font-weight: 700; color: #fff; line-height: 1.2;
  display: none;
}
.auth-brand__logo img.broken + .auth-brand__logo-fallback { display: block; }

.auth-brand__text h2 {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(28px, 3vw, 40px); font-weight: 400;
  color: #fff; line-height: 1.18; letter-spacing: -.3px; margin-bottom: 12px;
}
.auth-brand__text h2 em { font-style: italic; color: var(--green-light, #7ec8a0); }
.auth-brand__text p {
  font-size: 14.5px; font-weight: 300;
  color: rgba(255,255,255,0.62); line-height: 1.75;
  font-family: var(--font-body, 'Jost', sans-serif);
}

.auth-brand__features { display: flex; flex-direction: column; gap: 18px; }
.auth-feature { display: flex; align-items: flex-start; gap: 14px; }
.auth-feature__icon {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(201,168,76,0.12); border: 1px solid rgba(201,168,76,0.25);
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.auth-feature__icon svg { stroke: #c9a84c; }
.auth-feature strong {
  display: block; font-size: 13.5px; font-weight: 500; color: #fff;
  margin-bottom: 2px; font-family: var(--font-body, 'Jost', sans-serif);
  letter-spacing: .3px;
}
.auth-feature span { font-size: 12px; color: rgba(255,255,255,0.48); line-height: 1.5; font-family: var(--font-body, 'Jost', sans-serif); }

.auth-brand__quote {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 2px; padding: 20px 22px;
  border-left: 2px solid #c9a84c;
}
.auth-brand__quote p {
  font-family: var(--font-display, 'Playfair Display', serif); font-style: italic;
  font-size: 15px; color: rgba(255,255,255,0.78); line-height: 1.6; margin-bottom: 8px; quotes: none;
}
.auth-brand__quote cite { font-size: 11px; color: rgba(255,255,255,0.4); font-style: normal; letter-spacing: 1.5px; text-transform: uppercase; }

/* =============================================================
   RIGHT — FORM PANEL
   ============================================================= */
.auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
  background: var(--off-white, #f5f2ee);
  overflow-y: auto;
}
.auth-form-inner { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 0; }

.auth-mobile-logo {
  display: none; align-items: center; gap: 10px;
  margin-bottom: 28px; text-decoration: none;
}
.auth-mobile-logo img { height: 38px; width: auto; object-fit: contain; }
.auth-mobile-logo span {
  font-family: var(--font-display, 'Playfair Display', serif); font-size: 18px;
  font-weight: 700; color: var(--green-dark, #0a1f0e);
}

.auth-form-header { margin-bottom: 28px; }
.auth-form-header h1 {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(28px, 4vw, 36px); font-weight: 400;
  color: var(--green-dark, #0a1f0e); letter-spacing: -.3px; margin-bottom: 8px;
}
.auth-form-header p { font-size: 14px; color: #777; font-family: var(--font-body, 'Jost', sans-serif); }
.auth-form-header a { color: var(--green-accent, #2d7a3a); font-weight: 500; }
.auth-form-header a:hover { color: #c9a84c; }
.auth-track-guest { margin-top: 6px; }
.auth-form-header .auth-track-guest__link { color: var(--gold, #c9a84c); font-weight: 600; }
.auth-form-header .auth-track-guest__link:hover { color: var(--green-accent, #2d7a3a); }

/* =============================================================
   SIGNUP STEPS INDICATOR
   ============================================================= */
.signup-steps { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.signup-step { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.signup-step__num {
  width: 27px; height: 27px; border-radius: 50%;
  border: 2px solid rgba(10,31,14,0.18);
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 600; color: #999;
  transition: background .3s, border-color .3s, color .3s;
  font-family: var(--font-body, 'Jost', sans-serif);
}
.signup-step span { font-size: 11px; font-weight: 400; color: #999; transition: color .3s; font-family: var(--font-body, 'Jost', sans-serif); letter-spacing: .3px; }
.signup-step.active .signup-step__num { background: var(--green-dark, #0a1f0e); border-color: var(--green-dark, #0a1f0e); color: #fff; }
.signup-step.active span { color: var(--green-dark, #0a1f0e); }
.signup-step.done .signup-step__num { background: var(--green-accent, #2d7a3a); border-color: var(--green-accent, #2d7a3a); color: #fff; }
.signup-step__line { flex: 1; height: 2px; background: rgba(10,31,14,0.1); margin: 0 8px; transition: background .3s; }
.signup-step__line.done { background: var(--green-accent, #2d7a3a); }

/* =============================================================
   FORM FIELDS
   ============================================================= */
.auth-form { display: flex; flex-direction: column; gap: 0; }

.signup-panel { display: none; flex-direction: column; gap: 0; }
.signup-panel.active { display: flex; }
.signup-panel--success { align-items: center; text-align: center; padding: 16px 0; }
.signup-panel--success .success-icon { font-size: 58px; margin-bottom: 16px; animation: successPop .5s ease both; }
@keyframes successPop { from{transform:scale(0.5);opacity:0} to{transform:scale(1);opacity:1} }
.signup-panel--success h2 {
  font-family: var(--font-display, 'Playfair Display', serif); font-size: 30px; font-weight: 400;
  color: var(--green-dark, #0a1f0e); margin-bottom: 12px;
}
.signup-panel--success p { font-size: 14px; color: #777; line-height: 1.75; margin-bottom: 8px; font-family: var(--font-body, 'Jost', sans-serif); }
.signup-panel--success .success-sub { font-size: 13px; }

.af-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.af-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.af-group label {
  font-size: 11px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  color: var(--green-dark, #0a1f0e); font-family: var(--font-body, 'Jost', sans-serif);
}
.req { color: #c9a84c; }

.af-label-row { display: flex; align-items: center; justify-content: space-between; }
.af-forgot { font-size: 12px; color: var(--green-accent, #2d7a3a); font-weight: 500; }
.af-forgot:hover { color: #c9a84c; }

.af-input-wrap { position: relative; }
.af-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); fill: #999; pointer-events: none; z-index: 1; }
.af-input-wrap input {
  width: 100%;
  background: #fff;
  border: 1.5px solid rgba(10,31,14,0.12);
  border-radius: 2px;
  padding: 13px 16px 13px 42px;
  font-family: var(--font-body, 'Jost', sans-serif); font-size: 14px; color: var(--green-dark, #0a1f0e);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.af-input-wrap input:focus {
  border-color: var(--green-accent, #2d7a3a);
  box-shadow: 0 0 0 3px rgba(45,122,58,0.1);
}
.af-input-wrap input.error { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,0.08); }
.af-input-wrap input.success { border-color: #22c55e; }
.af-input-wrap input::placeholder { color: rgba(10,31,14,0.32); }
.af-input-wrap input[data-no-icon] { padding-left: 16px; }

.af-eye {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: #999; display: flex; align-items: center; transition: color .2s;
}
.af-eye:hover { color: var(--green-accent, #2d7a3a); }
.af-eye svg { fill: currentColor; }
.af-input-wrap input[type="password"] { padding-right: 44px; }

.af-hint { font-size: 11.5px; color: #999; font-family: var(--font-body, 'Jost', sans-serif); }

.af-remember {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--green-dark, #0a1f0e);
  cursor: pointer; margin-bottom: 20px; margin-top: 4px; line-height: 1.5;
  font-family: var(--font-body, 'Jost', sans-serif);
}
.af-remember input[type="checkbox"] { display: none; }
.af-checkbox {
  width: 17px; height: 17px; border-radius: 3px; flex-shrink: 0;
  border: 1.5px solid rgba(10,31,14,0.2); background: #fff;
  display: flex; align-items: center; justify-content: center; margin-top: 1px;
  transition: background .2s, border-color .2s;
}
.af-remember:has(input:checked) .af-checkbox { background: var(--green-accent, #2d7a3a); border-color: var(--green-accent, #2d7a3a); }
.af-checkbox::after {
  content: ''; width: 8px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .15s;
}
.af-remember:has(input:checked) .af-checkbox::after { transform: rotate(-45deg) scale(1); }
.af-remember a { color: var(--green-accent, #2d7a3a); font-weight: 500; }

.af-notice {
  font-size: 13px; border-radius: 2px; font-family: var(--font-body, 'Jost', sans-serif);
  max-height: 0; overflow: hidden; opacity: 0; padding: 0;
  transition: max-height .35s ease, padding .3s, opacity .3s; margin-bottom: 0;
}
.af-notice.visible { max-height: 80px; padding: 12px 16px; opacity: 1; margin-bottom: 16px; }
.af-notice.error { background: rgba(192,57,43,0.07); color: #c0392b; }
.af-notice.success { background: rgba(34,197,94,0.08); color: #16a34a; }

.af-submit {
  width: 100%; padding: 15px 24px;
  background: var(--green-dark, #0a1f0e); color: #fff;
  border: none; border-radius: 2px;
  font-family: var(--font-body, 'Jost', sans-serif); font-size: 11px; font-weight: 500;
  letter-spacing: 2.5px; text-transform: uppercase;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 10px;
  transition: background .25s, transform .2s, box-shadow .2s;
  margin-bottom: 20px;
}
.af-submit:hover { background: var(--green-accent, #2d7a3a); transform: translateY(-1px); }
.af-submit:disabled { opacity: .7; cursor: not-allowed; transform: none; }
.af-submit--flex { flex: 1; margin-bottom: 0; }
.af-submit__text { display: flex; align-items: center; gap: 10px; }
.af-submit__loader {
  display: none; width: 17px; height: 17px;
  border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: afSpin .7s linear infinite;
}
.af-submit.loading .af-submit__text { display: none; }
.af-submit.loading .af-submit__loader { display: block; }
@keyframes afSpin { to { transform: rotate(360deg); } }

.af-btn-row { display: flex; gap: 12px; align-items: center; }
.af-back {
  padding: 14px 22px; border-radius: 2px;
  font-family: var(--font-body, 'Jost', sans-serif); font-size: 11px; font-weight: 500;
  letter-spacing: 2px; text-transform: uppercase;
  color: #777; background: #fff;
  border: 1.5px solid rgba(10,31,14,0.14); cursor: pointer;
  transition: border-color .2s, color .2s; flex-shrink: 0;
}
.af-back:hover { border-color: var(--green-accent, #2d7a3a); color: var(--green-accent, #2d7a3a); }

.af-divider { display: flex; align-items: center; gap: 14px; font-size: 11px; color: #999; margin: 4px 0 16px; letter-spacing: 1px; text-transform: uppercase; font-family: var(--font-body, 'Jost', sans-serif); }
.af-divider::before, .af-divider::after { content: ''; flex: 1; height: 1px; background: rgba(10,31,14,0.1); }

.af-alt-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.af-alt-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 20px; border-radius: 2px;
  font-family: var(--font-body, 'Jost', sans-serif); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  border: 1.5px solid rgba(10,31,14,0.14); color: var(--green-dark, #0a1f0e); background: #fff;
}
.af-alt-btn svg { fill: currentColor; flex-shrink: 0; }
.af-alt-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(10,31,14,0.1); }
.af-alt-btn--wa { color: #25d366; border-color: rgba(37,211,102,0.3); }
.af-alt-btn--wa:hover { background: rgba(37,211,102,0.06); }

/* =============================================================
   PASSWORD STRENGTH
   ============================================================= */
.pw-strength { margin-top: 10px; }
.pw-strength__bars { display: flex; gap: 5px; margin-bottom: 6px; }
.pw-bar { flex: 1; height: 4px; border-radius: 2px; background: rgba(10,31,14,0.08); transition: background .3s; }
.pw-bar.weak { background: #c0392b; }
.pw-bar.fair { background: #d4a017; }
.pw-bar.good { background: #22c55e; }
.pw-bar.strong { background: var(--green-accent, #2d7a3a); }
.pw-strength__label { font-size: 11px; color: #999; font-family: var(--font-body, 'Jost', sans-serif); }

.pw-rules { display: flex; flex-direction: column; gap: 7px; margin: 12px 0 18px; padding: 0; }
.pw-rules li {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(10,31,14,0.4); list-style: none; transition: color .3s;
  font-family: var(--font-body, 'Jost', sans-serif);
}
.pw-rules li svg { fill: rgba(10,31,14,0.25); transition: fill .3s; flex-shrink: 0; }
.pw-rules li.met { color: #16a34a; }
.pw-rules li.met svg { fill: #16a34a; }

/* =============================================================
   FOOTER NOTES
   ============================================================= */
.auth-footer-note { font-size: 11.5px; color: #999; text-align: center; line-height: 1.7; margin-bottom: 16px; font-family: var(--font-body, 'Jost', sans-serif); }
.auth-footer-note a { color: var(--green-accent, #2d7a3a); font-weight: 500; }

.auth-back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase;
  color: #999; text-decoration: none; transition: color .2s; justify-content: center;
  font-family: var(--font-body, 'Jost', sans-serif);
}
.auth-back-link:hover { color: var(--green-accent, #2d7a3a); }

/* =============================================================
   FORGOT PASSWORD — step confirmation UI
   ============================================================= */
.fp-steps-done { display: flex; align-items: center; justify-content: center; gap: 0; margin: 28px 0 0; }
.fp-step-done { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fp-step-num {
  width: 33px; height: 33px; border-radius: 50%;
  background: var(--green-accent, #2d7a3a); color: #fff;
  font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-body, 'Jost', sans-serif);
}
.fp-step-num--muted { background: rgba(10,31,14,0.1); color: #999; }
.fp-step-done span { font-size: 11.5px; color: var(--green-dark, #0a1f0e); font-weight: 400; white-space: nowrap; font-family: var(--font-body, 'Jost', sans-serif); }
.fp-step-done--muted span { color: #999; }
.fp-step-line { flex: 1; height: 2px; min-width: 32px; max-width: 56px; background: rgba(10,31,14,0.1); margin-bottom: 20px; }

/* =============================================================
   RESPONSIVE
   ============================================================= */
@media (max-width: 1024px) {
  .auth-brand { padding: 48px 40px; }
  .auth-form-panel { padding: 40px 32px; }
}
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: flex; }
  .auth-form-panel { padding: 40px 24px; min-height: 100vh; align-items: flex-start; padding-top: 40px; }
  .auth-form-inner { max-width: 100%; }
}
@media (max-width: 480px) {
  .auth-form-panel { padding: 32px 20px; }
  .af-row { grid-template-columns: 1fr; }
  .auth-form-header h1 { font-size: 27px; }
  .signup-step span { display: none; }
  .signup-step__num { width: 30px; height: 30px; font-size: 12px; }
}
@media (max-width: 380px) {
  .auth-form-panel { padding: 24px 16px; }
  .af-submit { font-size: 10.5px; padding: 14px 20px; }
}