/* ================================================================
   VioBoost — Auth Pages (auth.css)
   Loaded on login, signup, verify, and all password-reset pages.
   Override auth-base.css body centering so we control layout here.
   ================================================================ */

*, *::before, *::after { box-sizing: border-box; }

/* ── Reset body from auth-base.css's flex-center ───────────── */
body {
  min-height: 100vh;
  display: block !important;
  background: #fff;
  margin: 0;
  padding: 0;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  overflow-x: hidden;
}

/* ── Design tokens ──────────────────────────────────────────── */
:root {
  --ag: #158413;
  --ag-dark: #0f6411;
  --ag-start: #0d6e0b;
  --ag-light: #f0fdf0;
  --ag-badge: #e3f1e2;
  --ink: #0f172a;
  --ink2: #374151;
  --muted: #6b7280;
  --border: #e5e7eb;
  --radius-md: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 4px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.07);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 20px 48px rgba(0,0,0,.10);
}

/* ================================================================
   SPLIT-SCREEN LAYOUT (login + signup)
   ================================================================ */

.auth-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ── Left: Green brand panel ──────────────────────────────── */
.auth-brand {
  background: linear-gradient(155deg, var(--ag-start) 0%, var(--ag) 55%, #1daa1a 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 48px;
  position: relative;
  overflow: hidden;
  color: #fff;
}

/* Decorative circles */
.auth-brand::before {
  content: '';
  position: absolute;
  width: 420px; height: 420px;
  background: rgba(255,255,255,.06);
  border-radius: 50%;
  top: -160px; right: -100px;
  pointer-events: none;
}
.auth-brand::after {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
  bottom: -100px; left: -60px;
  pointer-events: none;
}

.auth-brand-logo {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.auth-brand-logo img {
  height: 46px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.auth-brand-name {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  letter-spacing: -0.3px;
  line-height: 1;
}

.auth-brand-body {
  position: relative;
  z-index: 1;
}

.auth-brand-h {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2.6vw, 34px);
  line-height: 1.15;
  color: #fff;
  margin: 0 0 12px;
  letter-spacing: -.3px;
}

.auth-brand-sub {
  font-size: 14px;
  color: rgba(255,255,255,.78);
  line-height: 1.65;
  margin: 0 0 32px;
}

.auth-brand-feats {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-brand-feats li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  color: rgba(255,255,255,.90);
  line-height: 1.4;
}
.auth-feat-icon {
  width: 34px; height: 34px;
  background: rgba(255,255,255,.16);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #fff;
  flex-shrink: 0;
}

/* Platform icons row */
.auth-platforms {
  position: relative;
  z-index: 1;
  margin-top: 36px;
}
.auth-platforms-label {
  font-size: 10.5px;
  font-weight: 600;
  color: rgba(255,255,255,.50);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 0 0 10px;
}
.auth-platforms-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.auth-plat-icon {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.14);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: rgba(255,255,255,.85);
  transition: background .2s, color .2s;
  flex-shrink: 0;
}
.auth-plat-icon:hover {
  background: rgba(255,255,255,.24);
  color: #fff;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  color: rgba(255,255,255,.42);
}

/* ── Right: Form panel ──────────────────────────────────────── */
.auth-form-panel {
  background: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 56px 48px;
  overflow-y: auto;
}

.auth-form-wrap {
  width: 100%;
  max-width: 420px;
}

/* Card wrapper (used on login — gives 2-field form visual weight) */
.auth-form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 34px 30px;
  box-shadow: var(--shadow-sm);
}

/* Form heading */
.auth-form-hd {
  margin-bottom: 26px;
}
.auth-form-hd h2 {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--ink);
  margin: 0 0 5px;
  letter-spacing: -.2px;
}
.auth-form-hd p {
  font-size: 13.5px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}


/* ── Crispy form field overrides ────────────────────────────── */
.auth-fields .form-control {
  border-radius: var(--radius-md) !important;
  border: 1.5px solid var(--border) !important;
  padding: 11px 15px !important;
  font-size: 14px !important;
  font-family: "Poppins", sans-serif !important;
  color: var(--ink) !important;
  background: #fafafa !important;
  height: auto !important;
  transition: border-color .2s, box-shadow .2s, background .2s !important;
}
.auth-fields .form-control:focus {
  border-color: var(--ag) !important;
  box-shadow: 0 0 0 3px rgba(21,132,19,.09) !important;
  background: #fff !important;
  outline: none !important;
}
.auth-fields .form-control::placeholder {
  color: #9ca3af !important;
}
.auth-fields .form-group { margin-bottom: 14px !important; }
.auth-fields .errorlist {
  list-style: none;
  padding: 0; margin: 4px 0 0;
  font-size: 12px;
  color: #ef4444;
}
.auth-fields .invalid-feedback { font-size: 12px; color: #ef4444; }

/* Forgot password link */
.auth-forgot {
  text-align: right;
  margin-top: -6px;
  margin-bottom: 16px;
}
.auth-forgot a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color .2s;
}
.auth-forgot a:hover { color: var(--ag); }

/* Submit button */
.auth-submit {
  width: 100%;
  display: block;
  padding: 13px;
  background: var(--ag);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 600;
  font-family: "Poppins", sans-serif;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  margin-top: 6px;
  text-decoration: none;
  text-align: center;
}
.auth-submit:hover {
  background: var(--ag-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(21,132,19,.28);
  color: #fff;
}

/* Sign up / sign in switch link */
.auth-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--muted);
}
.auth-switch a {
  color: var(--ag);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.auth-switch a:hover { color: var(--ag-dark); text-decoration: underline; }

/* ================================================================
   CENTERED LAYOUT (OTP verify + all password reset pages)
   ================================================================ */

.auth-center-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(155deg, #f4fef4 0%, #edfaed 40%, #fff 100%);
  padding: 40px 24px;
}

.auth-center-logo {
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.auth-center-logo img { height: 44px; width: auto; object-fit: contain; }
.auth-center-wordmark {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--ag);
  letter-spacing: -0.5px;
  line-height: 1;
}

.auth-center-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 42px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-md);
}

.auth-center-icon {
  width: 52px; height: 52px;
  background: var(--ag-badge);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--ag);
  margin-bottom: 18px;
}
.auth-center-icon.centered { margin-left: auto; margin-right: auto; }

.auth-center-h {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
  margin: 0 0 8px;
  letter-spacing: -.2px;
}

.auth-center-p {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0 0 26px;
}

/* ── OTP inputs ─────────────────────────────────────────────── */
.auth-otp-row {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  justify-content: center;
}

/* .otp-input is the class auth-base.js targets — keep it */
.auth-otp-box {
  width: 48px; height: 56px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  font-family: "Poppins", sans-serif;
  color: var(--ink);
  background: #fafafa;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
  -moz-appearance: textfield;
}
.auth-otp-box:focus {
  border-color: var(--ag);
  box-shadow: 0 0 0 3px rgba(21,132,19,.09);
  background: #fff;
}
.auth-otp-box::-webkit-outer-spin-button,
.auth-otp-box::-webkit-inner-spin-button { -webkit-appearance: none; }

/* Resend link */
.auth-resend {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}
.auth-resend a {
  color: var(--ag);
  font-weight: 600;
  text-decoration: none;
  transition: color .2s;
}
.auth-resend a:hover { color: var(--ag-dark); text-decoration: underline; }

/* Inline alerts */
.auth-alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  margin-bottom: 16px;
}
.auth-alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #16a34a;
  margin-bottom: 16px;
}

/* Back link */
.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  margin-top: 18px;
  transition: color .2s;
}
.auth-back-link:hover { color: var(--ag); }

/* ================================================================
   RESPONSIVE
   ================================================================ */

@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
  }
  .auth-brand {
    display: none; /* collapse brand panel on mobile */
  }
  .auth-form-panel {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 48px 24px;
    justify-content: center;
  }
  .auth-form-wrap { max-width: 100%; }
}

@media (max-width: 480px) {
  .auth-center-card { padding: 32px 22px; }
  .auth-otp-box { width: 40px; height: 50px; font-size: 19px; }
  .auth-form-panel { padding: 40px 18px; }

}

@media (max-width: 375px) {
  .auth-form-panel { padding: 32px 14px; }
  .auth-otp-box { width: 36px; height: 46px; font-size: 17px; }
}
