/* ============================================
   Modern Login Page with Advertisement Section
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow-x: hidden;
}

/* Animated Background Elements */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  z-index: 0;
  opacity: 0.1;
}

body::before {
  background: white;
  top: -150px;
  left: -150px;
  height: 400px;
  width: 400px;
  animation: float 20s ease-in-out infinite;
}

body::after {
  background: white;
  bottom: -200px;
  right: -200px;
  height: 500px;
  width: 500px;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(30px);
  }
}

/* ============================================
   Main Login Container
   ============================================ */

.login-container {
  width: 100%;
  max-width: 1200px;
  position: relative;
  z-index: 1;
}

.login-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  min-height: 650px;
}

/* ============================================
   Left Side - Advertisement Section
   ============================================ */

.login-left {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  padding: 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}

.login-left::after {
  content: "";
  position: absolute;
  bottom: -150px;
  left: -150px;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.promo-section {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.promo-header {
  text-align: center;
  margin-bottom: 30px;
}

.promo-logo {
  max-width: 120px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 15px;
  background: white;
  padding: 10px;
}

.promo-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* Updates Carousel */
.updates-carousel {
  position: relative;
  min-height: 280px;
  margin: 30px 0;
}

.update-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(-20px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.update-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.update-icon {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin: 0 auto 20px;
  backdrop-filter: blur(10px);
}

.update-slide h3 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
  text-align: center;
}

.update-slide p {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  opacity: 0.95;
}

/* Carousel Indicators */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 20px 0;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
}

.indicator.active {
  background: white;
  width: 30px;
  border-radius: 10px;
}

/* Quick Stats */
.quick-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stat-item i {
  font-size: 24px;
  margin-bottom: 5px;
}

.stat-item strong {
  display: block;
  font-size: 20px;
  font-weight: 600;
}

.stat-item span {
  font-size: 13px;
  opacity: 0.9;
}

/* Powered by Badge */
.powered-by {
  text-align: center;
  margin-top: 20px;
}

.powered-by a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.8;
  transition: opacity 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.powered-by a:hover {
  opacity: 1;
}

.powered-by i {
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ============================================
   Right Side - Login Form
   ============================================ */

.login-right {
  padding: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f9fa;
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.form-header {
  text-align: center;
  margin-bottom: 40px;
}

.form-header h3 {
  font-size: 28px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
}

.form-header p {
  color: #7f8c8d;
  font-size: 14px;
}

/* Form Styling */
.login-form {
  width: 100%;
}

.login-form .form-group {
  margin-bottom: 25px;
}

.login-form label {
  font-weight: 500;
  color: #2c3e50;
  margin-bottom: 8px;
  display: block;
  font-size: 14px;
}

.login-form label i {
  color: #dc3545;
  margin-right: 5px;
}

.login-form .form-control {
  padding: 12px 15px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
  background: white;
}

.login-form .form-control:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
  outline: none;
}

.login-form .form-control.is-invalid {
  border-color: #dc3545;
}

/* Password Input with Toggle */
.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #7f8c8d;
  transition: color 0.3s;
}

.password-toggle:hover {
  color: #dc3545;
}

/* Form Options */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.custom-control-label {
  font-size: 14px;
  color: #2c3e50;
  user-select: none;
  cursor: pointer;
}

.custom-control-input:checked ~ .custom-control-label::before {
  background-color: #dc3545;
  border-color: #dc3545;
}

.forgot-link {
  font-size: 14px;
  color: #dc3545;
  text-decoration: none;
  transition: color 0.3s;
}

.forgot-link:hover {
  color: #c82333;
  text-decoration: underline;
}

/* Login Button */
.btn-login {
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  border: none;
  color: white;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
  background: linear-gradient(135deg, #c82333 0%, #b52130 100%);
}

.btn-login i {
  margin-right: 8px;
}

/* Form Footer */
.form-footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 30px;
  border-top: 1px solid #e0e0e0;
}

.form-footer p {
  color: #7f8c8d;
  font-size: 14px;
  margin: 0;
}

.form-footer a {
  color: #dc3545;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.form-footer a:hover {
  color: #c82333;
  text-decoration: underline;
}

/* Alerts */
.alert {
  border-radius: 8px;
  padding: 12px 15px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.alert i {
  font-size: 18px;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 992px) {
  .login-wrapper {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  
  .login-left {
    padding: 40px 30px;
    min-height: 400px;
  }
  
  .login-right {
    padding: 40px 30px;
  }
  
  .promo-title {
    font-size: 24px;
  }
  
  .update-slide h3 {
    font-size: 20px;
  }
  
  .update-slide p {
    font-size: 14px;
  }
  
  .quick-stats {
    flex-wrap: wrap;
    gap: 20px;
  }
  
  .stat-item {
    flex: 1 1 30%;
  }
}

@media (max-width: 576px) {
  body {
    padding: 10px;
  }
  
  .login-wrapper {
    border-radius: 15px;
  }
  
  .login-left {
    padding: 30px 20px;
    min-height: 350px;
  }
  
  .login-right {
    padding: 30px 20px;
  }
  
  .promo-logo {
    max-width: 100px;
  }
  
  .promo-title {
    font-size: 20px;
  }
  
  .form-header h3 {
    font-size: 24px;
  }
  
  .update-icon {
    width: 60px;
    height: 60px;
    font-size: 26px;
  }
  
  .update-slide h3 {
    font-size: 18px;
  }
  
  .update-slide p {
    font-size: 13px;
  }
  
  .quick-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .stat-item {
    flex-direction: row;
    justify-content: center;
  }
  
  .form-options {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
}

/* ============================================
   Registration Page Compatibility
   ============================================ */

.form-signup {
  font-family: 'Poppins', sans-serif;
  width: 100%;
}

.form-signup .btn {
  font-size: 14px;
  letter-spacing: .1rem;
  padding: 12px 20px;
  transition: all 0.2s;
}

.form-signup .form-control {
  padding: 12px 20px;
  height: auto;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
}

.form-signup .form-control:focus {
  border: 2px solid #dc3545;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

select.form-control {
  padding: 12px 20px;
  height: 51px !important;
}

.btn-register {
  text-align: center;
  display: block;
  color: #000000;
  font-size: 16px !important;
}

.btn-register:hover {
  color: #000000;
}

/* ============================================
   Button Styles
   ============================================ */

.btn-primary {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #c82333 !important;
  border-color: #c82333 !important;
}

.btn-block {
  display: block;
  width: 100%;
}

/* ============================================
   Custom Controls
   ============================================ */

.custom-control {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding-left: 1.5rem;
}

.custom-control-input {
  position: absolute;
  z-index: -1;
  opacity: 0;
}

.custom-control-label {
  position: relative;
  margin-bottom: 0;
  vertical-align: top;
}

.custom-control-label::before {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  pointer-events: none;
  content: "";
  background-color: #fff;
  border: 1px solid #adb5bd;
  border-radius: 0.25rem;
}

.custom-control-label::after {
  position: absolute;
  top: 0.25rem;
  left: -1.5rem;
  display: block;
  width: 1rem;
  height: 1rem;
  content: "";
  background: no-repeat 50% / 50% 50%;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::before {
  background-color: #dc3545;
  border-color: #dc3545;
}

.custom-checkbox .custom-control-input:checked ~ .custom-control-label::after {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
}

/* ============================================
   Utility Classes
   ============================================ */

.text-center {
  text-align: center;
}

.text-muted {
  color: #7f8c8d !important;
}

.d-block {
  display: block;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-0 {
  margin-bottom: 0;
}

/* ============================================
   Invalid Feedback
   ============================================ */

.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font-size: 80%;
  color: #dc3545;
}

.is-invalid ~ .invalid-feedback {
  display: block;
}