/* Login Page Styling */
body.login-page {
  background: var(--bg-gradient);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  position: relative;
}

body.login-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/pattern.svg');
  opacity: 0.05;
  z-index: 0;
}

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

.login-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid var(--color4);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--box-shadow-lg), 0 0 20px rgba(138, 99, 210, 0.3);
  overflow: hidden;
  transition: var(--transition-normal);
}

.login-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--box-shadow-lg), 0 0 30px rgba(138, 99, 210, 0.5);
}

.login-header {
  background: var(--color1);
  padding: 1.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.login-header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, var(--color3) 0%, transparent 70%);
  opacity: 0.2;
  animation: pulse 3s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.05); opacity: 0.3; }
  100% { transform: scale(1); opacity: 0.2; }
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: var(--text-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.login-logo i {
  font-size: 2.5rem;
  color: var(--color1);
}

.login-title {
  color: var(--text-light);
  font-weight: 700;
  margin: 0;
  font-size: 1.75rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
  color: var(--color6);
  font-size: 1rem;
  margin-top: 0.5rem;
}

.login-body {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
}

/* Fix for form icons positioning - revised to ensure visibility */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-icon {
  position: absolute;
  left: 10px;
  top: 38px; /* Position aligned with input */
  color: var(--color3);
  font-size: 1.2rem;
  z-index: 5; /* Higher z-index to ensure visibility */
  pointer-events: none;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem; /* Left padding for icon */
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition-fast);
  color: var(--text-dark);
  background-color: rgba(255, 255, 255, 0.9); /* Slightly transparent background */
  height: 45px;
  position: relative;
  z-index: 4; /* Lower than icon but higher than other elements */
}

.form-control:focus {
  border-color: var(--color3);
  box-shadow: 0 0 0 0.25rem rgba(113, 73, 198, 0.25);
  outline: none;
  background-color: white; /* Solid background when focused */
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
  position: relative;
  z-index: 6; /* Highest z-index */
}

.btn-login {
  width: 100%;
  padding: 0.75rem;
  background: var(--color3);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-normal);
}

.btn-login:hover {
  background: var(--color2);
}

.btn-login:hover::before {
  left: 100%;
  transition: 0.7s;
}

.login-footer {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.7);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.login-footer a {
  color: var(--color3);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
}

.login-footer a:hover {
  color: var(--color1);
  text-decoration: underline;
}

.alert {
  border-radius: var(--border-radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid transparent;
  background-color: white;
  box-shadow: var(--box-shadow-sm);
}

.alert-danger {
  border-left-color: var(--danger);
  background-color: rgba(220, 53, 69, 0.1);
}

.alert-danger i {
  color: var(--danger);
  margin-right: 0.5rem;
}

/* Loading animation for button */
.btn-loading {
  position: relative;
  pointer-events: none;
}

.btn-loading .spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
  margin-right: 0.5rem;
}

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

/* Floating particles */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  animation: float 15s infinite linear;
}

@keyframes float {
  0% { transform: translateY(0) rotate(0deg); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) rotate(360deg); opacity: 0; }
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .login-container {
    padding: 0.5rem;
  }
  
  .login-body {
    padding: 1.5rem;
  }
  
  .login-logo {
    width: 60px;
    height: 60px;
  }
  
  .login-title {
    font-size: 1.5rem;
  }
}