/* Flowdash shared professional UX kit */
:root {
  --fd-toast-bg: rgba(12, 28, 32, 0.96);
  --fd-toast-border: rgba(31, 162, 168, 0.28);
  --fd-ok: #2ecc71;
  --fd-warn: #f0b429;
  --fd-err: #e74c3c;
  --fd-info: #5dade2;
}

.fd-toast-stack {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none;
}

.fd-toast {
  pointer-events: auto;
  background: var(--fd-toast-bg);
  border: 1px solid var(--fd-toast-border);
  color: #f3fafb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.35);
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  animation: fdToastIn .28s cubic-bezier(.2,.8,.2,1) both;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.fd-toast .dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto;
}
.fd-toast.success .dot { background: var(--fd-ok); }
.fd-toast.error .dot, .fd-toast.err .dot { background: var(--fd-err); }
.fd-toast.warning .dot, .fd-toast.warn .dot { background: var(--fd-warn); }
.fd-toast.info .dot { background: var(--fd-info); }

.fd-toast .fd-toast-icon {
  margin-top: 2px; flex: 0 0 auto; font-size: 0.95rem; line-height: 1;
}
.fd-toast.success .fd-toast-icon { color: var(--fd-ok); }
.fd-toast.error .fd-toast-icon, .fd-toast.err .fd-toast-icon { color: var(--fd-err); }
.fd-toast.warning .fd-toast-icon, .fd-toast.warn .fd-toast-icon { color: var(--fd-warn); }
.fd-toast.info .fd-toast-icon { color: var(--fd-info); }

@keyframes fdToastIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.fd-empty {
  text-align: center;
  padding: 28px 18px;
  color: #9bb5ba;
  border: 1px dashed rgba(31,162,168,0.28);
  border-radius: 14px;
  background: rgba(11,110,122,0.06);
}
.fd-empty h4 {
  margin: 0 0 6px 0;
  color: #e8f4f6;
  font-size: 1rem;
}
.fd-empty p { margin: 0; font-size: 0.88rem; line-height: 1.45; }

.fd-skel {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(31,162,168,0.12), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: fdShine 1.2s linear infinite;
  border-radius: 8px;
  min-height: 14px;
}
@keyframes fdShine {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.fd-busy-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 100000;
  display: none;
  overflow: hidden;
  background: transparent;
}
.fd-busy-bar.on { display: block; }
.fd-busy-bar::after {
  content: '';
  display: block;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, #1FA2A8, #0B6E7A);
  animation: fdBusy 1s ease-in-out infinite;
}
@keyframes fdBusy {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

.btn[aria-busy="true"], button[aria-busy="true"] {
  opacity: 0.75;
  cursor: wait;
}

@media (prefers-reduced-motion: reduce) {
  .fd-toast, .fd-skel, .fd-busy-bar::after { animation: none !important; }
}
