/* Toasts + utilitários de navegação (usado em várias páginas) */

#gp-toast-host {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  right: max(20px, env(safe-area-inset-right, 0px));
  left: max(20px, env(safe-area-inset-left, 0px));
  z-index: 100000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}

#gp-toast-host .gp-toast {
  pointer-events: auto;
  max-width: min(420px, 100%);
  width: 100%;
  padding: 14px 16px 14px 18px;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: gp-toast-in 0.38s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid transparent;
  margin-left: auto;
}

@keyframes gp-toast-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.gp-toast--success {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.35);
}

.gp-toast--danger,
.gp-toast--error {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: #991b1b;
  border-color: rgba(239, 68, 68, 0.35);
}

.gp-toast--info {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: #1e40af;
  border-color: rgba(59, 130, 246, 0.35);
}

.gp-toast--warning {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.4);
}

.gp-toast__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.gp-toast--success .gp-toast__icon {
  background: #10b981;
  color: #fff;
}

.gp-toast--danger .gp-toast__icon,
.gp-toast--error .gp-toast__icon {
  background: #ef4444;
  color: #fff;
}

.gp-toast--info .gp-toast__icon {
  background: #3b82f6;
  color: #fff;
}

.gp-toast--warning .gp-toast__icon {
  background: #f59e0b;
  color: #fff;
}

.gp-toast__body {
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.gp-toast__close {
  flex-shrink: 0;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: inherit;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gp-toast__close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

body.gp-nav-open {
  overflow: hidden;
}

.gp-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.gp-nav-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
}
