/**
 * LoanBook — Auth Pages (Login, Register, Forgot Password)
 * Full-screen split layout: Dark brand panel + White form panel
 * Color: Indigo #4F46E5 (finance-grade trust)
 * Fonts: Outfit (headings) + DM Sans (body)
 *
 * @package LoanLedger
 * @since   2.5.1
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=DM+Sans:wght@400;500;700&display=swap');

/* ═══ RESET ═══ */
.lb-auth *, .lb-auth *::before, .lb-auth *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ═══ FULL-SCREEN LAYOUT ═══ */
.lb-auth {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0F0F23;
  overflow: hidden;
}

/* ═══ LEFT BRAND PANEL ═══ */
.lb-auth__brand {
  flex: 0 0 44%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
  background: #0F0F23;
}

.lb-auth__brand-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.02) 1px, transparent 1px);
  background-size: 50px 50px;
}

.lb-auth__brand-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(79,70,229,.15), transparent 70%);
  top: -100px;
  right: -100px;
  pointer-events: none;
}

.lb-auth__brand-glow2 {
  position: absolute;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(99,102,241,.08), transparent 70%);
  bottom: -80px;
  left: -60px;
  pointer-events: none;
}

.lb-auth__brand-content {
  position: relative;
  z-index: 2;
}

/* Logo */
.lb-auth__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
}

.lb-auth__logo-icon {
  width: 44px;
  height: 44px;
  background: #4F46E5;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.lb-auth__logo-text {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: #fff;
  letter-spacing: -.02em;
}

.lb-auth__logo-by {
  font-size: 12px;
  color: rgba(255,255,255,.4);
  margin-left: -4px;
  font-weight: 400;
}

/* Tagline */
.lb-auth__tagline {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(28px, 3.2vw, 38px);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.lb-auth__tagline span { color: #818CF8; }

/* Description */
.lb-auth__desc {
  font-size: 15px;
  color: rgba(255,255,255,.5);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 380px;
}

/* Feature list */
.lb-auth__features {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lb-auth__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
  font-weight: 500;
}

.lb-auth__feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(79,70,229,.12);
  border: 1px solid rgba(79,70,229,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #818CF8;
  flex-shrink: 0;
}

/* Steps (register page) */
.lb-auth__steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.lb-auth__step {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
}

.lb-auth__step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(79,70,229,.12);
  border: 1.5px solid rgba(79,70,229,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: #818CF8;
  flex-shrink: 0;
}

.lb-auth__step-text strong {
  color: #fff;
  display: block;
  font-size: 14px;
  margin-bottom: 1px;
}

.lb-auth__step-text span {
  font-size: 12px;
  color: rgba(255,255,255,.4);
}

/* ═══ RIGHT FORM PANEL ═══ */
.lb-auth__form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #fff;
  border-radius: 32px 0 0 32px;
  position: relative;
  overflow-y: auto;
}

.lb-auth__form-wrap {
  width: 100%;
  max-width: 420px;
}

/* Form header */
.lb-auth__form-header {
  margin-bottom: 28px;
}

.lb-auth__form-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: #EEF2FF;
  color: #4F46E5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.lb-auth__form-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  color: #0F0F23;
  margin-bottom: 6px;
}

.lb-auth__form-subtitle {
  font-size: 14px;
  color: #64748B;
}

/* Tabs */
.lb-auth__tabs {
  display: flex;
  background: #F1F5F9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}

.lb-auth__tab {
  flex: 1;
  padding: 11px 8px;
  border: none;
  background: transparent;
  color: #64748B;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 10px;
  transition: all .25s;
  outline: none;
}

.lb-auth__tab:hover { color: #334155; }

.lb-auth__tab.active {
  background: #fff;
  color: #4F46E5;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* Tab panels */
.ll-panel { display: none; }
.ll-panel.active { display: block; }

/* Alert messages */
.ll-alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 14px;
  display: none;
}

.ll-alert.error {
  display: block;
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.ll-alert.success {
  display: block;
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

/* Legacy alert for register form */
.loanledger-alert {
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 18px;
  font-size: 14px;
}

.loanledger-alert.error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid #FECACA;
}

.loanledger-alert.success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid #BBF7D0;
}

/* Form fields */
.lb-auth__field {
  margin-bottom: 18px;
}

.lb-auth__field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 600;
  color: #1E293B;
  font-size: 13px;
  letter-spacing: .01em;
}

.lb-auth__input-wrap {
  position: relative;
}

.lb-auth__input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
}

.lb-auth__input-wrap input {
  width: 100%;
  padding: 13px 14px 13px 42px;
  border: 1.5px solid #E2E8F0;
  border-radius: 12px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: #1E293B;
  transition: all .25s;
  background: #F8FAFC;
  outline: none;
}

.lb-auth__input-wrap input:focus {
  border-color: #4F46E5;
  box-shadow: 0 0 0 3px rgba(79,70,229,.1);
  background: #fff;
}

.lb-auth__input-wrap input::placeholder { color: #94A3B8; }

.lb-auth__input-wrap input.error {
  border-color: #EF4444;
  box-shadow: 0 0 0 3px rgba(239,68,68,.1);
}

.lb-auth__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #94A3B8;
}

/* Row (2 columns) */
.lb-auth__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Remember me / Forgot link row */
.lb-auth__field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.lb-auth__check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #475569;
  cursor: pointer;
  font-weight: 500;
}

.lb-auth__check input[type="checkbox"] {
  accent-color: #4F46E5;
  width: 16px;
  height: 16px;
}

.lb-auth__check a {
  color: #4F46E5;
  text-decoration: none;
  font-weight: 600;
}

.lb-auth__check a:hover { text-decoration: underline; }

.lb-auth__forgot-link {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: #4F46E5;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  padding: 0;
}

.lb-auth__forgot-link:hover { text-decoration: underline; }

.lb-auth__forgot-desc {
  margin: 0 0 18px;
  font-size: 14px;
  color: #64748B;
  line-height: 1.6;
}

.lb-auth__back-link {
  text-align: center;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #E2E8F0;
}

.lb-auth__back-link button {
  background: none;
  border: none;
  cursor: pointer;
  color: #4F46E5;
  font-weight: 600;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
}

/* Password strength */
.lb-auth__strength {
  height: 4px;
  background: #E2E8F0;
  border-radius: 4px;
  margin-top: 8px;
  overflow: hidden;
}

.password-strength-bar,
.ll-strength-bar {
  height: 100%;
  width: 0;
  border-radius: 4px;
  transition: width .3s, background .3s;
  background: #E2E8F0;
}

.password-strength-bar.weak { background: #EF4444; }
.password-strength-bar.medium { background: #F59E0B; }
.password-strength-bar.strong { background: #22C55E; }

/* Button */
.lb-auth__btn {
  width: 100%;
  padding: 14px;
  background: #4F46E5;
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all .3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
}

.lb-auth__btn:hover {
  background: #4338CA;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(79,70,229,.3);
}

.lb-auth__btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.lb-auth__btn:active { transform: translateY(0); }

/* Spinner inside button */
.ll-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lb-spin .6s linear infinite;
}

.spinner {
  animation: lb-spin .8s linear infinite;
}

.spinner .path {
  stroke-dasharray: 90;
  stroke-dashoffset: 0;
}

@keyframes lb-spin {
  to { transform: rotate(360deg); }
}

/* Footer */
.lb-auth__footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: #64748B;
}

.lb-auth__footer a {
  color: #4F46E5;
  font-weight: 600;
  text-decoration: none;
}

.lb-auth__footer a:hover { text-decoration: underline; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 900px) {
  .lb-auth {
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .lb-auth__brand {
    flex: 0 0 auto;
    padding: 32px 28px 24px;
  }

  .lb-auth__tagline {
    font-size: 22px;
    margin-bottom: 10px;
  }

  .lb-auth__desc { display: none; }

  .lb-auth__features,
  .lb-auth__steps {
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
  }

  .lb-auth__feature,
  .lb-auth__step {
    font-size: 12px;
    gap: 8px;
  }

  .lb-auth__feature-icon,
  .lb-auth__step-num {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .lb-auth__step-text span { display: none; }

  .lb-auth__form-panel {
    border-radius: 24px 24px 0 0;
    padding: 32px 24px;
    flex: 0 0 auto;
    overflow: visible;
  }
}

@media (max-width: 480px) {
  .lb-auth__brand {
    padding: 24px 20px 18px;
  }

  .lb-auth__logo { margin-bottom: 12px; }

  .lb-auth__tagline { font-size: 19px; }

  .lb-auth__features,
  .lb-auth__steps { display: none; }

  .lb-auth__form-panel { padding: 28px 20px; }

  .lb-auth__form-title { font-size: 22px; }

  .lb-auth__row { grid-template-columns: 1fr; }

  .lb-auth__form-wrap { padding-bottom: 40px; }
}

/* Auth pages: fixed position covers everything, no need to hide WP chrome */
