.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: all;
  min-width: 320px;
  max-width: 420px;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
  animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}

.toast.removing {
  animation: toastOut 0.3s ease forwards;
}

.toast-body {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 18px 14px;
}

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.toast.success .toast-icon { background: #ecfdf5; }
.toast.error .toast-icon { background: #fef2f2; }
.toast.warning .toast-icon { background: #fffbeb; }
.toast.info .toast-icon { background: #eff6ff; }

.toast-text {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.toast.success .toast-title { color: #064e3b; }
.toast.error .toast-title { color: #7f1d1d; }
.toast.warning .toast-title { color: #78350f; }
.toast.info .toast-title { color: #1e3a5f; }

.toast-msg {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.4;
}

.toast-close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  transition: color 0.15s;
}

.toast-close:hover { color: #374151; }

.toast-progress {
  height: 3px;
  background: #f1f5f9;
}

.toast-progress-bar {
  height: 100%;
  border-radius: 0 0 0 3px;
  animation: progressShrink var(--duration) linear forwards;
}

.toast.success .toast-progress-bar { background: linear-gradient(90deg, #10b981, #34d399); }
.toast.error .toast-progress-bar { background: linear-gradient(90deg, #ef4444, #f87171); }
.toast.warning .toast-progress-bar { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.toast.info .toast-progress-bar { background: linear-gradient(90deg, #3b82f6, #60a5fa); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.9); }
}

@keyframes progressShrink {
  from { width: 100%; }
  to { width: 0%; }
}

@media (max-width: 480px) {
  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
  }
  .toast {
    min-width: auto;
    max-width: 100%;
  }
}
