.toast-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
  max-width: 420px;
  width: calc(100% - 2rem);
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

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

.toast-icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
}

.toast-success .toast-icon {
  background: var(--success-light);
  color: var(--success);
}

.toast-error .toast-icon {
  background: var(--error-light);
  color: var(--error);
}

.toast-info .toast-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.toast-warning .toast-icon {
  background: var(--warning-light);
  color: var(--warning);
}

.toast-message {
  flex: 1;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 0 0 var(--radius) var(--radius);
  animation: toastProgress linear forwards;
}

.toast-success .toast-progress {
  background: var(--success);
}

.toast-error .toast-progress {
  background: var(--error);
}

.toast-warning .toast-progress {
  background: var(--warning);
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 0.25rem;
  font-size: 0.875rem;
  line-height: 1;
}

.toast-close:hover {
  color: var(--text);
}

.toast-close::after {
  display: none;
}

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

@keyframes toastIn {
  from { opacity: 0; transform: translateY(-1rem) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-1rem) scale(0.95); }
}
