.toast-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: min(430px, calc(100vw - 32px));
  pointer-events: none;
  position: fixed;
  right: 22px;
  top: 86px;
  width: 100%;
  z-index: 10000;
}

.toast {
  align-items: flex-start;
  animation: toast-arrive .32s cubic-bezier(.2,.8,.2,1) both;
  backdrop-filter: blur(16px);
  background: rgba(255,255,255,.97);
  border: 1px solid #e3e7f1;
  border-left: 4px solid #52607b;
  border-radius: 15px;
  box-shadow: 0 18px 48px rgba(12,24,58,.18), 0 3px 10px rgba(12,24,58,.07);
  color: #15203e;
  display: grid;
  gap: 12px;
  grid-template-columns: 34px 1fr 25px;
  line-height: 1.4;
  overflow: hidden;
  padding: 15px 14px 15px 15px;
  pointer-events: auto;
  position: relative;
}

.toast::after {
  animation: toast-progress 5.6s linear both;
  background: currentColor;
  bottom: 0;
  content: '';
  height: 2px;
  left: 0;
  opacity: .18;
  position: absolute;
  transform-origin: left;
  width: 100%;
}

.toast:hover::after {
  animation-play-state: paused;
}

.toast-success { border-left-color: #15936b; }
.toast-error { border-left-color: #d64a5f; }
.toast-warning { border-left-color: #db8b23; }
.toast-info { border-left-color: #6251dc; }

.toast-icon {
  align-items: center;
  background: #edf0f6;
  border-radius: 10px;
  color: #52607b;
  display: flex;
  font-size: 16px;
  font-weight: 900;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.toast-success .toast-icon { background: #e7f8f1; color: #11815e; }
.toast-error .toast-icon { background: #fff0f2; color: #c93b51; }
.toast-warning .toast-icon { background: #fff5e7; color: #bd7214; }
.toast-info .toast-icon { background: #f0edff; color: #5943c6; }

.toast-copy strong {
  color: #101a38;
  display: block;
  font-size: 13px;
  margin: 0 0 2px;
}

.toast-message {
  color: #65708a;
  font-size: 13px;
}

.toast-message a {
  color: #5d43ca;
  font-weight: 800;
}

.toast-close {
  background: transparent;
  border: 0;
  border-radius: 7px;
  color: #8992a8;
  cursor: pointer;
  font-size: 21px;
  height: 25px;
  line-height: 20px;
  padding: 0;
  width: 25px;
}

.toast-close:hover {
  background: #f0f2f7;
  color: #28344f;
}

.toast-leaving {
  animation: toast-leave .25s ease both;
}

@keyframes toast-arrive {
  from { opacity: 0; transform: translate3d(34px,-8px,0) scale(.97); }
  to { opacity: 1; transform: translate3d(0,0,0) scale(1); }
}

@keyframes toast-leave {
  to { opacity: 0; transform: translate3d(30px,0,0) scale(.97); }
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 680px) {
  .toast-stack {
    left: 14px;
    max-width: none;
    right: 14px;
    top: 72px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .toast,
  .toast::after,
  .toast-leaving { animation: none; }
}
