/* ═══════════════════════════════════════════════
   TOAST / POPUP NOTIFICĂRI — global
═══════════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 40px));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.06);
  pointer-events: all;
  animation: toastIn .35s cubic-bezier(.34,1.56,.64,1) forwards;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  min-width: 280px;
}

.toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
}

.toast.toast-error::before   { background: #ef4444; }
.toast.toast-success::before { background: #22c55e; }
.toast.toast-warning::before { background: #f59e0b; }
.toast.toast-info::before    { background: #3b82f6; }

.toast-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  margin-top: 1px;
}
.toast-error   .toast-icon { background: #fef2f2; }
.toast-success .toast-icon { background: #f0fdf4; }
.toast-warning .toast-icon { background: #fffbeb; }
.toast-info    .toast-icon { background: #eff6ff; }

.toast-body { flex: 1; min-width: 0; }
.toast-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
  line-height: 1.3;
}
.toast-error   .toast-title { color: #991b1b; }
.toast-success .toast-title { color: #166534; }
.toast-warning .toast-title { color: #92400e; }
.toast-info    .toast-title { color: #1e40af; }

.toast-msg {
  font-size: 13px;
  color: #475569;
  line-height: 1.5;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 16px;
  color: #94a3b8;
  transition: background .15s, color .15s;
  padding: 0;
  line-height: 1;
}
.toast-close:hover { background: #f1f5f9; color: #334155; }

.toast-progress {
  position: absolute;
  bottom: 0; left: 0;
  height: 3px;
  border-radius: 0 0 16px 16px;
  animation: toastProgress linear forwards;
}
.toast-error   .toast-progress { background: #ef4444; }
.toast-success .toast-progress { background: #22c55e; }
.toast-warning .toast-progress { background: #f59e0b; }
.toast-info    .toast-progress { background: #3b82f6; }

.toast.hiding {
  animation: toastOut .25s ease forwards;
}

@keyframes toastIn {
  from { opacity:0; transform: translateX(60px) scale(.92); }
  to   { opacity:1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  to { opacity:0; transform: translateX(60px) scale(.92); }
}
@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

/* Multiple erori stacked */
.toast-errors-list {
  list-style: none;
  padding: 0;
  margin: 4px 0 0;
}
.toast-errors-list li {
  font-size: 13px;
  color: #475569;
  padding: 3px 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.toast-errors-list li::before {
  content: '•';
  color: #ef4444;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

@media (max-width: 480px) {
  #toast-container {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: 100%;
  }
  @keyframes toastIn {
    from { opacity:0; transform: translateY(40px) scale(.95); }
    to   { opacity:1; transform: translateY(0) scale(1); }
  }
  @keyframes toastOut {
    to { opacity:0; transform: translateY(40px) scale(.95); }
  }
}
