/* ── Reset & Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
@keyframes spin { to { transform: rotate(360deg); } }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  /* Rede de segurança: nenhum elemento largo (tabela sem quebra, card
     estourado, etc.) deve conseguir empurrar a página inteira pros lados —
     quem precisa rolar de lado é o componente (.table-wrap), nunca o body. */
  overflow-x: hidden;
}

/* Cor de marcação dos checkboxes nativos em todo o sistema — customizável
   em Configurações → Cores (ver --cor-checkbox em base/variables.css). */
input[type="checkbox"] { accent-color: var(--cor-checkbox); }

/* ── Barra de rolagem ─────────────────────────────────────────────────
   Sem isso, toda barra de rolagem (da página inteira ou de qualquer
   container com overflow — .table-wrap, .hdr-scroll, dropdowns, modais)
   fica no estilo branco padrão do sistema operacional, mesmo no modo
   escuro — destoando do resto da tela. Cobre Firefox (scrollbar-color/
   -width) e Chromium/Safari/Edge (::-webkit-scrollbar); usa os mesmos
   tokens de tema do resto do site, então troca sozinha ao alternar
   claro/escuro (ver :root[data-theme="dark"] em base/variables.css). */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border2) transparent;
}
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 999px; }
*::-webkit-scrollbar-thumb:hover { background: var(--text3); }
*::-webkit-scrollbar-corner { background: transparent; }

/* ── Toast ────────────────────────────────────────────────────────── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 8px; z-index: 200;
}
.toast {
  background: var(--text); color: #fff;
  padding: 11px 16px; border-radius: var(--radius-sm);
  font-size: 13px; box-shadow: 0 4px 12px rgba(0,0,0,.2);
  display: flex; align-items: center; gap: 8px;
  animation: slideIn .2s ease;
}
.toast.error { background: var(--red-mid); }
.toast.success { background: #2B6830; }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }
.toast-undo { background: #33383f; }
.toast-undo-btn {
  background: none; border: none; color: #7fc2ff; font-weight: 600;
  font-size: 13px; cursor: pointer; padding: 0; margin-left: 4px;
  text-decoration: underline; text-underline-offset: 2px;
}
.toast-undo-btn:hover { color: #a9d8ff; }

/* ── Empty ────────────────────────────────────────────────────────── */
.empty {
  text-align: center; padding: 48px 24px; color: var(--text3);
}
.empty i    { font-size: 36px; display: block; margin-bottom: 10px; }
.empty p    { font-size: 14px; }
.empty small{ font-size: 12px; display: block; margin-top: 4px; color: var(--text3); }
