/* ===== LOGIN PAGE STYLES (SPA Overlay) ===== */

/* ===== OVERLAY WRAPPER ===== */
.login-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  display: flex;
  font-family: "Sora", sans-serif;
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.login-wrapper.login-exit {
  opacity: 0;
  transform: translateY(-30px) scale(0.98);
  pointer-events: none;
}

/* ===== LEFT PANEL ===== */
.login-left {
  flex: 0 0 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 60px;
  background: #ffffff;
  position: relative;
  overflow-y: auto;
}

.login-content {
  width: 100%;
  max-width: 440px;
}

/* Logo */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo img {
  max-width: 140px;
  height: auto;
  object-fit: contain;
  margin-bottom: 12px;
}

.login-logo h2 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0;
}

/* Header */
.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 8px;
}

.login-header p {
  font-size: 14px;
  color: #8c9196;
  font-weight: 400;
}

/* Form */
.login-form {
  width: 100%;
}

.login-form .form-group {
  position: relative;
  margin-bottom: 20px;
}

.login-form .form-group .input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #b0b5ba;
  font-size: 16px;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.login-form .form-group .input-icon svg {
  width: 18px;
  height: 18px;
  stroke: #b0b5ba;
  fill: none;
  stroke-width: 1.5;
}

.login-form .form-group input {
  width: 100%;
  padding: 16px 48px 16px 48px;
  border: 1.5px solid #e8eaed;
  border-radius: 12px;
  font-size: 14px;
  font-family: "Sora", sans-serif;
  color: #1a1a1a;
  background: #fafbfc;
  transition: all 0.3s ease;
  outline: none;
}

.login-form .form-group input::placeholder {
  color: #b0b5ba;
  font-weight: 400;
}

.login-form .form-group input:focus {
  border-color: #7fad49;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(127, 173, 73, 0.1);
}

.login-form .form-group .toggle-password {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #b0b5ba;
  transition: color 0.2s ease;
}

.login-form .form-group .toggle-password:hover {
  color: #6b7280;
}

.login-form .form-group .toggle-password svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
}

/* Error message */
.login-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 20px;
  align-items: center;
  gap: 8px;
  animation: shakeError 0.4s ease;
}

.login-error.show {
  display: flex;
}

.login-error svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke: #dc2626;
  fill: none;
  stroke-width: 2;
}

@keyframes shakeError {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* Submit Button */
.btn-signin {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: "Sora", sans-serif;
  color: #ffffff;
  background: linear-gradient(135deg, #7fad49 0%, #5a7e32 100%);
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
}

.btn-signin::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-signin:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(127, 173, 73, 0.35);
}

.btn-signin:hover::before {
  left: 100%;
}

.btn-signin:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(127, 173, 73, 0.25);
}

.btn-signin:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Loading spinner */
.btn-signin .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

.btn-signin.loading .btn-text {
  display: none;
}

.btn-signin.loading .spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.login-footer {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  text-align: center;
  padding: 0 40px;
}

.login-footer p {
  font-size: 11px;
  color: #b0b5ba;
  line-height: 1.6;
  max-width: 440px;
  margin: 0 auto 8px;
}

.login-footer .powered-by {
  font-size: 11px;
  color: #b0b5ba;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.login-footer .powered-by span {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 10px;
  font-weight: 600;
}

.login-footer .powered-by .brand-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #7fad49, #5a7e32);
  border-radius: 50%;
}

/* ===== RIGHT PANEL ===== */
.login-right {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
}

.login-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.login-right::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(127, 173, 73, 0.08) 0%,
    rgba(0, 0, 0, 0.05) 100%
  );
  pointer-events: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  .login-right {
    display: none;
  }

  .login-left {
    flex: 1;
  }
}

@media (max-width: 576px) {
  .login-left {
    padding: 24px 24px;
  }

  .login-header h1 {
    font-size: 24px;
  }

  .login-form .form-group input {
    padding: 14px 44px 14px 44px;
  }

  .btn-signin {
    padding: 14px;
  }

  .login-footer {
    position: relative;
    bottom: auto;
    margin-top: 40px;
    padding: 0;
  }
}
