/* Password reset feature only. It does not alter dashboard, sidebar, or page layout styles. */
#loginForm .forgot-password-link {
  display: inline-flex;
  width: auto;
  min-height: auto;
  margin-top: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  box-shadow: none;
}

#loginForm .forgot-password-link:hover {
  color: var(--accent-dark);
  background: transparent;
  transform: none;
}

.reset_password-panel .panel-heading p {
  max-width: 360px;
}

.reset_password-panel .auth-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.reset_password-panel .auth-form-actions button {
  margin: 0;
}

/* ==========================================================
   LOGIN + PASSWORD RESET FORM ALIGNMENT
   Add at the END of reset-password.css
   ========================================================== */

/* Forgot Password stays on its own row at the lower-left side
   of the Login form. */
#loginForm .forgot-password-link {
  justify-self: start;
  width: auto;
  margin: 16px 0 0;
  color: #0f766e;
}

#loginForm .forgot-password-link:hover {
  color: #115e59;
  text-decoration-thickness: 2px;
}

/* Keep password-reset action buttons visually balanced */
.reset-password-panel .auth-form-actions {
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

/* Keep status text from shifting the form layout */
#loginStatus,
#forgotPasswordStatus,
#resetPasswordStatus {
  min-height: 20px;
  margin-top: 10px;
}
/* ==========================================================
   Password reset overlap fix
   ========================================================== */

/* When forgot/reset screen is active, login panel must not show behind it */
body.auth-forgot-active #loginPanel,
body.auth-reset-active #loginPanel {
  display: none !important;
}

/* Forgot/reset panels should be centered alone */
body.auth-forgot-active #forgotPasswordPanel,
body.auth-reset-active #resetPasswordPanel {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  z-index: 50 !important;
  width: min(420px, calc(100% - 32px)) !important;
  margin: 0 !important;
  padding: 28px !important;
  transform: translate(-50%, -50%) !important;
}

/* Use the actual class name from reset_password.js: reset_password-panel */
.reset_password-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.reset_password-panel.hidden {
  display: none !important;
}

.reset_password-panel .panel-heading {
  margin-bottom: 18px;
}

.reset_password-panel .panel-heading h2 {
  font-size: 18px;
  line-height: 1.3;
}

.reset_password-panel .panel-heading p {
  max-width: 360px;
  margin-top: 6px;
  line-height: 1.5;
}

.reset_password-panel form {
  display: flex;
  flex-direction: column;
}

.reset_password-panel label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.reset_password-panel input {
  margin: 0 0 12px;
}

.reset_password-panel .auth-form-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.reset_password-panel .auth-form-actions button {
  margin: 0;
}

#forgotPasswordStatus,
#resetPasswordStatus {
  min-height: 20px;
  margin: 10px 0 0;
  text-align: center;
  font-size: 13px;
}
