/* ==========================================================================
   Login v2 — full-bleed split-screen theme
   Used ONLY by index.php (login) and forget.php (forgot password).
   Deliberately separate from auth-theme.css (shared by registration,
   payment, thank-you, 403/404 pages) so this redesign can't affect those.
   ========================================================================== */
:root {
  --lgx-primary: #4f46e5;
  --lgx-primary-dark: #3730a3;
  --lgx-primary-light: #818cf8;
  --lgx-ink: #14172b;
  --lgx-ink-soft: #6b7280;
  --lgx-ink-faint: #9ca3af;
  --lgx-border: #e5e7eb;
  --lgx-bg: #ffffff;
  --lgx-danger: #dc2626;
  --lgx-radius-lg: 20px;
  --lgx-radius: 12px;
  --lgx-radius-sm: 10px;
}

* { box-sizing: border-box; }

.lgx-body {
  margin: 0;
  min-height: 100vh;
  height: auto;
  display: block;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--lgx-ink);
  -webkit-font-smoothing: antialiased;
  background: var(--lgx-bg);
}

.lgx-shell {
  min-height: 100vh;
  display: flex;
}

/* ---------------------------------------------------------------
   LEFT — full-height brand/visual panel, edge to edge, no card
--------------------------------------------------------------- */
.lgx-side {
  flex: 1 1 46%;
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  background:
    radial-gradient(circle at 15% 15%, rgba(255,255,255,0.14), transparent 45%),
    radial-gradient(circle at 85% 85%, rgba(255,255,255,0.10), transparent 40%),
    linear-gradient(155deg, var(--lgx-primary) 0%, var(--lgx-primary-dark) 100%);
  overflow: hidden;
}
.lgx-side-top { position: relative; z-index: 2; }
.lgx-side-top img { height: 42px; filter: brightness(0) invert(1); opacity: 0.95; }

.lgx-side-banner {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  color: #fff;
  max-width: 460px;
}
.lgx-side-banner img.lgx-banner-img {
  width: 100%;
  border-radius: var(--lgx-radius);
  box-shadow: 0 24px 60px rgba(0,0,0,0.28);
  margin-bottom: 28px;
  object-fit: cover;
  max-height: 260px;
}
.lgx-side-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 24px;
}
.lgx-side-banner h2 {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 14px;
}
.lgx-side-banner p {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.82);
  margin: 0;
}

.lgx-side-foot {
  position: relative;
  z-index: 2;
  font-size: 12.5px;
  color: rgba(255,255,255,0.65);
}

/* decorative orbs */
.lgx-side::before,
.lgx-side::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  pointer-events: none;
}
.lgx-side::before { width: 380px; height: 380px; top: -140px; right: -140px; }
.lgx-side::after { width: 260px; height: 260px; bottom: -100px; left: -60px; }

/* ---------------------------------------------------------------
   RIGHT — form panel, full height, no visible card boundary
--------------------------------------------------------------- */
.lgx-main {
  flex: 1 1 54%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 40px clamp(24px, 6vw, 96px);
}

.lgx-main-top {
  display: flex;
  justify-content: flex-end;
}
.lgx-main-top img { height: 34px; opacity: 0.85; }

.lgx-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
}

.lgx-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--lgx-ink);
  margin: 0 0 8px;
}
.lgx-subtitle {
  font-size: 14px;
  color: var(--lgx-ink-soft);
  margin: 0 0 32px;
}

/* ---- Fields ---- */
.lgx-field { position: relative; margin-bottom: 18px; }
.lgx-field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--lgx-ink-soft);
  margin-bottom: 6px;
}
.lgx-field .bi {
  position: absolute;
  left: 15px;
  top: 41px;
  color: var(--lgx-ink-faint);
  font-size: 15px;
  pointer-events: none;
}
.lgx-field .bi-toggle { left: auto; right: 15px; pointer-events: auto; cursor: pointer; }
.lgx-field.lgx-field-noicon .bi { display: none; }
.lgx-field.lgx-field-noicon .form-control,
.lgx-field.lgx-field-noicon .form-select { padding-left: 14px; }

.lgx-body .form-control,
.lgx-body .form-select {
  border: 1.5px solid var(--lgx-border);
  border-radius: var(--lgx-radius-sm);
  height: 48px;
  padding-left: 42px;
  font-size: 14px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.lgx-body .form-control:focus,
.lgx-body .form-select:focus {
  border-color: var(--lgx-primary);
  box-shadow: 0 0 0 4px rgba(79,70,229,0.12);
}

.lgx-forgot { text-align: right; margin: -8px 0 22px; }
.lgx-forgot a, .lgx-link {
  color: var(--lgx-primary);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.lgx-forgot a:hover, .lgx-link:hover { text-decoration: underline; }

/* ---- Role picker — icon tiles, outlined not filled ---- */
.lgx-role-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--lgx-ink-soft);
  margin-bottom: 10px;
  display: block;
}
.lgx-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 26px;
}
.lgx-role-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid var(--lgx-border);
  border-radius: var(--lgx-radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lgx-ink);
  text-align: left;
  transition: border-color .15s ease, background .15s ease, transform .1s ease;
}
.lgx-role-btn .bi {
  font-size: 17px;
  color: var(--lgx-primary);
  flex-shrink: 0;
}
.lgx-role-btn:hover {
  border-color: var(--lgx-primary);
  background: #f5f4ff;
}
.lgx-role-btn:active { transform: scale(0.98); }

/* ---- Buttons ---- */
.lgx-btn-primary {
  width: 100%;
  background: var(--lgx-primary);
  color: #fff;
  border: none;
  border-radius: var(--lgx-radius-sm);
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 600;
  transition: filter .15s ease, box-shadow .15s ease, transform .1s ease;
}
.lgx-btn-primary:hover { filter: brightness(1.08); box-shadow: 0 10px 24px rgba(79,70,229,0.28); color: #fff; }
.lgx-btn-primary:active { transform: scale(0.99); }

.lgx-footnote {
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--lgx-ink-soft);
  text-align: center;
}
.lgx-footnote a { color: var(--lgx-primary); font-weight: 600; text-decoration: none; }
.lgx-footnote a:hover { text-decoration: underline; }

.lgx-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--lgx-primary);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 28px;
}
.lgx-back-link:hover { text-decoration: underline; }

/* ---------------------------------------------------------------
   REGISTRATION FORM VARIANT (long, multi-section, top-aligned,
   wider than the login/reset form)
--------------------------------------------------------------- */
.lgx-form-wrap-wide {
  flex: none;
  justify-content: flex-start;
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 0 40px;
}

.lgx-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lgx-primary);
  margin: 30px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--lgx-border);
}
.lgx-section-title:first-of-type { margin-top: 8px; }

.lgx-form-wrap-wide .lgx-field-label {
  text-transform: none;
  font-weight: 500;
}

.lgx-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--lgx-ink-soft);
  margin: 6px 0 4px;
}
.lgx-checkbox-row input { width: 16px; height: 16px; accent-color: var(--lgx-primary); }

.lgx-captcha-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lgx-captcha-row img {
  border: 1.5px solid var(--lgx-border);
  border-radius: var(--lgx-radius-sm);
  height: 44px;
}
.lgx-captcha-refresh {
  font-size: 22px;
  line-height: 1;
  color: var(--lgx-primary);
  text-decoration: none;
  font-weight: 700;
}
.lgx-captcha-row .form-control { padding-left: 14px; }

.lgx-btn-ghost {
  background: #fff;
  color: var(--lgx-ink-soft);
  border: 1.5px solid var(--lgx-border);
  border-radius: var(--lgx-radius-sm);
  padding: 14px 20px;
  font-size: 14.5px;
  font-weight: 600;
  transition: border-color .15s ease, color .15s ease;
}
.lgx-btn-ghost:hover { border-color: var(--lgx-danger); color: var(--lgx-danger); }

.lgx-btn-row { display: flex; gap: 12px; margin-top: 8px; }
.lgx-btn-row .lgx-btn-primary,
.lgx-btn-row .lgx-btn-ghost { width: auto; flex: 1; }

.lgx-alert {
  background: #fef2f2;
  color: #991b1b;
  border-radius: var(--lgx-radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  margin-bottom: 20px;
}

.lgx-body label.error {
  color: var(--lgx-danger);
  font-size: 12px;
  margin-top: 4px;
  display: block;
  font-weight: 500;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .lgx-shell { flex-direction: column; }
  .lgx-side { min-height: 260px; padding: 28px; }
  .lgx-side-banner { max-width: none; }
  .lgx-side-banner img.lgx-banner-img { max-height: 160px; }
  .lgx-side-banner h2 { font-size: 22px; }
  .lgx-side-foot { display: none; }
  .lgx-main { padding: 32px 24px; }
  .lgx-role-grid { grid-template-columns: 1fr; }
}
