/* Password Eye Toggle */
.password-wrapper {
  position: relative;
}
.password-wrapper .form-control {
  padding-right: 3rem;
}
.eye-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0;
  user-select: none;
}

/* Loading Overlay */
#loading-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}


#loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-logo {
  max-width: 250px;
  margin-bottom: 2rem;
  animation: pulse 2s infinite ease-in-out;
}

.loading-bar-container {
  width: 300px;
  height: 6px;
  background-color: var(--border-color);
  border-radius: 999px;
  overflow: hidden;
}

.loading-bar {
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 999px;
  transform-origin: left;
  animation: loading-fill 1.5s infinite ease-in-out;
}

/* Login Split Screen */
.login-wrapper {
  display: flex;
  min-height: 100vh;
  background-color: var(--bg-color);
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  padding: 3rem;
  position: relative;
  overflow: hidden;
}

.login-left-bg {
  position: absolute;
  top: -10%; right: -10%;
  width: 120%; height: 120%;
  object-fit: cover;
  opacity: 0.1;
  pointer-events: none;
}

.login-illustration {
  max-width: 80%;
  max-height: 60vh;
  z-index: 1;
}

.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  padding: 2rem;
}

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

.login-form-logo {
  max-width: 200px;
  margin-bottom: 2rem;
  display: block;
}

.login-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.login-subtitle {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

/* Animations */
@keyframes loading-fill {
  0% { transform: scaleX(0); }
  50% { transform: scaleX(0.5); }
  100% { transform: scaleX(1); }
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Responsiveness */
@media (max-width: 768px) {
  .login-left {
    display: none;
  }
}
