/* Global toast notifications — Office Management */
.om-toast-host {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}

.om-toast {
  position: relative;
  pointer-events: auto;
  display: grid;
  grid-template-columns: 38px 1fr 28px;
  gap: 10px;
  align-items: start;
  padding: 12px 12px 14px 10px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  transform: translateX(18px);
  opacity: 0;
  animation: om-toast-in 280ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  overflow: hidden;
}

.om-toast.is-leaving {
  animation: om-toast-out 240ms ease forwards;
}

.om-toast__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.om-toast__body {
  min-width: 0;
  padding-top: 2px;
}

.om-toast__title {
  margin: 0 0 2px;
  font-size: 0.86rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: #0f172a;
  line-height: 1.25;
}

.om-toast__msg {
  margin: 0;
  font-size: 0.84rem;
  color: #475569;
  line-height: 1.4;
  word-break: break-word;
}

.om-toast__close {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.om-toast__close:hover {
  background: #f1f5f9;
  color: #334155;
}

.om-toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  animation-name: om-toast-progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

.om-toast--success {
  border-color: #bbf7d0;
}
.om-toast--success .om-toast__icon {
  background: #dcfce7;
  color: #15803d;
}
.om-toast--success .om-toast__progress { background: #22c55e; }

.om-toast--error {
  border-color: #fecaca;
}
.om-toast--error .om-toast__icon {
  background: #fee2e2;
  color: #b91c1c;
}
.om-toast--error .om-toast__progress { background: #ef4444; }

.om-toast--warning {
  border-color: #fde68a;
}
.om-toast--warning .om-toast__icon {
  background: #fef3c7;
  color: #b45309;
}
.om-toast--warning .om-toast__progress { background: #f59e0b; }

.om-toast--info {
  border-color: #bfdbfe;
}
.om-toast--info .om-toast__icon {
  background: #dbeafe;
  color: #1d4ed8;
}
.om-toast--info .om-toast__progress { background: #3b82f6; }

@keyframes om-toast-in {
  from { opacity: 0; transform: translateX(24px) translateY(-4px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}

@keyframes om-toast-out {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(28px); }
}

@keyframes om-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 575.98px) {
  .om-toast-host {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .om-toast,
  .om-toast.is-leaving,
  .om-toast__progress {
    animation-duration: 1ms !important;
  }
}
