/* Project-wide modal alert / confirm — use AppDialog, never window.alert/confirm */
.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: grid;
  place-items: center;
  padding: 16px;
}
.app-dialog[hidden] {
  display: none !important;
}
.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, .55);
  backdrop-filter: blur(3px);
}
.app-dialog-panel {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(28, 25, 23, .28);
  padding: 24px 22px 18px;
  text-align: center;
  animation: appDialogIn .18s ease-out;
}
@keyframes appDialogIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.app-dialog-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: #2563eb;
  font-size: 22px;
}
.app-dialog.is-danger .app-dialog-icon {
  background: #fef2f2;
  color: #dc2626;
}
.app-dialog.is-confirm:not(.is-danger) .app-dialog-icon {
  background: #fff7ed;
  color: #c2410c;
}
.app-dialog-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 800;
  color: #1c1917;
  line-height: 1.25;
}
.app-dialog-message {
  margin: 0 0 20px;
  font-size: 14px;
  line-height: 1.5;
  color: #57534e;
  white-space: pre-wrap;
  word-break: break-word;
}
.app-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.app-dialog-btn {
  min-height: 40px;
  min-width: 96px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #e7e5e4;
  background: #fff;
  color: #44403c;
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}
.app-dialog-btn-ok {
  background: #1c1917;
  border-color: #1c1917;
  color: #fff;
}
.app-dialog-btn-ok.is-danger,
.app-dialog.is-danger .app-dialog-btn-ok {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
.app-dialog-btn:hover {
  filter: brightness(1.05);
}
.app-dialog-btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}
body.app-dialog-open {
  overflow: hidden;
}
@media (max-width: 480px) {
  .app-dialog-actions {
    flex-direction: column-reverse;
  }
  .app-dialog-btn {
    width: 100%;
  }
}
