/* Shared modal treatment: softened backdrop, blurred page context, and a calm entrance. */
.modal-backdrop.show {
  background-color: rgba(38, 52, 68, 0.72);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  opacity: 1;
}

.modal.modal-modern .modal-dialog {
  opacity: 0;
  transform: translateY(18px) scale(0.97);
  transition: opacity 180ms ease, transform 220ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.modal.modal-modern.show .modal-dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal.modal-modern .modal-content {
  background: #ffffff;
  border: 0;
  border-radius: 24px;
  box-shadow: 0 24px 70px rgba(26, 43, 60, 0.24);
  overflow: hidden;
}

/* Keep modal actions reachable when a form grows beyond the viewport. */
.modal .modal-dialog {
  max-height: calc(100vh - 2rem);
}

.modal .modal-content {
  max-height: calc(100vh - 2rem);
}

.modal .modal-header,
.modal .modal-footer {
  flex-shrink: 0;
}

.modal .modal-body {
  min-height: 0;
  overflow-y: auto;
}

.modal.modal-modern .modal-header {
  align-items: flex-start;
  border-bottom-color: #edf1f5;
  display: flex;
  justify-content: space-between;
  padding: 24px 28px 18px;
}

.modal.modal-modern .modal-title {
  color: #1a2b3c;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.modal.modal-modern .modal-body {
  padding: 24px 28px;
}

.modal.modal-modern .modal-footer {
  background: #f8fafc;
  border-top-color: #edf1f5;
  padding: 18px 28px 22px;
}

.modal.modal-modern .btn-close {
  align-items: center;
  background-color: #f2f6fa;
  background-size: 10px;
  border-radius: 10px;
  display: inline-flex;
  height: 42px;
  justify-content: center;
  margin: 0;
  opacity: 1;
  padding: 0;
  width: 42px;
}

.modal.modal-modern .modal-header > .btn-close {
  flex: 0 0 auto;
  margin-left: 24px;
}

.modal.modal-modern .btn-close:hover,
.modal.modal-modern .btn-close:focus-visible {
  background-color: #e7eef5;
  opacity: 1;
}

.logout-confirm-modal .modal-dialog {
  max-width: 540px;
}

.logout-confirm-modal .modal-body {
  color: #344054;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 112px;
}

.logout-confirm-modal .modal-footer {
  gap: 10px;
}

.logout-confirm-modal .modal-footer .btn {
  min-height: 44px;
  padding-left: 20px;
  padding-right: 20px;
}

.logout-confirm-action {
  background: #3caf9f;
  border-color: #3caf9f;
  color: #ffffff;
  font-weight: 700;
}

.logout-confirm-action:hover,
.logout-confirm-action:focus-visible,
.logout-confirm-action:active {
  background: #32998b;
  border-color: #32998b;
  color: #ffffff;
}

.logout-confirm-action:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(60, 175, 159, 0.24);
}

@media (max-width: 575.98px) {
  .modal.modal-modern .modal-dialog {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }

  .modal.modal-modern .modal-content {
    border-radius: 18px;
    max-height: calc(100vh - 32px);
  }

  .modal.modal-modern .modal-header,
  .modal.modal-modern .modal-body,
  .modal.modal-modern .modal-footer {
    padding-left: 20px;
    padding-right: 20px;
  }
}
