/* ==========================================================================
   REFERRAL & REWARDS PORTAL - LIGHT ELEGANT THEME (UI/UX PRO MAX)
   Clean White, Emerald Green Accent & Crisp Modern Typography
   ========================================================================== */

:root {
  /* Color Tokens - Light Theme */
  --ref-bg-light: #f8fafc;
  --ref-bg-card: #ffffff;
  --ref-border-color: #e2e8f0;
  --ref-border-hover: #10b981;
  
  --ref-emerald-primary: #10b981;
  --ref-emerald-hover: #059669;
  --ref-emerald-glow: rgba(16, 185, 129, 0.2);
  --ref-emerald-soft: rgba(16, 185, 129, 0.08);
  
  --ref-text-heading: #0f172a;
  --ref-text-body: #475569;
  --ref-text-muted: #64748b;
  --ref-text-label: #334155;

  /* Elevation & Soft Shadows */
  --ref-shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
  --ref-shadow-input: 0 1px 2px rgba(15, 23, 42, 0.04);
  --ref-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 1. Main Background Container */
.bg-gradient-auth {
  background: linear-gradient(135deg, rgba(241, 245, 249, 0.62) 0%, rgba(248, 250, 252, 0.68) 50%, rgba(226, 232, 240, 0.72) 100%),
              url('../images/referral_portal_bg.png') center/cover no-repeat !important;
  position: relative;
  overflow: hidden;
}

/* Subtle background accent glow */
.bg-gradient-auth::before {
  content: '';
  position: absolute;
  top: -15%;
  left: -10%;
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.bg-gradient-auth::after {
  content: '';
  position: absolute;
  bottom: -15%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

/* 2. Container & Card Styling */
#authSection .container-lg {
  position: relative;
  z-index: 2;
}

#authSection .row.g-0.rounded-4 {
  background: var(--ref-bg-card);
  border: 1px solid var(--ref-border-color);
  box-shadow: var(--ref-shadow-card);
  transition: var(--ref-transition);
}

#authSection .row.g-0.rounded-4:hover {
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.12);
}

/* Logo Header */
#authSection .header-logo-img {
  max-height: 48px;
  width: auto;
}

/* 3. Left Promo Banner */
#authSection .col-md-5 {
  border-right: 1px solid var(--ref-border-color);
  background-color: #f1f5f9;
}

#authSection .col-md-5 img {
  opacity: 1 !important;
  object-fit: cover;
  transition: transform 0.6s ease;
}

#authSection .col-md-5:hover img {
  transform: scale(1.03);
}

/* 4. Form Styling & Typography */
#authSection h3 {
  color: var(--ref-text-heading);
  letter-spacing: -0.02em;
  font-weight: 700;
}

#authSection p.text-muted,
#authSection .text-muted {
  color: var(--ref-text-body) !important;
}

.tracking-wider {
  letter-spacing: 0.06em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ref-text-label) !important;
}

/* Input Fields & Groups */
#authSection .input-group {
  border-radius: 0.6rem;
  overflow: hidden;
  transition: var(--ref-transition);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  box-shadow: var(--ref-shadow-input);
}

#authSection .input-group:focus-within {
  border-color: var(--ref-emerald-primary);
  box-shadow: 0 0 0 4px var(--ref-emerald-soft), 0 2px 8px rgba(16, 185, 129, 0.15);
}

#authSection .input-group-text {
  background-color: #f8fafc !important;
  border: none !important;
  border-right: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  padding-left: 1rem;
  padding-right: 1rem;
  transition: var(--ref-transition);
}

#authSection .input-group:focus-within .input-group-text {
  color: var(--ref-emerald-primary) !important;
  background-color: #f0fdf4 !important;
  border-right-color: #bbf7d0 !important;
}

#authSection .form-control {
  background-color: #ffffff !important;
  border: none !important;
  color: #0f172a !important;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

#authSection .form-control::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

#authSection .form-control:focus {
  background-color: #ffffff !important;
  box-shadow: none !important;
  color: #0f172a !important;
}

#authSection .toggle-password-btn {
  background-color: transparent !important;
  border: none !important;
  color: #94a3b8 !important;
  padding-left: 0.75rem;
  padding-right: 1rem;
  transition: var(--ref-transition);
}

#authSection .toggle-password-btn:hover,
#authSection .toggle-password-btn:focus {
  color: var(--ref-emerald-primary) !important;
  box-shadow: none !important;
}

/* Checkbox */
.form-check-input {
  background-color: #ffffff;
  border-color: #cbd5e1;
  cursor: pointer;
}

.form-check-input:checked {
  background-color: var(--ref-emerald-primary);
  border-color: var(--ref-emerald-primary);
  box-shadow: 0 0 6px var(--ref-emerald-glow);
}

.form-check-label {
  color: var(--ref-text-body);
  cursor: pointer;
}

/* Primary Button Styling */
#authSection .btn-success,
#otpModal .btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.28) !important;
  transition: var(--ref-transition);
}

#authSection .btn-success:hover,
#otpModal .btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-1px);
}

#authSection .btn-success:active,
#otpModal .btn-success:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25) !important;
}

/* Links */
#authSection a.text-success {
  color: #059669 !important;
  font-weight: 600;
  transition: var(--ref-transition);
}

#authSection a.text-success:hover {
  color: #047857 !important;
  text-decoration: underline !important;
}

/* 5. OTP Modal (Light Style) */
#otpModal {
  background-color: rgba(15, 23, 42, 0.4) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#otpModal .bg-dark {
  background-color: #ffffff !important;
  border-color: var(--ref-border-color) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  color: var(--ref-text-heading) !important;
}

#otpModal h3 {
  color: #0f172a !important;
}

#otpModal .btn-close-white {
  filter: invert(1) grayscale(100%) brightness(0.2);
}

.otp-box {
  width: 50px;
  height: 58px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 0.6rem;
  transition: var(--ref-transition);
  outline: none;
}

.otp-box:focus {
  border-color: var(--ref-emerald-primary);
  box-shadow: 0 0 0 4px var(--ref-emerald-soft), 0 2px 10px rgba(16, 185, 129, 0.2);
  background: #ffffff;
  transform: scale(1.04);
}

/* 6. Trust Badges & Footer */
.badge-icon-box {
  background-color: rgba(99, 102, 241, 0.08) !important;
  color: #6366f1 !important;
}

.badge-icon-box .text-indigo {
  color: #6366f1 !important;
}

.badge-icon-box .text-success {
  color: #10b981 !important;
}

#authSection .col-6 .rounded-4 {
  border-color: rgba(226, 232, 240, 0.8) !important;
  transition: var(--ref-transition);
}

#authSection .col-6 .rounded-4:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
}

.logo-img{
    max-width: 285px;
}

/* 7. Toast Notification Container & Cards */
#toastContainer {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1090;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 380px;
  width: calc(100% - 48px);
  pointer-events: none;
}

#toastContainer > div {
  pointer-events: auto;
  background: #ffffff !important;
  color: #0f172a !important;
  border-radius: 0.75rem !important;
  border: 1px solid var(--ref-border-color) !important;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0.9rem 1.1rem !important;
  animation: slideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

#toastContainer .border-success {
  border-left: 4px solid var(--ref-emerald-primary) !important;
}

#toastContainer .border-danger {
  border-left: 4px solid #ef4444 !important;
}

#toastContainer .border-secondary,
#toastContainer .border-info {
  border-left: 4px solid #3b82f6 !important;
}

#toastContainer .text-light {
  color: #475569 !important;
}

#toastContainer h6 {
  color: #0f172a !important;
  letter-spacing: 0.03em;
}

#toastContainer .btn-close-white {
  filter: invert(1) opacity(0.5);
  transition: opacity 0.2s ease;
}

#toastContainer .btn-close-white:hover {
  filter: invert(1) opacity(0.9);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
/* Mobile Responsiveness */
@media (max-width: 767.98px) {
  #authSection .col-md-5 {
    display: none !important;
  }
  
  .otp-box {
    width: 42px;
    height: 50px;
    font-size: 1.25rem;
  }
}
