.toast-viewport {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  width: 100%;
  padding: 14px 14px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(10px);
  transform: translateY(-12px);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.is-closing {
  transform: translateY(-8px);
  opacity: 0;
}

.toast-icon {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.toast-content {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.toast-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.toast-message {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #475569;
}

.toast-action {
  display: inline-flex;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #4338ca;
  text-decoration: none;
}

.toast-close {
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.toast--success .toast-icon {
  background: #ecfdf3;
  color: #15803d;
}

.toast--error .toast-icon {
  background: #fef2f2;
  color: #b91c1c;
}

.toast--warning .toast-icon {
  background: #fffbeb;
  color: #b45309;
}

.toast--info .toast-icon {
  background: #eff6ff;
  color: #1d4ed8;
}

.toast--default .toast-icon {
  background: #f8fafc;
  color: #475569;
}

@media (max-width: 640px) {
  .toast-viewport {
    top: 12px;
    width: calc(100vw - 24px);
  }
}
