/* ============================================================
   MESSAGES — toast alert system (replaces old banner messages).
   Rendered by partials/layout/messages.html + toast.html.
   ============================================================ */
.toast-container {
  position: fixed; top: calc(var(--navbar-h) + 12px); right: 16px; z-index: 120;
  display: flex; flex-direction: column; gap: var(--space-2);
  max-width: min(380px, calc(100vw - 32px));
}
.toast {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-start; gap: var(--space-3);
  background: var(--color-surface); border: 1px solid var(--color-line);
  border-left: 4px solid var(--color-info);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-2);
  padding: var(--space-3) var(--space-4);
  animation: toast-in 0.25s ease;
}
.toast-icon { margin-top: 2px; font-size: var(--text-base); color: var(--color-info-deep); }
.toast-body { font-size: var(--text-sm); color: var(--color-ink); font-weight: 500; }
.toast-close {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--color-ink-subtle); font-size: var(--text-sm); padding: 2px;
}
.toast-success { border-left-color: var(--color-success); }
.toast-success .toast-icon { color: var(--color-success-deep); }
.toast-error { border-left-color: var(--color-danger); }
.toast-error .toast-icon { color: var(--color-danger-deep); }
.toast-warning { border-left-color: var(--color-warning); }
.toast-warning .toast-icon { color: var(--color-warning-deep); }
.toast-progress {
  position: absolute; left: 0; bottom: 0; height: 3px; width: 100%;
  background: currentColor; opacity: 0.25;
  animation: toast-progress 4s linear forwards;
}
.toast-hide { opacity: 0; transform: translateX(12px); transition: all 0.25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toast-progress { from { width: 100%; } to { width: 0%; } }
@media (max-width: 560px) {
  .toast-container { right: 16px; left: 16px; max-width: none; }
}