/* ============================================================
   ERP Toaster — fixed top-right notifications
   ============================================================ */

.erp-toaster {
  position: fixed;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  width: min(360px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.erp-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.9rem 1rem;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-left: 5px solid #22C55E;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.04);
  position: relative;
}

.erp-toast-enter {
  animation: erpToasterIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.erp-toast-leave {
  animation: erpToasterOut 0.28s ease forwards;
}

@keyframes erpToasterIn {
  from {
    opacity: 0;
    transform: translateX(28px) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

@keyframes erpToasterOut {
  to {
    opacity: 0;
    transform: translateX(20px);
  }
}

.erp-toast-icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #DCFCE7;
  color: #16A34A;
}

.erp-toast-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}

.erp-toast-body {
  flex: 1 1 auto;
  min-width: 0;
}

.erp-toast-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.25;
  margin-bottom: 0.12rem;
  letter-spacing: -0.01em;
}

.erp-toast-text {
  margin: 0;
  font-size: 0.8125rem;
  color: #64748B;
  line-height: 1.35;
}

.erp-toast-close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: #94A3B8;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  align-self: flex-start;
  margin-top: -0.1rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.erp-toast-close:hover {
  background: #F1F5F9;
  color: #475569;
}

.erp-toast-close svg {
  width: 14px;
  height: 14px;
}

/* Variants */
.erp-toast-success {
  border-left-color: #22C55E;
}
.erp-toast-success .erp-toast-icon {
  background: #DCFCE7;
  color: #16A34A;
}

.erp-toast-error {
  border-left-color: #EF4444;
}
.erp-toast-error .erp-toast-icon {
  background: #FEE2E2;
  color: #DC2626;
}

.erp-toast-warning {
  border-left-color: #F59E0B;
}
.erp-toast-warning .erp-toast-icon {
  background: #FEF3C7;
  color: #D97706;
}

.erp-toast-info {
  border-left-color: #3B82F6;
}
.erp-toast-info .erp-toast-icon {
  background: #DBEAFE;
  color: #2563EB;
}

@media (max-width: 575.98px) {
  .erp-toaster {
    top: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    align-items: stretch;
  }
}
