/* ---------------------------------------------------------
   11. AUTHENTICATION PAGES - ENHANCED Login Page Styles
   --------------------------------------------------------- */

/* Main container with gradient background */
.login-main-block {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
}

/* Animated background particles effect */
.login-main-block::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: drift 20s linear infinite;
  pointer-events: none;
}

@keyframes drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Enhanced login card */
.login-block {
  background: rgb(255, 255, 255) !important;
  backdrop-filter: blur(20px);
  border-radius: 28px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 
              0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
  border: none !important;
  width: 100%;
  margin: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.login-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35), 
              0 0 0 1px rgba(255, 255, 255, 0.5) inset !important;
}

.login-block .row {
  margin: 0 !important;
}

.login-block .col-lg-6 {
  padding: 0 !important;
}

/* Content side with subtle gradient */
.auth-content-side {
  padding: 50px 45px !important;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  background: linear-gradient(to bottom, #e4e6e9  0%, #e4e6e9  100%) !important;
  position: relative;
  border-radius: 20px 20px 20px 20px !important;
}

/* Decorative corner element */
.auth-content-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
  border-radius: 0 0 100% 0;
}

/* Image side with overlay effect */
.auth-image-side {
  height: 100%;
  width: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  min-height: 520px;
  max-height: 820px;
  overflow: hidden;
  border-radius: 20px 20px 20px 20px !important;
  object-fit: cover !important;
}

.auth-image-side::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 100%);
  z-index: 1;
  border-radius: 28px;
}

.auth-image-side img {
  width: 100%;
  height: 100%;
  object-fit: cover !important;
  display: block;
  border-radius: 28px !important;
  position: relative;
  z-index: 0;
}

/* Enhanced typography */
.auth-title {
  font-family: "Google Sans", -apple-system, BlinkMacSystemFont, sans-serif !important;
  font-weight: 700 !important;
  font-size: 36px !important;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.auth-subtitle {
  font-size: 15px !important;
  color: #6c757d !important;
  margin-bottom: 30px;
  padding: 0;
  font-weight: 400;
}


/* Password eye icon - only if exists */
.login-block .eye {
  position: absolute;
  right: 15px;
  top: 60%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s ease;
}

.login-block .eye:hover {
  color: #667eea;
}

/* Enhanced links */
.auth-link {
  color: #667eea !important;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap !important;
  position: relative;
  transition: color 0.3s ease;
}

.auth-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: #667eea;
  transition: width 0.3s ease;
}

.auth-link:hover {
  color: #764ba2 !important;
}

.auth-link:hover::after {
  width: 100%;
}

/* Enhanced primary button */
.login-block .btn-primary {
  height: 52px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #ffffff;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-block .btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.5s ease;
}

.login-block .btn-primary:hover::before {
  left: 100%;
}

.login-block .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
  background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
}

.login-block .btn-primary:active {
  transform: translateY(0);
}

/* Social login section */
.social-login-options {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

.social-login-options p {
  font-size: 13px;
  color: #adb5bd;
  margin-bottom: 0;
}

.social-login-gap {
  gap: 12px;
  margin-top: 15px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

.social-icon-img {
  width: 44px;
  height: 44px;
  transition: all 0.3s ease;
  display: block;
  border-radius: 12px;
  padding: 8px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
}

.social-icon-img:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
  background: #ffffff;
  border-color: #667eea;
}

/* Alert styling */
.login-block .alert {
  border-radius: 12px;
  border: none;
  font-size: 14px;
}

.login-block .alert-danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
  color: #ffffff;
}

.login-block .alert-success {
  background: linear-gradient(135deg, #51cf66 0%, #37b24d 100%);
  color: #ffffff;
}

.login-block .alert ul {
  margin-bottom: 0;
}

/* reCAPTCHA container */
.login-block .g-recaptcha {
  display: flex;
  justify-content: center;
  margin: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .auth-content-side {
    padding: 35px 30px !important;
  }
  
  .auth-title {
    font-size: 30px !important;
  }
  
  .login-block {
    border-radius: 20px !important;
  }
  
  .auth-image-side,
  .auth-image-side::before,
  .auth-image-side img {
    border-radius: 20px !important;
  }
}

@media (max-width: 576px) {
  .login-main-block {
    padding: 15px;
  }
  
  .auth-content-side {
    padding: 25px 20px !important;
  }
  
  .auth-title {
    font-size: 26px !important;
  }
  
  .login-block .btn-primary {
    height: 48px;
    font-size: 15px;
  }
  
  .social-icon-img {
    width: 40px;
    height: 40px;
  }
  
  .auth-image-side,
  .auth-image-side::before,
  .auth-image-side img {
    border-radius: 20px !important;
  }
}

/* Required field asterisk */
.required {
  color: #ff1e1e;
  margin-left: 3px;
}

/* Additional utility classes */
.row-tight {
  display: flex;
  flex-wrap: wrap;
  margin-right: -5px !important;
  margin-left: -5px !important;
}

.col-half {
  flex: 0 0 50%;
  max-width: 50%;
  padding-right: 5px !important;
  padding-left: 5px !important;
}

/* Loading animation for form submission */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.login-block .btn-primary.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-left: -10px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.603);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}
/* ---------------------------------------------------------
   12. REGISTER PAGE - Layout Specifics
   (Note: Colors/Shadows inherited from Section 11)
   --------------------------------------------------------- */

/* DESKTOP ONLY: 90vh Fixed Height + Internal Scroll */
@media (min-width: 992px) {
  .register-main-block {
    overflow: hidden; /* Prevent body scroll on large screens */
  }

  .register-block {
    height: 95vh !important; /* Fixed height for Single Page view */
    min-height: 600px !important;
  }

  .register-content-side {
    height: 100%;
    overflow-y: auto; /* Enable internal scrolling */
    display: block !important;
    padding: 20px 35px !important;
  }

  .register-content-wrapper {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  /* Custom Scrollbar */
  .register-content-side::-webkit-scrollbar { width: 5px; }
  .register-content-side::-webkit-scrollbar-thumb { background-color: rgba(0,0,0,0.1); border-radius: 10px; }
}

/* ---------------------------------------------------------
   INPUT FIXES (Applies to all Auth Pages)
   --------------------------------------------------------- */

/* Input Layout & Z-Index Stack */
.auth-form .form-group {
  margin-bottom: 12px !important;
  position: relative;
}

/* Base Input Styling */
.auth-form .form-control {
  z-index: 1; 
  position: relative;
}

/* Icon Positioning */
.auth-form .form-control-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  pointer-events: none; /* Critical: Clicks pass through */
  font-size: 16px;
  color: #6c757d;
  margin-top: 12px; /* Visual alignment with Label */
}

/* Eye Icon - Fixed Clickability */
.auth-form .eye {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  z-index: 50; /* High Z-Index ensures clickable */
  color: #6c757d;
  font-size: 16px;
  margin-top: 12px;
}
.auth-form .eye:hover { color: #667eea; }

/* ---------------------------------------------------------
   MOBILE RESPONSIVE FIXES (Natural Flow)
   --------------------------------------------------------- */
@media (max-width: 991px) {
  .login-main-block {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto !important; /* Allow body scroll */
    padding: 20px 15px;
  }

  .register-block {
    height: auto !important; 
    min-height: auto !important;
  }

  .register-content-side {
    height: auto !important;
    overflow: visible !important;
    padding: 30px 20px !important;
  }

  .register-image-side {
    display: none; 
  }

  /* Stack columns on mobile */
  .col-half {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .row-tight {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}