/* ============================================
   MODERN LOGIN PAGE STYLES
   Western Crop Genetics Alliance
   ============================================ */

/* Login Container */
.login-container {
  min-height: 96vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: #FFFFFF;
  padding: 20px 15px 40px;
  position: relative;
  overflow: visible;
}

/* Decorative Background Pattern */
.login-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(36, 89, 83, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(60, 72, 107, 0.3) 0%, transparent 50%);
  pointer-events: none;
}

/* Login Card */
.login-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  width: 100%;
  max-width: 480px;
  position: relative;
  z-index: 1;
}

/* Header Section */
.login-header {
  background: linear-gradient(135deg, #245953 0%, #1e4541 100%);
  padding: 35px 30px;
  text-align: center;
  color: white;
}

.login-logo {
  width: 70px;
  height: 70px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  font-size: 32px;
  color: white;
}

.login-title {
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.5px;
}

.login-subtitle {
  font-size: 14px;
  opacity: 0.95;
  margin: 0;
  line-height: 1.5;
}

/* Body Section */
.login-body {
  padding: 35px 30px;
}

/* Form Groups */
.form-group-modern {
  margin-bottom: 22px;
}

.form-label-modern {
  font-weight: 600;
  font-size: 15px;
  color: #333;
  margin-bottom: 8px;
  display: block;
}

.form-control-modern {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.form-control-modern:focus {
  border-color: #245953;
  background: white;
  box-shadow: 0 0 0 4px rgba(36, 89, 83, 0.1);
  outline: none;
}

.form-control-modern::placeholder {
  color: #aaa;
}

/* Error States */
.form-control-modern.is-invalid {
  border-color: #dc3545;
  background: #fff5f5;
}

.invalid-feedback {
  display: block;
  font-size: 13px;
  color: #dc3545;
  margin-top: 6px;
}

/* Button Styles */
.btn-login {
  width: 100%;
  padding: 16px 28px;
  background: linear-gradient(135deg, #245953 0%, #1e4541 100%);
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(36, 89, 83, 0.3);
}

.btn-login:hover {
  background: linear-gradient(135deg, #1e4541 0%, #183a38 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(36, 89, 83, 0.4);
}

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

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 30px 0;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e0e0e0;
}

.login-divider span {
  padding: 0 15px;
  color: #888;
  font-size: 14px;
}

/* Footer Links */
.login-footer {
  padding: 20px 25px 25px;
  background: #f8f9fa;
  text-align: center;
}

.login-footer-links {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.login-footer-links a {
  color: #245953;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.login-footer-links a:hover {
  color: #1e4541;
  text-decoration: underline;
}

/* Alert Styles */
.alert-custom {
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  border: none;
  font-size: 14px;
}

.alert-custom.alert-danger {
  background: #fff5f5;
  color: #c0392b;
  border-left: 4px solid #c0392b;
}

.alert-custom.alert-success {
  background: #f0fff4;
  color: #27ae60;
  border-left: 4px solid #27ae60;
}

/* Responsive Design */
@media (max-width: 576px) {
  .login-container {
    padding: 15px 10px 30px;
  }
  
  .login-card {
    max-width: 100%;
  }
  
  .login-header {
    padding: 28px 20px;
  }
  
  .login-title {
    font-size: 24px;
  }
  
  .login-subtitle {
    font-size: 13px;
  }
  
  .login-body {
    padding: 28px 20px;
  }
  
  .login-footer {
    padding: 18px 20px 22px;
  }
  
  .login-footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-card {
  animation: fadeIn 0.5s ease;
}

/* Icon styling */
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  margin-bottom: 15px;
  font-size: 24px;
}

/* Field icon */
.input-icon {
  position: relative;
}

.input-icon input[type="text"],
.input-icon input[type="password"],
.input-icon .form-control {
  padding-left: 45px !important;
}

.input-icon::before {
  content: '\f023';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #888;
  font-size: 16px;
  pointer-events: none;
  z-index: 10;
}

.input-icon-password::before {
  content: '\f084';
}
