/* =============================================================
   ANITA'S HOME KITCHEN — auth.css
   Login & Signup pages
   ============================================================= */

/* Full-page layout — no navbar needed */
.auth-page {
  margin: 0; padding: 0;
  background: var(--clr-cream);
  min-height: 100vh;
}

/* =============================================================
   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, #0e2318 0%, var(--clr-dark-green) 55%, #2a5040 100%);
  padding: 56px 52px;
  display: flex; align-items: center;
  overflow: hidden;
}

/* Kente stripe top */
.auth-kente {
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg,
    var(--clr-accent) 0%, #e8a020 25%,
    var(--clr-mid-green) 50%, #e8a020 75%,
    var(--clr-accent) 100%);
}

/* Decorative rings */
.auth-ring {
  position: absolute; border-radius: 50%;
  pointer-events: none;
  animation: authRing 5s ease-in-out infinite;
}
.auth-ring--1 { width: 420px; height: 420px; bottom: -120px; right: -120px; border: 1.5px solid rgba(200,80,42,0.12); 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%;
}

/* Logo */
.auth-brand__logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.auth-brand__logo img {
  height: 52px; width: auto; object-fit: contain;
}
.auth-brand__logo img.broken { display: none; }
.auth-brand__logo-fallback {
  font-family: var(--ff-display); font-size: 20px; font-weight: 700;
  color: var(--clr-white); line-height: 1.2;
  display: none;
}
.auth-brand__logo img.broken + .auth-brand__logo-fallback { display: block; }

/* Brand text */
.auth-brand__text h2 {
  font-family: var(--ff-display);
  font-size: clamp(28px, 3vw, 42px); font-weight: 700;
  color: var(--clr-white); line-height: 1.15;
  letter-spacing: -.5px; margin-bottom: 12px;
}
.auth-brand__text p {
  font-size: 15px; font-weight: 300;
  color: rgba(255,255,255,0.65); line-height: 1.75;
}

/* Feature list */
.auth-brand__features {
  display: flex; flex-direction: column; gap: 18px;
}
.auth-feature {
  display: flex; align-items: flex-start; gap: 14px;
}
.auth-feature__icon {
  font-size: 22px; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
}
.auth-feature strong { display: block; font-size: 14px; font-weight: 600; color: var(--clr-white); margin-bottom: 2px; }
.auth-feature span { font-size: 12.5px; color: rgba(255,255,255,0.5); line-height: 1.45; }

/* Quote */
.auth-brand__quote {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px; padding: 20px 22px;
  border-left: 3px solid var(--clr-accent);
}
.auth-brand__quote p {
  font-family: var(--ff-display); font-style: italic;
  font-size: 16px; color: rgba(255,255,255,0.8);
  line-height: 1.6; margin-bottom: 8px; quotes: none;
}
.auth-brand__quote cite { font-size: 12px; color: rgba(255,255,255,0.4); font-style: normal; letter-spacing: 1px; }

/* =============================================================
   RIGHT — FORM PANEL
   ============================================================= */
.auth-form-panel {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 40px;
  background: var(--clr-cream);
  overflow-y: auto;
}
.auth-form-inner {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: 0;
}

/* Mobile logo — hidden on desktop */
.auth-mobile-logo {
  display: none; align-items: center; gap: 10px;
  margin-bottom: 28px; text-decoration: none;
}
.auth-mobile-logo img { height: 40px; width: auto; object-fit: contain; }
.auth-mobile-logo span {
  font-family: var(--ff-display); font-size: 18px;
  font-weight: 700; color: var(--clr-text);
}

/* Form header */
.auth-form-header { margin-bottom: 28px; }
.auth-form-header h1 {
  font-family: var(--ff-display);
  font-size: clamp(28px, 4vw, 38px); font-weight: 700;
  color: var(--clr-text); letter-spacing: -.5px; margin-bottom: 8px;
}
.auth-form-header p { font-size: 14.5px; color: var(--clr-muted); }
.auth-form-header a { color: var(--clr-mid-green); font-weight: 600; }
.auth-form-header a:hover { color: var(--clr-accent); }

/* =============================================================
   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: 28px; height: 28px; border-radius: 50%;
  border: 2px solid rgba(27,61,47,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--clr-muted);
  transition: background .3s, border-color .3s, color .3s;
}
.signup-step span { font-size: 12px; font-weight: 500; color: var(--clr-muted); transition: color .3s; }
.signup-step.active .signup-step__num { background: var(--clr-dark-green); border-color: var(--clr-dark-green); color: white; }
.signup-step.active span { color: var(--clr-text); }
.signup-step.done .signup-step__num { background: var(--clr-mid-green); border-color: var(--clr-mid-green); color: white; }
.signup-step__line { flex: 1; height: 2px; background: rgba(27,61,47,0.12); margin: 0 8px; transition: background .3s; }
.signup-step__line.done { background: var(--clr-mid-green); }

/* =============================================================
   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: 64px; margin-bottom: 16px; animation: successPop .5s var(--ease) both; }
@keyframes successPop { from{transform:scale(0.5);opacity:0} to{transform:scale(1);opacity:1} }
.signup-panel--success h2 { font-family: var(--ff-display); font-size: 32px; font-weight: 700; color: var(--clr-text); margin-bottom: 12px; }
.signup-panel--success p { font-size: 15px; color: var(--clr-muted); line-height: 1.75; margin-bottom: 8px; }
.signup-panel--success .success-sub { font-size: 13.5px; }

.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: 12px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--clr-text); }
.req { color: var(--clr-accent); }

.af-label-row { display: flex; align-items: center; justify-content: space-between; }
.af-forgot { font-size: 12.5px; color: var(--clr-mid-green); font-weight: 600; }
.af-forgot:hover { color: var(--clr-accent); }

.af-input-wrap {
  position: relative;
}
.af-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  fill: var(--clr-muted); pointer-events: none; z-index: 1;
}
.af-input-wrap input {
  width: 100%;
  background: var(--clr-white);
  border: 1.5px solid rgba(27,61,47,0.12);
  border-radius: 12px;
  padding: 13px 16px 13px 42px;
  font-family: var(--ff-body); font-size: 14px; color: var(--clr-text);
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.af-input-wrap input:not([type="password"]):not([type="tel"]):not([type="date"]):not([type="number"]) {
  /* email and text fields with icon */
}
.af-input-wrap input:focus {
  border-color: var(--clr-mid-green);
  box-shadow: 0 0 0 3px rgba(38,92,64,0.1);
}
.af-input-wrap input.error { border-color: var(--clr-accent); box-shadow: 0 0 0 3px rgba(200,80,42,0.1); }
.af-input-wrap input.success { border-color: #22c55e; }
.af-input-wrap input::placeholder { color: rgba(107,112,104,0.45); }

/* No-icon fields */
.af-input-wrap input[data-no-icon] { padding-left: 16px; }

/* Eye toggle */
.af-eye {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--clr-muted); display: flex; align-items: center;
  transition: color .2s;
}
.af-eye:hover { color: var(--clr-mid-green); }
.af-eye svg { fill: currentColor; }
.af-input-wrap input[type="password"] { padding-right: 44px; }

.af-hint { font-size: 12px; color: var(--clr-muted); }

/* Remember / checkbox label */
.af-remember {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13.5px; color: var(--clr-text);
  cursor: pointer; margin-bottom: 20px; margin-top: 4px;
  line-height: 1.5;
}
.af-remember input[type="checkbox"] { display: none; }
.af-checkbox {
  width: 18px; height: 18px; border-radius: 5px; flex-shrink: 0;
  border: 1.5px solid rgba(27,61,47,0.2); background: var(--clr-white);
  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(--clr-mid-green); border-color: var(--clr-mid-green); }
.af-checkbox::after {
  content: ''; width: 9px; height: 5px;
  border-left: 2px solid white; border-bottom: 2px solid white;
  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(--clr-mid-green); font-weight: 600; }

/* Notice */
.af-notice {
  font-size: 13.5px; border-radius: 10px;
  max-height: 0; overflow: hidden; opacity: 0; padding: 0;
  transition: max-height .35s var(--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(200,80,42,0.08); color: var(--clr-accent); }
.af-notice.success { background: rgba(34,197,94,0.08); color: #16a34a; }

/* Submit */
.af-submit {
  width: 100%; padding: 15px 24px;
  background: var(--clr-accent); color: var(--clr-white);
  border: none; border-radius: var(--radius-pill);
  font-family: var(--ff-body); font-size: 15px; font-weight: 600;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; gap: 10px;
  transition: background .25s, transform .2s, box-shadow .2s;
  box-shadow: 0 6px 22px rgba(200,80,42,0.32);
  margin-bottom: 20px;
}
.af-submit:hover { background: var(--clr-accent-warm); transform: translateY(-2px); box-shadow: 0 10px 28px rgba(200,80,42,0.42); }
.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: 18px; height: 18px;
  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); } }

/* Back button */
.af-btn-row { display: flex; gap: 12px; align-items: center; }
.af-back {
  padding: 14px 24px; border-radius: var(--radius-pill);
  font-family: var(--ff-body); font-size: 14px; font-weight: 600;
  color: var(--clr-muted); background: var(--clr-white);
  border: 1.5px solid rgba(27,61,47,0.15); cursor: pointer;
  transition: border-color .2s, color .2s;
  flex-shrink: 0;
}
.af-back:hover { border-color: var(--clr-mid-green); color: var(--clr-mid-green); }

/* Divider */
.af-divider {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; color: var(--clr-muted);
  margin: 4px 0 16px;
}
.af-divider::before, .af-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(27,61,47,0.12);
}

/* Alt actions (WhatsApp) */
.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: var(--radius-pill);
  font-family: var(--ff-body); font-size: 14px; font-weight: 600;
  text-decoration: none; transition: transform .2s, box-shadow .2s;
  border: 1.5px solid rgba(27,61,47,0.15); color: var(--clr-text);
  background: var(--clr-white);
}
.af-alt-btn svg { fill: currentColor; flex-shrink: 0; }
.af-alt-btn:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(27,61,47,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(27,61,47,0.1);
  transition: background .3s;
}
.pw-bar.weak { background: #ef4444; }
.pw-bar.fair { background: #f59e0b; }
.pw-bar.good { background: #22c55e; }
.pw-bar.strong { background: var(--clr-mid-green); }
.pw-strength__label { font-size: 11.5px; color: var(--clr-muted); }

.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: 12.5px; color: rgba(107,112,104,0.6);
  list-style: none; transition: color .3s;
}
.pw-rules li svg { fill: rgba(107,112,104,0.3); 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: 12px; color: var(--clr-muted);
  text-align: center; line-height: 1.65;
  margin-bottom: 16px;
}
.auth-footer-note a { color: var(--clr-mid-green); font-weight: 600; }

.auth-back-link {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--clr-muted);
  text-decoration: none; transition: color .2s;
  justify-content: center;
}
.auth-back-link:hover { color: var(--clr-mid-green); }

/* =============================================================
   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: 28px; }
  .signup-step span { display: none; }
  .signup-step__num { width: 32px; height: 32px; font-size: 13px; }
}

@media (max-width: 380px) {
  .auth-form-panel { padding: 24px 16px; }
  .af-submit { font-size: 14px; padding: 14px 20px; }
}

/* =============================================================
   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: 34px; height: 34px; border-radius: 50%;
  background: var(--clr-mid-green); color: white;
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.fp-step-num--muted { background: rgba(27,61,47,0.12); color: var(--clr-muted); }
.fp-step-done span { font-size: 12px; color: var(--clr-text); font-weight: 500; white-space: nowrap; }
.fp-step-done--muted span { color: var(--clr-muted); }
.fp-step-line {
  flex: 1; height: 2px; min-width: 32px; max-width: 56px;
  background: rgba(27,61,47,0.12); margin-bottom: 20px;
}
