/* Shared modal + toast (top-right) */
.rd-toast-host {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.rd-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  background: #1a222c;
  border: 1px solid #2d3a47;
  border-left: 3px solid #3d9cfd;
  border-radius: 8px;
  padding: 0.7rem 0.7rem 0.7rem 0.85rem;
  color: #e7eef5;
  font: 600 0.85rem/1.4 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.rd-toast-body {
  flex: 1;
  min-width: 0;
  white-space: pre-wrap;
  word-break: break-word;
}
.rd-toast-close {
  flex-shrink: 0;
  box-sizing: border-box;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 1.65rem !important;
  min-width: 1.65rem !important;
  max-width: 1.65rem !important;
  height: 1.65rem !important;
  margin: -0.1rem 0 0 0 !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 6px !important;
  background: transparent !important;
  color: #8b9aab !important;
  font: 700 1.05rem/1 "IBM Plex Sans", "Segoe UI", system-ui, sans-serif !important;
  cursor: pointer !important;
  opacity: 1 !important;
  box-shadow: none !important;
}
.rd-toast-close:hover {
  background: #243040 !important;
  color: #e7eef5 !important;
}
.rd-toast-close:focus-visible {
  outline: 2px solid #3d9cfd;
  outline-offset: 1px;
}
.rd-toast.show {
  opacity: 1;
  transform: translateX(0);
}
.rd-toast.info { border-left-color: #3d9cfd; }
.rd-toast.ok { border-left-color: #3ecf8e; }
.rd-toast.warn { border-left-color: #f0a020; }
.rd-toast.err { border-left-color: #e85d5d; }

.rd-modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 150;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.rd-modal-backdrop.open { display: flex; }
.rd-modal {
  background: #1a222c;
  border: 1px solid #2d3a47;
  border-radius: 10px;
  max-width: 420px;
  width: 100%;
  padding: 1.1rem 1.2rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  color: #e7eef5;
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}
.rd-modal h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}
.rd-modal p {
  margin: 0 0 1rem;
  color: #8b9aab;
  font-size: 0.9rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.rd-modal .rd-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.rd-modal .rd-actions button {
  font: inherit;
  border-radius: 6px;
  border: 1px solid #2d3a47;
  background: transparent;
  color: #e7eef5;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
  font-weight: 600;
  min-width: 6rem;
  margin: 0;
  width: auto;
}
.rd-modal .rd-actions button.primary {
  background: #3d9cfd;
  border-color: transparent;
  color: #041018;
}
.rd-modal .rd-actions button.warn {
  background: #f0a020;
  border-color: transparent;
  color: #1a1200;
}
.rd-modal .rd-actions button.danger {
  background: #e85d5d;
  border-color: transparent;
  color: #1a0808;
}
.rd-modal .rd-actions button.ok {
  background: #3ecf8e;
  border-color: transparent;
  color: #041210;
}
