/* Non-blocking toast stack + styled confirm/prompt dialogs. */

#toast-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #d7e0ef;
  border-left: 4px solid #6b7a90;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16, 33, 60, 0.22);
  color: #13294b;
  font: 13px/1.42 Inter, "Segoe UI", Arial, sans-serif;
  opacity: 0;
  transform: translateY(12px) scale(.98);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(6px) scale(.98); }

.toast-text { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }

.toast-close {
  flex: 0 0 auto;
  margin: -3px -3px 0 0;
  padding: 2px 5px;
  border: 0;
  background: transparent;
  color: #8291a8;
  font: 400 18px/1 Inter, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}
.toast-close:hover { color: #13294b; }

.toast-success { border-left-color: #1f9d57; }
.toast-info    { border-left-color: #2f6bd8; }
.toast-warning { border-left-color: #d08300; }

@media (max-width: 640px) {
  #toast-stack { right: 12px; left: 12px; bottom: 12px; width: auto; }
}

/* ---- confirmModal / promptModal ---- */
#app-dialog.app-dialog {
  border: 0;
  border-radius: 16px;
  padding: 0;
  width: min(440px, 92vw);
  box-shadow: 0 24px 70px rgba(16, 33, 60, 0.4);
  color: #13294b;
  background: #fff;
}
#app-dialog.app-dialog::backdrop { background: rgba(21, 38, 66, 0.5); }

.app-dialog-body { margin: 0; padding: 20px 22px 18px; }
.app-dialog-head { display:flex; align-items:center; gap:9px; margin:0 0 10px; }
.app-dialog-head h3 { margin:0; color:#102f5a; font:700 17px/1.25 Inter, "Segoe UI", Arial, sans-serif; }
.app-dialog-mark { display:grid; place-items:center; width:24px; height:24px; border-radius:50%; background:#fff1f2; color:#c93646; font:800 15px/1 Inter, "Segoe UI", Arial, sans-serif; }
.app-dialog:not(.app-dialog-danger) .app-dialog-mark { background:#eaf0ff; color:#315be8; }

.app-dialog-text {
  margin: 0 0 18px;
  font: 14px/1.5 Inter, "Segoe UI", Arial, sans-serif;
  white-space: pre-line;
}

.app-dialog-input {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 16px;
  padding: 9px 11px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: #13294b;
}

.app-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.app-dialog-actions button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 15px;
  font: 700 13px Inter, "Segoe UI", Arial, sans-serif;
  cursor: pointer;
}
.app-dialog-actions .secondary { background: #fff; border-color: #cbd5e1; color: #13294b; }
.app-dialog-actions .primary { background: #315be8; color: #fff; }
.app-dialog-actions .danger { background: #d64550; color: #fff; }
.app-dialog-actions button:hover { filter: brightness(0.96); }
