/* Login — minimal, aligned with public site (slate + #174545) */

.page-banner {
  display: none !important;
}

.login-section {
  min-height: 100vh;
  background: #f1f5f9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  margin: 0;
}

.login-section::before {
  display: none;
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  padding: 2.25rem 2rem;
}

.login-container::before {
  display: none;
}

.login-form-wrapper {
  position: relative;
}

.login-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.login-header h4 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.login-header h2 {
  font-size: 1.65rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
}

.login-header p {
  color: #64748b;
  margin-top: 0.5rem;
  font-size: 0.9375rem;
}

.login-form {
  max-width: 100%;
}

.login-section .form-group {
  margin-bottom: 1.25rem;
}

.login-section .form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.875rem;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > i {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  z-index: 2;
  font-size: 1rem;
  pointer-events: none;
}

.input-with-icon input {
  width: 100%;
  padding: 0.75rem 0.75rem 0.75rem 2.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9375rem;
  color: #0f172a;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  outline: none;
}

.input-with-icon input::placeholder {
  color: #94a3b8;
}

.input-with-icon input:focus {
  border-color: #174545;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 112, 235, 0.15);
}

.input-with-icon input.error {
  border-color: #dc3545;
  background: #fff5f5;
}

.input-with-icon:focus-within > i {
  color: #174545;
}

.input-with-icon:has(.toggle-password) input {
  padding-right: 2.75rem;
}

.password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.forgot-password {
  color: #174545;
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
}

.forgot-password:hover {
  color: #0f3030;
  text-decoration: underline;
}

.toggle-password {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin: 0;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  z-index: 3;
  line-height: 1;
}

.toggle-password i {
  position: static;
  left: auto;
  top: auto;
  transform: none;
  font-size: 0.95rem;
  color: inherit;
  pointer-events: none;
}

.toggle-password:hover {
  color: #0f172a;
}

.form-options {
  margin-bottom: 1.25rem;
}

.remember-me {
  display: flex;
  align-items: center;
  color: #475569;
  font-size: 0.875rem;
  cursor: pointer;
}

.remember-me input[type="checkbox"] {
  margin-right: 0.5rem;
  width: 1rem;
  height: 1rem;
  accent-color: #174545;
}

.login-button {
  width: 100%;
  padding: 0.75rem 1.25rem;
  background: #174545;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  margin-bottom: 1.25rem;
}

.login-button:hover {
  background: #0f3030;
  box-shadow: 0 4px 14px rgba(0, 112, 235, 0.35);
}

.login-button:active {
  transform: translateY(1px);
}

.login-form p {
  text-align: center;
  color: #64748b;
  font-size: 0.875rem;
  margin: 0;
}

.login-form p a {
  color: #174545;
  text-decoration: none;
  font-weight: 600;
}

.login-form p a:hover {
  text-decoration: underline;
  color: #0f3030;
}

.login-section .alert {
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.login-section .btn-close {
  filter: none;
}

.error-message {
  color: #b91c1c;
  font-size: 0.8125rem;
  margin-top: 0.35rem;
  display: block;
}

.reset-password-hint {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: #64748b;
}

.login-section .input-with-icon input.error {
  border-color: #dc3545;
  background: #fff5f5;
}

.login-section .modal-content {
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.login-section .modal-header {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
}

.login-section .modal-title {
  font-weight: 700;
  font-size: 1.05rem;
}

.login-section .modal-footer .btn-primary {
  background: #174545;
  border-color: #174545;
}

.login-section .modal-footer .btn-primary:hover {
  background: #0f3030;
  border-color: #0f3030;
}

/* Forgot password modal (rendered outside .login-section) */
.login-forgot-modal .modal-content {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.login-forgot-modal .modal-header {
  padding: 1.1rem 1.35rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.login-forgot-modal .modal-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
}

.login-forgot-modal .btn-close {
  filter: none;
}

.login-forgot-modal .modal-body {
  padding: 1.35rem 1.35rem 1.5rem;
}

.login-forgot-modal__intro {
  margin: 0 0 1.15rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.login-forgot-modal .form-group {
  margin-bottom: 1rem;
}

.login-forgot-modal .form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: #334155;
  font-size: 0.875rem;
}

.login-forgot-modal__actions {
  display: flex;
  flex-direction: column-reverse;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.login-forgot-modal__submit {
  width: 100%;
  margin-bottom: 0;
}

.login-forgot-modal__cancel {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.login-forgot-modal__cancel:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #334155;
}

.login-forgot-modal #forgot_password_message {
  margin-top: 0.85rem;
}

.login-forgot-modal #forgot_password_message.alert {
  margin-bottom: 0;
  font-size: 0.875rem;
}

@media (min-width: 480px) {
  .login-forgot-modal__actions {
    flex-direction: row;
    align-items: stretch;
  }

  .login-forgot-modal__cancel,
  .login-forgot-modal__submit {
    flex: 1;
  }
}

.input-with-icon.focused {
  transform: none;
}

.input-with-icon.has-value input {
  border-color: #cbd5e1;
}

.login-button.loading {
  opacity: 0.75;
  cursor: not-allowed;
}

.login-button.loading::after {
  content: "";
  display: inline-block;
  width: 1rem;
  height: 1rem;
  margin-left: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.8s linear infinite;
  vertical-align: middle;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

body {
  padding-top: 0 !important;
}

.main-header,
.top-menu {
  display: none !important;
}

@media (max-width: 480px) {
  .login-container {
    padding: 1.5rem 1.25rem;
  }

  .login-header h2 {
    font-size: 1.4rem;
  }
}
