/* Login Page Specific Styles */
.login-body {
  background: radial-gradient(circle at top right, #142050 0%, #0C1A3E 60%, #050B1B 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 24px;
  padding: 40px 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInDown 0.6s ease-out;
}

.login-logo {
  width: 70px;
  height: 70px;
  background: #FFFFFF;
  box-shadow: 0px 0px 0px 4px rgba(109, 196, 36, 0.4), 0px 10px 25px rgba(0, 0, 0, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform var(--transition-normal);
}

.login-logo:hover {
  transform: scale(1.05) rotate(3deg);
}

.login-logo img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-title {
  font-size: 20px;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: #7A90B8;
}

.login-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.input-label {
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  stroke: #7A90B8;
  fill: none;
  stroke-width: 1.5;
}

.login-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px 42px 12px 14px; /* extra padding on right for icon in RTL */
  color: #FFFFFF;
  font-size: 13px;
  outline: none;
  transition: all var(--transition-fast);
  font-family: var(--font-main);
}

.login-input:focus {
  border-color: var(--brand-green-light);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(109, 196, 36, 0.25);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #7A90B8;
  margin-top: -5px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.remember-me input {
  accent-color: var(--brand-green-light);
}

.forgot-password {
  color: var(--brand-green-light);
  text-decoration: none;
  font-weight: 600;
  transition: opacity var(--transition-fast);
}

.forgot-password:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.btn-login {
  width: 100%;
  background: var(--brand-green-gradient);
  border: none;
  border-radius: 12px;
  padding: 14px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0px 4px 15px rgba(109, 196, 36, 0.35);
  transition: all var(--transition-fast);
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  box-shadow: 0px 6px 20px rgba(109, 196, 36, 0.55);
  transform: translateY(-1px);
}

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

/* Spinner Loader */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: spin 0.8s linear infinite;
  display: none;
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Error Alert */
.error-alert {
  width: 100%;
  background: rgba(224, 82, 82, 0.15);
  border: 1px solid rgba(224, 82, 82, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: #FFA5A5;
  font-size: 12px;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 8px;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* Back to Home Button */
.back-to-home-btn {
  position: absolute;
  top: 20px;
  right: 20px; /* Arabic layout - top right is perfect, or top-left depending on preference. Let's make it top-right in RTL or just floating */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 12px;
  color: #FFFFFF;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
  z-index: 1000;
  direction: rtl;
}

.back-to-home-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateX(-3px);
}

.back-to-home-btn svg {
  transition: transform 0.2s;
}

.back-to-home-btn:hover svg {
  transform: translateX(3px);
}

/* OTP Code Styling */
.otp-inputs-container {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  direction: ltr; /* Digits left-to-right */
  margin: 15px 0;
}

.otp-field {
  width: 50px;
  height: 52px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #FFFFFF;
  outline: none;
  transition: all var(--transition-fast);
  box-sizing: border-box;
}

.otp-field:focus {
  border-color: var(--brand-green-light);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(109, 196, 36, 0.25);
}

/* State Panels Handling */
.login-panel {
  display: none;
  width: 100%;
  flex-direction: column;
}

.login-panel.active {
  display: flex;
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.back-link-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

.back-to-login-link {
  font-size: 13px;
  color: #7A90B8;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.back-to-login-link:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

