/* Animações e microinterações */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton {
  border-radius: var(--radius-sm);
  background: linear-gradient(
    90deg,
    var(--bg-secondary) 25%,
    rgba(255, 255, 255, 0.65) 50%,
    var(--bg-secondary) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  min-height: 14px;
}

.view-page {
  animation: fadeInUp 0.4s ease;
}

.toast-stack {
  position: fixed;
  right: var(--space-4);
  bottom: var(--space-4);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  max-width: min(400px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: fadeInUp 0.35s ease;
}

.toast--success {
  border-color: rgba(5, 150, 105, 0.35);
  background: rgba(5, 150, 105, 0.06);
  color: var(--success);
}

.toast--error {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
  color: var(--danger);
}

.bottom-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background: var(--surface-glass);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -8px 30px rgba(15, 23, 42, 0.08);
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-light);
  text-decoration: none;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.bottom-nav a i {
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.bottom-nav a.is-active {
  color: var(--accent);
  background: var(--accent-muted);
}
