/* RESET MODERNO & BASE ERGONÔMICA */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0; /* Previne estouro de flex e grid items */
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  color-scheme: light dark;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: manual;
}

/* Prevenção Global e Irrestrita de Quebra Indesejada de Palavras em Elementos de Interface */
label,
.form-label,
.badge,
.badge-prio,
.badge-dot,
.btn,
.nav-item,
.nav-section-title,
.card-title,
.card-subtitle,
.kpi-label,
.kpi-value,
.kpi-meta,
.cal-filter-label,
.agenda-day-header,
.cal-card-time,
.cal-card-client-name,
.cal-selected-day-title,
.cal-mobile-weekdays,
.cal-mobile-day-num,
.cal-strip-day-name,
.cal-strip-day-num,
.filter-pill,
.filter-pill-counter,
.filter-active-tag,
.filter-summary-strip,
.tab-btn,
.view-switcher-btn,
.action-rank-circle,
.action-diag-pill,
.action-suggest-pill,
.chart-legend,
.chart-legend-item,
.perm-role-btn,
.perm-chip-toggle,
.perm-module-title,
.ficha-kpi-label,
.ficha-kpi-val,
.criteria-btn,
.notion-event-pill,
.notion-more-pill,
.kanban-column-title,
.kanban-column-count,
.kanban-column-meta,
.logo-badge,
.user-role-badge,
th,
td .badge,
td .badge-prio {
  word-break: keep-all;
  overflow-wrap: normal;
  hyphens: none;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  touch-action: manipulation;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

a {
  color: inherit;
  text-decoration: none;
  word-break: break-word;
}

table {
  border-collapse: collapse;
  width: 100%;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Utilitários Globais Anti-Vazamento */
.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.break-words {
  overflow-wrap: anywhere;
  word-break: break-word;
}
