/* ===== TOAST NOTIFICATION SYSTEM ===== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: calc(100vw - 48px);
  width: 380px;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.06);
  border-left: 4px solid #6b7280;
  font-family: inherit;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease;
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(120%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: white;
  margin-top: 2px;
}

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

.toast-title {
  margin: 0 0 2px 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
}

.toast-message {
  margin: 0;
  font-size: 0.85rem;
  color: #4b5563;
  line-height: 1.4;
  word-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.toast-close:hover {
  background: #f3f4f6;
  color: #374151;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  opacity: 0.4;
  width: 100%;
  transform-origin: left;
  animation: toast-progress-shrink var(--toast-duration, 5s) linear forwards;
}

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

/* Variant: success */
.toast.toast-success {
  border-left-color: #10b981;
  color: #10b981;
}
.toast.toast-success .toast-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

/* Variant: error */
.toast.toast-error {
  border-left-color: #ef4444;
  color: #ef4444;
}
.toast.toast-error .toast-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* Variant: warning */
.toast.toast-warning {
  border-left-color: #f59e0b;
  color: #f59e0b;
}
.toast.toast-warning .toast-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

/* Variant: info */
.toast.toast-info {
  border-left-color: #3b82f6;
  color: #3b82f6;
}
.toast.toast-info .toast-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}

/* ===== CONFIRM MODAL (replacement for confirm()) ===== */
.toast-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100000;
  padding: 1rem;
  opacity: 0;
  transition: opacity 200ms ease;
}

.toast-confirm-overlay.show {
  opacity: 1;
}

.toast-confirm {
  background: white;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  transform: translateY(20px) scale(0.95);
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.toast-confirm-overlay.show .toast-confirm {
  transform: translateY(0) scale(1);
}

.toast-confirm-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid #f3f4f6;
}

.toast-confirm-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: white;
}

.toast-confirm-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
}

.toast-confirm-body {
  padding: 18px 24px;
  color: #4b5563;
  font-size: 0.92rem;
  line-height: 1.55;
}

.toast-confirm-actions {
  padding: 14px 24px 20px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast-confirm-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
}

.toast-confirm-btn-cancel {
  background: #f3f4f6;
  color: #374151;
}

.toast-confirm-btn-cancel:hover {
  background: #e5e7eb;
}

.toast-confirm-btn-confirm {
  color: white;
  background: linear-gradient(135deg, #0d7377, #14919b);
}

.toast-confirm-btn-confirm:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.toast-confirm-btn-confirm.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-confirm.variant-danger .toast-confirm-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast-confirm.variant-warning .toast-confirm-icon {
  background: linear-gradient(135deg, #f59e0b, #d97706);
}

.toast-confirm.variant-info .toast-confirm-icon {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
