/**
 * Modais globais centralizados (success / error / warning / confirm).
 * z-index acima do flash overlay e da sidebar Tabler.
 */
.app-modal-root {
  position: fixed;
  inset: 0;
  z-index: 20050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.app-modal-root.is-open {
  display: flex;
}

.app-modal-root[aria-hidden="false"] {
  display: flex;
}

.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.app-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 26rem;
  margin: auto;
  animation: app-modal-in 0.18s ease-out;
}

@keyframes app-modal-in {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(6px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.app-modal-card {
  background: var(--tblr-bg-surface, #fff);
  color: var(--tblr-body-color, #1a1d21);
  border-radius: 0.75rem;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.app-modal-card--success .app-modal-accent {
  background: #2fb344;
}

.app-modal-card--error .app-modal-accent {
  background: #d63939;
}

.app-modal-card--warning .app-modal-accent {
  background: #f59f00;
}

.app-modal-card--confirm .app-modal-accent {
  background: #066fd1;
}

.app-modal-accent {
  height: 4px;
  width: 100%;
}

.app-modal-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  padding: 1rem 1.25rem 0.25rem;
  line-height: 1.35;
}

.app-modal-body {
  padding: 0.5rem 1.25rem 1rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.app-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0 1.25rem 1.25rem;
}

.app-modal-actions .btn {
  min-width: 5.5rem;
}

body.app-modal-open {
  overflow: hidden;
}
