/* =====================================================================
   Sistema de toasts global — Sharktool
   Compatible con todas las páginas (cliente + admin).
   ===================================================================== */

#toastStack {
  position: fixed;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  align-items: center;
  pointer-events: none;
  max-width: calc(100vw - 32px);
  width: max-content;
}
.toast {
  display: flex; align-items: center; gap: 12px;
  min-width: 260px; max-width: 440px;
  padding: 13px 18px 13px 16px;
  border-radius: 14px;
  font-size: 13.5px; font-weight: 600;
  color: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid;
  box-shadow: 0 18px 50px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.04);
  pointer-events: auto;
  animation: toastIn .28s cubic-bezier(.18,.89,.43,1.18);
  font-family: 'Inter', system-ui, sans-serif;
}
.toast.out { animation: toastOut .22s ease-in forwards; }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-20px) scale(.96); }
  to   { opacity: 1; transform: translateY(0)     scale(1);  }
}
@keyframes toastOut {
  to   { opacity: 0; transform: translateY(-14px) scale(.96); }
}
.toast .ti {
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.toast.t-ok    { background: rgba(15,73,52,0.92);   border-color: rgba(16,217,156,0.45); }
.toast.t-ok    .ti { background: rgba(16,217,156,0.30); color: #6ff5c4; }
.toast.t-err   { background: rgba(85,18,32,0.92);   border-color: rgba(255,87,119,0.45); }
.toast.t-err   .ti { background: rgba(255,87,119,0.30); color: #ffc8d2; }
.toast.t-info  { background: rgba(28,42,90,0.92);   border-color: rgba(56,189,248,0.45); }
.toast.t-info  .ti { background: rgba(56,189,248,0.30); color: #bae6fd; }
.toast.t-warn  { background: rgba(74,52,8,0.92);    border-color: rgba(245,158,11,0.45); }
.toast.t-warn  .ti { background: rgba(245,158,11,0.30); color: #fde68a; }
.toast .tx { line-height: 1.4; flex: 1; min-width: 0; }
.toast .tx small {
  display: block; font-weight: 500; opacity: 0.78;
  font-size: 11.5px; margin-top: 2px;
  word-break: break-word;
}
.toast .tclose {
  margin-left: auto; flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.7);
  cursor: pointer; border: none;
  font-size: 14px; line-height: 1;
  transition: background .12s, color .12s;
}
.toast .tclose:hover { background: rgba(255,255,255,0.18); color: #fff; }
@media (max-width: 540px) {
  #toastStack { top: 14px; }
  .toast { min-width: 0; width: calc(100vw - 32px); font-size: 12.8px; }
}
